Overview
| Artifact ID: | 27b475233b5efceeb1c400796f35771197e4db9909d4ac6aab09deffb2febac0 |
|---|---|
| Ticket: | cfef2718e1ba1f49a8ff59d9e9f9948287b9379a
Localisation: a language selector and translatable interface strings |
| User & Date: | dmestas on 2026-08-18 19:37:21 |
Changes
- Untracked field cmimetype: "text/x-markdown"
- comment changed to:
Forgejo carries a language selector in its footer. quarry has the slot for one; what it does not have is anything to select between. ## What has to happen first Every visible string is currently a literal inside a Go template. Translation needs them extracted to a catalogue keyed by message id, with the templates calling a lookup. That is the bulk of the work and it is mechanical. ## Choosing a language, without JavaScript The theme switcher already establishes the pattern this should follow: a form POST to `/lang`, a cookie, and the choice resolved server-side before the first byte. That keeps the one-script rule and avoids a flash of the wrong language. `Accept-Language` supplies the default when no cookie is set, which is the "system" state of the same three-way shape. ## What must NOT be translated Repository content. Check-in comments, wiki pages, tickets and file names are the corpus, in whatever language their authors wrote. Only quarry chrome is translatable, and the boundary needs to be explicit or a translator will reasonably assume otherwise. ## Two things that will bite - Dates already go through a relative-time helper (`ago`), which is English-only and pluralises in English. It needs the catalogue too, and plural rules are not uniform across languages — this is the part that cannot be done by string substitution alone. - The layout is currently sized by English. German compounds and Japanese line-breaking will both find the places where a width was chosen by eye. Not urgent, but worth deciding before the string count grows much further: extraction gets more expensive per screen added.
- severity changed to: "Minor"
- status changed to: "Open"
- title changed to:
Localisation: a language selector and translatable interface strings
- type changed to: "Feature_Request"