Skip to content
This repository was archived by the owner on Apr 22, 2024. It is now read-only.

Allow multiple translation files for each locale #254

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion generator/templates-vue3/js/src/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function loadLocaleMessages() {
const matched = key.match(/([A-Za-z0-9-_]+)\./i)
if (matched && matched.length > 1) {
const locale = matched[1]
messages[locale] = locales(key).default
messages[locale] = {...messages[locale], ...locales(key).default}
}
})
return messages
Expand Down
2 changes: 1 addition & 1 deletion generator/templates-vue3/ts/src/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function loadLocaleMessages(): LocaleMessages<VueMessageType> {
const matched = key.match(/([A-Za-z0-9-_]+)\./i)
if (matched && matched.length > 1) {
const locale = matched[1]
messages[locale] = locales(key).default
messages[locale] = {...messages[locale], ...locales(key).default}
}
})
return messages
Expand Down
2 changes: 1 addition & 1 deletion generator/templates/js/src/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function loadLocaleMessages () {
const matched = key.match(/([A-Za-z0-9-_]+)\./i)
if (matched && matched.length > 1) {
const locale = matched[1]
messages[locale] = locales(key)
messages[locale] = {...messages[locale], ...locales(key)}
}
})
return messages
Expand Down
2 changes: 1 addition & 1 deletion generator/templates/ts/src/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function loadLocaleMessages (): LocaleMessages {
const matched = key.match(/([A-Za-z0-9-_]+)\./i)
if (matched && matched.length > 1) {
const locale = matched[1]
messages[locale] = locales(key)
messages[locale] = {...messages[locale], ...locales(key)}
}
})
return messages
Expand Down