-
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(unplugin-vue-i18n): allow for a custom i18n block transform hook (…
…#387) * implement webpack custom block transform * remove debug code * remove json generate modifications * add vite example * remove vestigial debug code and adjust types * remove unused value from json.ts * add readme documentation for transformI18nBlock
- Loading branch information
Showing
11 changed files
with
182 additions
and
8 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<template> | ||
<p>{{ t('language') }}</p> | ||
<p>{{ t('hello') }}</p> | ||
</template> | ||
|
||
<script> | ||
import { useI18n } from 'vue-i18n' | ||
export default { | ||
name: 'Apple', | ||
setup() { | ||
const { t } = useI18n({ | ||
inheritLocale: true, | ||
useScope: 'local' | ||
}) | ||
return { t } | ||
} | ||
} | ||
</script> | ||
|
||
<i18n> | ||
[ | ||
"language", | ||
"hello", | ||
] | ||
</i18n> |
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
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<template> | ||
<p>{{ t('language') }}</p> | ||
<p>{{ t('hello') }}</p> | ||
</template> | ||
|
||
<script> | ||
import { useI18n } from 'vue-i18n' | ||
export default { | ||
name: 'Apple', | ||
setup() { | ||
const { t } = useI18n({ | ||
inheritLocale: true, | ||
useScope: 'local' | ||
}) | ||
return { t } | ||
} | ||
} | ||
</script> | ||
|
||
<i18n> | ||
[ | ||
"language", | ||
"hello", | ||
] | ||
</i18n> |
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
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
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