Skip to content

Commit

Permalink
chore(deps): update dependency @nuxtjs/i18n to v9 (#1647)
Browse files Browse the repository at this point in the history
* chore(deps): update dependency @nuxtjs/i18n to v9

* code adjustments

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Frank Elsinga <[email protected]>
Co-authored-by: Frank Elsinga <[email protected]>
  • Loading branch information
3 people authored Nov 10, 2024
1 parent 205485b commit b82a96f
Show file tree
Hide file tree
Showing 5 changed files with 198 additions and 140 deletions.
8 changes: 6 additions & 2 deletions webclient/app/components/PreferencesPopup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const { t } = useI18n({ useScope: "local" });
const { locale } = useI18n();
const switchLocalePath = useSwitchLocalePath();
async function updateLocale(value: string) {
async function updateLocale(value: "de" | "en") {
await navigateTo(switchLocalePath(value));
}
</script>
Expand Down Expand Up @@ -55,7 +55,11 @@ async function updateLocale(value: string) {
</SelectionSwitch>
</MenuItem>
<MenuItem as="div" class="text-md text-zinc-500 block px-4 py-1 font-semibold">
<SelectionSwitch v-model="locale" :label="t('language')" @update:model-value="updateLocale">
<SelectionSwitch
v-model="locale"
:label="t('language')"
@update:model-value="(value) => updateLocale(value as 'de' | 'en')"
>
<SelectionOption value="de">de</SelectionOption>
<SelectionOption value="en">en</SelectionOption>
</SelectionSwitch>
Expand Down
5 changes: 1 addition & 4 deletions webclient/app/layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ import { useFeedback } from "~/composables/feedback";
const searchBarFocused = ref(false);
const feedback = useFeedback();
const i18nHead = useLocaleHead({
addDirAttribute: true,
addSeoAttributes: true,
});
const i18nHead = useLocaleHead({ dir: true, seo: true });
useHead({
htmlAttrs: {
lang: i18nHead.value.htmlAttrs!.lang,
Expand Down
5 changes: 1 addition & 4 deletions webclient/app/layouts/details.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ import { useFeedback } from "~/composables/feedback";
const searchBarFocused = ref(false);
const feedback = useFeedback();
const i18nHead = useLocaleHead({
addDirAttribute: true,
addSeoAttributes: true,
});
const i18nHead = useLocaleHead({ dir: true, seo: true });
useHead({
htmlAttrs: {
lang: i18nHead.value.htmlAttrs!.lang,
Expand Down
2 changes: 1 addition & 1 deletion webclient/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
},
"devDependencies": {
"@nuxt/eslint": "0.6.1",
"@nuxtjs/i18n": "8.5.5",
"@nuxtjs/i18n": "9.0.0",
"@nuxtjs/tailwindcss": "6.12.2",
"@types/geojson": "7946.0.14",
"@types/nightwind": "1.0.0",
Expand Down
Loading

0 comments on commit b82a96f

Please sign in to comment.