Skip to content

src/lib/i18n.ts is not consumed; apps reimplement the same convention #28

Description

@quotentiroler

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions