mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-10-14 21:22:22 +00:00
fix(i18n): use translate key as fallback
- If the translate key is nonsense (not seen in any of the languages) then the translate key as-is should be returned as value, this helps during development. Currently it displays the first entry of the locale store which is "Home". - Regression from forgejo/forgejo#6203. - Added unit test.
This commit is contained in:
parent
9f3507e726
commit
15aa35a809
2 changed files with 4 additions and 3 deletions
|
@ -158,6 +158,7 @@ commits = fallback value for commits
|
|||
|
||||
found := lang1.HasKey("no-such")
|
||||
assert.False(t, found)
|
||||
assert.EqualValues(t, "no-such", lang1.TrString("no-such"))
|
||||
require.NoError(t, ls.Close())
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue