Add default locale for generated categories

The client expects at least a name to be set.

Regression of 2c566cf6.
This commit is contained in:
Jochen Sprickerhof 2023-09-10 10:05:15 +02:00 committed by Hans-Christoph Steiner
parent b5724f507b
commit 521ff4fe17
4 changed files with 20 additions and 8 deletions

View file

@ -746,7 +746,7 @@ def make_v2(apps, packages, repodir, repodict, requestsdict, fdroid_signing_key_
# include definitions for "auto-defined" categories, e.g. just used in app metadata
for category in sorted(categories_used_by_apps):
if category not in output['repo'][CATEGORIES_CONFIG_NAME]:
output['repo'][CATEGORIES_CONFIG_NAME][category] = dict()
output['repo'][CATEGORIES_CONFIG_NAME][category] = {"name": {DEFAULT_LOCALE: category}}
# do not include defined categories if no apps use them
for category in list(output['repo'].get(CATEGORIES_CONFIG_NAME, list())):
if category not in categories_used_by_apps: