Context
src/lib/i18n.ts implements the org's i18n convention: English-key translations.json with a positional _languages array and English fallback.
Seven consumer apps each carry their own src/i18n/index.ts implementing that same convention independently. None of them import this one.
The tooling around it is split the same way. Two different scripts exist for the same job, an extract-and-sync.py and a translate-batch.js, each present in only two repos, with the remaining apps having neither. The two translate-batch.js copies score as full semantic duplicates of each other, so that one is a straight copy-forward.
Ask
Decide whether this file is canonical.
- If yes: export it from the package entry point, document it, and the local copies can be dropped. Right now it is not exported from the entry point, which is most of why nobody uses it.
- If no: delete it, because its location makes it read like the shared implementation and it is the first thing someone looking for one will find.
Then the same question for the tooling: one extract-and-sync script, in one place, rather than two scripts covering four of seven apps between them.
Note
The convention itself is consistent across the apps, which is the good news here. This is a packaging problem rather than a behaviour problem, so consolidating should be low-risk: the implementations agree, they are just seven copies.
Context
src/lib/i18n.tsimplements the org's i18n convention: English-keytranslations.jsonwith a positional_languagesarray and English fallback.Seven consumer apps each carry their own
src/i18n/index.tsimplementing that same convention independently. None of them import this one.The tooling around it is split the same way. Two different scripts exist for the same job, an
extract-and-sync.pyand atranslate-batch.js, each present in only two repos, with the remaining apps having neither. The twotranslate-batch.jscopies score as full semantic duplicates of each other, so that one is a straight copy-forward.Ask
Decide whether this file is canonical.
Then the same question for the tooling: one extract-and-sync script, in one place, rather than two scripts covering four of seven apps between them.
Note
The convention itself is consistent across the apps, which is the good news here. This is a packaging problem rather than a behaviour problem, so consolidating should be low-risk: the implementations agree, they are just seven copies.