diff options
author | Brandon Labuschagne <blabuschagne@gitlab.com> | 2019-05-07 08:24:27 +0200 |
---|---|---|
committer | Brandon Labuschagne <blabuschagne@gitlab.com> | 2019-05-17 16:23:42 +0200 |
commit | 69a65d8d63fb32483836fe958e2c4d8b53ac20bd (patch) | |
tree | 9c2a56745a273a4e70b5eb3b2c9569d92eb24b7a | |
parent | 941f37e9939e21b8a7b669f71be4b0422e673dba (diff) | |
download | gitlab-ce-js-i18n-p-r.tar.gz |
I18N JS files starting with p or rjs-i18n-p-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
-rw-r--r-- | app/assets/javascripts/project_label_subscription.js | 4 | ||||
-rw-r--r-- | app/assets/javascripts/project_select.js | 5 | ||||
-rw-r--r-- | app/assets/javascripts/right_sidebar.js | 7 | ||||
-rw-r--r-- | locale/gitlab.pot | 15 |
4 files changed, 25 insertions, 6 deletions
diff --git a/app/assets/javascripts/project_label_subscription.js b/app/assets/javascripts/project_label_subscription.js index d3c604dcee1..5395e14cc79 100644 --- a/app/assets/javascripts/project_label_subscription.js +++ b/app/assets/javascripts/project_label_subscription.js @@ -38,9 +38,9 @@ export default class ProjectLabelSubscription { let newAction; if (oldStatus === 'unsubscribed') { - [newStatus, newAction] = ['subscribed', 'Unsubscribe']; + [newStatus, newAction] = ['subscribed', __('Unsubscribe')]; } else { - [newStatus, newAction] = ['unsubscribed', 'Subscribe']; + [newStatus, newAction] = ['unsubscribed', __('Subscribe')]; } $btn.removeClass('disabled'); diff --git a/app/assets/javascripts/project_select.js b/app/assets/javascripts/project_select.js index 5ee510eb11d..dbe354a547b 100644 --- a/app/assets/javascripts/project_select.js +++ b/app/assets/javascripts/project_select.js @@ -3,6 +3,7 @@ import $ from 'jquery'; import Api from './api'; import ProjectSelectComboButton from './project_select_combo_button'; +import { s__ } from './locale'; export default function projectSelect() { import(/* webpackChunkName: 'select2' */ 'select2/select2') @@ -21,9 +22,9 @@ export default function projectSelect() { this.includeProjectsInSubgroups = $(select).data('includeProjectsInSubgroups') || false; this.allowClear = $(select).data('allowClear') || false; - placeholder = 'Search for project'; + placeholder = s__('ProjectSelect|Search for project'); if (this.includeGroups) { - placeholder += ' or group'; + placeholder += s__('ProjectSelect| or group'); } $(select).select2({ 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'), + }), ); }; diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 5800aa9604b..6e144ae8df8 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -7538,6 +7538,12 @@ msgstr "" msgid "ProjectPage|Project ID: %{project_id}" msgstr "" +msgid "ProjectSelect| or group" +msgstr "" + +msgid "ProjectSelect|Search for project" +msgstr "" + msgid "ProjectSettings|Additional merge request capabilities that influence how and when merges will be performed" msgstr "" @@ -8226,6 +8232,12 @@ msgstr "" msgid "Revoked personal access token %{personal_access_token_name}!" msgstr "" +msgid "RightSidebar|adding a" +msgstr "" + +msgid "RightSidebar|deleting the" +msgstr "" + msgid "Run housekeeping" msgstr "" @@ -9664,6 +9676,9 @@ msgstr "" msgid "There was a problem communicating with your device." msgstr "" +msgid "There was an error %{message} todo." +msgstr "" + msgid "There was an error loading users activity calendar." msgstr "" |