refactor: refs #6425 fix failed tests
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Jon Elias 2024-04-16 11:42:43 +02:00
parent 73c5a5b7d2
commit b216112d2a
3 changed files with 4 additions and 7 deletions

View File

@ -1,10 +1,8 @@
const files = import.meta.glob(`./locale/*.yml`); const files = import.meta.glob(`./locale/*.yml`);
console.log('files: ', files);
const modules = import.meta.glob(`../pages/**/locale/*.yml`); const modules = import.meta.glob(`../pages/**/locale/*.yml`);
const translations = {}; const translations = {};
for (const file in files) { for (const file in files) {
const lang = file.split('/').at(2).split('.')[0]; const lang = file.split('/').at(2).split('.')[0];
@ -18,7 +16,6 @@ for (const file in files) {
if (!module.endsWith(actualLang)) continue; if (!module.endsWith(actualLang)) continue;
modules[module]().then((t) => { modules[module]().then((t) => {
Object.assign(translations[lang], t.default); Object.assign(translations[lang], t.default);
console.log(' modules[module].default: ', t.default);
}) })
} }
}); });

View File

@ -1,4 +1,4 @@
customerFilter: customerFilter:
filter: filter:
name: Name name: 'Name'
socialName: Social name socialName: 'Social name'

View File

@ -1,4 +1,4 @@
customerFilter: customerFilter:
filter: filter:
name: Nombre name: 'Nombre'
socialName: Razón Social socialName: 'Razón Social'