chore: move weblate translations to root directory (#13604)

* chore: move translations to root directory

* chore: update build processes to work with new i18n location
This commit is contained in:
Ben
2024-10-22 11:39:28 -04:00
committed by GitHub
parent 62e0658e5a
commit e98acc976e
66 changed files with 66 additions and 61 deletions

View File

@@ -4,7 +4,7 @@ import { readFileSync, readdirSync } from 'node:fs';
describe('i18n', () => {
describe('loaders', () => {
const languageFiles = readdirSync('src/lib/i18n').sort();
const languageFiles = readdirSync('../i18n').sort();
for (const filename of languageFiles) {
test(`${filename} should have a loader`, async () => {
const code = filename.replaceAll('.json', '');
@@ -17,7 +17,7 @@ describe('i18n', () => {
// verify it loads the right file
const module: { default?: unknown } = await item.loader();
const translations = JSON.stringify(module.default, null, 2).trim();
const content = readFileSync(`src/lib/i18n/${filename}`).toString().trim();
const content = readFileSync(`../i18n/${filename}`).toString().trim();
expect(translations === content, `${item.name} did not load ${filename}`).toEqual(true);
});
}