mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-05-05 13:57:10 -04:00
WIP(translate): translate two category all tools
This commit is contained in:
parent
9db4b41daf
commit
4f550a9499
58 changed files with 708 additions and 172 deletions
|
@ -13,19 +13,20 @@ function transformer(value: string) {
|
|||
}, '');
|
||||
}
|
||||
|
||||
const { t } = useI18n();
|
||||
const rules: UseValidationRule<string>[] = [
|
||||
{
|
||||
validator: (v: string) => v === '' || JSON5.parse(v),
|
||||
message: 'Provided JSON is not valid.',
|
||||
message: t('tools.json-to-csv.invalidMessage'),
|
||||
},
|
||||
];
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<format-transformer
|
||||
input-label="Your raw JSON"
|
||||
input-placeholder="Paste your raw JSON here..."
|
||||
output-label="CSV version of your JSON"
|
||||
:input-label="t('tools.json-to-csv.inputLabel')"
|
||||
:input-placeholder="t('tools.json-to-csv.inputPlaceholder')"
|
||||
:output-label="t('tools.json-to-csv.outputLabel')"
|
||||
:input-validation-rules="rules"
|
||||
:transformer="transformer"
|
||||
/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue