Skip to content

Commit

Permalink
Fix oppia#7161: Removes expression evaluation braces from i18n transl…
Browse files Browse the repository at this point in the history
…ation-values (oppia#7183)
  • Loading branch information
DubeySandeep authored Jul 20, 2019
1 parent 7e37bbb commit bafc5f5
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
tabindex="-1" focus-on="<[$ctrl.labelForErrorFocusTarget]>">
<span ng-if="$ctrl.floatForm.floatValue.$error.isFloat && $ctrl.floatForm.floatValue.$viewValue" class="oppia-form-error" aria-live="assertive" translate="I18N_FORMS_TYPE_NUMBER_INVALID_DECIMAL"></span>
<span ng-if="!$ctrl.floatForm.floatValue.$error.isFloat && $ctrl.floatForm.floatValue.$error.isAtLeast"
class="oppia-form-error" aria-live="assertive" translate="I18N_FORMS_TYPE_NUMBER_AT_LEAST" translate-values="{minValue: <[minValue]>}">
class="oppia-form-error" aria-live="assertive" translate="I18N_FORMS_TYPE_NUMBER_AT_LEAST" translate-values="{minValue: minValue}">
</span>
<span ng-if="!$ctrl.floatForm.floatValue.$error.isFloat && $ctrl.floatForm.floatValue.$error.isAtMost"
class="oppia-form-error" aria-live="assertive" translate="I18N_FORMS_TYPE_NUMBER_AT_MOST" translate-values="{maxValue: <[maxValue]>}">
class="oppia-form-error" aria-live="assertive" translate="I18N_FORMS_TYPE_NUMBER_AT_MOST" translate-values="{maxValue: maxValue}">
</span>
</span>
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ <h2 translate="I18N_ABOUT_PAGE_CREDITS_TAB_HEADING"></h2>
<li>Zoe Madden-Wood</li>
</ul>
</div>
<p translate="I18N_ABOUT_PAGE_CREDITS_TAB_TEXT_BOTTOM" translate-values="{listOfNames: '<[$ctrl.listOfNames]>'}">
<p translate="I18N_ABOUT_PAGE_CREDITS_TAB_TEXT_BOTTOM" translate-values="{listOfNames: $ctrl.listOfNames}">
</p>
<p translate="I18N_ABOUT_PAGE_CREDITS_THANK_TRANSLATEWIKI">
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ <h2 class="activity-title protractor-test-exp-summary-tile-title">
<span ng-if="$ctrl.subscribersList.length > 1"
style="margin-top: 14px; display: inline-block;"
translate="I18N_TOTAL_SUBSCRIBERS_TEXT"
translate-values="{totalSubscribers: <[$ctrl.subscribersList.length]>}">>
translate-values="{totalSubscribers: $ctrl.subscribersList.length}">>
</span>
<span ng-if="$ctrl.subscribersList.length === 1"
style="margin-top: 14px; display: inline-block;"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
ng-click="toggleShowPreviousResponses()">
<span class="conversation-skin-responses-dropdown-text">
<span translate="I18N_PLAYER_PREVIOUS_RESPONSES"
translate-values="{previousResponses: <[getDisplayedCard().getInputResponsePairs().length - (isInteractionInline() ? 1 : 0)]>}">
translate-values="{previousResponses: getDisplayedCard().getInputResponsePairs().length - (isInteractionInline() ? 1 : 0)}">
</span>
<span class="conversation-skin-responses-dropdown-icon">
<i class="material-icons conversation-skin-responses-dropdown-icon" ng-class="{'conversation-skin-responses-dropdown-icon-rotated': arePreviousResponsesShown}">&#xE037;</i>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ <h2 class="oppia-info-card-title"><[explorationTitle]></h2>
tooltip-append-to-body="true" uib-tooltip="<[explorationTags.tagsInTooltip.join(', ')]>"
tooltip-placement="right"
translate="I18N_PLAYER_PLUS_TAGS"
translate-values="{additionalTagNumber: <[explorationTags.tagsInTooltip.length]>}">
translate-values="{additionalTagNumber: explorationTags.tagsInTooltip.length}">
</md-chip>
<md-chip ng-if="explorationTags.tagsToShow.length > 0">
<[explorationTags.tagsToShow.join(", ")]>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ <h1 class="stat-value"><[$ctrl.subscriptionsList.length]></h1>
<span style="display: block; padding: 5px 7.5px;"
ng-if="$ctrl.numberNonexistentIncompleteExplorations !== 0">
<span translate="I18N_LEARNER_DASHBOARD_NONEXISTENT_INCOMPLETE_EXPLORATIONS"
translate-values="{numberNonexistent: <[$ctrl.numberNonexistentIncompleteExplorations]>}"
translate-values="{numberNonexistent: $ctrl.numberNonexistentIncompleteExplorations}"
translate-interpolation="messageformat">
</span>
&#9785
Expand Down Expand Up @@ -265,7 +265,7 @@ <h1 class="stat-value"><[$ctrl.subscriptionsList.length]></h1>
<span style="display: block; padding: 5px 7.5px;"
ng-if="$ctrl.numberNonexistentCompletedExplorations !== 0">
<span translate="I18N_LEARNER_DASHBOARD_NONEXISTENT_COMPLETED_EXPLORATIONS"
translate-values="{numberNonexistent: <[$ctrl.numberNonexistentCompletedExplorations]>}"
translate-values="{numberNonexistent: $ctrl.numberNonexistentCompletedExplorations}"
translate-interpolation="messageformat">
</span>
&#9785
Expand Down Expand Up @@ -318,7 +318,7 @@ <h1 class="stat-value"><[$ctrl.subscriptionsList.length]></h1>
<span style="display: block; padding: 5px 7.5px;"
ng-if="$ctrl.numberNonexistentExplorationsFromPlaylist !== 0">
<span translate="I18N_LEARNER_DASHBOARD_NONEXISTENT_EXPLORATIONS_FROM_PLAYLIST"
translate-values="{numberNonexistent: <[$ctrl.numberNonexistentExplorationsFromPlaylist]>}"
translate-values="{numberNonexistent: $ctrl.numberNonexistentExplorationsFromPlaylist}"
translate-interpolation="messageformat">
</span>
&#9785
Expand Down Expand Up @@ -373,7 +373,7 @@ <h1 class="stat-value"><[$ctrl.subscriptionsList.length]></h1>
<span style="display: block; padding: 5px 7.5px;"
ng-if="$ctrl.numberNonexistentIncompleteCollections !== 0">
<span translate="I18N_LEARNER_DASHBOARD_NONEXISTENT_INCOMPLETE_COLLECTIONS"
translate-values="{numberNonexistent: <[$ctrl.numberNonexistentIncompleteCollections]>}"
translate-values="{numberNonexistent: $ctrl.numberNonexistentIncompleteCollections}"
translate-interpolation="messageformat">
</span>
&#9785
Expand Down Expand Up @@ -434,7 +434,7 @@ <h1 class="stat-value"><[$ctrl.subscriptionsList.length]></h1>
<span style="display: block; padding: 5px 7.5px;"
ng-if="$ctrl.numberNonexistentCollectionsFromPlaylist !== 0">
<span translate="I18N_LEARNER_DASHBOARD_NONEXISTENT_COLLECTIONS_FROM_PLAYLIST"
translate-values="{numberNonexistent: <[$ctrl.numberNonexistentCollectionsFromPlaylist]>}"
translate-values="{numberNonexistent: $ctrl.numberNonexistentCollectionsFromPlaylist}"
translate-interpolation="messageformat">
</span>
&#9785
Expand Down Expand Up @@ -498,7 +498,7 @@ <h1 class="stat-value"><[$ctrl.subscriptionsList.length]></h1>
<span style="display: block; padding: 5px 7.5px;"
ng-if="$ctrl.numberNonexistentCompletedCollections !== 0">
<span translate="I18N_LEARNER_DASHBOARD_NONEXISTENT_COMPLETED_COLLECTIONS"
translate-values="{numberNonexistent: <[$ctrl.numberNonexistentCompletedCollections]>}"
translate-values="{numberNonexistent: $ctrl.numberNonexistentCompletedCollections}"
translate-interpolation="messageformat">
</span>
&#9785
Expand Down Expand Up @@ -639,7 +639,7 @@ <h1 class="stat-value"><[$ctrl.subscriptionsList.length]></h1>
<span ng-if="thread.lastMessageText"><[thread.lastMessageText | truncate:50]></span>
<span ng-if="!thread.lastMessageText && thread.totalMessageCount !== 1">
<i translate="I18N_LEARNER_DASHBOARD_FEEDBACK_THREAD_STATUS_CHANGE_MESSAGE"
translate-values="{<[$ctrl.threadStatus]>: <[$ctrl.getHumanReadableStatus(thread.status)]>}">
translate-values="{threadStatus: $ctrl.getHumanReadableStatus(thread.status)}">
</i>
</span>
<span ng-if="!thread.lastMessageText && thread.totalMessageCount === 1"><i translate="I18N_LEARNER_DASHBOARD_SUGGESTION_TEXT"></i></span>
Expand Down Expand Up @@ -691,7 +691,7 @@ <h1 class="stat-value"><[$ctrl.subscriptionsList.length]></h1>
<span style="float: right; margin-right: 15px;"
ng-if="message.messageId !== 0 && message.updatedStatus">
<em translate="I18N_LEARNER_DASHBOARD_FEEDBACK_THREAD_STATUS_CHANGE_MESSAGE"
translate-values="{<[$ctrl.threadStatus]>: <[$ctrl.getHumanReadableStatus(message.updatedStatus)]>}">
translate-values="{threadStatus: $ctrl.getHumanReadableStatus(message.updatedStatus)}">
</em>
</span>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- TODO(mili) Replace this logic for the correct pluralize tool when there are more cases that justify the use of the library -->
<div ng-if="$ctrl.graph.edges">
<span translate="I18N_INTERACTIONS_GRAPH_RESPONSE_EDGES" translate-values="{edges: <[$ctrl.graph.edges.length]>}" ng-if="$ctrl.graph.edges.length != 1"></span>
<span translate="I18N_INTERACTIONS_GRAPH_RESPONSE_EDGE" translate-values="{edges: <[$ctrl.graph.edges.length]>}" ng-if="$ctrl.graph.edges.length == 1"></span>
<span translate="I18N_INTERACTIONS_GRAPH_RESPONSE_VERTICES" translate-values="{vertices: <[$ctrl.graph.vertices.length]>}" ng-if="$ctrl.graph.vertices.length != 1"></span>
<span translate="I18N_INTERACTIONS_GRAPH_RESPONSE_VERTEX" translate-values="{vertices: <[$ctrl.graph.vertices.length]>}" ng-if="$ctrl.graph.vertices.length == 1"></span>
<span translate="I18N_INTERACTIONS_GRAPH_RESPONSE_EDGES" translate-values="{edges: $ctrl.graph.edges.length}" ng-if="$ctrl.graph.edges.length != 1"></span>
<span translate="I18N_INTERACTIONS_GRAPH_RESPONSE_EDGE" translate-values="{edges: $ctrl.graph.edges.length}" ng-if="$ctrl.graph.edges.length == 1"></span>
<span translate="I18N_INTERACTIONS_GRAPH_RESPONSE_VERTICES" translate-values="{vertices: $ctrl.graph.vertices.length}" ng-if="$ctrl.graph.vertices.length != 1"></span>
<span translate="I18N_INTERACTIONS_GRAPH_RESPONSE_VERTEX" translate-values="{vertices: $ctrl.graph.vertices.length}" ng-if="$ctrl.graph.vertices.length == 1"></span>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<form ng-submit="$ctrl.submitAnswer()">
<small ng-if="$ctrl.displayCheckboxes">
<span ng-if="$ctrl.notEnoughSelections">
<span translate="I18N_INTERACTIONS_ITEM_SELECTION_NOT_ENOUGH" translate-values="{minChoiceNumber:<[$ctrl.minAllowableSelectionCount]>}" translate-interpolation="$ctrl.messageformat"></span>
<span translate="I18N_INTERACTIONS_ITEM_SELECTION_NOT_ENOUGH" translate-values="{minChoiceNumber: $ctrl.minAllowableSelectionCount}" translate-interpolation="messageformat"></span>
</span>

<span ng-if="$ctrl.preventAdditionalSelections">
<span translate="I18N_INTERACTIONS_ITEM_SELECTION_PREVENT_MORE" translate-values="{maxAllowableSelectionCount:<[$ctrl.maxAllowableSelectionCount]>}" translate-interpolation="$ctrl.messageformat">
<span translate="I18N_INTERACTIONS_ITEM_SELECTION_PREVENT_MORE" translate-values="{maxAllowableSelectionCount: $ctrl.maxAllowableSelectionCount}" translate-interpolation="messageformat">
</span>
</span>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="logic-proof-container">
<span translate="<[$ctrl.questionString]>" translate-values="<[$ctrl.questionStringData]>"></span>
<span translate="<[$ctrl.questionString]>" translate-values="$ctrl.questionStringData"></span>
<div class="logic-proof-input-box">
<div ui-codemirror="{onLoad: $ctrl.codeEditor, readOnly: !$ctrl.interactionIsActive}">
<textarea ng-trim="false" rows="10"></textarea>
Expand Down

0 comments on commit bafc5f5

Please sign in to comment.