Commit 75f428d0 authored by Fatih Acet's avatar Fatih Acet

Merge branch 'ee-js-i18n-protected-tags' into 'master'

i18n of protected_tags directory - EE

See merge request gitlab-org/gitlab-ee!11851
parents 85dc57c6 45295ef4
import { __ } from '~/locale';
export default class ProtectedTagAccessDropdown { export default class ProtectedTagAccessDropdown {
constructor(options) { constructor(options) {
this.options = options; this.options = options;
...@@ -15,7 +17,7 @@ export default class ProtectedTagAccessDropdown { ...@@ -15,7 +17,7 @@ export default class ProtectedTagAccessDropdown {
if ($el.is('.is-active')) { if ($el.is('.is-active')) {
return item.text; return item.text;
} }
return 'Select'; return __('Select');
}, },
clicked(options) { clicked(options) {
options.e.preventDefault(); options.e.preventDefault();
......
import $ from 'jquery'; import $ from 'jquery';
import ProtectedTagAccessDropdown from './protected_tag_access_dropdown'; import ProtectedTagAccessDropdown from './protected_tag_access_dropdown';
import CreateItemDropdown from '../create_item_dropdown'; import CreateItemDropdown from '../create_item_dropdown';
import { __ } from '~/locale';
export default class ProtectedTagCreate { export default class ProtectedTagCreate {
constructor() { constructor() {
...@@ -27,7 +28,7 @@ export default class ProtectedTagCreate { ...@@ -27,7 +28,7 @@ export default class ProtectedTagCreate {
// Protected tag dropdown // Protected tag dropdown
this.createItemDropdown = new CreateItemDropdown({ this.createItemDropdown = new CreateItemDropdown({
$dropdown: this.$form.find('.js-protected-tag-select'), $dropdown: this.$form.find('.js-protected-tag-select'),
defaultToggleLabel: 'Protected Tag', defaultToggleLabel: __('Protected Tag'),
fieldName: 'protected_tag[name]', fieldName: 'protected_tag[name]',
onSelect: this.onSelectCallback, onSelect: this.onSelectCallback,
getData: ProtectedTagCreate.getProtectedTags, getData: ProtectedTagCreate.getProtectedTags,
......
import flash from '../flash'; import flash from '../flash';
import axios from '../lib/utils/axios_utils'; import axios from '../lib/utils/axios_utils';
import ProtectedTagAccessDropdown from './protected_tag_access_dropdown'; import ProtectedTagAccessDropdown from './protected_tag_access_dropdown';
import { __ } from '~/locale';
export default class ProtectedTagEdit { export default class ProtectedTagEdit {
constructor(options) { constructor(options) {
...@@ -47,7 +48,11 @@ export default class ProtectedTagEdit { ...@@ -47,7 +48,11 @@ export default class ProtectedTagEdit {
.catch(() => { .catch(() => {
this.$allowedToCreateDropdownButton.enable(); this.$allowedToCreateDropdownButton.enable();
flash('Failed to update tag!', 'alert', document.querySelector('.js-protected-tags-list')); flash(
__('Failed to update tag!'),
'alert',
document.querySelector('.js-protected-tags-list'),
);
}); });
} }
} }
...@@ -4888,6 +4888,9 @@ msgstr "" ...@@ -4888,6 +4888,9 @@ msgstr ""
msgid "Failed to update issues, please try again." msgid "Failed to update issues, please try again."
msgstr "" msgstr ""
msgid "Failed to update tag!"
msgstr ""
msgid "Failed to update." msgid "Failed to update."
msgstr "" msgstr ""
...@@ -9552,6 +9555,9 @@ msgstr "" ...@@ -9552,6 +9555,9 @@ msgstr ""
msgid "Protected Environments" msgid "Protected Environments"
msgstr "" msgstr ""
msgid "Protected Tag"
msgstr ""
msgid "ProtectedEnvironment|%{environment_name} will be writable for developers. Are you sure?" msgid "ProtectedEnvironment|%{environment_name} will be writable for developers. Are you sure?"
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