-
Notifications
You must be signed in to change notification settings - Fork 473
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor!:
vueI18n
options from config path (#1973)
* docs: mention callbacks * chore: initial commit * chore: progress * chore: updating minor bits and tests * refactor!: `vueI18n` options from config path * fix: complete config load implementation * updates * fix: unit tests * fix: e2e testing * update lock file * tweak docs --------- Co-authored-by: Inesh Bose <2504266b@student.gla.ac.uk>
- Loading branch information
Showing
98 changed files
with
1,645 additions
and
705 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import type { I18nOptions } from 'vue-i18n' | ||
|
||
export default { | ||
legacy: false, | ||
locale: 'en', | ||
fallbackLocale: 'fr', | ||
modifiers: { | ||
snakeCase: (str: string) => str.split(' ').join('-') | ||
}, | ||
messages: { | ||
ja: { | ||
bar: { | ||
buz: 'バズ' | ||
} | ||
} | ||
} | ||
// fallbackLocale: { | ||
// en: ['ja', 'fr', 'en-US'], | ||
// ja: ['en', 'fr', 'ja-JP'], | ||
// fr: ['en', 'ja', 'fr-FR'] | ||
// } | ||
} as I18nOptions |
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,3 @@ | ||
{ | ||
"moduleLayerText": "This is a merged module layer locale key" | ||
} | ||
"moduleLayerText": "This is a merged module layer locale key" | ||
} |
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,3 @@ | ||
{ | ||
"moduleLayerText": "This is a merged module layer locale key in French" | ||
} | ||
"moduleLayerText": "This is a merged module layer locale key in French" | ||
} |
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,3 @@ | ||
{ | ||
"moduleLayerText": "This is a merged module layer locale key in Dutch" | ||
} | ||
"moduleLayerText": "This is a merged module layer locale key in Dutch" | ||
} |
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,9 @@ | ||
export default defineI18nConfig(() => { | ||
return { | ||
messages: { | ||
ja: { | ||
layerText: 'これはマージされたロケールキーです' | ||
} | ||
} | ||
} | ||
}) |
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,3 @@ | ||
{ | ||
"layerText": "This is a merged locale key" | ||
} | ||
"layerText": "This is a merged locale key" | ||
} |
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,3 @@ | ||
{ | ||
"layerText": "This is a merged locale key in French" | ||
} | ||
"layerText": "This is a merged locale key in French" | ||
} |
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,3 @@ | ||
{ | ||
"layerText": "This is a merged locale key in Dutch" | ||
} | ||
"layerText": "This is a merged locale key in Dutch" | ||
} |
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,5 @@ | ||
export default { | ||
bar: { | ||
buz: 'Hello, {name}!' | ||
} | ||
} |
Oops, something went wrong.