Skip to content

Commit fa07cf7

Browse files
committed
feat(i18n): update internationalization for app using nuxt i18n version 10
1 parent 2ed8b56 commit fa07cf7

File tree

6 files changed

+10
-6
lines changed

6 files changed

+10
-6
lines changed

playground/app/app.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<script setup lang='ts'>
2-
import FormkitComponent from '~/components/FormkitComponent.vue'
2+
const { t } = useI18n()
33
</script>
44

55
<template>
66
<div style="padding: 1rem">
77
<div class="">
8-
<h2>Formkit-PrimeVue</h2>
8+
<h2>{{ t('app_name') }}</h2>
99
<div>
1010
<h4>GitHub</h4>
1111
<a href="https://github.com/sfxcode/formkit-primevue">formkit-primevue</a>

playground/app/components/FormkitComponent.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ onMounted(() => {
1919
2020
const schema = reactive(
2121
[
22-
addElement('h5', ['Validation with FormKit - Inputs from PrimeVue']),
22+
addElement('h3', ['Validation with FormKit - Inputs from PrimeVue']),
2323
{
2424
$formkit: 'primeOutputDate',
2525
name: 'date',
26-
label: 'Date',
26+
label: 'Formatted Date',
2727
},
2828
{
2929
$formkit: 'primeInputText',
@@ -128,7 +128,7 @@ async function submitHandler() {
128128

129129
<template>
130130
<div>
131-
<h2>FormKit PrimeVue Nuxt Playground</h2>
131+
<h2>{{ t('app_description') }}</h2>
132132
<div v-if="data">
133133
<FormKitDataEdit
134134
v-model="data"
File renamed without changes.

playground/i18n/locales/de.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
{
2+
"app_name": "FormKit Playground",
3+
"app_description": "FormKit PrimeVue Nuxt Module Playground",
24
"welcome": "Willkommen",
35
"sample": "Hallo Welt",
46
"save": "Speichern",

playground/i18n/locales/en.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
{
2+
"app_name": "FormKit Playground",
3+
"app_description": "FormKit PrimeVue Nuxt Module Playground",
24
"welcome": "Welcome",
35
"sample": "Hello World",
46
"save": "Save",

src/module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default defineNuxtModule<ModuleOptions>({
1919
name: 'formkit-primevue-nuxt',
2020
configKey: 'formkitPrimevue',
2121
compatibility: {
22-
nuxt: '>=3.16.0',
22+
nuxt: '^3.0.0',
2323
},
2424
},
2525
// Default configuration options of the Nuxt module

0 commit comments

Comments
 (0)