summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/notes/stores/utils.js
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2019-05-08 22:52:23 +0000
committerRobert Speicher <rspeicher@gmail.com>2019-05-08 22:52:23 +0000
commitfa6e00d05dedfac9ec28bf1a4735bffc38a5b4d0 (patch)
tree07c2087939b6c6dce33620c57a6989d76547e681 /app/assets/javascripts/notes/stores/utils.js
parent204dca4436f5b2c82611a873d05186ec4ff4c17c (diff)
parent2f003b58645b3cbc987c240f844b1ff6eb0c026a (diff)
downloadgitlab-ce-fa6e00d05dedfac9ec28bf1a4735bffc38a5b4d0.tar.gz
Merge branch '11-11-stable-prepare-rc2' into '11-11-stable'
Prepare 11.11.0-rc2 release See merge request gitlab-org/gitlab-ce!28215
Diffstat (limited to 'app/assets/javascripts/notes/stores/utils.js')
-rw-r--r--app/assets/javascripts/notes/stores/utils.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/assets/javascripts/notes/stores/utils.js b/app/assets/javascripts/notes/stores/utils.js
index 4b0feb0f94d..029fde348fb 100644
--- a/app/assets/javascripts/notes/stores/utils.js
+++ b/app/assets/javascripts/notes/stores/utils.js
@@ -1,12 +1,13 @@
import AjaxCache from '~/lib/utils/ajax_cache';
import { trimFirstCharOfLineContent } from '~/diffs/store/utils';
+import { sprintf, __ } from '~/locale';
const REGEX_QUICK_ACTIONS = /^\/\w+.*$/gm;
export const findNoteObjectById = (notes, id) => notes.filter(n => n.id === id)[0];
export const getQuickActionText = note => {
- let text = 'Applying command';
+ let text = __('Applying command');
const quickActions = AjaxCache.get(gl.GfmAutoComplete.dataSources.commands) || [];
const executedCommands = quickActions.filter(command => {
@@ -16,10 +17,10 @@ export const getQuickActionText = note => {
if (executedCommands && executedCommands.length) {
if (executedCommands.length > 1) {
- text = 'Applying multiple commands';
+ text = __('Applying multiple commands');
} else {
const commandDescription = executedCommands[0].description.toLowerCase();
- text = `Applying command to ${commandDescription}`;
+ text = sprintf(__('Applying command to %{commandDescription}', { commandDescription }));
}
}