Forgejo footer links send English users to the Swedish portal pages #334
Etiketter
Inga etiketter
area/backups
area/ci
area/control-panel
area/identity
area/infra
area/observability
area/payments
area/security
area/storage
area/web
blocked
needs-info
needs-triage
ready-for-implementation
type
bug
type
chore
type
docs
type
epic
type
feature
type
task
wontfix
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Inget förfallodatum satt.
Beroenden
Inga beroenden satta
Referens
bitborg/bitborg-infra#334
Läser in…
Hänvisa till i nytt ärende
Ingen beskrivning angiven.
Ta bort grenen "%!s()"
Borttagning av en gren är permanent. Även om den borttagna grenen kan fortsätta existera en kort tid innan den faktiskt tas bort, kan det INTE ångras i de flesta fall. Vill du fortsätta?
Separately from the label language: the footer links point at the portal's Swedish
URLs unconditionally. The website serves Swedish at
/and English under/en/, so a readerusing Forgejo in English who clicks "Privacy Policy" gets the Swedish "Integritetspolicy" page.
The website does not detect
Accept-Language— Astro is configured withdefaultLocale: "sv"andredirectToDefaultLocale: false, and there is no locale middleware —so the
/enprefix has to be built by whoever emits the link. The comment at the top ofansible/roles/forgejo/templates/custom/extra_links_footer.tmpl.j2claims the legal pages dotheir own English detection; they do not, and that comment should go with the fix.
Fix
In the same fragment, derive the path prefix from the Forgejo UI language:
sv-SE→ no prefix, anything else →/en. Applies to all three links, including the baregitborg.selink, whose label stays as it is (a hostname, not translatable text).Honouring the language the reader explicitly selected in Forgejo is better than header
sniffing, and it works without any change to the website.
Done when
/en/,/en/terms,/en/privacy(all200).Part of gitborg/gitborg-docs#70.
supernaut refererade till detta ärende från bitborg/bitborg-docs2026-08-02 12:32:47 +00:00