fix
This commit is contained in:
parent
448dd80c5f
commit
1d19f28c9a
1 changed files with 9 additions and 5 deletions
|
@ -22,7 +22,8 @@ def generate_READMEs(app_path: str):
|
||||||
catalog = json.load(open(Path(os.path.abspath(__file__)).parent.parent.parent / "apps.json"))
|
catalog = json.load(open(Path(os.path.abspath(__file__)).parent.parent.parent / "apps.json"))
|
||||||
from_catalog = catalog.get(manifest['id'], {})
|
from_catalog = catalog.get(manifest['id'], {})
|
||||||
|
|
||||||
antifeatures_list = yaml.load(open(Path(os.path.abspath(__file__)).parent.parent.parent / "antifeatures.yaml"))
|
antifeatures_list = yaml.load(open(Path(os.path.abspath(__file__)).parent.parent.parent / "antifeatures.yml"))
|
||||||
|
antifeatures_list = { e['id']: e for e in antifeatures_list }
|
||||||
|
|
||||||
if not upstream and not (app_path / "doc" / "DISCLAIMER.md").exists():
|
if not upstream and not (app_path / "doc" / "DISCLAIMER.md").exists():
|
||||||
print(
|
print(
|
||||||
|
@ -60,10 +61,13 @@ def generate_READMEs(app_path: str):
|
||||||
disclaimer = None
|
disclaimer = None
|
||||||
|
|
||||||
# TODO: Add url to the documentation... and actually create that documentation :D
|
# TODO: Add url to the documentation... and actually create that documentation :D
|
||||||
antifeatures = [antifeatures_list[a] for a in from_catalog.get('antifeatures', [])]
|
antifeatures = { a: antifeatures_list[a] for a in from_catalog.get('antifeatures', [])}
|
||||||
for antifeature in antifeatures:
|
for k, v in antifeatures:
|
||||||
antifeature['title'] = antifeature['title'].get(lang_suffix, 'en')
|
v['title'] = v['title'].get(lang_suffix, 'en')
|
||||||
antifeature['description'] = antifeature['description'].get(lang_suffix, 'en')
|
if manifest.get("antifeatures", {}).get(k, 'en'):
|
||||||
|
v['description'] = manifest.get("antifeatures", {}).get(k, 'en')
|
||||||
|
else:
|
||||||
|
antifeature['description'] = antifeature['description'].get(lang_suffix, 'en')
|
||||||
|
|
||||||
out = template.render(
|
out = template.render(
|
||||||
lang=lang,
|
lang=lang,
|
||||||
|
|
Loading…
Reference in a new issue