forked from forgejo/forgejo
[I18N] add [common] as first line
To keep weblate happy as it would otherwise be duplicating the content
to all sections.
See https://github.com/WeblateOrg/weblate/issues/10831 for more information.
(cherry picked from commit 5ffc10a00e
)
This commit is contained in:
parent
1e3c6af5fe
commit
96d10e793b
29 changed files with 32 additions and 1 deletions
|
@ -54,7 +54,10 @@ func (store *localeStore) AddLocaleByIni(langName, langDesc string, source, more
|
|||
for _, section := range iniFile.Sections() {
|
||||
for _, key := range section.Keys() {
|
||||
var trKey string
|
||||
if section.Name() == "" || section.Name() == "DEFAULT" {
|
||||
// see https://codeberg.org/forgejo/discussions/issues/104
|
||||
// https://github.com/WeblateOrg/weblate/issues/10831
|
||||
// for an explanation of why "common" is an alternative
|
||||
if section.Name() == "" || section.Name() == "DEFAULT" || section.Name() == "common" {
|
||||
trKey = key.Name()
|
||||
} else {
|
||||
trKey = section.Name() + "." + key.Name()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue