mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-25 23:24:09 +03:00
i18n: extract strings
This commit is contained in:
1 parent
239c69ee40
commit
b788aaf03f
37 files changed
+2880
-2420
No files matched your search
@@ -1,9 +1,10 @@
|
||||
import { translate as t } from '@/plugins/i18n.plugin';
|
||||
import { defineTool } from '../tool';
|
||||
|
||||
export const tool = defineTool({
|
||||
name: 'Markdown Diff',
|
||||
name: t('tools.markdown-diff.title'),
|
||||
path: '/markdown-diff',
|
||||
description: 'Compare two Markdown documents and see the differences between them.',
|
||||
description: t('tools.markdown-diff.description'),
|
||||
keywords: ['markdown', 'diff', 'compare', 'difference', 'markdown diff', 'md', 'text'],
|
||||
component: () => import('./markdown-diff.vue'),
|
||||
icon: defineAsyncComponent(() => import('@vicons/tabler/es/Markdown')),
|
||||
|
||||
@@ -17,14 +17,14 @@
|
||||
<c-card v-else data-test-id="markdown-preview" w-full>
|
||||
<div class="markdown-preview-grid">
|
||||
<section>
|
||||
<h3>Source Markdown</h3>
|
||||
<h3>{{ t('tools.markdown-diff.texts.tag-source-markdown') }}</h3>
|
||||
<div class="markdown-preview-pane" data-test-id="source-markdown-preview">
|
||||
<c-markdown :markdown="sourceMarkdown" />
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h3>Modified Markdown</h3>
|
||||
<h3>{{ t('tools.markdown-diff.texts.tag-modified-markdown') }}</h3>
|
||||
<div class="markdown-preview-pane" data-test-id="modified-markdown-preview">
|
||||
<c-markdown :markdown="targetMarkdown" />
|
||||
</div>
|
||||
@@ -35,6 +35,8 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
const { t } = useI18n();
|
||||
import { ref } from 'vue';
|
||||
import { modifiedMarkdown, originalMarkdown } from './markdown-diff.constants';
|
||||
|
||||
@@ -45,8 +47,8 @@ const sourceMarkdown = ref(originalMarkdown);
|
||||
const targetMarkdown = ref(modifiedMarkdown);
|
||||
|
||||
const modeOptions: Array<{ label: string; value: MarkdownDiffMode }> = [
|
||||
{ label: 'Code', value: 'code' },
|
||||
{ label: 'Preview', value: 'preview' },
|
||||
{ label: t('tools.markdown-diff.texts.label-code'), value: 'code' },
|
||||
{ label: t('tools.markdown-diff.texts.label-preview'), value: 'preview' },
|
||||
];
|
||||
</script>
|
||||
|
||||
|
||||
Reference in new issue
Block a user