Skip to content

Commit

Permalink
hotfix: render locale (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
0plan authored Dec 13, 2023
1 parent 11a3b47 commit 8ca4647
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 2 deletions.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/lib/locales.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ i18n
escapeValue: false
},
backend: {
loadPath: '/src/locales/{{lng}}.yml',
loadPath: '/locales/{{lng}}.yml',
parse: function(data) {
return yaml.load(data)
}
Expand Down
2 changes: 1 addition & 1 deletion src/stores/language.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ type Language = {
}

const localesMap = Object.fromEntries(
Object.entries(import.meta.glob('~/locales/*.yml'))
Object.entries(import.meta.glob('/public/locales/*.yml'))
.map(([path, loadLocale]) => [path.match(/([\w-]*)\.yml$/)?.[1], loadLocale])
) as Record<Locale, () => Promise<{ default: Record<string, string> }>>
const availableLocales = Object.keys(localesMap)
Expand Down

0 comments on commit 8ca4647

Please sign in to comment.