A Reviewer's acceptance counts only for the wording they accepted: if
main rewords the row after the export, export marks it fuzzy again and
import leaves it on its list. The checker rejects an app Draft for a
shared string's override, which Weblate never offers. A leading BOM no
longer stops a row leaving its list.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
drafts/<locale>/<catalog>.tsv lists a catalog's Drafts as context and
source text. The checker fails an entry whose catalog row is missing or
that is listed twice. The Weblate converter exports listed rows fuzzy
("Needs editing"); when a Reviewer accepts one, import takes it off its
list (unless its row also changed on main) and the sync PR says so.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tools/sync_app.py ../photocraft 8d2e615 --ref 848fa306 --app photocraft:
round trip 141,125 rows reproduced, 0 not. 12 new PhotoCraft locales
(ar, az, da, fi, he, hi, nb, ro, sv, ta, th, ur; az new to craft-i18n,
its language.name from PhotoCraft's LANGUAGES). Hebrew: 35 @plural rows
listed one|other; CLDR he has one|two|other, so the other form is
repeated (PhotoCraft clamps the index today, so n=2 already shows it).
tools/plural_forms.tsv gains az.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Answers FredApps' review on #199:
- The base is main as of the last export, re-rendered from the commit in the
export message (tools/weblate_base.sh). The export's own output also holds
pending Weblate changes, so using it lost them after an unrelated export.
- Import runs hourly from main (and on dispatch): the weblate branch has no
workflow file, so a push there could never start it.
- Each rebuild of weblate/sync replays commits people added to the open PR
(ATTRIBUTION.md, fixes) and pushes only when the tree changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review on #191: CI checks the format, not that the text was accepted,
and main doesn't require reviews yet. Revisit with AutoCraft's merge
queue.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A row whose translation changed both on main and in Weblate since the
last export keeps main's text: import lists it as a conflict (PR body
and an Actions warning) instead of writing it, and export keeps main's
value. Review on #191.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tools/weblate_bridge.py turns locales/ into PO files on the `weblate`
branch and Weblate's accepted translations back into TSV edits. Both
directions diff against the last export commit, so neither a pending
Weblate translation nor a newer main change is lost. Import edits lines
in place and leaves @id rows, shared strings in app components, fuzzy
and incomplete entries alone. .github/workflows/weblate.yml runs export
on pushes to main and import plus the auto-merging `weblate/sync` PR on
Weblate's pushes. Tasks 2, 3 and 5 of the plan (ADR 0006); attribution
from Weblate's API waits for the deploy spike.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`tools/plural_forms.tsv` gives each locale's gettext Plural-Forms in
the catalogs' CLDR form order (integers 0..=1000). A test checks every
row against craft-libs' runtime crate for each n in 0..=1000, so a wrong
order fails CI before any Weblate import. Task 1 of the translation
platform plan (ADR 0006).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The sync/rekey helpers already write UTF-8 catalogs; the tests used the
platform default encoding, so headers with "…" / Français failed under
cp1252. Report paths with forward slashes and run the tool suite in CI.
When an app fixes its English source text without changing the meaning, every
locale's row for the old text is renamed in <app>.tsv, or copied there from
common.tsv (the shared row stays, ADR 0003). A renamed row identical to the
shared row for the new text is dropped. Refuses a change of placeholders or
trailing ellipsis, which would need new translations.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tools/new_locale.py <locale> "<name>" [<app> ...] writes the header, the
@id language.name row and every English string the other locales have,
commented out, so a translator uncomments and fills rows and CI passes
from the first commit. It never overwrites an existing file.
The README gets a step-by-step guide: code, starter files (or the web
editor), translate, check, credit, PR, and the app-side language list.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Split the high-cognitive-complexity functions (fix, read_app, sync,
main) into small helpers; pass the argument-injection and regex
code smells with sys.argv-independent git() and a PLURAL constant.
Mirrors the checker's check_template (#14): an unclosed {, two
placeholders in a row, or no literal text. Without it a VectorCraft
sync re-adds the dead 'Packaged {n} file(s) in {folder}{note}' row.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5qjdPbdcyPMikAqXxAAdW
T3 of the app-wiring plan. Applies what an app changed between the last
synced SHA and --ref (merge-base three-way, so a stale branch never reverts
main), writes only to locales/<l>/<app>.tsv, never common.tsv. --check runs
the round trip. Stdlib only; tests in tools/test_sync_app.py.
docs/integration.md: the two-PR flow, cutover and catch-up before a pin
bump; clone URL now storytold/craft-i18n.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>