Commit 40043a07 authored by Brandon Labuschagne's avatar Brandon Labuschagne Committed by Fatih Acet

Internationalisation of protected_tags directory

This is one of many MRs opened in order to improve the overall
internationalisation of the GitLab codebase.

i18n documentation
https://docs.gitlab.com/ee/development/i18n/externalization.html
parent 10900207
import { __ } from '~/locale';
export default class ProtectedTagAccessDropdown {
constructor(options) {
this.options = options;
......@@ -15,7 +17,7 @@ export default class ProtectedTagAccessDropdown {
if ($el.is('.is-active')) {
return item.text;
}
return 'Select';
return __('Select');
},
clicked(options) {
options.e.preventDefault();
......
import $ from 'jquery';
import ProtectedTagAccessDropdown from './protected_tag_access_dropdown';
import CreateItemDropdown from '../create_item_dropdown';
import { __ } from '~/locale';
export default class ProtectedTagCreate {
constructor() {
......@@ -27,7 +28,7 @@ export default class ProtectedTagCreate {
// Protected tag dropdown
this.createItemDropdown = new CreateItemDropdown({
$dropdown: this.$form.find('.js-protected-tag-select'),
defaultToggleLabel: 'Protected Tag',
defaultToggleLabel: __('Protected Tag'),
fieldName: 'protected_tag[name]',
onSelect: this.onSelectCallback,
getData: ProtectedTagCreate.getProtectedTags,
......
import flash from '../flash';
import axios from '../lib/utils/axios_utils';
import ProtectedTagAccessDropdown from './protected_tag_access_dropdown';
import { __ } from '~/locale';
export default class ProtectedTagEdit {
constructor(options) {
......@@ -47,7 +48,11 @@ export default class ProtectedTagEdit {
.catch(() => {
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'),
);
});
}
}
......@@ -4036,6 +4036,9 @@ msgstr ""
msgid "Failed to update issues, please try again."
msgstr ""
msgid "Failed to update tag!"
msgstr ""
msgid "Failed to update."
msgstr ""
......@@ -7402,6 +7405,9 @@ msgstr ""
msgid "Protected"
msgstr ""
msgid "Protected Tag"
msgstr ""
msgid "Protip:"
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