Skip to content

Commit 34d21f6

Browse files
committed
[I18N] add [common] as first line
To keep weblate happy as it would otherwise be duplicating the content to all sections. See WeblateOrg/weblate#10831 for more information. (cherry picked from commit 5ffc10a00e1ceb24755894e981d3d26d654b4b7e) (cherry picked from commit 96d10e793b72e39656cc0df02272c7dd7632964c)
1 parent 20b5ca1 commit 34d21f6

29 files changed

+32
-1
lines changed

modules/translation/i18n/localestore.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,10 @@ func (store *localeStore) AddLocaleByIni(langName, langDesc string, source, more
5454
for _, section := range iniFile.Sections() {
5555
for _, key := range section.Keys() {
5656
var trKey string
57-
if section.Name() == "" || section.Name() == "DEFAULT" {
57+
// see https://codeberg.org/forgejo/discussions/issues/104
58+
// https://github.com/WeblateOrg/weblate/issues/10831
59+
// for an explanation of why "common" is an alternative
60+
if section.Name() == "" || section.Name() == "DEFAULT" || section.Name() == "common" {
5861
trKey = key.Name()
5962
} else {
6063
trKey = section.Name() + "." + key.Name()

options/locale/locale_cs-CZ.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
[common]
12
home=Domů
23
dashboard=Přehled
34
explore=Procházet

options/locale/locale_de-DE.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
[common]
12
home=Startseite
23
dashboard=Übersicht
34
explore=Erkunden

options/locale/locale_el-GR.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
[common]
12
home=Αρχική
23
dashboard=Κεντρικός Πίνακας
34
explore=Εξερεύνηση

options/locale/locale_en-US.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
[common]
12
home = Home
23
dashboard = Dashboard
34
explore = Explore

options/locale/locale_es-ES.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
[common]
12
home=Inicio
23
dashboard=Panel de control
34
explore=Explorar

options/locale/locale_fa-IR.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
[common]
12
home=خانه
23
dashboard=میز کار
34
explore=گشت‌و‌گذار

options/locale/locale_fi-FI.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
[common]
12
home=Etusivu
23
dashboard=Kojelauta
34
explore=Tutki

options/locale/locale_fr-FR.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
[common]
12
home=Accueil
23
dashboard=Tableau de bord
34
explore=Explorateur

options/locale/locale_hu-HU.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
[common]
12
home=Főoldal
23
dashboard=Műszerfal
34
explore=Felfedezés

0 commit comments

Comments
 (0)