summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/assets/javascripts/new_branch_form.js19
-rw-r--r--app/assets/javascripts/notes.js4
-rw-r--r--locale/gitlab.pot21
3 files changed, 12 insertions, 32 deletions
diff --git a/app/assets/javascripts/new_branch_form.js b/app/assets/javascripts/new_branch_form.js
index 80115e75b58..f338dbbb0a6 100644
--- a/app/assets/javascripts/new_branch_form.js
+++ b/app/assets/javascripts/new_branch_form.js
@@ -2,7 +2,6 @@
import $ from 'jquery';
import RefSelectDropdown from './ref_select_dropdown';
-import { s__ } from './locale';
export default class NewBranchForm {
constructor(form, availableRefs) {
@@ -30,23 +29,23 @@ export default class NewBranchForm {
var endsWith, invalid, single, startsWith;
startsWith = {
pattern: /^(\/|\.)/g,
- prefix: s__("BranchValidation|can't start with"),
- conjunction: s__('BranchValidation|or'),
+ prefix: "can't start with",
+ conjunction: 'or',
};
endsWith = {
pattern: /(\/|\.|\.lock)$/g,
- prefix: s__("BranchValidation|can't end in"),
- conjunction: s__('BranchValidation|or'),
+ prefix: "can't end in",
+ conjunction: 'or',
};
invalid = {
pattern: /(\s|~|\^|:|\?|\*|\[|\\|\.\.|@\{|\/{2,}){1}/g,
- prefix: s__("BranchValidation|can't contain"),
+ prefix: "can't contain",
conjunction: ', ',
};
single = {
pattern: /^@+$/g,
- prefix: s__("BranchValidation|can't be"),
- conjunction: s__('BranchValidation|or'),
+ prefix: "can't be",
+ conjunction: 'or',
};
return (this.restrictions = [startsWith, invalid, endsWith, single]);
}
@@ -67,9 +66,9 @@ export default class NewBranchForm {
formatted = values.map(function(value) {
switch (false) {
case !/\s/.test(value):
- return s__('BranchValidation|spaces');
+ return 'spaces';
case !/\/{2,}/g.test(value):
- return s__('BranchValidation|consecutive slashes');
+ return 'consecutive slashes';
default:
return "'" + value + "'";
}
diff --git a/app/assets/javascripts/notes.js b/app/assets/javascripts/notes.js
index d21982721ed..d03f4508fb8 100644
--- a/app/assets/javascripts/notes.js
+++ b/app/assets/javascripts/notes.js
@@ -1504,7 +1504,9 @@ export default class Notes {
tempFormContent = __('Applying multiple commands');
} else {
const commandDescription = executedCommands[0].description.toLowerCase();
- tempFormContent = __(`Applying command to ${commandDescription}`);
+ tempFormContent = sprintf(__('Applying command to %{commandDescription}'), {
+ commandDescription,
+ });
}
} else {
tempFormContent = __('Applying command');
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index 1e7e1fe362c..f13c3023bab 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -1462,27 +1462,6 @@ msgstr ""
msgid "BranchSwitcherTitle|Switch branch"
msgstr ""
-msgid "BranchValidation|can't be"
-msgstr ""
-
-msgid "BranchValidation|can't contain"
-msgstr ""
-
-msgid "BranchValidation|can't end in"
-msgstr ""
-
-msgid "BranchValidation|can't start with"
-msgstr ""
-
-msgid "BranchValidation|consecutive slashes"
-msgstr ""
-
-msgid "BranchValidation|or"
-msgstr ""
-
-msgid "BranchValidation|spaces"
-msgstr ""
-
msgid "Branches"
msgstr ""