mirror of
https://github.com/Donkie/Spoolman.git
synced 2026-10-22 10:02:17 -05:00
Weblate translates client_v2 from now on. The two translation workflows still only knew about client/public/locales/, which meant a Weblate sync for the new client would be rejected by the auto-merge scope check and hand-edits to client_v2 translations would sail through unguarded. - weblate-automerge: accept locale JSON under either client_v2/locales/ or client/public/locales/. The legacy tree stays on the allowlist only so a sync opened before its component was locked isn't stranded; the Weblate-side lock, not this allowlist, is what ends legacy translation. - guard-translations: guard both trees, with different rules. For client_v2, modifying or deleting an existing non-English file is blocked while adding a brand-new language stays allowed (bootstrapping one also needs entries in project.inlang/settings.json and src/lib/i18n/languages.ts, which only a human PR can add — the failure message now says so). For the legacy client every non-English change is blocked, adds included, and the message redirects translators to the client users actually get. - README: 18 -> 26 languages, and say outright that translations come through Weblate rather than pull requests. Verified: the guard script passes 9 synthetic PR cases (en edits and new v2 languages allowed; v2 edits/deletes, legacy edits and legacy new languages blocked; both sections render when a PR trips each rule), and the auto-merge regex accepts both locale trees while still rejecting code, workflows, non-JSON and path-prefix smuggling. Also confirmed the format risk is a non-issue: if Weblate's i18next v4 writer emits nested JSON instead of the repo's flat dotted keys, paraglide still compiles it — nested German round-tripped intact, and a nested _one/_other pair compiled to a correct CLDR plural with other locales still falling back to English. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>