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:
sharevb authored and ShareVB committed 2025-07-20 21:01:01 +02:00
1 parent 0d4267e356
commit a8c6ebc81b
347 files changed
+10245 -4533

No files matched your search

@@ -1,4 +1,5 @@
<script setup lang="ts">
import { useI18n } from 'vue-i18n';
import JSStack from 'jsstack.js';
import JavaStack from 'javastack.js';
import PythonStack from 'pythonstack.js';
@@ -8,6 +9,8 @@ import { useQueryParamOrStorage } from '@/composable/queryParams';
import { useStyleStore } from '@/stores/style.store';
import { useCopy } from '@/composable/copy';
const { t } = useI18n();
const styleStore = useStyleStore();
const stackType = useQueryParamOrStorage<'net' | 'js' | 'java' | 'python'>({ name: 'type', storageName: 'stackfmt:type', defaultValue: 'net' });
@@ -65,8 +68,8 @@ const stackTraceMarkdown = computed(() => {
return `\`\`\`${lang}\n${formatedStackTrace.value?.innerText}\n\`\`\``;
});
const { copy: copyText } = useCopy({ source: stackTraceText, text: 'Formatted stacktrace copied to the clipboard' });
const { copy: copyMarkdown } = useCopy({ source: stackTraceMarkdown, text: 'Markdown Formatted stacktrace copied to the clipboard' });
const { copy: copyText } = useCopy({ source: stackTraceText, text: t('tools.stacktrace-prettier.texts.text-formatted-stacktrace-copied-to-the-clipboard') });
const { copy: copyMarkdown } = useCopy({ source: stackTraceMarkdown, text: t('tools.stacktrace-prettier.texts.text-markdown-formatted-stacktrace-copied-to-the-clipboard') });
async function downloadAsPNG() {
const dataUrl = await domtoimage.toPng(formatedStackTrace.value, { bgcolor: styleStore.isDarkTheme ? '#333' : '#fff' });
@@ -85,32 +88,32 @@ const wrap = ref(true);
<n-space>
<n-radio
value="net"
label=".Net"
:label="t('tools.stacktrace-prettier.texts.label-net')"
/>
<n-radio
value="js"
label="Javascript"
:label="t('tools.stacktrace-prettier.texts.label-javascript')"
/>
<n-radio
value="python"
label="Python"
:label="t('tools.stacktrace-prettier.texts.label-python')"
/>
<n-radio
value="java"
label="Java"
:label="t('tools.stacktrace-prettier.texts.label-java')"
/>
</n-space>
</n-radio-group>
<div mb-2 flex justify-center>
<n-checkbox v-model:checked="wrap">
Wrap lines?
{{ t('tools.stacktrace-prettier.texts.tag-wrap-lines') }}
</n-checkbox>
</div>
<c-input-text
v-model:value="stackTrace"
label="Stacktrace"
placeholder="Paste your stacktrace here.."
:label="t('tools.stacktrace-prettier.texts.label-stacktrace')"
:placeholder="t('tools.stacktrace-prettier.texts.placeholder-paste-your-stacktrace-here')"
multiline
rows="5"
/>
@@ -121,13 +124,13 @@ const wrap = ref(true);
<div v-if="stackTraceText" flex justify-center gap-1>
<c-button @click="copyText()">
Copy Formatted (Text)
{{ t('tools.stacktrace-prettier.texts.tag-copy-formatted-text') }}
</c-button>
<c-button @click="copyMarkdown()">
Copy Formatted (Markdown)
{{ t('tools.stacktrace-prettier.texts.tag-copy-formatted-markdown') }}
</c-button>
<c-button @click="downloadAsPNG()">
Download as PNG
{{ t('tools.stacktrace-prettier.texts.tag-download-as-png') }}
</c-button>
</div>
</div>