fix: merge common and web po files (#1563)

This commit is contained in:
David Nguyen
2024-12-31 17:20:58 +11:00
committed by GitHub
parent 0d3681e26a
commit 4085151f80
20 changed files with 8879 additions and 9587 deletions

View File

@ -21,15 +21,7 @@ export async function loadCatalog(lang: SupportedLanguages): Promise<{
}> {
const extension = process.env.NODE_ENV === 'development' ? 'po' : 'js';
let { messages } = await import(`../../translations/${lang}/web.${extension}`);
if (extension === 'po') {
const { messages: commonMessages } = await import(
`../../translations/${lang}/common.${extension}`
);
messages = { ...messages, ...commonMessages };
}
const { messages } = await import(`../../translations/${lang}/web.${extension}`);
return {
[lang]: messages,