forked from nuxt-modules/i18n
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: merge language switching tests with basic usage (nuxt-modules#2850
- Loading branch information
1 parent
3231577
commit f57e208
Showing
17 changed files
with
189 additions
and
381 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,35 @@ | ||
<script setup lang="ts"> | ||
const head = useLocaleHead({ addSeoAttributes: true }) | ||
import { useI18n } from '#i18n' | ||
import { useRuntimeConfig } from 'nuxt/app' | ||
const { finalizePendingLocaleChange } = useI18n() | ||
const skipSettingLocale = useRuntimeConfig().public.i18n.skipSettingLocaleOnNavigate | ||
const pageTransition = { | ||
name: 'my', | ||
mode: 'out-in', | ||
onBeforeEnter: async () => { | ||
await finalizePendingLocaleChange() | ||
} | ||
} | ||
</script> | ||
|
||
<template> | ||
<NuxtLayout> | ||
<NuxtPage /> | ||
<NuxtPage id="nuxt-page" :transition="skipSettingLocale ? pageTransition : undefined" /> | ||
</NuxtLayout> | ||
</template> | ||
|
||
<style> | ||
section { | ||
margin: 1rem 0; | ||
} | ||
.my-enter-active, | ||
.my-leave-active { | ||
transition: opacity 0.3s; | ||
} | ||
.my-enter, | ||
.my-leave-active { | ||
opacity: 0; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
<template> | ||
<p id="profile-page">This is profile page</p> | ||
<div> | ||
<p id="profile-page">This is profile page</p> | ||
</div> | ||
</template> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.