mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-05-05 05:47:10 -04:00
feat(Text to NATO): add other languages, upper/lower and other
Add support for many languages and countries ((International), (France), (Belgium), (Switzerland), (Québec), (Germany, 2022), (Austria), (Germany, informal, 2022), (Netherlands), Italian, Spanish, (Brazil), (Portugal), Swedish, Danish, Norwegian, Finnish, Turkish, Romanian, Czech, Yugoslav, Serbian, Slovene, Russian, Korean, Greek, Japanese) Handle uppercase/lowercase and some punctuations Fix #794
This commit is contained in:
parent
d3b32cc14e
commit
1b1be10762
4 changed files with 1644 additions and 42 deletions
|
@ -1,14 +1,22 @@
|
|||
<script setup lang="ts">
|
||||
import { textToNatoAlphabet } from './text-to-nato-alphabet.service';
|
||||
import { allLanguagesAndCountries } from './text-to-nato-alphabet.constants';
|
||||
import { useCopy } from '@/composable/copy';
|
||||
|
||||
const lang = useStorage('text-to-nato:lang', '(International)');
|
||||
const input = ref('');
|
||||
const natoText = computed(() => textToNatoAlphabet({ text: input.value }));
|
||||
const natoText = computed(() => textToNatoAlphabet({ text: input.value, langOrCountry: lang.value }));
|
||||
const { copy } = useCopy({ source: natoText, text: 'NATO alphabet string copied.' });
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<c-select
|
||||
v-model:value="lang"
|
||||
:options="allLanguagesAndCountries"
|
||||
searchable
|
||||
/>
|
||||
|
||||
<c-input-text
|
||||
v-model:value="input"
|
||||
label="Your text to convert to NATO phonetic alphabet"
|
||||
|
@ -19,7 +27,7 @@ const { copy } = useCopy({ source: natoText, text: 'NATO alphabet string copied.
|
|||
|
||||
<div v-if="natoText">
|
||||
<div mb-2>
|
||||
Your text in NATO phonetic alphabet
|
||||
Your text in NATO phonetic alphabet ({{ lang }})
|
||||
</div>
|
||||
<c-card>
|
||||
{{ natoText }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue