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