diff --git a/app/assets/javascripts/protected_tags/protected_tag_access_dropdown.js b/app/assets/javascripts/protected_tags/protected_tag_access_dropdown.js index b803da798d599fefb53fd1805bdd4911ae86c881..def2f091947c74ef7ac4e419f1d1a9f3be49288c 100644 --- a/app/assets/javascripts/protected_tags/protected_tag_access_dropdown.js +++ b/app/assets/javascripts/protected_tags/protected_tag_access_dropdown.js @@ -1,3 +1,5 @@ +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(); diff --git a/app/assets/javascripts/protected_tags/protected_tag_create.js b/app/assets/javascripts/protected_tags/protected_tag_create.js index fddf2674cbb6285f5de28a9ed8e95e4303c8320c..03a5fe6b3531cfebc9d22b3d5bececad69aced84 100644 --- a/app/assets/javascripts/protected_tags/protected_tag_create.js +++ b/app/assets/javascripts/protected_tags/protected_tag_create.js @@ -1,6 +1,7 @@ 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, diff --git a/app/assets/javascripts/protected_tags/protected_tag_edit.js b/app/assets/javascripts/protected_tags/protected_tag_edit.js index c52497e62f26e781f0063827446207113e6a0898..70bfd71abcebb7032348cd73ddc13732185c8184 100644 --- a/app/assets/javascripts/protected_tags/protected_tag_edit.js +++ b/app/assets/javascripts/protected_tags/protected_tag_edit.js @@ -1,6 +1,7 @@ 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'), + ); }); } } diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 7b5770a607516a3a3fdcd0f52fdf1698906b83ce..b97511eea73085a7f9c553bec5b1d5c16f2ba64e 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -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 ""