Commit 11be4df3 authored by Ezekiel Kigbo's avatar Ezekiel Kigbo

Vue-i18n: app/assets/javascripts/ide directory

i18n linting for .vue files under the
app/assets/javascripts/ide directory
parent 58f3a561
...@@ -107,7 +107,8 @@ export default { ...@@ -107,7 +107,8 @@ export default {
@click="openFileInEditor" @click="openFileInEditor"
> >
<span class="multi-file-commit-list-file-path d-flex align-items-center"> <span class="multi-file-commit-list-file-path d-flex align-items-center">
<file-icon :file-name="file.name" class="append-right-8" />{{ file.name }} <file-icon :file-name="file.name" class="append-right-8" />
{{ file.name }}
</span> </span>
<div class="ml-auto d-flex align-items-center"> <div class="ml-auto d-flex align-items-center">
<div class="d-flex align-items-center ide-commit-list-changed-icon"> <div class="d-flex align-items-center ide-commit-list-changed-icon">
......
...@@ -27,7 +27,7 @@ export default { ...@@ -27,7 +27,7 @@ export default {
target="_blank" target="_blank"
rel="noopener noreferrer" rel="noopener noreferrer"
> >
<span class="vertical-align-middle">Open in file view</span> <span class="vertical-align-middle">{{ __('Open in file view') }}</span>
<icon :size="16" name="external-link" css-classes="vertical-align-middle space-right" /> <icon :size="16" name="external-link" css-classes="vertical-align-middle space-right" />
</a> </a>
</div> </div>
......
...@@ -8,6 +8,7 @@ import { activityBarViews, viewerTypes } from '../constants'; ...@@ -8,6 +8,7 @@ import { activityBarViews, viewerTypes } from '../constants';
import Editor from '../lib/editor'; import Editor from '../lib/editor';
import ExternalLink from './external_link.vue'; import ExternalLink from './external_link.vue';
import FileTemplatesBar from './file_templates/bar.vue'; import FileTemplatesBar from './file_templates/bar.vue';
import { __ } from '~/locale';
export default { export default {
components: { components: {
...@@ -145,7 +146,14 @@ export default { ...@@ -145,7 +146,14 @@ export default {
this.createEditorInstance(); this.createEditorInstance();
}) })
.catch(err => { .catch(err => {
flash('Error setting up editor. Please try again.', 'alert', document, null, false, true); flash(
__('Error setting up editor. Please try again.'),
'alert',
document,
null,
false,
true,
);
throw err; throw err;
}); });
}, },
...@@ -227,12 +235,8 @@ export default { ...@@ -227,12 +235,8 @@ export default {
role="button" role="button"
@click.prevent="setFileViewMode({ file, viewMode: 'editor' })" @click.prevent="setFileViewMode({ file, viewMode: 'editor' })"
> >
<template v-if="viewer === $options.viewerTypes.edit"> <template v-if="viewer === $options.viewerTypes.edit">{{ __('Edit') }}</template>
{{ __('Edit') }} <template v-else>{{ __('Review') }}</template>
</template>
<template v-else>
{{ __('Review') }}
</template>
</a> </a>
</li> </li>
<li v-if="file.previewMode" :class="previewTabCSS"> <li v-if="file.previewMode" :class="previewTabCSS">
...@@ -240,9 +244,8 @@ export default { ...@@ -240,9 +244,8 @@ export default {
href="javascript:void(0);" href="javascript:void(0);"
role="button" role="button"
@click.prevent="setFileViewMode({ file, viewMode: 'preview' })" @click.prevent="setFileViewMode({ file, viewMode: 'preview' })"
>{{ file.previewMode.previewTitle }}</a
> >
{{ file.previewMode.previewTitle }}
</a>
</li> </li>
</ul> </ul>
<external-link :file="file" /> <external-link :file="file" />
......
<script> <script>
import { __, sprintf } from '~/locale';
import icon from '~/vue_shared/components/icon.vue'; import icon from '~/vue_shared/components/icon.vue';
import tooltip from '~/vue_shared/directives/tooltip'; import tooltip from '~/vue_shared/directives/tooltip';
import '~/lib/utils/datetime_utility'; import '~/lib/utils/datetime_utility';
...@@ -18,7 +19,9 @@ export default { ...@@ -18,7 +19,9 @@ export default {
}, },
computed: { computed: {
lockTooltip() { lockTooltip() {
return `Locked by ${this.file.file_lock.user.name}`; return sprintf(__(`Locked by %{fileLockUserName}`), {
fileLockUserName: this.file.file_lock.user.name,
});
}, },
}, },
}; };
......
<script> <script>
import { __, sprintf } from '~/locale';
import { mapActions } from 'vuex'; import { mapActions } from 'vuex';
import FileIcon from '~/vue_shared/components/file_icon.vue'; import FileIcon from '~/vue_shared/components/file_icon.vue';
...@@ -27,9 +28,9 @@ export default { ...@@ -27,9 +28,9 @@ export default {
computed: { computed: {
closeLabel() { closeLabel() {
if (this.fileHasChanged) { if (this.fileHasChanged) {
return `${this.tab.name} changed`; return sprintf(__(`%{tabname} changed`), { tabname: this.tab.name });
} }
return `Close ${this.tab.name}`; return sprintf(__(`Close %{tabname}`, { tabname: this.tab.name }));
}, },
showChangedIcon() { showChangedIcon() {
if (this.tab.pending) return true; if (this.tab.pending) return true;
......
...@@ -231,6 +231,9 @@ msgid_plural "%{strong_start}%{tag_count}%{strong_end} Tags" ...@@ -231,6 +231,9 @@ msgid_plural "%{strong_start}%{tag_count}%{strong_end} Tags"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
msgid "%{tabname} changed"
msgstr ""
msgid "%{text} %{files}" msgid "%{text} %{files}"
msgid_plural "%{text} %{files} files" msgid_plural "%{text} %{files} files"
msgstr[0] "" msgstr[0] ""
...@@ -2206,6 +2209,9 @@ msgstr "" ...@@ -2206,6 +2209,9 @@ msgstr ""
msgid "Close" msgid "Close"
msgstr "" msgstr ""
msgid "Close %{tabname}"
msgstr ""
msgid "Close milestone" msgid "Close milestone"
msgstr "" msgstr ""
...@@ -4205,6 +4211,9 @@ msgstr "" ...@@ -4205,6 +4211,9 @@ msgstr ""
msgid "Error saving label update." msgid "Error saving label update."
msgstr "" msgstr ""
msgid "Error setting up editor. Please try again."
msgstr ""
msgid "Error updating %{issuableType}" msgid "Error updating %{issuableType}"
msgstr "" msgstr ""
...@@ -6046,6 +6055,9 @@ msgstr "" ...@@ -6046,6 +6055,9 @@ msgstr ""
msgid "Locked" msgid "Locked"
msgstr "" msgstr ""
msgid "Locked by %{fileLockUserName}"
msgstr ""
msgid "Locked to current projects" msgid "Locked to current projects"
msgstr "" msgstr ""
...@@ -7010,6 +7022,9 @@ msgstr "" ...@@ -7010,6 +7022,9 @@ msgstr ""
msgid "Open in Xcode" msgid "Open in Xcode"
msgstr "" msgstr ""
msgid "Open in file view"
msgstr ""
msgid "Open issues" msgid "Open issues"
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