Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon Labuschagne <blabuschagne@gitlab.com>2019-05-07 09:24:27 +0300
committerBrandon Labuschagne <blabuschagne@gitlab.com>2019-05-17 17:23:42 +0300
commit69a65d8d63fb32483836fe958e2c4d8b53ac20bd (patch)
tree9c2a56745a273a4e70b5eb3b2c9569d92eb24b7a /app/assets/javascripts/right_sidebar.js
parent941f37e9939e21b8a7b669f71be4b0422e673dba (diff)
I18N JS files starting with p or r
This is one of many MRs opened in order to improve the overall internationalisation of the GitLab codebase. This commit only targets Vanilla JS files. i18n documentation https://docs.gitlab.com/ee/development/i18n/externalization.html
Diffstat (limited to 'app/assets/javascripts/right_sidebar.js')
-rw-r--r--app/assets/javascripts/right_sidebar.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/assets/javascripts/right_sidebar.js b/app/assets/javascripts/right_sidebar.js
index 9a0cdc02952..72e061df573 100644
--- a/app/assets/javascripts/right_sidebar.js
+++ b/app/assets/javascripts/right_sidebar.js
@@ -5,7 +5,7 @@ import _ from 'underscore';
import Cookies from 'js-cookie';
import flash from './flash';
import axios from './lib/utils/axios_utils';
-import { __ } from './locale';
+import { sprintf, s__, __ } from './locale';
function Sidebar(currentUser) {
this.toggleTodo = this.toggleTodo.bind(this);
@@ -101,7 +101,10 @@ Sidebar.prototype.toggleTodo = function(e) {
this.todoUpdateDone(data);
})
.catch(() =>
- flash(`There was an error ${ajaxType === 'post' ? 'adding a' : 'deleting the'} todo.`),
+ flash(sprintf(__('There was an error %{message} todo.')), {
+ message:
+ ajaxType === 'post' ? s__('RightSidebar|adding a') : s__('RightSidebar|deleting the'),
+ }),
);
};