[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 5ffc10a00e1ceb24755894e981d3d26d654b4b7e) (cherry picked from commit 96d10e793b72e39656cc0df02272c7dd7632964c)
This commit is contained in:
parent
20b5ca1e6c
commit
34d21f6bc2
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