diff options
5 files changed, 48 insertions, 10 deletions
diff --git a/app/assets/javascripts/merge_conflicts/merge_conflict_store.js b/app/assets/javascripts/merge_conflicts/merge_conflict_store.js index 0333335de06..88bc0940741 100644 --- a/app/assets/javascripts/merge_conflicts/merge_conflict_store.js +++ b/app/assets/javascripts/merge_conflicts/merge_conflict_store.js @@ -3,15 +3,16 @@ import $ from 'jquery'; import Vue from 'vue'; import Cookies from 'js-cookie'; +import { s__ } from '~/locale'; (global => { global.mergeConflicts = global.mergeConflicts || {}; const diffViewType = Cookies.get('diff_view'); - const HEAD_HEADER_TEXT = 'HEAD//our changes'; - const ORIGIN_HEADER_TEXT = 'origin//their changes'; - const HEAD_BUTTON_TITLE = 'Use ours'; - const ORIGIN_BUTTON_TITLE = 'Use theirs'; + const HEAD_HEADER_TEXT = s__('MergeConflict|HEAD//our changes'); + const ORIGIN_HEADER_TEXT = s__('MergeConflict|origin//their changes'); + const HEAD_BUTTON_TITLE = s__('MergeConflict|Use ours'); + const ORIGIN_BUTTON_TITLE = s__('MergeConflict|Use theirs'); const INTERACTIVE_RESOLVE_MODE = 'interactive'; const EDIT_RESOLVE_MODE = 'edit'; const DEFAULT_RESOLVE_MODE = INTERACTIVE_RESOLVE_MODE; @@ -173,7 +174,7 @@ import Cookies from 'js-cookie'; getConflictsCountText() { const count = this.getConflictsCount(); - const text = count > 1 ? 'conflicts' : 'conflict'; + const text = count > 1 ? s__('MergeConflict|conflicts') : s__('MergeConflict|conflict'); return `${count} ${text}`; }, @@ -348,8 +349,8 @@ import Cookies from 'js-cookie'; }, getCommitButtonText() { - const initial = 'Commit to source branch'; - const inProgress = 'Committing...'; + const initial = s__('MergeConflict|Commit to source branch'); + const inProgress = s__('MergeConflict|Committing...'); return this.state ? (this.state.isSubmitting ? inProgress : initial) : initial; }, diff --git a/app/assets/javascripts/merge_conflicts/merge_conflicts_bundle.js b/app/assets/javascripts/merge_conflicts/merge_conflicts_bundle.js index 7badd68089c..d8d203e0616 100644 --- a/app/assets/javascripts/merge_conflicts/merge_conflicts_bundle.js +++ b/app/assets/javascripts/merge_conflicts/merge_conflicts_bundle.js @@ -8,6 +8,7 @@ import './components/diff_file_editor'; import './components/inline_conflict_lines'; import './components/parallel_conflict_lines'; import syntaxHighlight from '../syntax_highlight'; +import { __ } from '~/locale'; export default function initMergeConflicts() { const INTERACTIVE_RESOLVE_MODE = 'interactive'; @@ -92,7 +93,7 @@ export default function initMergeConflicts() { }) .catch(() => { mergeConflictsStore.setSubmitState(false); - createFlash('Failed to save merge conflicts resolutions. Please try again!'); + createFlash(__('Failed to save merge conflicts resolutions. Please try again!')); }); }, }, diff --git a/app/assets/javascripts/templates/issuable_template_selector.js b/app/assets/javascripts/templates/issuable_template_selector.js index 6065770e68d..78609ce0610 100644 --- a/app/assets/javascripts/templates/issuable_template_selector.js +++ b/app/assets/javascripts/templates/issuable_template_selector.js @@ -3,6 +3,7 @@ import $ from 'jquery'; import Api from '../api'; import TemplateSelector from '../blob/template_selector'; +import { __ } from '~/locale'; export default class IssuableTemplateSelector extends TemplateSelector { constructor(...args) { @@ -25,7 +26,7 @@ export default class IssuableTemplateSelector extends TemplateSelector { $('.no-template', this.dropdown.parent()).on('click', () => { this.currentTemplate.content = ''; this.setInputValueToTemplateContent(); - $('.dropdown-toggle-text', this.dropdown).text('Choose a template'); + $('.dropdown-toggle-text', this.dropdown).text(__('Choose a template')); }); } diff --git a/app/assets/javascripts/terminal/terminal.js b/app/assets/javascripts/terminal/terminal.js index e5dd7a465ea..9c7c10d9864 100644 --- a/app/assets/javascripts/terminal/terminal.js +++ b/app/assets/javascripts/terminal/terminal.js @@ -4,6 +4,7 @@ import { Terminal } from 'xterm'; import * as fit from 'xterm/lib/addons/fit/fit'; import * as webLinks from 'xterm/lib/addons/webLinks/webLinks'; import { canScrollUp, canScrollDown } from '~/lib/utils/dom_utils'; +import { __ } from '~/locale'; const SCROLL_MARGIN = 5; @@ -78,7 +79,8 @@ export default class GLTerminal { } handleSocketFailure() { - this.terminal.write('\r\nConnection failure'); + this.terminal.write('\r\n'); + this.terminal.write(__('Connection failure')); } addScrollListener(onScrollLimit) { diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 8ae350779d4..352de8599ba 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -1740,6 +1740,9 @@ msgstr "" msgid "Choose a role permission" msgstr "" +msgid "Choose a template" +msgstr "" + msgid "Choose a template..." msgstr "" @@ -2606,6 +2609,9 @@ msgstr "" msgid "Connect repositories from GitHub" msgstr "" +msgid "Connection failure" +msgstr "" + msgid "Container Registry" msgstr "" @@ -4060,6 +4066,9 @@ msgstr "" msgid "Failed to remove user key." msgstr "" +msgid "Failed to save merge conflicts resolutions. Please try again!" +msgstr "" + msgid "Failed to save new settings" msgstr "" @@ -5637,6 +5646,30 @@ msgstr "" msgid "Merge when pipeline succeeds" msgstr "" +msgid "MergeConflict|Commit to source branch" +msgstr "" + +msgid "MergeConflict|Committing..." +msgstr "" + +msgid "MergeConflict|HEAD//our changes" +msgstr "" + +msgid "MergeConflict|Use ours" +msgstr "" + +msgid "MergeConflict|Use theirs" +msgstr "" + +msgid "MergeConflict|conflict" +msgstr "" + +msgid "MergeConflict|conflicts" +msgstr "" + +msgid "MergeConflict|origin//their changes" +msgstr "" + msgid "MergeRequests|Add a reply" msgstr "" |