update: If cateogories.yml only has icon:, then add name:

E.g. if _categories.yml_ is like:

```yaml
Time:
  icon: time.png
```
This commit is contained in:
Hans-Christoph Steiner 2025-05-22 19:54:07 +02:00
parent 964861eb68
commit 494d811846
2 changed files with 38 additions and 1 deletions

View file

@ -775,7 +775,9 @@ def make_v2(apps, packages, repodir, repodict, requestsdict, signer_fingerprints
# 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] = {"name": {DEFAULT_LOCALE: category}}
output['repo'][CATEGORIES_CONFIG_NAME][category] = dict()
if 'name' not in output['repo'][CATEGORIES_CONFIG_NAME][category]:
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: