openreply icon indicating copy to clipboard operation
openreply copied to clipboard

Would you take an i18n layer, so the dashboard can ship in other languages?

Open emanueletech opened this issue 3 months ago • 2 comments

Context

I self-host OpenReply for an Italian-speaking account. The engine works great, but the dashboard is English-only, and the UI strings are hardcoded in the components — so localising it today means editing the components themselves, which stops being maintainable the moment I pull upstream.

I worked around it locally with a dictionary and a script that rewrites the strings after every update. It does the job for me, but it is a workaround, and it is not something worth sending as a pull request: replacing English with Italian in the components would just move the problem to everyone else.

The question

Would you be open to an i18n layer? Something small and boring:

  • a messages/en.json extracted from the current strings, with English staying the default and the only complete locale
  • a lightweight lookup in the components (no heavy dependency, or next-intl if you prefer something standard)
  • additional locales as optional files, so a translation that falls behind degrades to English instead of breaking

Two things I would want your call on before writing any code:

  1. Scope. The dashboard and the campaign builder are what a self-hoster looks at every day. The public marketing pages under app/ are a different matter — they carry SEO value in English and I would leave them alone unless you want otherwise.
  2. Size. It touches roughly 25 files and ~300 strings, so it is a big diff by nature, even though each change is mechanical. If you would rather keep the codebase single-language, that is a completely reasonable answer and I will keep my dictionary on my own instance.

If you are interested I am happy to do the work and split it into reviewable pieces — the extraction first, then the lookup, then Italian as the first extra locale to prove the shape works.

Not urgent, and no hard feelings if the answer is no. Thanks for making this public in the first place.

emanueletech avatar Aug 16 '26 21:08 emanueletech

I don't think this will be necessary; you're right that this will contain too many line changes. Thanks for contributing :)

diwennee avatar Aug 24 '26 17:08 diwennee

Understood, and thanks for the straight answer — that is the useful kind.

Agreed on the reasoning: a translation layer would have touched a large share of the UI files for something only forks benefit from, and that is a poor trade for the project. The Italian translation stays in the fork, where the cost falls on me instead of on everyone reading this code.

For what it is worth, the cost turned out to be small, and the reason may be useful to anyone else running a translated fork: only user-visible strings are translated, while identifiers, props and anything the code compares against keep the upstream names. Renaming variables was what made merges painful early on — one merge produced two parallel state declarations that git had auto-merged outside the conflict markers, one of them updated and never read. Since going back to upstream names, the last sync pulled six commits with zero conflicts.

Closing this. Thanks for the project, and for reviewing the other contributions.

emanueletech avatar Aug 25 '26 21:08 emanueletech