Use translate filter instead of directive when strings contain HTML

This commit is contained in:
gconsidine 2017-07-28 14:39:37 -04:00
parent 76da28783e
commit 47d3def94f
5 changed files with 20 additions and 11 deletions

View File

@ -109,7 +109,7 @@
{{job.job_explanation}}
</div>
<div class="jobResult-resultRowText "
ng-show="previousTaskFailed" translate>Previous Task Failed
ng-show="previousTaskFailed">{{ 'Previous Task Failed' | translate }}
<a
href=""
id="explanation_help"

View File

@ -26,10 +26,17 @@
<div id="schedules-detail"></div>
</div>
<div id="schedules-buttons">
<a id="schedules-flip-link" ng-show="formShowing" ng-click="showScheduleDetail()" href="" translate><i class="fa fa-search-plus"></i> View Details</a>
<a id="schedules-flip-link" ng-show="!formShowing" ng-click="showScheduleDetail()" href="" translate><i class="fa fa-arrow-circle-left"></i> Back to options</a>
<button type="button" class="btn btn-default btn-sm" id="reset-button" ng-click="cancelScheduleForm()" translate><i class="fa fa-times"></i> Cancel</button>
<button type="button" class="btn btn-primary btn-sm" id="save-button" ng-click="saveScheduleForm()" translate><i class="fa fa-check"></i> Save</button>
<a id="schedules-flip-link" ng-show="formShowing" ng-click="showScheduleDetail()" href="">
<i class="fa fa-search-plus"></i> {{ 'View Details' | translate }}
</a>
<a id="schedules-flip-link" ng-show="!formShowing" ng-click="showScheduleDetail()" href="">
<i class="fa fa-arrow-circle-left"></i> {{ 'Back to options' | translate }}</a>
<button type="button" class="btn btn-default btn-sm" id="reset-button" ng-click="cancelScheduleForm()">
<i class="fa fa-times"></i> {{ 'Cancel' | translate }}
</button>
<button type="button" class="btn btn-primary btn-sm" id="save-button" ng-click="saveScheduleForm()">
<i class="fa fa-check"></i> {{ 'Save' | translate }}
</button>
</div>
</div>
</div>

View File

@ -30,8 +30,8 @@
</a>
</li>
</ul>
<span class="Paginate-pager--pageof" translate>Page
<span id="current-page">{{current}}</span> of
<span class="Paginate-pager--pageof">{{ 'Page' | translate }}
<span id="current-page">{{current}}</span> {{ 'of' | translate }}
<span id="total-pages">{{last}}</span>
</span>
</div>
@ -40,7 +40,7 @@
so that i18n.sprintf("A of B") can be used but
it seems $sce.trustAsHtml() does not work with html tag.
-->
<span class="Paginate-itemsOf" translate>ITEMS&nbsp;
<span class="Paginate-itemsOf">{{ 'ITEMS' | translate }}&nbsp;
<span>{{dataRange}}</span>
<span ng-hide="dataset.count <= basePageSize">of {{dataset.count | number}}</span>
</span>

View File

@ -48,7 +48,9 @@
<b translate>RELATED FIELDS:</b> <span ng-repeat="relation in model.related">{{ relation }}<span ng-if="!$last">, </span></span>
</div>
<div class="SmartSearch-keyRow">
<b translate>ADDITIONAL INFORMATION:</b> <span translate>For additional information on advanced search search syntax please see the Ansible Tower<a href="http://docs.ansible.com/ansible-tower/3.1.0/html/userguide/search_sort.html" target="_blank"> documentation</a>.</span>
<b>{{ 'ADDITIONAL INFORMATION' | translate }}:</b>
<span>{{ 'For additional information on advanced search search syntax please see the Ansible Tower' | translate }}
<a href="http://docs.ansible.com/ansible-tower/3.2.0/html/userguide/search_sort.html" target="_blank"> {{ 'documentation' | translate }}</a>.</span>
</div>
</div>
</div>

View File

@ -101,8 +101,8 @@
</div>
<div class="StandardOut-detailsRow" ng-show="job.extra_vars">
<div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4" translate>
Extra Variables
<div class="StandardOut-detailsLabel col-lg-3 col-md-3 col-sm-3 col-xs-4">
{{ 'Extra Variables' | translate }}
<i class="StandardOut-extraVarsHelp fa fa-question-circle"
aw-tool-tip="Read only view of extra variables added to the ad-hoc command."
data-placement="top">