aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/coding-rules/rule/custom-rule-creation-view.js
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2016-01-06 16:14:25 +0100
committerStas Vilchik <vilchiks@gmail.com>2016-01-06 16:25:12 +0100
commitf4c7830570b522ad83ec9168cf12755e58192d26 (patch)
tree60cb773e73bd4cd17b5d83191897d439ea0bbad5 /server/sonar-web/src/main/js/apps/coding-rules/rule/custom-rule-creation-view.js
parent14fde3c0c46e717ac44a0b482f21f82149e2e837 (diff)
downloadsonarqube-f4c7830570b522ad83ec9168cf12755e58192d26.tar.gz
sonarqube-f4c7830570b522ad83ec9168cf12755e58192d26.zip
rewrite translation module
Diffstat (limited to 'server/sonar-web/src/main/js/apps/coding-rules/rule/custom-rule-creation-view.js')
-rw-r--r--server/sonar-web/src/main/js/apps/coding-rules/rule/custom-rule-creation-view.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/rule/custom-rule-creation-view.js b/server/sonar-web/src/main/js/apps/coding-rules/rule/custom-rule-creation-view.js
index 5f4cbc72378..2d89ec9d009 100644
--- a/server/sonar-web/src/main/js/apps/coding-rules/rule/custom-rule-creation-view.js
+++ b/server/sonar-web/src/main/js/apps/coding-rules/rule/custom-rule-creation-view.js
@@ -23,6 +23,7 @@ import ModalFormView from '../../../components/common/modal-form';
import Template from '../templates/rule/coding-rules-custom-rule-creation.hbs';
import { csvEscape } from '../../../helpers/csv';
import latinize from '../../../helpers/latinize';
+import { translate } from '../../../helpers/l10n';
export default ModalFormView.extend({
template: Template,
@@ -172,7 +173,7 @@ export default ModalFormView.extend({
}).fail(function (jqXHR) {
if (jqXHR.status === 409) {
that.existingRule = jqXHR.responseJSON.rule;
- that.showErrors([], [{ msg: window.t('coding_rules.reactivate.help') }]);
+ that.showErrors([], [{ msg: translate('coding_rules.reactivate.help') }]);
that.ui.customRuleCreationCreate.addClass('hidden');
that.ui.customRuleCreationReactivate.removeClass('hidden');
} else {
@@ -194,7 +195,7 @@ export default ModalFormView.extend({
var statuses = ['READY', 'BETA', 'DEPRECATED'].map(function (status) {
return {
id: status,
- text: window.t('rules.status', status.toLowerCase())
+ text: translate('rules.status', status.toLowerCase())
};
});