Commit 4ca8e36e authored by Coung Ngo's avatar Coung Ngo

Add internationalization to markdown textarea

Some sentences did not have internalization, which this commit
fixes
parent 39c1af46
<script> <script>
/* eslint-disable @gitlab/vue-require-i18n-strings */ import { GlButton, GlLink, GlLoadingIcon, GlSprintf } from '@gitlab/ui';
import { GlButton, GlLink, GlLoadingIcon } from '@gitlab/ui';
export default { export default {
components: { components: {
GlButton, GlButton,
GlLink, GlLink,
GlLoadingIcon, GlLoadingIcon,
GlSprintf,
}, },
props: { props: {
markdownDocsPath: { markdownDocsPath: {
...@@ -41,16 +41,27 @@ export default { ...@@ -41,16 +41,27 @@ export default {
}}</gl-link> }}</gl-link>
</template> </template>
<template v-if="hasQuickActionsDocsPath && markdownDocsPath"> <template v-if="hasQuickActionsDocsPath && markdownDocsPath">
<gl-link :href="markdownDocsPath" target="_blank">{{ __('Markdown') }}</gl-link> <gl-sprintf
and :message="
<gl-link :href="quickActionsDocsPath" target="_blank">{{ __('quick actions') }}</gl-link> __(
are supported '%{markdownDocsLinkStart}Markdown%{markdownDocsLinkEnd} and %{quickActionsDocsLinkStart}quick actions%{quickActionsDocsLinkEnd} are supported',
)
"
>
<template #markdownDocsLink="{content}">
<gl-link :href="markdownDocsPath" target="_blank">{{ content }}</gl-link>
</template>
<template #quickActionsDocsLink="{content}">
<gl-link :href="quickActionsDocsPath" target="_blank">{{ content }}</gl-link>
</template>
</gl-sprintf>
</template> </template>
</div> </div>
<span v-if="canAttachFile" class="uploading-container"> <span v-if="canAttachFile" class="uploading-container">
<span class="uploading-progress-container hide"> <span class="uploading-progress-container hide">
<i class="fa fa-file-image-o toolbar-button-icon" aria-hidden="true"></i> <i class="fa fa-file-image-o toolbar-button-icon" aria-hidden="true"></i>
<span class="attaching-file-message"></span> <span class="attaching-file-message"></span>
<!-- eslint-disable-next-line @gitlab/vue-require-i18n-strings -->
<span class="uploading-progress">0%</span> <span class="uploading-progress">0%</span>
<gl-loading-icon inline class="align-text-bottom" /> <gl-loading-icon inline class="align-text-bottom" />
</span> </span>
...@@ -59,10 +70,21 @@ export default { ...@@ -59,10 +70,21 @@ export default {
<i class="fa fa-file-image-o toolbar-button-icon" aria-hidden="true"></i> <i class="fa fa-file-image-o toolbar-button-icon" aria-hidden="true"></i>
</span> </span>
<span class="uploading-error-message"></span> <span class="uploading-error-message"></span>
<button class="retry-uploading-link" type="button">{{ __('Try again') }}</button> or
<button class="attach-new-file markdown-selector" type="button"> <gl-sprintf
{{ __('attach a new file') }} :message="
</button> __(
'%{retryButtonStart}Try again%{retryButtonEnd} or %{newFileButtonStart}attach a new file%{newFileButtonEnd}',
)
"
>
<template #retryButton="{content}">
<button class="retry-uploading-link" type="button">{{ content }}</button>
</template>
<template #newFileButton="{content}">
<button class="attach-new-file markdown-selector" type="button">{{ content }}</button>
</template>
</gl-sprintf>
</span> </span>
<gl-button class="markdown-selector button-attach-file" variant="link"> <gl-button class="markdown-selector button-attach-file" variant="link">
<i class="fa fa-file-image-o toolbar-button-icon" aria-hidden="true"></i <i class="fa fa-file-image-o toolbar-button-icon" aria-hidden="true"></i
......
...@@ -406,6 +406,9 @@ msgstr "" ...@@ -406,6 +406,9 @@ msgstr ""
msgid "%{lock_path} is locked by GitLab User %{lock_user_id}" msgid "%{lock_path} is locked by GitLab User %{lock_user_id}"
msgstr "" msgstr ""
msgid "%{markdownDocsLinkStart}Markdown%{markdownDocsLinkEnd} and %{quickActionsDocsLinkStart}quick actions%{quickActionsDocsLinkEnd} are supported"
msgstr ""
msgid "%{mergeLength}/%{usersLength} can merge" msgid "%{mergeLength}/%{usersLength} can merge"
msgstr "" msgstr ""
...@@ -479,6 +482,9 @@ msgid_plural "%{releases} releases" ...@@ -479,6 +482,9 @@ msgid_plural "%{releases} releases"
msgstr[0] "" msgstr[0] ""
msgstr[1] "" msgstr[1] ""
msgid "%{retryButtonStart}Try again%{retryButtonEnd} or %{newFileButtonStart}attach a new file%{newFileButtonEnd}"
msgstr ""
msgid "%{screenreaderOnlyStart}Keyboard shorcuts%{screenreaderOnlyEnd} Disabled" msgid "%{screenreaderOnlyStart}Keyboard shorcuts%{screenreaderOnlyEnd} Disabled"
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