mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
feat: use prettier for i18n translations (#24623)
This commit is contained in:
+1
-2
@@ -17,8 +17,7 @@
|
||||
"lint": "eslint . --max-warnings 0 --concurrency 4",
|
||||
"lint:fix": "pnpm run lint --fix",
|
||||
"format": "prettier --check .",
|
||||
"format:fix": "prettier --write . && pnpm run format:i18n",
|
||||
"format:i18n": "pnpm dlx sort-json ../i18n/*.json",
|
||||
"format:fix": "prettier --write .",
|
||||
"test": "vitest",
|
||||
"test:cov": "vitest --coverage",
|
||||
"test:watch": "vitest dev",
|
||||
|
||||
@@ -7,6 +7,10 @@ describe('i18n', () => {
|
||||
const languageFiles = readdirSync('../i18n').sort();
|
||||
for (const filename of languageFiles) {
|
||||
test(`${filename} should have a loader`, async () => {
|
||||
if (!filename.endsWith('.json') || filename == 'package.json') {
|
||||
return;
|
||||
}
|
||||
|
||||
const code = filename.replaceAll('.json', '');
|
||||
const item = langs.find((lang) => lang.weblateCode === code || lang.code === code);
|
||||
expect(item, `${filename} has no loader`).toBeDefined();
|
||||
|
||||
Reference in New Issue
Block a user