Commit a627210a authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab-ce master

parents 713ce79b 40983f47
import $ from 'jquery';
import Clipboard from 'clipboard';
import { sprintf, __ } from '~/locale';
function showTooltip(target, title) {
const $target = $(target);
......@@ -16,7 +17,7 @@ function showTooltip(target, title) {
}
function genericSuccess(e) {
showTooltip(e.trigger, 'Copied');
showTooltip(e.trigger, __('Copied'));
// Clear the selection and blur the trigger so it loses its border
e.clearSelection();
$(e.trigger).blur();
......@@ -33,7 +34,7 @@ function genericError(e) {
} else {
key = 'Ctrl';
}
showTooltip(e.trigger, `Press ${key}-C to copy`);
showTooltip(e.trigger, sprintf(__(`Press %{key}-C to copy`), { key }));
}
export default function initCopyToClipboard() {
......
/* eslint-disable class-methods-use-this */
import { Node } from 'tiptap';
import { __ } from '~/locale';
// Transforms generated HTML back to GFM for Banzai::Filter::TableOfContentsFilter
export default class TableOfContents extends Node {
......@@ -22,7 +23,7 @@ export default class TableOfContents extends Node {
priority: 51,
},
],
toDOM: () => ['p', { class: 'table-of-contents' }, 'Table of Contents'],
toDOM: () => ['p', { class: 'table-of-contents' }, __('Table of Contents')],
};
}
......
......@@ -22,7 +22,7 @@ function MarkdownPreview() {}
// Minimum number of users referenced before triggering a warning
MarkdownPreview.prototype.referenceThreshold = 10;
MarkdownPreview.prototype.emptyMessage = 'Nothing to preview.';
MarkdownPreview.prototype.emptyMessage = __('Nothing to preview.');
MarkdownPreview.prototype.ajaxCache = {};
......@@ -40,7 +40,7 @@ MarkdownPreview.prototype.showPreview = function($form) {
preview.text(this.emptyMessage);
this.hideReferencedUsers($form);
} else {
preview.addClass('md-preview-loading').text('Loading...');
preview.addClass('md-preview-loading').text(__('Loading...'));
this.fetchMarkdownPreview(
mdText,
url,
......
import $ from 'jquery';
import '../commons/bootstrap';
import { isInIssuePage } from '../lib/utils/common_utils';
import { __ } from '~/locale';
// Quick Submit behavior
//
......@@ -65,7 +66,9 @@ $(document).on(
}
const $this = $(this);
const title = isMac() ? 'You can also press ⌘-Enter' : 'You can also press Ctrl-Enter';
const title = isMac()
? __('You can also press ⌘-Enter')
: __('You can also press Ctrl-Enter');
$this.tooltip({
container: 'body',
......
......@@ -3299,6 +3299,9 @@ msgstr ""
msgid "ConvDev Index"
msgstr ""
msgid "Copied"
msgstr ""
msgid "Copy %{http_label} clone URL"
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