From: Coleman Watts Date: Fri, 10 Apr 2020 01:47:43 +0000 (-0400) Subject: Improve AngularJS performance with one-time binding for static strings X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=f9c5f498f5a335b76ec378cf5297393ec4c176e2;p=civicrm-core.git Improve AngularJS performance with one-time binding for static strings Use one-time binding for all static strings being passed through ts(). This prevents unnecessary $watch expressions, making the digest loop faster. See https://docs.angularjs.org/guide/expression#one-time-binding --- diff --git a/ang/api4Explorer/Chain.html b/ang/api4Explorer/Chain.html index 257efdeccf..e46bdfbdcb 100644 --- a/ang/api4Explorer/Chain.html +++ b/ang/api4Explorer/Chain.html @@ -1,4 +1,4 @@ - - + + diff --git a/ang/api4Explorer/Clause.html b/ang/api4Explorer/Clause.html index 3fc5cababd..6ccdff2bcd 100644 --- a/ang/api4Explorer/Clause.html +++ b/ang/api4Explorer/Clause.html @@ -1,12 +1,12 @@ {{ data.label || data.op + ' group' }} *
-
-
+
{{ data.type }} {{ data.op }} diff --git a/ang/api4Explorer/Explorer.html b/ang/api4Explorer/Explorer.html index e16f59a93a..047e2d094b 100644 --- a/ang/api4Explorer/Explorer.html +++ b/ang/api4Explorer/Explorer.html @@ -2,16 +2,16 @@

- {{ ts('CiviCRM APIv4') }}{{ entity ? (' (' + entity + '::' + action + ')') : '' }} + {{:: ts('CiviCRM APIv4') }}{{ entity ? (' (' + entity + '::' + action + ')') : '' }}

- {{ ts('Bootstrap theme not found.') }} + {{:: ts('Bootstrap theme not found.') }}

-

{{ ts('This screen may not work correctly without a bootstrap-based theme such as Shoreditch installed.') }}

+

{{:: ts('This screen may not work correctly without a bootstrap-based theme such as Shoreditch installed.') }}

@@ -24,9 +24,9 @@ - - - + + +
@@ -194,13 +194,13 @@ - {{ ts('Result') }} + {{:: ts('Result') }}
  • - {{ ts('Debug') }} + {{:: ts('Debug') }}
  • @@ -211,10 +211,10 @@
    
                 

    - {{ ts('To view debugging output, enable the debug param before executing.') }} + {{:: ts('To view debugging output, enable the debug param before executing.') }}

    - {{ ts('Enable backtrace in system settings to see error backtraces.') }} + {{:: ts('Enable backtrace in system settings to see error backtraces.') }}

    diff --git a/ang/api4Explorer/SaveSearch.html b/ang/api4Explorer/SaveSearch.html index 72ffecfeaf..a59d01de9c 100644 --- a/ang/api4Explorer/SaveSearch.html +++ b/ang/api4Explorer/SaveSearch.html @@ -1,12 +1,12 @@
    - +
    - + - +
    - +
    - - + +
    diff --git a/ang/crmAttachment/attachments.html b/ang/crmAttachment/attachments.html index 1646ad546c..23ff627282 100644 --- a/ang/crmAttachment/attachments.html +++ b/ang/crmAttachment/attachments.html @@ -7,13 +7,13 @@ {{file.name}} - + @@ -23,11 +23,11 @@ {{item.file.name}} - + - + @@ -38,10 +38,10 @@ e.g. http://www.quirksmode.org/dom/inputfile.html -->
    - {{ts('Add file:')}}
    + {{:: ts('Add file:') }}
    - {{ts('Alternatively, you may add new files using drag/drop.')}} + {{:: ts('Alternatively, you may add new files using drag/drop.') }} {{ts('Each file must be less than %1M in size.', {1: max_size})}} diff --git a/ang/crmCaseType/activityTypesTable.html b/ang/crmCaseType/activityTypesTable.html index 0b39092e0c..3563f0318f 100644 --- a/ang/crmCaseType/activityTypesTable.html +++ b/ang/crmCaseType/activityTypesTable.html @@ -6,8 +6,8 @@ Required vars: caseType - {{ts('Activity Type')}} - {{ts('Max Instances')}} + {{:: ts('Activity Type') }} + {{:: ts('Max Instances') }} @@ -25,7 +25,7 @@ Required vars: caseType - + @@ -38,7 +38,7 @@ Required vars: caseType crm-options="activityTypeOptions" crm-var="newActivity" crm-on-add="addActivityType(newActivity)" - placeholder="{{ts('Add activity type')}}" + placeholder="{{:: ts('Add activity type') }}" > diff --git a/ang/crmCaseType/caseTypeDetails.html b/ang/crmCaseType/caseTypeDetails.html index 2bc30182ea..1c4e612c0d 100644 --- a/ang/crmCaseType/caseTypeDetails.html +++ b/ang/crmCaseType/caseTypeDetails.html @@ -29,10 +29,10 @@ The original form used table layout; don't know if we have an alternative, CSS-b
    - {{ts('WARNING: The case type name includes deprecated characters.')}} + {{:: ts('WARNING: The case type name includes deprecated characters.') }}
    - {{ts('WARNING: If any external files or programs reference the old "Name", then they must be updated manually.')}} + {{:: ts('WARNING: If any external files or programs reference the old "Name", then they must be updated manually.') }}
    @@ -42,7 +42,7 @@ The original form used table layout; don't know if we have an alternative, CSS-b
    - {{ ts('Activity assignment settings') }} + {{:: ts('Activity assignment settings') }}
    {{caseType.title || ts('New Case Type')}}
    - {{ts('Use this screen to define or update the Case Roles, Activity Types, and Timelines for a case type.')}} {{ts('Learn more...')}} + {{:: ts('Use this screen to define or update the Case Roles, Activity Types, and Timelines for a case type.') }} {{:: ts('Learn more...') }}
    @@ -15,16 +15,16 @@ Required vars: caseType
    @@ -53,10 +53,10 @@ Required vars: caseType
    diff --git a/ang/crmCaseType/list.html b/ang/crmCaseType/list.html index 4ba06c96fe..ed3f7bd359 100644 --- a/ang/crmCaseType/list.html +++ b/ang/crmCaseType/list.html @@ -2,10 +2,10 @@ Controller: CaseTypeListsCtrl Required vars: caseTypes --> -

    {{ts('Case Types')}}

    +

    {{:: ts('Case Types') }}

    - {{ts('A Case Type describes a group of related tasks, interactions, or processes.')}} + {{:: ts('A Case Type describes a group of related tasks, interactions, or processes.') }}
    @@ -13,10 +13,10 @@ Required vars: caseTypes - - - - + + + + @@ -33,36 +33,36 @@ Required vars: caseTypes
    {{ts('Title')}}{{ts('Name')}}{{ts('Description')}}{{ts('Enabled?')}}{{:: ts('Title') }}{{:: ts('Name') }}{{:: ts('Description') }}{{:: ts('Enabled?') }}
    - {{ts('Edit')}} + {{:: ts('Edit') }} - {{ts('more')}} + {{:: ts('more') }} @@ -74,6 +74,6 @@ Required vars: caseTypes
    diff --git a/ang/crmCaseType/rolesTable.html b/ang/crmCaseType/rolesTable.html index ed8983db0c..ce8765a62f 100644 --- a/ang/crmCaseType/rolesTable.html +++ b/ang/crmCaseType/rolesTable.html @@ -5,10 +5,10 @@ Required vars: caseType - - - - + + + + @@ -23,7 +23,7 @@ Required vars: caseType ng-model="relType.groups" /> @@ -35,7 +35,7 @@ Required vars: caseType crm-options="relationshipTypeOptions" crm-var="newRole" crm-on-add="addRole(caseType.definition.caseRoles, newRole)" - placeholder="{{ts('Add role')}}" + placeholder="{{:: ts('Add role') }}" > diff --git a/ang/crmCaseType/sequenceTable.html b/ang/crmCaseType/sequenceTable.html index e07a11bde8..ef62fb06b5 100644 --- a/ang/crmCaseType/sequenceTable.html +++ b/ang/crmCaseType/sequenceTable.html @@ -6,7 +6,7 @@ Required vars: activitySet - + @@ -21,7 +21,7 @@ Required vars: activitySet {{ activity.name }} @@ -33,7 +33,7 @@ Required vars: activitySet crm-options="activityTypeOptions" crm-var="newActivity" crm-on-add="addActivity(activitySet, newActivity)" - placeholder="{{ts('Add activity')}}" + placeholder="{{:: ts('Add activity') }}" > diff --git a/ang/crmCaseType/statusTable.html b/ang/crmCaseType/statusTable.html index 890989a3b0..e7dfd9eb21 100644 --- a/ang/crmCaseType/statusTable.html +++ b/ang/crmCaseType/statusTable.html @@ -6,8 +6,8 @@ Required vars: selectedStatuses - - + + @@ -28,7 +28,7 @@ Required vars: selectedStatuses - + diff --git a/ang/crmCaseType/timelineTable.html b/ang/crmCaseType/timelineTable.html index fd24b03bfb..76113a1208 100644 --- a/ang/crmCaseType/timelineTable.html +++ b/ang/crmCaseType/timelineTable.html @@ -6,12 +6,12 @@ Required vars: activitySet - - - - - - + + + + + + @@ -96,7 +96,7 @@ Required vars: activitySet crm-icon="fa-trash" ng-show="isActivityRemovable(activitySet, activity)" ng-click="removeItem(activitySet.activityTypes, activity)" - title="{{ts('Remove')}}"> + title="{{:: ts('Remove') }}"> @@ -109,7 +109,7 @@ Required vars: activitySet crm-options="activityTypeOptions" crm-var="newActivity" crm-on-add="addActivity(activitySet, newActivity)" - placeholder="{{ts('Add activity')}}" + placeholder="{{:: ts('Add activity') }}" > diff --git a/ang/crmCxn/AdvTable.html b/ang/crmCxn/AdvTable.html index 7080fdd7a9..905cec4397 100644 --- a/ang/crmCxn/AdvTable.html +++ b/ang/crmCxn/AdvTable.html @@ -1,8 +1,8 @@
    {{ts('Display Label')}}{{ts('Assign to Creator')}}{{ts('Is Manager')}}{{ts('Restrict to Groups')}}{{:: ts('Display Label') }}{{:: ts('Assign to Creator') }}{{:: ts('Is Manager') }}{{:: ts('Restrict to Groups') }}
    - +
    {{ts('Activity')}}{{:: ts('Activity') }}
    - +
    {{ts('Name')}}{{ts('Class')}}{{:: ts('Name') }}{{:: ts('Class') }}
    {{ ts('New Status') }} {{:: ts('New Status') }}
    {{ts('Activity')}}{{ts('Status')}}{{ts('Reference')}}{{ts('Offset')}}{{ts('Select')}}{{ts('Default assignee')}}{{:: ts('Activity') }}{{:: ts('Status') }}{{:: ts('Reference') }}{{:: ts('Offset') }}{{:: ts('Select') }}{{:: ts('Default assignee') }}
    - - + + diff --git a/ang/crmCxn/ConfirmReconnectCtrl.html b/ang/crmCxn/ConfirmReconnectCtrl.html index 0b60bd8792..b415e409e2 100644 --- a/ang/crmCxn/ConfirmReconnectCtrl.html +++ b/ang/crmCxn/ConfirmReconnectCtrl.html @@ -1,13 +1,13 @@

    {{ts('Are you sure you want to reconnect \"%1\"?', {1: appMeta.title})}}

    -

    {{ts('Reconnecting will change the connection details (such as callback URLs and permissions). This can be useful in a few cases, such as:')}}

    +

    {{:: ts('Reconnecting will change the connection details (such as callback URLs and permissions). This can be useful in a few cases, such as:') }}

      -
    • {{ts('After your site has migrated to a new URL.')}}
    • -
    • {{ts('After the application has migrated to a new URL.')}}
    • -
    • {{ts('After the application has changed permission requirements.')}}
    • -
    • {{ts('After the application has a major failure or reset.')}}
    • +
    • {{:: ts('After your site has migrated to a new URL.') }}
    • +
    • {{:: ts('After the application has migrated to a new URL.') }}
    • +
    • {{:: ts('After the application has changed permission requirements.') }}
    • +
    • {{:: ts('After the application has a major failure or reset.') }}
    diff --git a/ang/crmCxn/Connectivity.html b/ang/crmCxn/Connectivity.html index e8a14d8aaa..161d27262c 100644 --- a/ang/crmCxn/Connectivity.html +++ b/ang/crmCxn/Connectivity.html @@ -1,4 +1,4 @@ -

    {{ts('There was a problem verifying that this site is available on the public Internet.')}}

    -

    {{ts('See also:')}} - {{ts('Firewalls and Proxies')}} -

    \ No newline at end of file +

    {{:: ts('There was a problem verifying that this site is available on the public Internet.') }}

    +

    {{:: ts('See also:') }} + {{:: ts('Firewalls and Proxies') }} +

    diff --git a/ang/crmCxn/ManageCtrl.html b/ang/crmCxn/ManageCtrl.html index 891942e69b..78509a0601 100644 --- a/ang/crmCxn/ManageCtrl.html +++ b/ang/crmCxn/ManageCtrl.html @@ -10,18 +10,18 @@ -->
    -

    {{ts('Connections provide a simplified way to link your CiviCRM installation to an external service.')}}

    +

    {{:: ts('Connections provide a simplified way to link your CiviCRM installation to an external service.') }}

    -

    {{ts('Existing Connections')}}

    +

    {{:: ts('Existing Connections') }}

    {{ts('Property')}}{{ts('Value')}}{{:: ts('Property') }}{{:: ts('Value') }}
    - - - + + + @@ -36,22 +36,22 @@
    {{ts('Title')}} {{ts('Description')}} {{ts('Status')}}{{:: ts('Title') }} {{:: ts('Description') }} {{:: ts('Status') }}
    {{cxn.is_active=="1" ? ts('Enabled') : ts('Disabled')}} - {{ts('Settings')}} - {{ts('more')}} + {{:: ts('Settings') }} + {{:: ts('more') }} @@ -85,12 +85,12 @@
    -

    {{ts('New Connections')}}

    +

    {{:: ts('New Connections') }}

    - - + + @@ -105,7 +105,7 @@ {{ts('Connect')}} + >{{:: ts('Connect') }} @@ -116,5 +116,5 @@
    - {{ts('No available applications')}} + {{:: ts('No available applications') }}
    diff --git a/ang/crmCxn/PermTable.html b/ang/crmCxn/PermTable.html index d2a1eabfed..4d2d0d17af 100644 --- a/ang/crmCxn/PermTable.html +++ b/ang/crmCxn/PermTable.html @@ -1,10 +1,10 @@
    {{ts('Title')}}{{ts('Description')}}{{:: ts('Title') }}{{:: ts('Description') }}
    - - - - + + + + @@ -12,13 +12,13 @@ ng-class-even="'even-row even'" ng-class-odd="'odd-row odd'"> diff --git a/ang/crmExample/example.html b/ang/crmExample/example.html index 5393e7c1a5..458d4f85b4 100644 --- a/ang/crmExample/example.html +++ b/ang/crmExample/example.html @@ -21,11 +21,11 @@
    - +
    - +
    diff --git a/ang/crmMailing/BlockPreview.html b/ang/crmMailing/BlockPreview.html index 6315466e83..8137633bfe 100644 --- a/ang/crmMailing/BlockPreview.html +++ b/ang/crmMailing/BlockPreview.html @@ -8,23 +8,23 @@ Vars: mailing:obj, testContact:obj, testGroup:obj, crmMailing:FormController -->
    - ({{ts('No content to preview')}}) + ({{:: ts('No content to preview') }})
    - {{ts('Send test email to:')}} + {{:: ts('Send test email to:') }}
    @@ -37,11 +37,11 @@ Vars: mailing:obj, testContact:obj, testGroup:obj, crmMailing:FormController crm-multiple-email />
    - +
    - {{ts('Send test email to group:')}} + {{:: ts('Send test email to group:') }}
    @@ -51,7 +51,7 @@ Vars: mailing:obj, testContact:obj, testGroup:obj, crmMailing:FormController class="crm-action-menu fa-envelope-o" />
    - +
    diff --git a/ang/crmMailing/BlockRecipients.html b/ang/crmMailing/BlockRecipients.html index cedfa6dc24..8803868453 100644 --- a/ang/crmMailing/BlockRecipients.html +++ b/ang/crmMailing/BlockRecipients.html @@ -7,9 +7,9 @@ crm-ui-id="{{crmMailingBlockRecipients.id}}" name="{{crmMailingBlockRecipients.name}}" ng-required="true" /> - +
    - - {{getRecipientCount()}} + + {{getRecipientCount()}}
    diff --git a/ang/crmMailing/BlockReview.html b/ang/crmMailing/BlockReview.html index 5a0021e40a..c872b5e9d7 100644 --- a/ang/crmMailing/BlockReview.html +++ b/ang/crmMailing/BlockReview.html @@ -13,17 +13,17 @@ Required vars: mailing, attachments
    - ({{ts('Include:')}} {{getIncludesAsString(mailing)}}) + ({{:: ts('Include:') }} {{getIncludesAsString(mailing)}})
    - ({{ts('Exclude:')}} {{getExcludesAsString(mailing)}}) + ({{:: ts('Exclude:') }} {{getExcludesAsString(mailing)}})
    @@ -32,7 +32,7 @@ Required vars: mailing, attachments
    {{item.file.name}}
    -
    {{ts('None')}}
    +
    {{:: ts('None') }}
    {{crmMailingConst.enabledLanguages[mailing.language]}} @@ -47,10 +47,10 @@ Required vars: mailing, attachments
    diff --git a/ang/crmMailing/BlockSchedule.html b/ang/crmMailing/BlockSchedule.html index 75cf19b2cb..4457135403 100644 --- a/ang/crmMailing/BlockSchedule.html +++ b/ang/crmMailing/BlockSchedule.html @@ -2,11 +2,11 @@
    - +
    - +
    diff --git a/ang/crmMailing/BlockTemplates.html b/ang/crmMailing/BlockTemplates.html index 38a37a91fd..bebb8457ff 100644 --- a/ang/crmMailing/BlockTemplates.html +++ b/ang/crmMailing/BlockTemplates.html @@ -1,9 +1,9 @@
    - - -
    \ No newline at end of file + +
    diff --git a/ang/crmMailing/BodyHtml.html b/ang/crmMailing/BodyHtml.html index b38c28c76b..fc7ef5d1c7 100644 --- a/ang/crmMailing/BodyHtml.html +++ b/ang/crmMailing/BodyHtml.html @@ -19,7 +19,7 @@ Required vars: mailing > diff --git a/ang/crmMailing/BodyText.html b/ang/crmMailing/BodyText.html index 598c779230..8cfa90beb9 100644 --- a/ang/crmMailing/BodyText.html +++ b/ang/crmMailing/BodyText.html @@ -17,7 +17,7 @@ Required vars: mailing, crmMailingConst > diff --git a/ang/crmMailing/EditMailingCtrl/2step.html b/ang/crmMailing/EditMailingCtrl/2step.html index d5fa639c9b..5901a0dd79 100644 --- a/ang/crmMailing/EditMailingCtrl/2step.html +++ b/ang/crmMailing/EditMailingCtrl/2step.html @@ -43,7 +43,7 @@
    -
    {{ts('Submit Mailing')}}
    +
    {{:: ts('Submit Mailing') }}
    @@ -55,8 +55,8 @@ class="crmMailing-btn-danger-outline" ng-disabled="block.check()" crm-confirm="{title:ts('Delete Draft'), message:ts('Are you sure you want to permanently delete this mailing?')}" - on-yes="delete()">{{ts('Delete Draft')}} - + on-yes="delete()">{{:: ts('Delete Draft') }} + diff --git a/ang/crmMailing/EditMailingCtrl/base.html b/ang/crmMailing/EditMailingCtrl/base.html index 92a97b242c..4d74fc1a7f 100644 --- a/ang/crmMailing/EditMailingCtrl/base.html +++ b/ang/crmMailing/EditMailingCtrl/base.html @@ -1,8 +1,8 @@
    - {{ts('This mailing has been submitted.')}} + {{:: ts('This mailing has been submitted.') }}
    - \ No newline at end of file + diff --git a/ang/crmMailing/EditMailingCtrl/unified.html b/ang/crmMailing/EditMailingCtrl/unified.html index cc3056fa2f..62eec2d221 100644 --- a/ang/crmMailing/EditMailingCtrl/unified.html +++ b/ang/crmMailing/EditMailingCtrl/unified.html @@ -37,14 +37,14 @@
    - - + + + on-yes="delete()">{{:: ts('Delete Draft') }} diff --git a/ang/crmMailing/EditMailingCtrl/unified2.html b/ang/crmMailing/EditMailingCtrl/unified2.html index 1506b8d593..0f94331134 100644 --- a/ang/crmMailing/EditMailingCtrl/unified2.html +++ b/ang/crmMailing/EditMailingCtrl/unified2.html @@ -33,14 +33,14 @@
    - - + + + on-yes="delete()">{{:: ts('Delete Draft') }} diff --git a/ang/crmMailing/EditMailingCtrl/wizard.html b/ang/crmMailing/EditMailingCtrl/wizard.html index 9854cc5c95..569880f0c0 100644 --- a/ang/crmMailing/EditMailingCtrl/wizard.html +++ b/ang/crmMailing/EditMailingCtrl/wizard.html @@ -46,7 +46,7 @@
    -
    {{ts('Submit Mailing')}}
    +
    {{:: ts('Submit Mailing') }}
    @@ -58,8 +58,8 @@ class="crmMailing-btn-danger-outline" ng-disabled="block.check()" crm-confirm="{title:ts('Delete Draft'), message:ts('Are you sure you want to permanently delete this mailing?')}" - on-yes="delete()">{{ts('Delete Draft')}} - + on-yes="delete()">{{:: ts('Delete Draft') }} + diff --git a/ang/crmMailing/EditMailingCtrl/workflow.html b/ang/crmMailing/EditMailingCtrl/workflow.html index 9a6c21af2b..e5a3d4eb45 100644 --- a/ang/crmMailing/EditMailingCtrl/workflow.html +++ b/ang/crmMailing/EditMailingCtrl/workflow.html @@ -48,12 +48,12 @@
    -
    {{ts('Submit Mailing')}}
    +
    {{:: ts('Submit Mailing') }}
    -
    {{ts('Submit and Approve Mailing')}}
    +
    {{:: ts('Submit and Approve Mailing') }}
    @@ -65,8 +65,8 @@ class="crmMailing-btn-danger-outline" ng-disabled="block.check()" crm-confirm="{title:ts('Delete Draft'), message:ts('Are you sure you want to permanently delete this mailing?')}" - on-yes="delete()">{{ts('Delete Draft')}} - + on-yes="delete()">{{:: ts('Delete Draft') }} + diff --git a/ang/crmMailing/EditRecipOptionsDialogCtrl.html b/ang/crmMailing/EditRecipOptionsDialogCtrl.html index be5e2c2e5f..56faec438a 100644 --- a/ang/crmMailing/EditRecipOptionsDialogCtrl.html +++ b/ang/crmMailing/EditRecipOptionsDialogCtrl.html @@ -18,7 +18,7 @@ name="location_type_id" ng-model="model.mailing.location_type_id" > - + diff --git a/ang/crmMailing/EmailBodyCtrl/tokenAlert.html b/ang/crmMailing/EmailBodyCtrl/tokenAlert.html index 46f3eac7b2..81e52e1737 100644 --- a/ang/crmMailing/EmailBodyCtrl/tokenAlert.html +++ b/ang/crmMailing/EmailBodyCtrl/tokenAlert.html @@ -4,38 +4,38 @@

    - {{ts('The mailing must allow recipients to (a) unsubscribe from the mailing-list or (b) completely opt-out from all mailings. Please insert an unsubscribe or opt-out token.')}} + {{:: ts('The mailing must allow recipients to (a) unsubscribe from the mailing-list or (b) completely opt-out from all mailings. Please insert an unsubscribe or opt-out token.') }}

    {{ts('Entity')}}{{ts('Action(s)')}}{{ts('Filter(s)')}}{{ts('Field(s)')}}{{:: ts('Entity') }}{{:: ts('Action(s)') }}{{:: ts('Filter(s)') }}{{:: ts('Field(s)') }}
    - {{ts('Any')}} + {{:: ts('Any') }} {{api.entity}}
    - {{ts('Any')}} + {{:: ts('Any') }} {{api.actions}} @@ -27,11 +27,11 @@
    - {{ts('Any')}} + {{:: ts('Any') }}
    {{field}} = "{{value}}",
    - {{ts('Any')}} + {{:: ts('Any') }} {{field}},
    - - + + @@ -46,8 +46,8 @@
    {{ts('Via Web')}}{{ts('Via Email')}}{{:: ts('Via Web') }}{{:: ts('Via Email') }}
    - {{ts('Unsubscribe')}} + {{:: ts('Unsubscribe') }} - {{ts('Unsubscribe')}} + {{:: ts('Unsubscribe') }}
    - {{ts('Opt-out')}} + {{:: ts('Opt-out') }} - {{ts('Opt-out')}} + {{:: ts('Opt-out') }}
    - - + + @@ -72,5 +72,5 @@

    - {{ts('Alternatively, you may select a header or footer which includes the required tokens.')}} + {{:: ts('Alternatively, you may select a header or footer which includes the required tokens.') }}

    diff --git a/ang/crmMailing/PreviewComponentDialogCtrl.html b/ang/crmMailing/PreviewComponentDialogCtrl.html index 71db702761..d9f4447b7d 100644 --- a/ang/crmMailing/PreviewComponentDialogCtrl.html +++ b/ang/crmMailing/PreviewComponentDialogCtrl.html @@ -2,14 +2,14 @@
    -
    {{ts('Name')}}
    +
    {{:: ts('Name') }}
    {{model.name}}
    -
    {{ts('Subject')}}
    +
    {{:: ts('Subject') }}
    {{model.subject}}
    diff --git a/ang/crmMailing/PreviewRecipCtrl.html b/ang/crmMailing/PreviewRecipCtrl.html index 6eb6459aa1..900beeb6de 100644 --- a/ang/crmMailing/PreviewRecipCtrl.html +++ b/ang/crmMailing/PreviewRecipCtrl.html @@ -9,17 +9,17 @@

    {{ts('Below is a sample of the first %1 recipients.', {1: model.sampleLimit})}}

    -

    {{ts('If individual contacts are separately modified, added, or removed, then the final list may change.')}}

    +

    {{:: ts('If individual contacts are separately modified, added, or removed, then the final list may change.') }}

    - {{ts('No recipients')}} + {{:: ts('No recipients') }}
    {{ts('Via Web')}}{{ts('Via Email')}}{{:: ts('Via Web') }}{{:: ts('Via Email') }}
    - - + + diff --git a/ang/crmMailing/SaveMsgTemplateDialogCtrl.html b/ang/crmMailing/SaveMsgTemplateDialogCtrl.html index 1e5c723f58..3d15874bca 100644 --- a/ang/crmMailing/SaveMsgTemplateDialogCtrl.html +++ b/ang/crmMailing/SaveMsgTemplateDialogCtrl.html @@ -1,5 +1,5 @@
    -

    {{ts('Save the current mailing as a template.')}}

    +

    {{:: ts('Save the current mailing as a template.') }}

    @@ -44,7 +44,7 @@ processed by Angular; if false, the field will be hidden and completely ignored - +
    @@ -60,7 +60,7 @@ processed by Angular; if false, the field will be hidden and completely ignored - +
    diff --git a/ang/crmMailingAB/BlockSetup.html b/ang/crmMailingAB/BlockSetup.html index 7d124cc06c..d84c673f63 100644 --- a/ang/crmMailingAB/BlockSetup.html +++ b/ang/crmMailingAB/BlockSetup.html @@ -1,7 +1,7 @@
    - {{ts('A/B testing allows you to send two test mailings to a random subset of your recipients. After collecting and comparing metrics, the more successful mailing will be sent to the remaining recipients.')}} + {{:: ts('A/B testing allows you to send two test mailings to a random subset of your recipients. After collecting and comparing metrics, the more successful mailing will be sent to the remaining recipients.') }}
    - +
    - +
    @@ -54,11 +54,11 @@
    - +
    - +
    diff --git a/ang/crmMailingAB/EditCtrl/edit.html b/ang/crmMailingAB/EditCtrl/edit.html index e737bd0a59..de95f0351b 100644 --- a/ang/crmMailingAB/EditCtrl/edit.html +++ b/ang/crmMailingAB/EditCtrl/edit.html @@ -159,7 +159,7 @@ crm-abtest="abtest">
    -
    {{ts('Submit Mailing')}}
    +
    {{:: ts('Submit Mailing') }}
    @@ -169,9 +169,9 @@ ng-show="checkPerm('delete in CiviMail')" ng-disabled="block.check()" crm-confirm="{title:ts('Delete Draft'), message:ts('Are you sure you want to permanently delete this mailing?')}" - on-yes="delete()">{{ts('Delete Draft')}} + on-yes="delete()">{{:: ts('Delete Draft') }} - + diff --git a/ang/crmMailingAB/EditCtrl/report.html b/ang/crmMailingAB/EditCtrl/report.html index 68b79245a3..18380923c1 100644 --- a/ang/crmMailingAB/EditCtrl/report.html +++ b/ang/crmMailingAB/EditCtrl/report.html @@ -2,8 +2,8 @@ Implicit Controller: CrmMailingABEditCtrl -->
    -
    {{ts('A/B Test Results')}}: {{abtest.ab.name}}
    - {{ts('This report displays the current results for your A/B test. You can return to this page to view the latest statistics by navigating to "Manage A/B Tests" and clicking "Results".')}} +
    {{:: ts('A/B Test Results') }}: {{abtest.ab.name}}
    + {{:: ts('This report displays the current results for your A/B test. You can return to this page to view the latest statistics by navigating to "Manage A/B Tests" and clicking "Results".') }}
    {{ts('Name')}}{{ts('Email')}}{{:: ts('Name') }}{{:: ts('Email') }}
    @@ -11,7 +11,7 @@ @@ -19,36 +19,36 @@ - + - + - + - + - + - + - + @@ -58,9 +58,9 @@ - + - + @@ -92,63 +92,63 @@ - + - + - + - + - + - + - + - + - + - + - + diff --git a/ang/crmMailingAB/ListCtrl.html b/ang/crmMailingAB/ListCtrl.html index 5d2c0768d2..29fe00ed63 100644 --- a/ang/crmMailingAB/ListCtrl.html +++ b/ang/crmMailingAB/ListCtrl.html @@ -8,17 +8,17 @@ Required vars: mailingABList
    - + @@ -29,10 +29,10 @@ Required vars: mailingABList
    - +
    {{ts('Delivery')}}{{:: ts('Delivery') }} {{am.title}}{{ts('Final')}}{{:: ts('Final') }}
    {{ts('Status')}}{{:: ts('Status') }} {{job.status}} {{ts('Not selected')}}{{:: ts('Not selected') }}
    {{ts('Scheduled')}}{{:: ts('Scheduled') }}
    {{job.scheduled_date}}
    {{ts('Started at')}}{{:: ts('Started at') }}
    {{job.start_date || ts('Not started')}}
    {{ts('Completed at')}}{{:: ts('Completed at') }}
    {{job.end_date || ts('Not completed')}}
    {{ts('Performance')}}{{:: ts('Performance') }} {{am.title}}{{ts('Final')}}{{:: ts('Final') }}
    {{ts('Details')}}{{:: ts('Details') }} {{am.title}}{{ts('Final')}}{{:: ts('Final') }}
    {{ts('Mailing Name')}}{{:: ts('Mailing Name') }} {{am.mailing.name}}
    {{ts('From')}}{{:: ts('From') }} "{{am.mailing.from_name}}" <{{am.mailing.from_email}}>
    {{ts('Subject')}}{{:: ts('Subject') }} {{am.mailing.subject}}
    {{ts('Recipients')}}{{:: ts('Recipients') }}
    - {{ts('Include:')}} {{getIncludesAsString(am.mailing)}} + {{:: ts('Include:') }} {{getIncludesAsString(am.mailing)}}
    - {{ts('Exclude:')}} {{getExcludesAsString(am.mailing)}} + {{:: ts('Exclude:') }} {{getExcludesAsString(am.mailing)}}
    {{ts('Content')}}{{:: ts('Content') }} - {{ts('HTML')}} - {{ts('Text')}} + {{:: ts('HTML') }} + {{:: ts('Text') }}
    {{ts('Attachments')}}{{:: ts('Attachments') }}
    {{ts('Tracking')}}{{:: ts('Tracking') }}
    @@ -156,21 +156,21 @@
    {{ts('Responding')}}{{:: ts('Responding') }}
    {{ts('Publication')}}{{:: ts('Publication') }} {{am.mailing.visibility}}
    - - - - + + + + @@ -43,8 +43,8 @@ Required vars: mailingABList @@ -53,11 +53,11 @@ Required vars: mailingABList
    - {{ts('You have no A/B mailings')}} + {{:: ts('You have no A/B mailings') }}
    diff --git a/ang/crmMailingAB/Slider.html b/ang/crmMailingAB/Slider.html index cdfcad3b77..34088e59ff 100644 --- a/ang/crmMailingAB/Slider.html +++ b/ang/crmMailingAB/Slider.html @@ -1,14 +1,14 @@
    {{ts('Name')}}{{ts('Status')}}{{ts('Test Type')}}{{ts('Created')}}{{:: ts('Name') }}{{:: ts('Status') }}{{:: ts('Test Type') }}{{:: ts('Created') }}
    {{crmMailingABCriteria.get(mailingAB.testing_criteria).label}} {{mailingAB.created_date}} - {{ts('Continue')}} - {{ts('Results')}} + {{:: ts('Continue') }} + {{:: ts('Results') }}
    - + - + @@ -16,7 +16,7 @@ - + diff --git a/ang/crmMailingAB/WinnerDialogCtrl.html b/ang/crmMailingAB/WinnerDialogCtrl.html index 0c2db4f602..af80c4a3f7 100644 --- a/ang/crmMailingAB/WinnerDialogCtrl.html +++ b/ang/crmMailingAB/WinnerDialogCtrl.html @@ -7,11 +7,11 @@
    - +
    - +
    diff --git a/ang/crmStatusPage/SnoozeOptions.html b/ang/crmStatusPage/SnoozeOptions.html index b21cb7b9ce..49865b2f7c 100644 --- a/ang/crmStatusPage/SnoozeOptions.html +++ b/ang/crmStatusPage/SnoozeOptions.html @@ -1,11 +1,11 @@
    - +
    - +
      -
    • {{ts('Remind me again in a week')}}
    • -
    • {{ts('Remind me again in a month')}}
    • -
    • {{ts('Never remind me again')}}
    • +
    • {{:: ts('Remind me again in a week') }}
    • +
    • {{:: ts('Remind me again in a month') }}
    • +
    • {{:: ts('Never remind me again') }}
    diff --git a/ang/crmStatusPage/StatusPage.html b/ang/crmStatusPage/StatusPage.html index 71a9c6aa9e..bf252cbeb1 100644 --- a/ang/crmStatusPage/StatusPage.html +++ b/ang/crmStatusPage/StatusPage.html @@ -1,7 +1,7 @@

    - {{ts('CiviCRM System Status')}} + {{:: ts('CiviCRM System Status') }}

    diff --git a/ang/crmUi/wizard.html b/ang/crmUi/wizard.html index 116f060dcf..bb55c89b1d 100644 --- a/ang/crmUi/wizard.html +++ b/ang/crmUi/wizard.html @@ -9,7 +9,7 @@
    - - + +
    diff --git a/ang/exportui/export.html b/ang/exportui/export.html index 3a1638c33a..8a3e093619 100644 --- a/ang/exportui/export.html +++ b/ang/exportui/export.html @@ -2,7 +2,7 @@ @@ -21,7 +21,7 @@ diff --git a/tests/phpunit/CRM/Utils/HTMLTest.php b/tests/phpunit/CRM/Utils/HTMLTest.php index e3c8b89c70..2de12a8d1e 100644 --- a/tests/phpunit/CRM/Utils/HTMLTest.php +++ b/tests/phpunit/CRM/Utils/HTMLTest.php @@ -39,6 +39,11 @@ class CRM_Utils_HTMLTest extends CiviUnitTestCase { '
    {{ts("Good morning, Dave")}}
    ', ['Good morning, Dave'], ]; + // angular one-time binding notation - great when there are no args + $cases[] = [ + '
    {{:: ts("One-time binding is more efficient!") }}
    ', + ['One-time binding is more efficient!'], + ]; // text, with arg $cases[] = [ '
    {{ts("Hello world", {1: "whiz"})}}
    ', diff --git a/tools/extensions/org.civicrm.angularex/partials/example.html b/tools/extensions/org.civicrm.angularex/partials/example.html index 93810f3f68..bed6e4e21c 100644 --- a/tools/extensions/org.civicrm.angularex/partials/example.html +++ b/tools/extensions/org.civicrm.angularex/partials/example.html @@ -1,5 +1,5 @@
    - {{ts('Name')}}: + {{:: ts('Name') }}:
    {{ts('Hello, %1!', {1: name})}}
    {{ts('Test Mailing A')}}{{:: ts('Test Mailing A') }}
    ({{testValue}}%)
    {{ts('Test Mailing B')}}{{:: ts('Test Mailing B') }}
    {{ts('Final Mailing')}}{{:: ts('Final Mailing') }}
    - +