Compare commits

...

1 Commits

Author SHA1 Message Date
bwees
819ea9fbc0 Revert "feat: use prettier for i18n translations (#24623)"
This reverts commit f52bd9f38a.
2026-01-27 11:58:51 -06:00
9 changed files with 12386 additions and 4286 deletions

View File

@@ -298,9 +298,9 @@ jobs:
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'
- name: Install dependencies
run: pnpm --filter=immich-i18n install --frozen-lockfile
run: pnpm --filter=immich-web install --frozen-lockfile
- name: Format
run: pnpm --filter=immich-i18n format:fix
run: pnpm --filter=immich-web format:i18n
- name: Find file changes
uses: tj-actions/verify-changed-files@a1c6acee9df209257a246f2cc6ae8cb6581c1edf # v20.0.4
id: verify-changed-files

View File

@@ -1,5 +0,0 @@
{
"jsonRecursiveSort": true,
"jsonSortOrder": "{\"/.*/\": \"lexical\"}",
"plugins": ["prettier-plugin-sort-json"]
}

View File

@@ -1,13 +0,0 @@
{
"name": "immich-i18n",
"version": "1.0.0",
"private": true,
"scripts": {
"format": "prettier --check .",
"format:fix": "prettier --write ."
},
"devDependencies": {
"prettier": "^3.7.4",
"prettier-plugin-sort-json": "^4.1.1"
}
}

View File

@@ -34,4 +34,4 @@ run = { task = ":i18n:format-fix" }
[tasks."i18n:format-fix"]
dir = "i18n"
run = "pnpm run format:fix"
run = "pnpm dlx sort-json *.json"

View File

@@ -35,7 +35,7 @@ migration:
dart run drift_dev make-migrations
translation:
npm --prefix ../i18n run format:fix
npm --prefix ../web run format:i18n
dart run easy_localization:generate -S ../i18n
dart run bin/generate_keys.dart
dart format lib/generated/codegen_loader.g.dart

16638
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -3,7 +3,6 @@ packages:
- docs
- e2e
- e2e-auth-server
- i18n
- open-api/typescript-sdk
- server
- plugins

View File

@@ -17,7 +17,8 @@
"lint": "eslint . --max-warnings 0 --concurrency 4",
"lint:fix": "pnpm run lint --fix",
"format": "prettier --check .",
"format:fix": "prettier --write .",
"format:fix": "prettier --write . && pnpm run format:i18n",
"format:i18n": "pnpm dlx sort-json ../i18n/*.json",
"test": "vitest",
"test:cov": "vitest --coverage",
"test:watch": "vitest dev",

View File

@@ -7,10 +7,6 @@ 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();