style: prettier-format the native and i18n changes

The feature-branch CI does not run the formatting check, so the conflict-resolved
files (AboutTab, useAccountSettings, useTripExport), the native shell and iap
module, and the i18n files touched by the translation scripts were never run
through Prettier. Format them all; no behaviour changes.
This commit is contained in:
Maurice
2026-11-05 17:11:47 +01:00
parent 91defd40fd
commit a9ffcbc134
29 changed files with 527 additions and 437 deletions
+11 -9
View File
@@ -34,14 +34,14 @@
// first column of the file, matching the regex below). Nested objects, function
// bodies, and inline comments are ignored. This matches how `t(key)` calls
// resolve at runtime in TranslationContext.
import { readFileSync } from 'node:fs';
import { join } from 'node:path';
import { getIntlLanguage } from '../src/i18n/languages.ts';
import { allPluralCategories, integerPluralCategories, pluralFormOf, pluralGroups } from '../src/i18n/plural.ts';
import { I18N_ROOT, listDomainFiles, listLocales, readCatalog } from './i18n-catalog.mjs';
import { compare, countUntranslated, formatGrown, readBaseline } from './i18n-untranslated.mjs';
import { readFileSync } from 'node:fs';
import { join } from 'node:path';
// Match a top-level translation key declaration: leading whitespace, then a
// quoted key (must start with a lowercase letter), then a colon. This is the
// exact pattern every domain file uses. Keys may hold a colon themselves
@@ -103,7 +103,10 @@ export const NOT_PLURAL = [
{ key: 'dawarich.duration.hoursMinutes', because: 'a duration in unit symbols (h, min), the same for any number' },
{ key: 'files.uploadErrorSize', because: 'a size limit in a unit symbol (MB), the same for any number' },
{ key: 'native.plans.storage', because: 'a storage size in a unit symbol (GB), the same for any number' },
{ key: 'native.plans.aiDocs', because: 'a monthly document allowance, always in the tens, so no singular ever shows' },
{
key: 'native.plans.aiDocs',
because: 'a monthly document allowance, always in the tens, so no singular ever shows',
},
];
/**
@@ -189,10 +192,7 @@ function checkParity() {
if (locale === 'en') continue;
const localeFiles = listDomainFiles(locale);
const { missing: missingFiles, extra: extraFiles } = diffSets(
new Set(enFiles),
new Set(localeFiles),
);
const { missing: missingFiles, extra: extraFiles } = diffSets(new Set(enFiles), new Set(localeFiles));
if (missingFiles.length || extraFiles.length) {
report.fileDrift.push({ locale, missing: missingFiles, extra: extraFiles });
@@ -280,7 +280,9 @@ function formatReport(report) {
} else if (grown.length === 0) {
lines.push(
'Untranslated strings: OK' +
(lowerable ? ` (${lowerable} baseline entries can come down: node scripts/i18n-untranslated.mjs --update)` : ''),
(lowerable
? ` (${lowerable} baseline entries can come down: node scripts/i18n-untranslated.mjs --update)`
: ''),
);
} else {
lines.push('Untranslated strings: grew past scripts/i18n-untranslated-baseline.json');