4 Commits

Author SHA1 Message Date
690b17ba0a add /packaging_apps_intro link 2024-03-09 05:40:50 +01:00
20097067c8 we need to better warn users and recruit maintainers 2024-03-09 05:40:50 +01:00
68741582d0 Merge pull request #2105 from YunoHost/readme_generator_generic_lang_list
feat(readme_generator): don't hardcode the list of languages, extract it from the README templates
2024-03-08 21:08:48 +01:00
a14b644665 feat(readme_generator): don't hardcode the list of languages, extract it from the README templates 2024-03-08 04:16:36 +01:00
2 changed files with 20 additions and 5 deletions

View File

@ -79,11 +79,11 @@ description.it = "Questo software non è più mantenuto. Ci si può aspettare ch
icon = "user-times"
title.en = "Package not maintained"
title.eu = "Mantendu gabeko paketea"
title.fr = "Paquet non maintenu"
title.fr = "Package non maintenu"
title.it = "Pacchetto non mantenuto"
description.en = "This YunoHost package is not maintained and needs adoption."
description.en = "This YunoHost package is not actively maintained and needs adoption. This means that minimal maintenance is made by volunteers who don't use the app, so you should expect the app to lose reliability over time. You can [learn how to package](https://yunohost.org/packaging_apps_intro) if you'd like to adopt it."
description.eu = "Pakete honek ez du mantenduko duenik, boluntario baten beharra dauka."
description.fr = "Ce package YunoHost n'est plus maintenu et doit être adopté."
description.fr = "Ce package YunoHost n'est pas activement maintenu et a besoin d'être adopté. Cela veut dire que la maintenance minimale est réalisée par des bénévoles qui n'utilisent pas l'application, il faut donc s'attendre à ce que l'app perde en fiabilité avec le temps. Vous pouvez [apprendre comment packager](https://yunohost.org/packaging_apps_intro) si vous voulez l'adopter."
description.it = "Questo pacchetto di YunoHost non è più mantenuto e necessita di essere adottato."
[paid-content]

View File

@ -6,7 +6,7 @@ import os
from pathlib import Path
from copy import deepcopy
from typing import Dict, Optional, List
from typing import Dict, Optional, List, Tuple
import toml
from jinja2 import Environment, FileSystemLoader
@ -51,7 +51,22 @@ def generate_READMEs(app_path: Path):
env = Environment(loader=FileSystemLoader(Path(__file__).parent / "templates"))
for lang, lang_suffix in [("en", ""), ("fr", "_fr")]:
# parse available README template and generate a list in the form of:
# > [("en", ""), ("fr", "_fr"), ...]
available_langs: List[Tuple[str, str]] = [("en", "")]
for README_template in (Path(__file__).parent / "templates").iterdir():
# we only want README_{lang}.md.j2 files
if README_template.name == "README.md.j2":
continue
if not README_template.name.endswith(".j2") or not README_template.name.startswith("README_"):
continue
language_code = README_template.name.split("_")[1].split(".")[0]
available_langs.append((language_code, "_" + language_code))
for lang, lang_suffix in available_langs:
template = env.get_template(f"README{lang_suffix}.md.j2")
if (app_path / "doc" / f"DESCRIPTION{lang_suffix}.md").exists():