Commit 8dd687bd authored by Tim Zallmann's avatar Tim Zallmann

Merge branch 'js-i18n-p-r' into 'master'

i18n JS files starting with p or r

See merge request gitlab-org/gitlab-ce!28168
parents 562838ba 69a65d8d
...@@ -38,9 +38,9 @@ export default class ProjectLabelSubscription { ...@@ -38,9 +38,9 @@ export default class ProjectLabelSubscription {
let newAction; let newAction;
if (oldStatus === 'unsubscribed') { if (oldStatus === 'unsubscribed') {
[newStatus, newAction] = ['subscribed', 'Unsubscribe']; [newStatus, newAction] = ['subscribed', __('Unsubscribe')];
} else { } else {
[newStatus, newAction] = ['unsubscribed', 'Subscribe']; [newStatus, newAction] = ['unsubscribed', __('Subscribe')];
} }
$btn.removeClass('disabled'); $btn.removeClass('disabled');
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
import $ from 'jquery'; import $ from 'jquery';
import Api from './api'; import Api from './api';
import ProjectSelectComboButton from './project_select_combo_button'; import ProjectSelectComboButton from './project_select_combo_button';
import { s__ } from './locale';
export default function projectSelect() { export default function projectSelect() {
import(/* webpackChunkName: 'select2' */ 'select2/select2') import(/* webpackChunkName: 'select2' */ 'select2/select2')
...@@ -21,9 +22,9 @@ export default function projectSelect() { ...@@ -21,9 +22,9 @@ export default function projectSelect() {
this.includeProjectsInSubgroups = $(select).data('includeProjectsInSubgroups') || false; this.includeProjectsInSubgroups = $(select).data('includeProjectsInSubgroups') || false;
this.allowClear = $(select).data('allowClear') || false; this.allowClear = $(select).data('allowClear') || false;
placeholder = 'Search for project'; placeholder = s__('ProjectSelect|Search for project');
if (this.includeGroups) { if (this.includeGroups) {
placeholder += ' or group'; placeholder += s__('ProjectSelect| or group');
} }
$(select).select2({ $(select).select2({
......
...@@ -5,7 +5,7 @@ import _ from 'underscore'; ...@@ -5,7 +5,7 @@ import _ from 'underscore';
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
import flash from './flash'; import flash from './flash';
import axios from './lib/utils/axios_utils'; import axios from './lib/utils/axios_utils';
import { __ } from './locale'; import { sprintf, s__, __ } from './locale';
function Sidebar(currentUser) { function Sidebar(currentUser) {
this.toggleTodo = this.toggleTodo.bind(this); this.toggleTodo = this.toggleTodo.bind(this);
...@@ -101,7 +101,10 @@ Sidebar.prototype.toggleTodo = function(e) { ...@@ -101,7 +101,10 @@ Sidebar.prototype.toggleTodo = function(e) {
this.todoUpdateDone(data); this.todoUpdateDone(data);
}) })
.catch(() => .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'),
}),
); );
}; };
......
...@@ -7564,6 +7564,12 @@ msgstr "" ...@@ -7564,6 +7564,12 @@ msgstr ""
msgid "ProjectPage|Project ID: %{project_id}" msgid "ProjectPage|Project ID: %{project_id}"
msgstr "" 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" msgid "ProjectSettings|Additional merge request capabilities that influence how and when merges will be performed"
msgstr "" msgstr ""
...@@ -8255,6 +8261,12 @@ msgstr "" ...@@ -8255,6 +8261,12 @@ msgstr ""
msgid "Revoked personal access token %{personal_access_token_name}!" msgid "Revoked personal access token %{personal_access_token_name}!"
msgstr "" msgstr ""
msgid "RightSidebar|adding a"
msgstr ""
msgid "RightSidebar|deleting the"
msgstr ""
msgid "Run housekeeping" msgid "Run housekeeping"
msgstr "" msgstr ""
...@@ -9696,6 +9708,9 @@ msgstr "" ...@@ -9696,6 +9708,9 @@ msgstr ""
msgid "There was a problem communicating with your device." msgid "There was a problem communicating with your device."
msgstr "" msgstr ""
msgid "There was an error %{message} todo."
msgstr ""
msgid "There was an error loading users activity calendar." msgid "There was an error loading users activity calendar."
msgstr "" msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment