mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-26 15:43:59 +03:00
Feat/translate all content (#121)
* feat: add script to extract strings * feat: extract many strings (html, attr, label) * feat(extract string): extract html only for .vue and single file mode * fix: __i18n_ally_root__ * feat: nestify en.yml + extract tab attributes * feat: add script to extract strings * feat: extract many strings (html, attr, label) * feat(extract string): extract html only for .vue and single file mode * fix: __i18n_ally_root__ * feat: nestify en.yml + extract tab attributes * fix: lint * feat: add vue-i18n-extract to check missing keys * fix: unit tests * fix: update vue i18n plugin
This commit is contained in:
1 parent
0d4267e356
commit
a8c6ebc81b
347 files changed
+10245
-4533
No files matched your search
@@ -1,8 +1,11 @@
|
||||
<script setup lang="ts">
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import TextareaCopyable from '@/components/TextareaCopyable.vue';
|
||||
import { escapeForLanguage, languages } from '@/utils/ascii-lang-utils';
|
||||
import { useQueryParamOrStorage } from '@/composable/queryParams';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const rawInput = ref('Hello "every"\n A\'');
|
||||
const language = useQueryParamOrStorage({ name: 'lang', storageName: 'string-escaper:l', defaultValue: 'raw' });
|
||||
const single_linize = useQueryParamOrStorage({ name: 'singleline', storageName: 'string-escaper:sl', defaultValue: false });
|
||||
@@ -14,24 +17,24 @@ const stringOutput = computed(() => escapeForLanguage(
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<c-card title="String Escaper">
|
||||
<c-card :title="t('tools.string-escaper.texts.title-string-escaper')">
|
||||
<c-input-text
|
||||
v-model:value="rawInput"
|
||||
label="Your text:"
|
||||
placeholder="Your raw text to escape"
|
||||
:label="t('tools.string-escaper.texts.label-your-text')"
|
||||
:placeholder="t('tools.string-escaper.texts.placeholder-your-raw-text-to-escape')"
|
||||
raw-text
|
||||
multiline
|
||||
rows="4"
|
||||
mb-2
|
||||
/>
|
||||
<c-select v-model:value="language" label="Target language:" :options="languagesOptions" searchable mb-2 />
|
||||
<c-select v-model:value="language" :label="t('tools.string-escaper.texts.label-target-language')" :options="languagesOptions" searchable mb-2 />
|
||||
<n-space justify="center">
|
||||
<n-checkbox v-model:checked="single_linize">
|
||||
Single linize
|
||||
{{ t('tools.string-escaper.texts.tag-single-linize') }}
|
||||
</n-checkbox>
|
||||
</n-space>
|
||||
</c-card>
|
||||
<c-card title="Your escaped string in target language">
|
||||
<c-card :title="t('tools.string-escaper.texts.title-your-escaped-string-in-target-language')">
|
||||
<TextareaCopyable
|
||||
:value="stringOutput"
|
||||
/>
|
||||
|
||||
Reference in new issue
Block a user