Skip to content

Commit 69debed

Browse files
committed
feat(PrimeOutputText): isTranslationKey prop added and i18n handling
1 parent 7f98331 commit 69debed

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

dev/locales/de.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"welcome": "Willkommen",
3+
"sample": "Hallo Welt",
34
"save": "Speichern",
45
"search": "Suchen",
56
"formkit": {

dev/locales/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"welcome": "Welcome",
3+
"sample": "Hello World",
34
"save": "Save",
45
"search": "Search",
56
"formkit": {

dev/pages/data/Edit.vue

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,8 @@ const schema = reactive(
2222
label: 'Email',
2323
help: 'This will be used for your account.',
2424
validation: 'required|email',
25-
prefix: 'test',
26-
iconPrefix: 'pi pi-trash text-color-red',
27-
suffix: 'ich suffix net',
28-
iconSuffix: 'pi pi-trash text-color-blue',
25+
iconPrefix: 'pi pi-book',
26+
iconSuffix: 'pi pi-bullseye',
2927
},
3028
{
3129
$formkit: 'primeTextarea',
@@ -108,7 +106,8 @@ async function submitHandler() {
108106
:schema="schema"
109107
:submit-label="t('save')"
110108
:form-class="horizontal ? 'form-horizontal' : ''"
111-
:debug-mode="true"
109+
:debug-data="true"
110+
:debug-schema="true"
112111
@data-saved="submitHandler"
113112
/>
114113
</PrimeData>

dev/pages/outputs/OutputText.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ const schema
99
name: 'name',
1010
label: 'Basic',
1111
},
12+
{
13+
$formkit: 'primeOutputText',
14+
name: 'toTranslate',
15+
isTranslationKey: true,
16+
label: 'Translated',
17+
},
1218
{
1319
$formkit: 'primeOutputText',
1420
name: 'html',
@@ -39,7 +45,7 @@ const schema
3945
4046
]
4147
42-
const data = { name: 'Harry Potter', iconLeft: 'Some Text ...', iconRight: 'Another Text ...', html: '<b style="color: gold">Bold Hello World</b>' }
48+
const data = { name: 'Harry Potter', toTranslate: 'sample', iconLeft: 'Some Text ...', iconRight: 'Another Text ...', html: '<b style="color: gold">Bold Hello World</b>' }
4349
</script>
4450

4551
<template>

0 commit comments

Comments
 (0)