From 9042eb6a6762cd35669efa16d208cdcefa13d9c7 Mon Sep 17 00:00:00 2001 From: Jochen Sprickerhof Date: Fri, 23 Apr 2021 18:34:00 +0200 Subject: [PATCH] Use English app name if the other is empty --- fdroid/index.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fdroid/index.go b/fdroid/index.go index 1716c19..119ea7e 100644 --- a/fdroid/index.go +++ b/fdroid/index.go @@ -59,6 +59,7 @@ type App struct { } type Localization struct { + Name string `json:"name"` Summary string `json:"summary"` Description string `json:"description"` } @@ -274,6 +275,9 @@ func LoadIndexJSON(r io.Reader) (*Index, error) { english, enOK = app.Localized["en-US"] } + if app.Name == "" && enOK { + app.Name = english.Name + } // TODO: why does the json index contain html escapes? app.Name = html.UnescapeString(app.Name)