@uipkge/nuxt 0.1.37 → 0.1.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cli.mjs +4 -3
- package/dist/module.json +1 -1
- package/package.json +1 -1
package/bin/cli.mjs
CHANGED
|
@@ -117,7 +117,7 @@ async function smartMerge(configPath, projectId) {
|
|
|
117
117
|
if (!config.i18n) {
|
|
118
118
|
config.i18n = {
|
|
119
119
|
defaultLocale: "en",
|
|
120
|
-
locales: ["en"],
|
|
120
|
+
locales: ["en", "es"],
|
|
121
121
|
};
|
|
122
122
|
} else if (!config.i18n.defaultLocale) {
|
|
123
123
|
config.i18n.defaultLocale = "en";
|
|
@@ -153,7 +153,8 @@ function createTestPage() {
|
|
|
153
153
|
fs.writeFileSync(
|
|
154
154
|
testPagePath,
|
|
155
155
|
`<script setup>
|
|
156
|
-
const { t
|
|
156
|
+
const { t } = useI18now()
|
|
157
|
+
const { locale, setLocale } = useI18n()
|
|
157
158
|
</script>
|
|
158
159
|
|
|
159
160
|
<template>
|
|
@@ -166,7 +167,7 @@ const { t, locale } = useI18now()
|
|
|
166
167
|
<p>{{ t('test.feature_sync', 'Key sync is enabled in development mode.') }}</p>
|
|
167
168
|
|
|
168
169
|
<h2>{{ t('test.language_switcher', 'Language Switcher:') }}</h2>
|
|
169
|
-
<select
|
|
170
|
+
<select :value="locale" @change="setLocale($event.target.value)" style="padding: 8px; margin: 10px 0;">
|
|
170
171
|
<option value="en">English</option>
|
|
171
172
|
<option value="es">Espa\u00f1ol</option>
|
|
172
173
|
</select>
|
package/dist/module.json
CHANGED