diff options
author | Stas Vilchik <stas.vilchik@sonarsource.com> | 2017-10-03 09:12:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-03 09:12:56 +0200 |
commit | b66f125104e97f4724afb87e448a79605a532222 (patch) | |
tree | f1a6d4cacf675a8c011cb2aceb8b2b21371fcf94 /server/sonar-web/src/main/js/apps/metrics | |
parent | c839d88af83ce551bd171703ec0902b1e79b3db1 (diff) | |
download | sonarqube-b66f125104e97f4724afb87e448a79605a532222.tar.gz sonarqube-b66f125104e97f4724afb87e448a79605a532222.zip |
SONAR-8828 Make sure all messages can be localized (#2600)
Diffstat (limited to 'server/sonar-web/src/main/js/apps/metrics')
5 files changed, 19 insertions, 20 deletions
diff --git a/server/sonar-web/src/main/js/apps/metrics/templates/metrics-delete.hbs b/server/sonar-web/src/main/js/apps/metrics/templates/metrics-delete.hbs index 73cddffcbf0..e6bf9ff5323 100644 --- a/server/sonar-web/src/main/js/apps/metrics/templates/metrics-delete.hbs +++ b/server/sonar-web/src/main/js/apps/metrics/templates/metrics-delete.hbs @@ -1,13 +1,13 @@ <form id="delete-metric-form"> <div class="modal-head"> - <h2>Delete Metric</h2> + <h2>{{t 'custom_metrics.delete_metric'}}</h2> </div> <div class="modal-body"> <div class="js-modal-messages"></div> - Are you sure you want to delete metric "{{name}}"? + {{tp 'custom_metrics.delete_metric.confirmation' name}} </div> <div class="modal-foot"> - <button id="delete-metric-submit" class="button-red">Delete</button> - <a href="#" class="js-modal-close" id="delete-metric-cancel">Cancel</a> + <button id="delete-metric-submit" class="button-red">{{t 'delete'}}</button> + <a href="#" class="js-modal-close" id="delete-metric-cancel">{{t 'cancel'}}</a> </div> </form> diff --git a/server/sonar-web/src/main/js/apps/metrics/templates/metrics-form.hbs b/server/sonar-web/src/main/js/apps/metrics/templates/metrics-form.hbs index e7f23e20e5e..55c9c9d4936 100644 --- a/server/sonar-web/src/main/js/apps/metrics/templates/metrics-form.hbs +++ b/server/sonar-web/src/main/js/apps/metrics/templates/metrics-form.hbs @@ -1,27 +1,27 @@ <form id="create-metric-form" autocomplete="off"> <div class="modal-head"> - <h2>{{#if id}}Update{{else}}Create{{/if}} Metric</h2> + <h2>{{#if id}}{{t 'custom_metrics.update_metric'}}{{else}}{{t 'custom_metrics.create_metric'}}{{/if}}</h2> </div> <div class="modal-body"> <div class="js-modal-messages"></div> <div class="modal-field"> - <label for="create-metric-key">Key<em class="mandatory">*</em></label> + <label for="create-metric-key">{{t 'key'}}<em class="mandatory">*</em></label> <input id="create-metric-key" name="key" type="text" maxlength="200" required value="{{key}}"> </div> <div class="modal-field"> - <label for="create-metric-name">Name<em class="mandatory">*</em></label> + <label for="create-metric-name">{{t 'name'}}<em class="mandatory">*</em></label> <input id="create-metric-name" name="name" type="text" maxlength="200" required value="{{name}}"> </div> <div class="modal-field"> - <label for="create-metric-description">Description</label> + <label for="create-metric-description">{{t 'description'}}</label> <textarea id="create-metric-description" name="description">{{description}}</textarea> </div> <div class="modal-field"> - <label for="create-metric-domain">Domain</label> + <label for="create-metric-domain">{{t 'custom_metrics.domain'}}</label> <input id="create-metric-domain" name="domain" type="text" maxlength="200" value="{{this.domain}}"> </div> <div class="modal-field"> - <label for="create-metric-type">Type<em class="mandatory">*</em></label> + <label for="create-metric-type">{{t 'type'}}<em class="mandatory">*</em></label> <select id="create-metric-type" name="type"> {{#each types}} <option value="{{this}}" {{#eq this ../type}}selected{{/eq}}>{{t 'metric.type' this}}</option> @@ -30,7 +30,7 @@ </div> </div> <div class="modal-foot"> - <button id="create-metric-submit">{{#if id}}Update{{else}}Create{{/if}}</button> - <a href="#" class="js-modal-close" id="create-metric-cancel">Cancel</a> + <button id="create-metric-submit">{{#if id}}{{t 'update_verb'}}{{else}}{{t 'create'}}{{/if}}</button> + <a href="#" class="js-modal-close" id="create-metric-cancel">{{t 'cancel'}}</a> </div> </form> diff --git a/server/sonar-web/src/main/js/apps/metrics/templates/metrics-header.hbs b/server/sonar-web/src/main/js/apps/metrics/templates/metrics-header.hbs index 05ef5f04fad..fc2d4d1e080 100644 --- a/server/sonar-web/src/main/js/apps/metrics/templates/metrics-header.hbs +++ b/server/sonar-web/src/main/js/apps/metrics/templates/metrics-header.hbs @@ -1,10 +1,9 @@ <header class="page-header"> - <h1 class="page-title">Custom Metrics</h1> + <h1 class="page-title">{{t 'custom_metrics.page'}}</h1> <div class="page-actions"> <div class="button-group"> - <button id="metrics-create">Create Metric</button> + <button id="metrics-create">{{t 'custom_metrics.create_metric'}}</button> </div> </div> - <p class="page-description">These metrics are available for all projects. Manual measures can be set at project level - via the configuration interface.</p> + <p class="page-description">{{t 'custom_metrics.page.description'}}</p> </header> diff --git a/server/sonar-web/src/main/js/apps/metrics/templates/metrics-list-footer.hbs b/server/sonar-web/src/main/js/apps/metrics/templates/metrics-list-footer.hbs index c389b85f818..fe8af8e8aef 100644 --- a/server/sonar-web/src/main/js/apps/metrics/templates/metrics-list-footer.hbs +++ b/server/sonar-web/src/main/js/apps/metrics/templates/metrics-list-footer.hbs @@ -1,6 +1,6 @@ <footer class="spacer-top note text-center"> - {{count}}/{{total}} shown + {{tp 'x_of_y_shown' count total}} {{#if more}} - <a id="metrics-fetch-more" class="spacer-left" href="#">show more</a> + <a id="metrics-fetch-more" class="spacer-left" href="#">{{t 'show_more'}}</a> {{/if}} </footer> diff --git a/server/sonar-web/src/main/js/apps/metrics/templates/metrics-list-item.hbs b/server/sonar-web/src/main/js/apps/metrics/templates/metrics-list-item.hbs index 26b784ea303..cb25af27f94 100644 --- a/server/sonar-web/src/main/js/apps/metrics/templates/metrics-list-item.hbs +++ b/server/sonar-web/src/main/js/apps/metrics/templates/metrics-list-item.hbs @@ -1,6 +1,6 @@ <div class="pull-right big-spacer-left nowrap"> - <a class="js-metric-update icon-edit" title="Update" data-toggle="tooltip" href="#"></a> - <a class="js-metric-delete icon-delete" title="Delete" data-toggle="tooltip" href="#"></a> + <a class="js-metric-update icon-edit" title="{{t 'update_verb'}}" data-toggle="tooltip" href="#"></a> + <a class="js-metric-delete icon-delete" title="{{t 'delete'}}" data-toggle="tooltip" href="#"></a> </div> <div class="display-inline-block text-top width-30"> |