forgejo/options/locale_next
Gusted 4c641b0fb2 feat: improve incorrect ROOT_URL warning (#7103)
- In the case that the `ROOT_URL` does not match the site a person is visiting Forgejo gives zero guarantees that any of the functionality will still work.
- Make the error i18n, use `local_next`.
- Reflect in the error that the any part of the application can break, don't be specific - it is plain wrong and should not be used.
- Always check for this case on the login page. This was previously only the case if OAuth2 was enabled, but this code was checking for elements that are always present on the login page regardless if the OAuth2 was enabled or not. Technically nothing changed, but reading the code it is now more clear when this check is being run.
- Add E2E testing.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7103
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-03-03 18:05:01 +00:00
..
locale_ar.json Initial support for localization and pluralization with go-i18n-JSON-v2 format 2025-01-17 11:21:28 +01:00
locale_be.json Initial support for localization and pluralization with go-i18n-JSON-v2 format 2025-01-17 11:21:28 +01:00
locale_bg.json fix(i18n): flatten next locales (#6607) 2025-01-18 07:35:28 +00:00
locale_bn.json Initial support for localization and pluralization with go-i18n-JSON-v2 format 2025-01-17 11:21:28 +01:00
locale_bs.json Initial support for localization and pluralization with go-i18n-JSON-v2 format 2025-01-17 11:21:28 +01:00
locale_ca.json fix(i18n): flatten next locales (#6607) 2025-01-18 07:35:28 +00:00
locale_cs-CZ.json fix(i18n): flatten next locales (#6607) 2025-01-18 07:35:28 +00:00
locale_da.json fix(i18n): flatten next locales (#6607) 2025-01-18 07:35:28 +00:00
locale_de-DE.json fix(i18n): flatten next locales (#6607) 2025-01-18 07:35:28 +00:00
locale_el-GR.json fix(i18n): flatten next locales (#6607) 2025-01-18 07:35:28 +00:00
locale_en-US.json feat: improve incorrect ROOT_URL warning (#7103) 2025-03-03 18:05:01 +00:00
locale_eo.json fix(i18n): flatten next locales (#6607) 2025-01-18 07:35:28 +00:00
locale_es-ES.json fix(i18n): flatten next locales (#6607) 2025-01-18 07:35:28 +00:00
locale_et.json fix(i18n): flatten next locales (#6607) 2025-01-18 07:35:28 +00:00
locale_fa-IR.json fix(i18n): flatten next locales (#6607) 2025-01-18 07:35:28 +00:00
locale_fi-FI.json fix(i18n): flatten next locales (#6607) 2025-01-18 07:35:28 +00:00
locale_fil.json fix(i18n): flatten next locales (#6607) 2025-01-18 07:35:28 +00:00
locale_fr-FR.json fix(i18n): flatten next locales (#6607) 2025-01-18 07:35:28 +00:00
locale_gl.json Initial support for localization and pluralization with go-i18n-JSON-v2 format 2025-01-17 11:21:28 +01:00
locale_hi.json Initial support for localization and pluralization with go-i18n-JSON-v2 format 2025-01-17 11:21:28 +01:00
locale_hu-HU.json fix(i18n): flatten next locales (#6607) 2025-01-18 07:35:28 +00:00
locale_id-ID.json fix(i18n): flatten next locales (#6607) 2025-01-18 07:35:28 +00:00
locale_is-IS.json fix(i18n): flatten next locales (#6607) 2025-01-18 07:35:28 +00:00
locale_it-IT.json fix(i18n): flatten next locales (#6607) 2025-01-18 07:35:28 +00:00
locale_ja-JP.json fix(i18n): flatten next locales (#6607) 2025-01-18 07:35:28 +00:00
locale_ko-KR.json fix(i18n): flatten next locales (#6607) 2025-01-18 07:35:28 +00:00
locale_lt.json fix(i18n): flatten next locales (#6607) 2025-01-18 07:35:28 +00:00
locale_lv-LV.json fix(i18n): flatten next locales (#6607) 2025-01-18 07:35:28 +00:00
locale_ml-IN.json Initial support for localization and pluralization with go-i18n-JSON-v2 format 2025-01-17 11:21:28 +01:00
locale_nb_NO.json Initial support for localization and pluralization with go-i18n-JSON-v2 format 2025-01-17 11:21:28 +01:00
locale_nds.json fix(i18n): flatten next locales (#6607) 2025-01-18 07:35:28 +00:00
locale_nl-NL.json fix(i18n): flatten next locales (#6607) 2025-01-18 07:35:28 +00:00
locale_pl-PL.json fix(i18n): flatten next locales (#6607) 2025-01-18 07:35:28 +00:00
locale_pt-BR.json fix(i18n): flatten next locales (#6607) 2025-01-18 07:35:28 +00:00
locale_pt-PT.json fix(i18n): flatten next locales (#6607) 2025-01-18 07:35:28 +00:00
locale_ru-RU.json fix(i18n): flatten next locales (#6607) 2025-01-18 07:35:28 +00:00
locale_si-LK.json fix(i18n): flatten next locales (#6607) 2025-01-18 07:35:28 +00:00
locale_sk-SK.json Initial support for localization and pluralization with go-i18n-JSON-v2 format 2025-01-17 11:21:28 +01:00
locale_sl.json Initial support for localization and pluralization with go-i18n-JSON-v2 format 2025-01-17 11:21:28 +01:00
locale_sr-SP.json Initial support for localization and pluralization with go-i18n-JSON-v2 format 2025-01-17 11:21:28 +01:00
locale_sv-SE.json fix(i18n): flatten next locales (#6607) 2025-01-18 07:35:28 +00:00
locale_tr-TR.json fix(i18n): flatten next locales (#6607) 2025-01-18 07:35:28 +00:00
locale_uk-UA.json fix(i18n): flatten next locales (#6607) 2025-01-18 07:35:28 +00:00
locale_vi.json Initial support for localization and pluralization with go-i18n-JSON-v2 format 2025-01-17 11:21:28 +01:00
locale_yi.json Initial support for localization and pluralization with go-i18n-JSON-v2 format 2025-01-17 11:21:28 +01:00
locale_zh-CN.json fix(i18n): flatten next locales (#6607) 2025-01-18 07:35:28 +00:00
locale_zh-HK.json fix(i18n): flatten next locales (#6607) 2025-01-18 07:35:28 +00:00
locale_zh-TW.json fix(i18n): flatten next locales (#6607) 2025-01-18 07:35:28 +00:00