Commit bda09311 authored by Clement Ho's avatar Clement Ho

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

i18n of protected_branches directory - EE

See merge request gitlab-org/gitlab-ee!12126
parents 4a7f7081 8b5f1c8a
import { __ } from '~/locale';
export default class ProtectedBranchAccessDropdown { export default class ProtectedBranchAccessDropdown {
constructor(options) { constructor(options) {
this.options = options; this.options = options;
...@@ -15,7 +17,7 @@ export default class ProtectedBranchAccessDropdown { ...@@ -15,7 +17,7 @@ export default class ProtectedBranchAccessDropdown {
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();
......
...@@ -2,6 +2,7 @@ import $ from 'jquery'; ...@@ -2,6 +2,7 @@ import $ from 'jquery';
import ProtectedBranchAccessDropdown from './protected_branch_access_dropdown'; import ProtectedBranchAccessDropdown from './protected_branch_access_dropdown';
import CreateItemDropdown from '../create_item_dropdown'; import CreateItemDropdown from '../create_item_dropdown';
import AccessorUtilities from '../lib/utils/accessor'; import AccessorUtilities from '../lib/utils/accessor';
import { __ } from '~/locale';
export default class ProtectedBranchCreate { export default class ProtectedBranchCreate {
constructor() { constructor() {
...@@ -35,7 +36,7 @@ export default class ProtectedBranchCreate { ...@@ -35,7 +36,7 @@ export default class ProtectedBranchCreate {
this.createItemDropdown = new CreateItemDropdown({ this.createItemDropdown = new CreateItemDropdown({
$dropdown: $protectedBranchDropdown, $dropdown: $protectedBranchDropdown,
defaultToggleLabel: 'Protected Branch', defaultToggleLabel: __('Protected Branch'),
fieldName: 'protected_branch[name]', fieldName: 'protected_branch[name]',
onSelect: this.onSelectCallback, onSelect: this.onSelectCallback,
getData: ProtectedBranchCreate.getProtectedBranches, getData: ProtectedBranchCreate.getProtectedBranches,
......
import flash from '../flash'; import flash from '../flash';
import axios from '../lib/utils/axios_utils'; import axios from '../lib/utils/axios_utils';
import ProtectedBranchAccessDropdown from './protected_branch_access_dropdown'; import ProtectedBranchAccessDropdown from './protected_branch_access_dropdown';
import { __ } from '~/locale';
export default class ProtectedBranchEdit { export default class ProtectedBranchEdit {
constructor(options) { constructor(options) {
...@@ -68,7 +69,7 @@ export default class ProtectedBranchEdit { ...@@ -68,7 +69,7 @@ export default class ProtectedBranchEdit {
this.$allowedToPushDropdown.enable(); this.$allowedToPushDropdown.enable();
flash( flash(
'Failed to update branch!', __('Failed to update branch!'),
'alert', 'alert',
document.querySelector('.js-protected-branches-list'), document.querySelector('.js-protected-branches-list'),
); );
......
...@@ -5099,6 +5099,9 @@ msgstr "" ...@@ -5099,6 +5099,9 @@ msgstr ""
msgid "Failed to signing using smartcard authentication" msgid "Failed to signing using smartcard authentication"
msgstr "" msgstr ""
msgid "Failed to update branch!"
msgstr ""
msgid "Failed to update issues, please try again." msgid "Failed to update issues, please try again."
msgstr "" msgstr ""
...@@ -9922,6 +9925,9 @@ msgstr "" ...@@ -9922,6 +9925,9 @@ msgstr ""
msgid "Protected" msgid "Protected"
msgstr "" msgstr ""
msgid "Protected Branch"
msgstr ""
msgid "Protected Environments" msgid "Protected Environments"
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