From 0cc9bc7740243a2c85411040d3b6530bead37130 Mon Sep 17 00:00:00 2001 From: Erik Moeller Date: Wed, 14 Aug 2019 13:26:02 -0700 Subject: [PATCH] Add .upper class and use it for text transformation to minimize i18n churn Towards #1587 --- securedrop/journalist_templates/_confirmation_modal.html | 4 ++-- securedrop/journalist_templates/col.html | 2 +- securedrop/journalist_templates/edit_account.html | 2 +- securedrop/journalist_templates/index.html | 2 +- securedrop/sass/_base.sass | 3 +++ securedrop/sass/modules/_upper.sass | 3 +++ 6 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 securedrop/sass/modules/_upper.sass diff --git a/securedrop/journalist_templates/_confirmation_modal.html b/securedrop/journalist_templates/_confirmation_modal.html index ad2d52d688..31a7e91584 100644 --- a/securedrop/journalist_templates/_confirmation_modal.html +++ b/securedrop/journalist_templates/_confirmation_modal.html @@ -4,7 +4,7 @@ X

{{ modal_data.modal_header }}

{{ modal_data.modal_body }}

- {{ gettext('CANCEL') }} - + {{ gettext('Cancel') }} + diff --git a/securedrop/journalist_templates/col.html b/securedrop/journalist_templates/col.html index f054cad3be..84eae009f3 100644 --- a/securedrop/journalist_templates/col.html +++ b/securedrop/journalist_templates/col.html @@ -132,7 +132,7 @@

{{ gettext('Reply') }}

"cancel_id": "cancel-collection-deletions", "submit_id": "delete-collection-button", "submit_btn_type": "danger", - "submit_btn_text": gettext('DELETE') + "submit_btn_text": gettext('Delete') } %} {% include '_confirmation_modal.html' %} diff --git a/securedrop/journalist_templates/edit_account.html b/securedrop/journalist_templates/edit_account.html index 2670d21275..ae042a8f56 100644 --- a/securedrop/journalist_templates/edit_account.html +++ b/securedrop/journalist_templates/edit_account.html @@ -72,7 +72,7 @@

{{ gettext('Reset Password') }}


{{ password }}

- +
diff --git a/securedrop/journalist_templates/index.html b/securedrop/journalist_templates/index.html index d3edace27f..8b4f123cac 100644 --- a/securedrop/journalist_templates/index.html +++ b/securedrop/journalist_templates/index.html @@ -48,7 +48,7 @@

{{ gettext('Sources') }}

"cancel_id": "cancel-collections-deletions", "submit_id": "delete-collections", "submit_btn_type": "danger", - "submit_btn_text": gettext('DELETE') + "submit_btn_text": gettext('Delete') } %} {% include '_confirmation_modal.html' %} diff --git a/securedrop/sass/_base.sass b/securedrop/sass/_base.sass index b1a1e8e5eb..7b77c84e20 100644 --- a/securedrop/sass/_base.sass +++ b/securedrop/sass/_base.sass @@ -94,6 +94,8 @@ @import "modules/footer" // Form validation error - text to help users correct errors @import "modules/form-validation-error" +// Text transformation class to minimize i18n churn for capitalization changes +@import "modules/upper" =base_rules // LIBRARIES @@ -147,3 +149,4 @@ +regenerate-codename-button +footer +form-validation-error + +upper diff --git a/securedrop/sass/modules/_upper.sass b/securedrop/sass/modules/_upper.sass new file mode 100644 index 0000000000..ed9d4544e5 --- /dev/null +++ b/securedrop/sass/modules/_upper.sass @@ -0,0 +1,3 @@ +=upper + .upper + text-transform: uppercase