fix(i18n): rebuild broken de/es/fr JSON + fix meta key lookup (Issue #86)

- de.json, es.json, fr.json had multiple missing commas and broken
  JSON structure causing 'Failed to load language' errors on startup
- Rebuilt all 3 files using en.json as structural template, preserving
  existing translations (de: 2145, es: 2245, fr: 2242 keys preserved)
- languages.routes.js: read both 'meta' and '_meta' keys (some files
  use 'meta', others '_meta') to correctly display language names
This commit is contained in:
UNITRONIX
2026-04-07 00:13:21 +02:00
parent d9b297f642
commit 428fe24924
4 changed files with 990 additions and 1272 deletions
+315 -331
View File
File diff suppressed because it is too large Load Diff
+339 -472
View File
File diff suppressed because it is too large Load Diff
+334 -467
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -87,12 +87,12 @@ router.get('/api/panel/languages', requireAuth, requireAdmin, (req, res) => {
continue;
}
const meta = data._meta || {};
const meta = data._meta || data.meta || {};
const langKeys = flattenKeys(data);
const langKeySet = new Set(langKeys.keys());
const missing = [...refKeySet].filter(k => !langKeySet.has(k));
const extra = [...langKeySet].filter(k => !refKeySet.has(k) && !k.startsWith('_meta'));
const extra = [...langKeySet].filter(k => !refKeySet.has(k) && !k.startsWith('_meta') && !k.startsWith('meta.'));
const empty = [...langKeySet].filter(k => refKeySet.has(k) && langKeys.get(k) === '');
const coverage = code === 'en' ? 100