From 8059177b8465013ec2663dcfee09bb142d8377d3 Mon Sep 17 00:00:00 2001 From: YunoHost Bot Date: Fri, 31 May 2024 19:33:59 +0200 Subject: [PATCH 01/19] Update app levels according to CI results (#2376) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update app levels according to CI results * Update apps.toml * Update apps.toml --------- Co-authored-by: root Co-authored-by: Éric Gaspar <46165813+ericgaspar@users.noreply.github.com> --- apps.toml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/apps.toml b/apps.toml index 09a28533..9243af55 100644 --- a/apps.toml +++ b/apps.toml @@ -758,7 +758,7 @@ url = "https://github.com/YunoHost-Apps/directorylister_ynh" [discourse] added_date = 1674232499 # 2023/01/20 category = "communication" -level = 6 +level = 8 potential_alternative_to = [ "Invision Community", "XenForo", "vBulletin" ] state = "working" subtags = [ "forum" ] @@ -909,7 +909,7 @@ url = "https://github.com/YunoHost-Apps/easyappointments_ynh" [elabftw] added_date = 1674232499 # 2023/01/20 category = "productivity_and_management" -level = 6 +level = 8 state = "working" url = "https://github.com/YunoHost-Apps/elabftw_ynh" @@ -1158,7 +1158,7 @@ url = "https://github.com/YunoHost-Apps/flarum_ynh" added_date = 1714137502 # 2024/04/26 antifeatures = [ "alpha-software", "arbitrary-limitations" ] category = "publishing" -level = 7 +level = 6 potential_alternative_to = [ "ClassifiedAds.com", "kleinanzeigen.de" ] state = "working" subtags = [ "ecommerce" ] @@ -2208,7 +2208,7 @@ url = "https://github.com/YunoHost-Apps/mantis_ynh" [mastodon] added_date = 1674232499 # 2023/01/20 category = "social_media" -level = 6 +level = 8 potential_alternative_to = [ "X" ] state = "working" subtags = [ "microblogging" ] @@ -3371,7 +3371,7 @@ url = "https://github.com/YunoHost-Apps/reiverr_ynh" [restic] added_date = 1674232499 # 2023/01/20 category = "system_tools" -level = 6 +level = 8 state = "working" subtags = [ "backup" ] url = "https://github.com/YunoHost-Apps/restic_ynh" From 90314cb4fa1e3b3f527fd3c3a9727c2d40b3ace2 Mon Sep 17 00:00:00 2001 From: YunoHost Bot Date: Sun, 2 Jun 2024 18:29:06 +0200 Subject: [PATCH 02/19] Translated using Weblate (French) for appstore (#2379) Currently translated at 100.0% (148 of 148 strings) Translation: YunoHost/store Translate-URL: https://translate.yunohost.org/projects/yunohost/apps/fr/ Co-authored-by: clecle226 --- store/translations/fr/LC_MESSAGES/messages.po | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/store/translations/fr/LC_MESSAGES/messages.po b/store/translations/fr/LC_MESSAGES/messages.po index 3e36bfcc..35b41cd8 100644 --- a/store/translations/fr/LC_MESSAGES/messages.po +++ b/store/translations/fr/LC_MESSAGES/messages.po @@ -8,8 +8,8 @@ msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2024-05-09 23:14+0200\n" -"PO-Revision-Date: 2024-05-20 21:19+0000\n" -"Last-Translator: ppr \n" +"PO-Revision-Date: 2024-06-02 15:54+0000\n" +"Last-Translator: clecle226 \n" "Language-Team: French \n" "Language: fr\n" @@ -615,7 +615,6 @@ msgid "Inactive (%(days)s days ago)" msgstr "Inactif (%(days)s jours)" #: templates/dash.html:177 -#, fuzzy msgid "Packaging v1" msgstr "Packaging v1" From 3120a6a530870b4a811f05acbbefdc2b4a7ce06a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Tue, 21 May 2024 10:59:49 +0200 Subject: [PATCH 03/19] app_caches.py: Add --ssh and --all-branches Those arguments allow to customize how repositories are cloned and what is fetched. --- tools/app_caches.py | 57 +++++++++++++++++++++++++++++++-------------- 1 file changed, 39 insertions(+), 18 deletions(-) diff --git a/tools/app_caches.py b/tools/app_caches.py index 069f5f2c..6cb79dd8 100755 --- a/tools/app_caches.py +++ b/tools/app_caches.py @@ -3,6 +3,7 @@ import argparse import shutil import logging +from itertools import repeat from multiprocessing import Pool from pathlib import Path from typing import Any @@ -24,7 +25,7 @@ def app_cache_folder(app: str) -> Path: return APPS_CACHE_DIR / app -def app_cache_clone(app: str, infos: dict[str, str]) -> None: +def app_cache_clone(app: str, infos: dict[str, str], all_branches: bool = False) -> None: logging.info("Cloning %s...", app) git_depths = { "notworking": 5, @@ -37,18 +38,26 @@ def app_cache_clone(app: str, infos: dict[str, str]) -> None: infos["url"], to_path=app_cache_folder(app), depth=git_depths.get(infos["state"], git_depths["default"]), - single_branch=True, + single_branch=not all_branches, branch=infos.get("branch", "master"), ) -def app_cache_clone_or_update(app: str, infos: dict[str, str]) -> None: +def app_cache_clone_or_update( + app: str, + infos: dict[str, str], + ssh_clone: bool = False, + fetch_all_branches: bool = False) -> None: app_path = app_cache_folder(app) + # Patch url for ssh clone + if ssh_clone: + infos["url"] = infos["url"].replace("https://github.com/", "git@github.com:") + # Don't refresh if already refreshed during last hour age = git_repo_age(app_path) if age is False: - app_cache_clone(app, infos) + app_cache_clone(app, infos, fetch_all_branches) return # if age < 3600: @@ -60,29 +69,38 @@ def app_cache_clone_or_update(app: str, infos: dict[str, str]) -> None: repo.remote("origin").set_url(infos["url"]) branch = infos.get("branch", "master") - if repo.active_branch != branch: - all_branches = [str(b) for b in repo.branches] - if branch in all_branches: - repo.git.checkout(branch, "--force") - else: - repo.git.remote("set-branches", "--add", "origin", branch) - repo.remote("origin").fetch(f"{branch}:{branch}") + if fetch_all_branches: + repo.git.remote("set-branches", "origin", "*") + repo.remote("origin").fetch() + else: + if repo.active_branch != branch: + all_branches = [str(b) for b in repo.branches] + if branch in all_branches: + repo.git.checkout(branch, "--force") + else: + repo.git.remote("set-branches", "--add", "origin", branch) + repo.remote("origin").fetch(f"{branch}:{branch}") - repo.remote("origin").fetch(refspec=branch, force=True) - repo.git.reset("--hard", f"origin/{branch}") + repo.remote("origin").fetch(refspec=branch, force=True) + repo.git.reset("--hard", f"origin/{branch}") def __app_cache_clone_or_update_mapped(data): - name, info = data + name, info, ssh_clone, all_branches = data try: - app_cache_clone_or_update(name, info) + app_cache_clone_or_update(name, info, ssh_clone, all_branches) except Exception as err: logging.error("[App caches] Error while updating %s: %s", name, err) -def apps_cache_update_all(apps: dict[str, dict[str, Any]], parallel: int = 8) -> None: +def apps_cache_update_all( + apps: dict[str, dict[str, Any]], + parallel: int = 8, + ssh_clone: bool = False, + all_branches: bool = False) -> None: with Pool(processes=parallel) as pool: - tasks = pool.imap_unordered(__app_cache_clone_or_update_mapped, apps.items()) + tasks = pool.imap_unordered(__app_cache_clone_or_update_mapped, + zip(apps.keys(), apps.values(), repeat(ssh_clone), repeat(all_branches))) for _ in tqdm.tqdm(tasks, total=len(apps.keys()), ascii=" ·#"): pass @@ -101,6 +119,8 @@ def __run_for_catalog(): parser = argparse.ArgumentParser() parser.add_argument("-v", "--verbose", action="store_true") parser.add_argument("-j", "--processes", type=int, default=8) + parser.add_argument("-s", "--ssh", action=argparse.BooleanOptionalAction, default=False, help="Use ssh clones instead of https") + parser.add_argument("-b", "--all-branches", action=argparse.BooleanOptionalAction, default=False, help="Download all branches from repo") parser.add_argument( "-c", "--cleanup", @@ -114,7 +134,8 @@ def __run_for_catalog(): if args.cleanup: apps_cache_cleanup(get_catalog()) - apps_cache_update_all(get_catalog(), parallel=args.processes) + apps_cache_update_all(get_catalog(), parallel=args.processes, + ssh_clone=args.ssh, all_branches=args.all_branches) if __name__ == "__main__": From 9be8d738033ada07d44a70eabf2fbbcc56974576 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Sun, 2 Jun 2024 21:04:21 +0200 Subject: [PATCH 04/19] Simplify github workflow: peter-evans/create-pull-request@v6 already checks if diff exists --- .github/workflows/added_dates.yml | 1 + .github/workflows/auto_messages_pot.yml | 10 ++++------ .github/workflows/autoblack.yml | 9 +-------- .github/workflows/test_toml.yaml | 11 ++--------- 4 files changed, 8 insertions(+), 23 deletions(-) diff --git a/.github/workflows/added_dates.yml b/.github/workflows/added_dates.yml index 6a32fd44..397a7a5b 100644 --- a/.github/workflows/added_dates.yml +++ b/.github/workflows/added_dates.yml @@ -13,6 +13,7 @@ jobs: with: fetch-depth: 0 token: ${{ secrets.YUNOHOST_BOT_TOKEN }} + - name: Set up Python 3.11 uses: actions/setup-python@v5 with: diff --git a/.github/workflows/auto_messages_pot.yml b/.github/workflows/auto_messages_pot.yml index c290b6f8..18e5c000 100644 --- a/.github/workflows/auto_messages_pot.yml +++ b/.github/workflows/auto_messages_pot.yml @@ -14,25 +14,23 @@ jobs: uses: actions/setup-python@v5 with: python-version: 3.11 + - name: Install dependencies run: | cd tools/readme_generator/ pip install -r requirements.txt + - name: Save old messges.pot for diffing later run: | cd tools/readme_generator/ cp messages.pot messages.pot.old + - name: Try to generate messages.pot run: | cd tools/readme_generator/ pybabel extract --ignore-dirs venv -F babel.cfg -o messages.pot . - - shell: pwsh - id: check_files_changed - run: | - $HasDiff = python .github/diff_pot_files.py tools/readme_generator/messages.pot.old tools/readme_generator/messages.pot - Write-Host "::set-output name=files_changed::$HasDiff" + - name: Create Pull Request - if: steps.check_files_changed.outputs.files_changed == 'true' uses: peter-evans/create-pull-request@v6 with: token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/autoblack.yml b/.github/workflows/autoblack.yml index 761222be..25c8e8b3 100644 --- a/.github/workflows/autoblack.yml +++ b/.github/workflows/autoblack.yml @@ -15,15 +15,8 @@ jobs: with: options: "." continue-on-error: true - - shell: pwsh - id: check_files_changed - run: | - # Diff HEAD with the previous commit - $diff = git diff - $HasDiff = $diff.Length -gt 0 - Write-Host "::set-output name=files_changed::$HasDiff" + - name: Create Pull Request - if: steps.check_files_changed.outputs.files_changed == 'true' uses: peter-evans/create-pull-request@v6 with: token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test_toml.yaml b/.github/workflows/test_toml.yaml index 8cd0e4b4..6c67ec9f 100644 --- a/.github/workflows/test_toml.yaml +++ b/.github/workflows/test_toml.yaml @@ -11,15 +11,8 @@ jobs: - uses: actions/checkout@v4 - uses: uncenter/setup-taplo@v1 - run: taplo fmt - - shell: pwsh - id: check_files_changed - run: | - # Diff HEAD with the previous commit - $diff = git diff - $HasDiff = $diff.Length -gt 0 - Write-Host "::set-output name=files_changed::$HasDiff" + - name: Create Pull Request - if: steps.check_files_changed.outputs.files_changed == 'true' uses: peter-evans/create-pull-request@v6 with: token: ${{ secrets.GITHUB_TOKEN }} @@ -28,4 +21,4 @@ jobs: body: | This pull request uses the [Taplo](https://taplo.tamasfe.dev) formatter. base: ${{ github.head_ref }} # Creates pull request onto pull request or commit branch - branch: actions/toml \ No newline at end of file + branch: actions/toml From 99e0ea6cf45e5255cc2bc91941bc4c962b533a24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Sun, 2 Jun 2024 21:16:24 +0200 Subject: [PATCH 05/19] Fix workflow auto_messages_pot for has_diff --- .github/workflows/auto_messages_pot.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/auto_messages_pot.yml b/.github/workflows/auto_messages_pot.yml index 18e5c000..d058ca68 100644 --- a/.github/workflows/auto_messages_pot.yml +++ b/.github/workflows/auto_messages_pot.yml @@ -30,7 +30,11 @@ jobs: cd tools/readme_generator/ pybabel extract --ignore-dirs venv -F babel.cfg -o messages.pot . + HAS_DIFF=$(python .github/diff_pot_files.py tools/readme_generator/messages.pot.old tools/readme_generator/messages.pot) + echo "HAS_DIFF=$HAS_DIFF" >> $GITHUB_ENV + - name: Create Pull Request + if: ${{ env.HAS_DIFF == 'true' }} uses: peter-evans/create-pull-request@v6 with: token: ${{ secrets.GITHUB_TOKEN }} From 26e8eb74b30fd72ecbabe24e95cf2b2940963118 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Sun, 2 Jun 2024 21:20:23 +0200 Subject: [PATCH 06/19] Fix again auto messages pot workflow --- .github/workflows/auto_messages_pot.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/auto_messages_pot.yml b/.github/workflows/auto_messages_pot.yml index d058ca68..6640e8e3 100644 --- a/.github/workflows/auto_messages_pot.yml +++ b/.github/workflows/auto_messages_pot.yml @@ -30,6 +30,8 @@ jobs: cd tools/readme_generator/ pybabel extract --ignore-dirs venv -F babel.cfg -o messages.pot . + - name: Check if files changed + run: | HAS_DIFF=$(python .github/diff_pot_files.py tools/readme_generator/messages.pot.old tools/readme_generator/messages.pot) echo "HAS_DIFF=$HAS_DIFF" >> $GITHUB_ENV From eb9f116bc55c0ef8eb123f5b2573e979aad375af Mon Sep 17 00:00:00 2001 From: Salamandar <6552989+Salamandar@users.noreply.github.com> Date: Sun, 2 Jun 2024 19:21:52 +0000 Subject: [PATCH 07/19] :art: Format Python code with Black --- tools/app_caches.py | 52 ++++++++++++++++++++++++++++++++------------- 1 file changed, 37 insertions(+), 15 deletions(-) diff --git a/tools/app_caches.py b/tools/app_caches.py index 6cb79dd8..af7b4a0f 100755 --- a/tools/app_caches.py +++ b/tools/app_caches.py @@ -25,7 +25,9 @@ def app_cache_folder(app: str) -> Path: return APPS_CACHE_DIR / app -def app_cache_clone(app: str, infos: dict[str, str], all_branches: bool = False) -> None: +def app_cache_clone( + app: str, infos: dict[str, str], all_branches: bool = False +) -> None: logging.info("Cloning %s...", app) git_depths = { "notworking": 5, @@ -44,10 +46,11 @@ def app_cache_clone(app: str, infos: dict[str, str], all_branches: bool = False) def app_cache_clone_or_update( - app: str, - infos: dict[str, str], - ssh_clone: bool = False, - fetch_all_branches: bool = False) -> None: + app: str, + infos: dict[str, str], + ssh_clone: bool = False, + fetch_all_branches: bool = False, +) -> None: app_path = app_cache_folder(app) # Patch url for ssh clone @@ -94,13 +97,16 @@ def __app_cache_clone_or_update_mapped(data): def apps_cache_update_all( - apps: dict[str, dict[str, Any]], - parallel: int = 8, - ssh_clone: bool = False, - all_branches: bool = False) -> None: + apps: dict[str, dict[str, Any]], + parallel: int = 8, + ssh_clone: bool = False, + all_branches: bool = False, +) -> None: with Pool(processes=parallel) as pool: - tasks = pool.imap_unordered(__app_cache_clone_or_update_mapped, - zip(apps.keys(), apps.values(), repeat(ssh_clone), repeat(all_branches))) + tasks = pool.imap_unordered( + __app_cache_clone_or_update_mapped, + zip(apps.keys(), apps.values(), repeat(ssh_clone), repeat(all_branches)), + ) for _ in tqdm.tqdm(tasks, total=len(apps.keys()), ascii=" ·#"): pass @@ -119,8 +125,20 @@ def __run_for_catalog(): parser = argparse.ArgumentParser() parser.add_argument("-v", "--verbose", action="store_true") parser.add_argument("-j", "--processes", type=int, default=8) - parser.add_argument("-s", "--ssh", action=argparse.BooleanOptionalAction, default=False, help="Use ssh clones instead of https") - parser.add_argument("-b", "--all-branches", action=argparse.BooleanOptionalAction, default=False, help="Download all branches from repo") + parser.add_argument( + "-s", + "--ssh", + action=argparse.BooleanOptionalAction, + default=False, + help="Use ssh clones instead of https", + ) + parser.add_argument( + "-b", + "--all-branches", + action=argparse.BooleanOptionalAction, + default=False, + help="Download all branches from repo", + ) parser.add_argument( "-c", "--cleanup", @@ -134,8 +152,12 @@ def __run_for_catalog(): if args.cleanup: apps_cache_cleanup(get_catalog()) - apps_cache_update_all(get_catalog(), parallel=args.processes, - ssh_clone=args.ssh, all_branches=args.all_branches) + apps_cache_update_all( + get_catalog(), + parallel=args.processes, + ssh_clone=args.ssh, + all_branches=args.all_branches, + ) if __name__ == "__main__": From 2b43e283914571335b49a8582f7816681812c127 Mon Sep 17 00:00:00 2001 From: Salamandar <6552989+Salamandar@users.noreply.github.com> Date: Wed, 5 Jun 2024 10:31:14 +0200 Subject: [PATCH 08/19] Move matrix-puppet-discord to graveyard : long time legacy and incompatible with newer synapse versions (#2385) --- apps.toml | 11 ----------- graveyard.toml | 10 ++++++++++ 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/apps.toml b/apps.toml index 9243af55..ca713f53 100644 --- a/apps.toml +++ b/apps.toml @@ -2231,17 +2231,6 @@ state = "working" subtags = [ "chat" ] url = "https://github.com/YunoHost-Apps/matrix-appservice-irc_ynh" -[matrix-puppet-discord] -added_date = 1674232499 # 2023/01/20 -antifeatures = [ "deprecated-software" ] -category = "communication" -deprecated_date = 1711055457 # 2024/03/21 -level = 6 -potential_alternative_to = [ "Discord" ] -state = "working" -subtags = [ "chat" ] -url = "https://github.com/YunoHost-Apps/matrix-puppet-discord_ynh" - [matterbridge] added_date = 1674232499 # 2023/01/20 category = "communication" diff --git a/graveyard.toml b/graveyard.toml index 6fac92aa..a4a37460 100644 --- a/graveyard.toml +++ b/graveyard.toml @@ -186,6 +186,16 @@ potential_alternative_to = [ "Google Groups" ] subtags = [ "email" ] url = "https://github.com/yunohost-apps/mailman_ynh" +[matrix-puppet-discord] +added_date = 1674232499 # 2023/01/20 +antifeatures = [ "deprecated-software" ] +category = "communication" +deprecated_date = 1711055457 # 2024/03/21 +level = 6 +potential_alternative_to = [ "Discord" ] +subtags = [ "chat" ] +url = "https://github.com/YunoHost-Apps/matrix-puppet-discord_ynh" + [mediadrop] added_date = 1554588215 # 2019/04/07 category = "multimedia" From 9150ee7ca2dc74ccaedb0ab9a66a7a9a1b199a54 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 5 Jun 2024 08:31:30 +0000 Subject: [PATCH 09/19] Automatically add dates to the catalog files --- graveyard.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/graveyard.toml b/graveyard.toml index a4a37460..d4e28b4a 100644 --- a/graveyard.toml +++ b/graveyard.toml @@ -191,6 +191,7 @@ added_date = 1674232499 # 2023/01/20 antifeatures = [ "deprecated-software" ] category = "communication" deprecated_date = 1711055457 # 2024/03/21 +killed_date = 1717576274 # 2024/06/05 level = 6 potential_alternative_to = [ "Discord" ] subtags = [ "chat" ] From 510ef51c7bf3960e3ef94d5f89050de12829902f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Thu, 6 Jun 2024 12:05:37 +0200 Subject: [PATCH 10/19] Remove additional level key in graveyard --- graveyard.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/graveyard.toml b/graveyard.toml index d4e28b4a..bce03564 100644 --- a/graveyard.toml +++ b/graveyard.toml @@ -192,7 +192,6 @@ antifeatures = [ "deprecated-software" ] category = "communication" deprecated_date = 1711055457 # 2024/03/21 killed_date = 1717576274 # 2024/06/05 -level = 6 potential_alternative_to = [ "Discord" ] subtags = [ "chat" ] url = "https://github.com/YunoHost-Apps/matrix-puppet-discord_ynh" From d126ab60702e09abac45217cf9fdc2983bc81c17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Sat, 1 Jun 2024 09:56:18 +0200 Subject: [PATCH 11/19] Move readme generator webhook service to its own directory --- tools/readme_generator/webhook.service | 16 ---------------- tools/{readme_generator => webhooks}/webhook.py | 6 +++++- tools/webhooks/webhook.service | 16 ++++++++++++++++ 3 files changed, 21 insertions(+), 17 deletions(-) delete mode 100644 tools/readme_generator/webhook.service rename tools/{readme_generator => webhooks}/webhook.py (94%) create mode 100644 tools/webhooks/webhook.service diff --git a/tools/readme_generator/webhook.service b/tools/readme_generator/webhook.service deleted file mode 100644 index e4783c74..00000000 --- a/tools/readme_generator/webhook.service +++ /dev/null @@ -1,16 +0,0 @@ -[Unit] -Description=Auto-README webhook gunicorn daemon -After=network.target - -[Service] -PIDFile=/run/gunicorn/autoreadme_webhook-pid -User=autoreadme_webhook -Group=autoreadme_webhook -WorkingDirectory=__PATH_TO_README_GENERATOR__ -ExecStart=__PATH_TO_README_GENERATOR__/venv/bin/gunicorn -w 4 -b 127.0.0.1:8123 webhook:app -ExecReload=/bin/kill -s HUP $MAINPID -ExecStop=/bin/kill -s TERM $MAINPID -PrivateTmp=true - -[Install] -WantedBy=multi-user.target diff --git a/tools/readme_generator/webhook.py b/tools/webhooks/webhook.py similarity index 94% rename from tools/readme_generator/webhook.py rename to tools/webhooks/webhook.py index 3e668757..08950e17 100755 --- a/tools/readme_generator/webhook.py +++ b/tools/webhooks/webhook.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 +import sys import hashlib import hmac from functools import cache @@ -9,7 +10,10 @@ from pathlib import Path from git import Actor, Repo from sanic import HTTPResponse, Request, Sanic, response -from make_readme import generate_READMEs +# add apps/tools to sys.path +sys.path.insert(0, str(Path(__file__).parent.parent)) + +from readme_generator.make_readme import generate_READMEs TOOLS_DIR = Path(__file__).resolve().parent.parent diff --git a/tools/webhooks/webhook.service b/tools/webhooks/webhook.service new file mode 100644 index 00000000..a15bbf6b --- /dev/null +++ b/tools/webhooks/webhook.service @@ -0,0 +1,16 @@ +[Unit] +Description=Auto-README webhook gunicorn daemon +After=network.target + +[Service] +PIDFile=/run/gunicorn/apps_webhooks-pid +User=apps_webhooks +Group=apps_webhooks +WorkingDirectory=__PATH_TO_APPS_TOOLS__/webhooks +ExecStart=__PATH_TO_APPS_TOOLS__/webhooks/venv/bin/gunicorn -w 4 -b 127.0.0.1:8123 webhook:app +ExecReload=/bin/kill -s HUP $MAINPID +ExecStop=/bin/kill -s TERM $MAINPID +PrivateTmp=true + +[Install] +WantedBy=multi-user.target From 27d614e2931b21eb048f7a27c20fbaa913c6bcca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Sat, 1 Jun 2024 10:26:23 +0200 Subject: [PATCH 12/19] webhooks: use logging, add --debug and --unsafe for testing, split functions by logical blocks --- tools/webhooks/webhook.py | 65 ++++++++++++++++++++++++---------- tools/webhooks/webhook.service | 8 ++--- 2 files changed, 51 insertions(+), 22 deletions(-) diff --git a/tools/webhooks/webhook.py b/tools/webhooks/webhook.py index 08950e17..d9e16006 100755 --- a/tools/webhooks/webhook.py +++ b/tools/webhooks/webhook.py @@ -2,9 +2,11 @@ import sys import hashlib +import argparse import hmac from functools import cache import tempfile +import logging from pathlib import Path from git import Actor, Repo @@ -17,18 +19,15 @@ from readme_generator.make_readme import generate_READMEs TOOLS_DIR = Path(__file__).resolve().parent.parent -app = Sanic(__name__) +DEBUG = False +UNSAFE = False + +APP = Sanic(__name__) @cache def github_webhook_secret() -> str: - return ( - (TOOLS_DIR / ".github_webhook_secret") - .open("r", encoding="utf-8") - .read() - .strip() - ) - + return (TOOLS_DIR / ".github_webhook_secret").open("r", encoding="utf-8").read().strip() @cache def github_login() -> str: @@ -40,23 +39,35 @@ def github_token() -> str: return (TOOLS_DIR / ".github_token").open("r", encoding="utf-8").read().strip() -@app.route("/github", methods=["GET"]) -async def main_route(request: Request) -> HTTPResponse: +@APP.route("/github", methods=["GET"]) +async def github_get(request: Request) -> HTTPResponse: return response.text( "You aren't supposed to go on this page using a browser, it's for webhooks push instead." ) -@app.route("/github", methods=["POST"]) -async def on_push(request: Request) -> HTTPResponse: +@APP.route("/github", methods=["POST"]) +async def github_post(request: Request) -> HTTPResponse: + if UNSAFE and (signatures_reply := check_webhook_signatures(request)): + return signatures_reply + + event = request.headers.get("X-Github-Event") + if event == "push": + return on_push(request) + + return response.json({"error": f"Unknown event '{event}'"}, 422) + + +def check_webhook_signatures(request: Request) -> HTTPResponse | None: + logging.warning("Unsafe webhook!") header_signature = request.headers.get("X-Hub-Signature") if header_signature is None: - print("no header X-Hub-Signature") + logging.error("no header X-Hub-Signature") return response.json({"error": "No X-Hub-Signature"}, 403) sha_name, signature = header_signature.split("=") if sha_name != "sha1": - print("signing algo isn't sha1, it's '%s'" % sha_name) + logging.error("signing algo isn't sha1, it's '%s'" % sha_name) return response.json({"error": "Signing algorightm is not sha1 ?!"}, 501) # HMAC requires the key to be bytes, but data is string @@ -66,13 +77,14 @@ async def on_push(request: Request) -> HTTPResponse: if not hmac.compare_digest(str(mac.hexdigest()), str(signature)): return response.json({"error": "Bad signature ?!"}, 403) + return None +def on_push(request: Request) -> HTTPResponse: data = request.json - repository = data["repository"]["full_name"] branch = data["ref"].split("/", 2)[2] - print(f"{repository} -> branch '{branch}'") + logging.info(f"{repository} -> branch '{branch}'") with tempfile.TemporaryDirectory() as folder_str: folder = Path(folder_str) @@ -90,7 +102,7 @@ async def on_push(request: Request) -> HTTPResponse: diff_empty = len(repo.index.diff("HEAD")) == 0 if diff_empty: - print("nothing to do") + logging.debug("nothing to do") return response.text("nothing to do") repo.index.commit( @@ -101,5 +113,22 @@ async def on_push(request: Request) -> HTTPResponse: return response.text("ok") +def main() -> None: + parser = argparse.ArgumentParser() + parser.add_argument("-d", "--debug", action="store_true") + parser.add_argument("-u", "--unsafe", action="store_true", + help="Disable Github signature checks on webhooks, for debug only.") + args = parser.parse_args() + + if args.debug: + logging.getLogger().setLevel(logging.DEBUG) + + + global DEBUG, UNSAFE + DEBUG = args.debug + UNSAFE = args.unsafe + + APP.run(host="127.0.0.1", port=8123, debug=args.debug) + if __name__ == "__main__": - app.run(host="127.0.0.1", port=8123, debug=True) + main() diff --git a/tools/webhooks/webhook.service b/tools/webhooks/webhook.service index a15bbf6b..66a13659 100644 --- a/tools/webhooks/webhook.service +++ b/tools/webhooks/webhook.service @@ -1,11 +1,11 @@ [Unit] -Description=Auto-README webhook gunicorn daemon +Description=Github webhooks for YunoHost-Apps management After=network.target [Service] -PIDFile=/run/gunicorn/apps_webhooks-pid -User=apps_webhooks -Group=apps_webhooks +PIDFile=/run/gunicorn/yunohost_apps_webhooks-pid +User=yunohost_apps_webhooks +Group=yunohost_apps_webhooks WorkingDirectory=__PATH_TO_APPS_TOOLS__/webhooks ExecStart=__PATH_TO_APPS_TOOLS__/webhooks/venv/bin/gunicorn -w 4 -b 127.0.0.1:8123 webhook:app ExecReload=/bin/kill -s HUP $MAINPID From f835ffa1738a82ea3a1c80f3319babddc5366972 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Sat, 1 Jun 2024 10:37:38 +0200 Subject: [PATCH 13/19] webhook: Rebase testing on master if fast-forwardable --- tools/webhooks/webhook.py | 51 ++++++++++++++++++++++++++++++--------- 1 file changed, 39 insertions(+), 12 deletions(-) diff --git a/tools/webhooks/webhook.py b/tools/webhooks/webhook.py index d9e16006..9ea9600e 100755 --- a/tools/webhooks/webhook.py +++ b/tools/webhooks/webhook.py @@ -9,7 +9,7 @@ import tempfile import logging from pathlib import Path -from git import Actor, Repo +from git import Actor, Repo, GitCommandError from sanic import HTTPResponse, Request, Sanic, response # add apps/tools to sys.path @@ -86,32 +86,59 @@ def on_push(request: Request) -> HTTPResponse: logging.info(f"{repository} -> branch '{branch}'") + need_push = False with tempfile.TemporaryDirectory() as folder_str: folder = Path(folder_str) repo = Repo.clone_from( f"https://{github_login()}:{github_token()}@github.com/{repository}", to_path=folder, - single_branch=True, - branch=branch, ) - generate_READMEs(folder) + # First rebase the testing branch if possible + if branch in ["master", "testing"]: + result = git_repo_rebase_testing_fast_forward(repo) + need_push = need_push or result - repo.git.add("README*.md") - repo.git.add("ALL_README.md") + repo.git.checkout(branch) + result = generate_and_commit_readmes(repo) + need_push = need_push or result - diff_empty = len(repo.index.diff("HEAD")) == 0 - if diff_empty: + if not need_push: logging.debug("nothing to do") return response.text("nothing to do") - repo.index.commit( - "Auto-update READMEs", author=Actor("yunohost-bot", "yunohost@yunohost.org") - ) - repo.remote().push(quiet=False) + logging.debug(f"Pushing {repository}") + repo.remote().push(quiet=False, all=True) return response.text("ok") +def generate_and_commit_readmes(repo: Repo) -> bool: + assert repo.working_tree_dir is not None + generate_READMEs(Path(repo.working_tree_dir)) + + repo.git.add("README*.md") + repo.git.add("ALL_README.md") + + diff_empty = len(repo.index.diff("HEAD")) == 0 + if diff_empty: + return False + + repo.index.commit( + "Auto-update READMEs", author=Actor("yunohost-bot", "yunohost@yunohost.org") + ) + return True + + +def git_repo_rebase_testing_fast_forward(repo: Repo) -> bool: + try: + repo.git.checkout("testing") + except GitCommandError: + return False + if not repo.is_ancestor("testing", "master"): + return False + repo.git.merge("master", ff_only=True) + return True + def main() -> None: parser = argparse.ArgumentParser() From 0b769e4e026f64f4aab69805f6715be5bda8372b Mon Sep 17 00:00:00 2001 From: Salamandar <6552989+Salamandar@users.noreply.github.com> Date: Thu, 6 Jun 2024 10:11:58 +0000 Subject: [PATCH 14/19] :art: Format Python code with Black --- tools/webhooks/webhook.py | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/tools/webhooks/webhook.py b/tools/webhooks/webhook.py index 9ea9600e..0bae51c3 100755 --- a/tools/webhooks/webhook.py +++ b/tools/webhooks/webhook.py @@ -27,7 +27,13 @@ APP = Sanic(__name__) @cache def github_webhook_secret() -> str: - return (TOOLS_DIR / ".github_webhook_secret").open("r", encoding="utf-8").read().strip() + return ( + (TOOLS_DIR / ".github_webhook_secret") + .open("r", encoding="utf-8") + .read() + .strip() + ) + @cache def github_login() -> str: @@ -54,7 +60,7 @@ async def github_post(request: Request) -> HTTPResponse: event = request.headers.get("X-Github-Event") if event == "push": return on_push(request) - + return response.json({"error": f"Unknown event '{event}'"}, 422) @@ -79,6 +85,7 @@ def check_webhook_signatures(request: Request) -> HTTPResponse | None: return response.json({"error": "Bad signature ?!"}, 403) return None + def on_push(request: Request) -> HTTPResponse: data = request.json repository = data["repository"]["full_name"] @@ -112,6 +119,7 @@ def on_push(request: Request) -> HTTPResponse: return response.text("ok") + def generate_and_commit_readmes(repo: Repo) -> bool: assert repo.working_tree_dir is not None generate_READMEs(Path(repo.working_tree_dir)) @@ -143,19 +151,23 @@ def git_repo_rebase_testing_fast_forward(repo: Repo) -> bool: def main() -> None: parser = argparse.ArgumentParser() parser.add_argument("-d", "--debug", action="store_true") - parser.add_argument("-u", "--unsafe", action="store_true", - help="Disable Github signature checks on webhooks, for debug only.") + parser.add_argument( + "-u", + "--unsafe", + action="store_true", + help="Disable Github signature checks on webhooks, for debug only.", + ) args = parser.parse_args() if args.debug: logging.getLogger().setLevel(logging.DEBUG) - global DEBUG, UNSAFE DEBUG = args.debug UNSAFE = args.unsafe APP.run(host="127.0.0.1", port=8123, debug=args.debug) + if __name__ == "__main__": main() From b087d7093c50ab60eea413ec44abaa7cc1faac02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Thu, 6 Jun 2024 16:26:22 +0200 Subject: [PATCH 15/19] readme_generator: use absolute paths to translations, not relative paths --- tools/readme_generator/make_readme.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/readme_generator/make_readme.py b/tools/readme_generator/make_readme.py index 06e3ca73..1d4f22d2 100755 --- a/tools/readme_generator/make_readme.py +++ b/tools/readme_generator/make_readme.py @@ -17,6 +17,7 @@ from langcodes import Language README_GEN_DIR = Path(__file__).resolve().parent APPS_REPO_ROOT = README_GEN_DIR.parent.parent +TRANSLATIONS_DIR = README_GEN_DIR / "translations" def value_for_lang(values: Dict, lang: str): if not isinstance(values, dict): @@ -54,13 +55,13 @@ def generate_READMEs(app_path: Path): return poparser = PoFileParser({}) - poparser.parse(open("messages.pot")) + poparser.parse((README_GEN_DIR / "messages.pot").open(encoding="utf-8")) # we only want to translate a README if all strings are translatables so we # do this loop to detect which language provides a full translation fully_translated_langs: List[str] = [] - for available_translations in os.listdir("translations"): - translations = Translations.load("translations", available_translations) + for available_translations in os.listdir(TRANSLATIONS_DIR): + translations = Translations.load(TRANSLATIONS_DIR, available_translations) is_fully_translated = True for sentence in poparser.catalog: @@ -111,7 +112,7 @@ def generate_READMEs(app_path: Path): loader=FileSystemLoader(README_GEN_DIR / "templates"), extensions=["jinja2.ext.i18n"], ) - translations = Translations.load("translations", [lang]) + translations = Translations.load(TRANSLATIONS_DIR, [lang]) env.install_gettext_translations(translations) template = env.get_template("README.md.j2") @@ -169,7 +170,7 @@ def generate_READMEs(app_path: Path): links_to_other_READMEs = [] for language in fully_translated_langs: - translations = Translations.load("translations", [language]) + translations = Translations.load(TRANSLATIONS_DIR, [language]) language_name_in_itself = Language.get(language).autonym() links_to_other_READMEs.append( ( From 851de630f1adbf52f5c9d3f992903fe43e484a78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Thu, 6 Jun 2024 16:26:41 +0200 Subject: [PATCH 16/19] Fix webhook service --- tools/webhooks/webhook.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/webhooks/webhook.service b/tools/webhooks/webhook.service index 66a13659..bfd6ccca 100644 --- a/tools/webhooks/webhook.service +++ b/tools/webhooks/webhook.service @@ -7,7 +7,7 @@ PIDFile=/run/gunicorn/yunohost_apps_webhooks-pid User=yunohost_apps_webhooks Group=yunohost_apps_webhooks WorkingDirectory=__PATH_TO_APPS_TOOLS__/webhooks -ExecStart=__PATH_TO_APPS_TOOLS__/webhooks/venv/bin/gunicorn -w 4 -b 127.0.0.1:8123 webhook:app +ExecStart=__PATH_TO_APPS_TOOLS__/webhooks/venv/bin/python3 webhook.py ExecReload=/bin/kill -s HUP $MAINPID ExecStop=/bin/kill -s TERM $MAINPID PrivateTmp=true From 3a2a24342e59ce5a1294a74c95911f3bb87a66eb Mon Sep 17 00:00:00 2001 From: root Date: Thu, 6 Jun 2024 14:30:13 +0000 Subject: [PATCH 17/19] webhook: Server does not have a recent python, use optional[] instead of | --- tools/webhooks/webhook.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/webhooks/webhook.py b/tools/webhooks/webhook.py index 0bae51c3..df30984c 100755 --- a/tools/webhooks/webhook.py +++ b/tools/webhooks/webhook.py @@ -9,6 +9,7 @@ import tempfile import logging from pathlib import Path +from typing import Optional from git import Actor, Repo, GitCommandError from sanic import HTTPResponse, Request, Sanic, response @@ -64,7 +65,7 @@ async def github_post(request: Request) -> HTTPResponse: return response.json({"error": f"Unknown event '{event}'"}, 422) -def check_webhook_signatures(request: Request) -> HTTPResponse | None: +def check_webhook_signatures(request: Request) -> Optional[HTTPResponse]: logging.warning("Unsafe webhook!") header_signature = request.headers.get("X-Hub-Signature") if header_signature is None: From 0b20bef754c1c9ef9a1762aa4a7e07be4b1eeae1 Mon Sep 17 00:00:00 2001 From: YunoHost Bot Date: Thu, 6 Jun 2024 17:16:11 +0200 Subject: [PATCH 18/19] Translations update from Weblate for appstore (#2392) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Translated using Weblate (Spanish) for appstore Currently translated at 3.3% (5 of 148 strings) Translation: YunoHost/store Translate-URL: https://translate.yunohost.org/projects/yunohost/apps/es/ * Translated using Weblate (French) for appstore Currently translated at 100.0% (148 of 148 strings) Translation: YunoHost/store Translate-URL: https://translate.yunohost.org/projects/yunohost/apps/fr/ * Translated using Weblate (Portuguese) for appstore Currently translated at 2.7% (4 of 148 strings) Translation: YunoHost/store Translate-URL: https://translate.yunohost.org/projects/yunohost/apps/pt/ --------- Co-authored-by: Éric Gaspar --- store/translations/es/LC_MESSAGES/messages.mo | Bin 576 -> 1657 bytes store/translations/es/LC_MESSAGES/messages.po | 16 +++++++++++----- store/translations/fr/LC_MESSAGES/messages.po | 6 +++--- store/translations/pt/LC_MESSAGES/messages.po | 18 +++++++++++++----- 4 files changed, 27 insertions(+), 13 deletions(-) diff --git a/store/translations/es/LC_MESSAGES/messages.mo b/store/translations/es/LC_MESSAGES/messages.mo index 55fc16dc62ff2fb92c10ead03e0ca8311c01b50a..37c5ce85901ab29c01b462f008e577a093376fc0 100644 GIT binary patch literal 1657 zcmaJ>%Wfk@6m4K&;n}fb!Qvu>G9%n}GQ*(INk(JFHe<<7qQnCPA))H->vl2SRZTq{ zj9BplED#@%9a+qZKfwRNe;~2oR69?^Q1b0^*L~Evr|R^dZ{PVf!gvezE^G|D3;Pik z#&589VCS$;V1K~6uSL<{VTQF|kD`w;e~tNPtp9>J)Or6-6!kDa!MwowPnfsy{@0sP zG{pP>8)CT`VQ-{e4TMH-T)ZKCJ$iLbAKVjl{f*4;TTe z!KzJl$-*)jo*A}ta&x9y6ih?hY1PyN60%O4CU3(TZylAq;F7jB2-(JVc2m=R+&ng>xBb$RP8~3ys+c)8 zBo&?_b5a!~sFF%nzM@m<*63&2_^RFDufm?T=1k6HCdzV|5QpR@Ghh%v@(A73GD8c7 zMSjcmaFc3n9bAD86jHbSTbp5f@7P}DHu0V4M0=`2pD70}3V;V6pbhULEgL4R69$C| z^t?LW`m~bnA}kaL2Xrd!yp+~Ohem(PnTtnx{5fcpS|xN`3k5&jJMl_C1N{4~Bd)b^ z@x&G~k3aQ=ji)-H*5N^X#0weH;=XX4(8-{86i*J~evh6VB$LsHUmffZT4T@@PmNHv z6gb9&hR?@i+V4#Uv^$veM&l>Fe*b82eEb-ps_?iz@sve%jb(T4Ty2wX*IiWM&JyV6 zK-bZx=+^5#Z1-}t3sP*CZTGq)&d##4?xD&SkzXu$FJu3MM5E<2RX zg|Y1Ro==DI_H|r9Fk=%BRHnmmCbXSO*E%e{5oJ8orm_jCx_PyG4|brC;Mr63-X3l3 zw7!f#V}%RYF!2Sa;DqT>=cCTUR@D2q@^IfW05l>O(KHBdtvv<(tj-`s-JxFQJXD$C zq6n&2XAq7c4!3-Dj@C*|Ig|3d(9x7t0iUAGqh&$gd4?W2MI9)iQRG^Xy1C6kjjE89 zwgjy~Cz))DL9cT4y9$M{rIWbUB5WdRzz_&hxX=R1^g-h`xHgmwdc{AqGm}F7ARyiw zvK^GKh#`DjAYg35NVm0Loi`OPRg68zE2>s6p<^A&2e1&aZqpLWX8<20ym}clTm}6m z=%v8NCdj8GECC}_%#}dfCF2uuwHy@e(;ICq0U}4C8!?wEMisG6zm?L7`kaE0hCk$8 ovR4a(^U`_qMFO==AL5Ec5d43MtQP-~5dh!^X*UM~zF6DnAA+hGNdN!< delta 362 zcmY*UO-lnY5MAA#iYHGZf{`LvG$l>92SY3UTBOptWxMn$v70WDk}OG9@YIX{VDZ;@ z@dx-D`airmd(#Jxc>{0e&HNmF)pq;i+J^@?1fBtJs^$-Rpih8(;P-*&t)N!EMl~?Z zb98yd^ZZGsO^cLvXrl|2dJCgp#MW07mKb9inu znc`8AS)6Ew!ufDI8w@9tI9x94izvZkBe;VVc*31vh!PrL(#7N!(GF_|*Mt%RMjVS* zSw;QxbujH9LRc4kfclJEhZDn<-EyZ5Whhe8$gwuLKs{aQb)^TXv_@;!(k8ouDU}sG vgLGlbhM$yszgfQffnT^y`RO-K?}ZWu&VxtZ7#i_su|>4i4qBwVsGa`;qy=I% diff --git a/store/translations/es/LC_MESSAGES/messages.po b/store/translations/es/LC_MESSAGES/messages.po index b2960f80..4925985f 100644 --- a/store/translations/es/LC_MESSAGES/messages.po +++ b/store/translations/es/LC_MESSAGES/messages.po @@ -8,8 +8,8 @@ msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2024-05-09 23:14+0200\n" -"PO-Revision-Date: 2024-03-23 00:54+0000\n" -"Last-Translator: OniriCorpe \n" +"PO-Revision-Date: 2024-06-06 14:54+0000\n" +"Last-Translator: Éric Gaspar \n" "Language-Team: Spanish \n" "Language: es\n" @@ -17,6 +17,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 5.4.3\n" "Generated-By: Babel 2.14.0\n" #: app.py:162 @@ -26,7 +27,7 @@ msgstr "App %(app_id)s no encontrada" #: app.py:165 msgid "You must be logged in to be able to star an app" -msgstr "" +msgstr "Debes iniciar sesión para poder iniciar una aplicación" #: app.py:167 app.py:212 app.py:530 templates/wishlist_add.html:33 msgid "" @@ -36,14 +37,19 @@ msgid "" "least 5 topics, reading at least 30 posts, and spending at least 10 minutes " "reading posts." msgstr "" +"Tenga en cuenta que, debido a varios abusos, restringimos el inicio de " +"sesión en la tienda de aplicaciones a usuarios de 'nivel de confianza 1'.

El 'nivel de confianza 1' se obtiene después de interactuar un mínimo " +"con el foro, y más específicamente: ingresar al menos 5 temas, leer al menos " +"30 publicaciones y dedicar al menos 10 minutos a leer publicaciones." #: app.py:210 msgid "You must be logged in to submit an app to the wishlist" -msgstr "" +msgstr "Debes iniciar sesión para enviar una aplicación a la lista de deseos" #: app.py:225 msgid "Invalid CSRF token, please refresh the page and try again" -msgstr "" +msgstr "Token CSRF no válido. Actualice la página e inténtelo de nuevo" #: app.py:263 msgid "" diff --git a/store/translations/fr/LC_MESSAGES/messages.po b/store/translations/fr/LC_MESSAGES/messages.po index 35b41cd8..8e68f05e 100644 --- a/store/translations/fr/LC_MESSAGES/messages.po +++ b/store/translations/fr/LC_MESSAGES/messages.po @@ -8,8 +8,8 @@ msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2024-05-09 23:14+0200\n" -"PO-Revision-Date: 2024-06-02 15:54+0000\n" -"Last-Translator: clecle226 \n" +"PO-Revision-Date: 2024-06-06 14:54+0000\n" +"Last-Translator: Éric Gaspar \n" "Language-Team: French \n" "Language: fr\n" @@ -492,7 +492,7 @@ msgstr "Niveau 8" #: templates/charts.html:107 #, python-format msgid "Level %(level)s:" -msgstr "Niveau %(level)s:" +msgstr "Niveau %(level)s :" #: templates/charts.html:107 msgid "Total:" diff --git a/store/translations/pt/LC_MESSAGES/messages.po b/store/translations/pt/LC_MESSAGES/messages.po index 1798b5fc..174f3223 100644 --- a/store/translations/pt/LC_MESSAGES/messages.po +++ b/store/translations/pt/LC_MESSAGES/messages.po @@ -8,14 +8,16 @@ msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2024-05-09 23:14+0200\n" -"PO-Revision-Date: 2024-02-21 06:08+0100\n" -"Last-Translator: FULL NAME \n" -"Language-Team: pt \n" +"PO-Revision-Date: 2024-06-06 14:54+0000\n" +"Last-Translator: Éric Gaspar \n" +"Language-Team: Portuguese \n" "Language: pt\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Weblate 5.4.3\n" "Generated-By: Babel 2.14.0\n" #: app.py:162 @@ -25,7 +27,7 @@ msgstr "" #: app.py:165 msgid "You must be logged in to be able to star an app" -msgstr "" +msgstr "Você deve estar logado para poder marcar um aplicativo com estrela" #: app.py:167 app.py:212 app.py:530 templates/wishlist_add.html:33 msgid "" @@ -35,14 +37,20 @@ msgid "" "least 5 topics, reading at least 30 posts, and spending at least 10 minutes " "reading posts." msgstr "" +"Observe que, devido a vários abusos, restringimos o login na app store para " +"usuários de 'nível de confiança 1'.

O 'nível de confiança 1' é " +"obtido após uma interação mínima com o fórum e, mais especificamente: " +"inserir pelo menos 5 tópicos, ler pelo menos 30 postagens e passar pelo " +"menos 10 minutos lendo postagens." #: app.py:210 msgid "You must be logged in to submit an app to the wishlist" msgstr "" +"Você deve estar logado para enviar um aplicativo para a lista de desejos" #: app.py:225 msgid "Invalid CSRF token, please refresh the page and try again" -msgstr "" +msgstr "Token CSRF inválido. Atualize a página e tente novamente" #: app.py:263 msgid "" From edc9e1a9c2d074a82d44173e33a7440084a2b117 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 7 Jun 2024 17:00:24 +0000 Subject: [PATCH 19/19] Update app levels according to CI results --- apps.toml | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/apps.toml b/apps.toml index ca713f53..3975421f 100644 --- a/apps.toml +++ b/apps.toml @@ -43,7 +43,7 @@ added_date = 1674232499 # 2023/01/20 antifeatures = [ "deprecated-software" ] category = "social_media" deprecated_date = 1717071136 # 2024/05/30 -level = 8 +level = 7 state = "working" subtags = [ "microblogging", "pictures" ] url = "https://github.com/YunoHost-Apps/acropolis_ynh" @@ -70,7 +70,7 @@ added_date = 1674232499 # 2023/01/20 antifeatures = [ "deprecated-software" ] category = "system_tools" deprecated_date = 1717071136 # 2024/05/30 -level = 8 +level = 7 state = "working" subtags = [ "db" ] url = "https://github.com/YunoHost-Apps/adminer_ynh" @@ -165,7 +165,7 @@ url = "https://github.com/YunoHost-Apps/archivist_ynh" added_date = 1674232499 # 2023/01/20 antifeatures = [ "alpha-software" ] category = "small_utilities" -level = 7 +level = 4 state = "working" url = "https://github.com/YunoHost-Apps/armadietto_ynh" @@ -245,7 +245,7 @@ added_date = 1674232499 # 2023/01/20 antifeatures = [ "deprecated-software" ] category = "publishing" deprecated_date = 1717071136 # 2024/05/30 -level = 8 +level = 7 potential_alternative_to = [ "Blogger", "Coldfusion", "Wix" ] state = "working" subtags = [ "blog" ] @@ -511,7 +511,7 @@ added_date = 1674232499 # 2023/01/20 antifeatures = [ "deprecated-software" ] category = "publishing" deprecated_date = 1717071136 # 2024/05/30 -level = 8 +level = 7 potential_alternative_to = [ "Disqus" ] state = "working" subtags = [ "website" ] @@ -681,7 +681,7 @@ url = "https://github.com/YunoHost-Apps/dendrite_ynh" [dex] added_date = 1674232499 # 2023/01/20 category = "system_tools" -level = 6 +level = 0 state = "working" subtags = [ "network" ] url = "https://github.com/YunoHost-Apps/dex_ynh" @@ -851,7 +851,7 @@ url = "https://github.com/YunoHost-Apps/domoticz_ynh" added_date = 1674232499 # 2023/01/20 branch = "main" category = "dev" -level = 8 +level = 4 state = "working" subtags = [ "programming" ] url = "https://github.com/YunoHost-Apps/dont-code_ynh" @@ -988,7 +988,7 @@ added_date = 1674232499 # 2023/01/20 antifeatures = [ "deprecated-software" ] category = "small_utilities" deprecated_date = 1717071136 # 2024/05/30 -level = 8 +level = 7 state = "working" url = "https://github.com/YunoHost-Apps/encryptor-decryptor_ynh" @@ -1089,7 +1089,7 @@ url = "https://github.com/YunoHost-Apps/fastapi_ynh" [fider] added_date = 1674232499 # 2023/01/20 category = "productivity_and_management" -level = 3 +level = 0 state = "working" subtags = [ "poll" ] url = "https://github.com/YunoHost-Apps/fider_ynh" @@ -1115,7 +1115,7 @@ url = "https://github.com/YunoHost-Apps/filepizza_ynh" [firefish] added_date = 1691055044 # 2023/08/03 category = "social_media" -level = 0 +level = 7 potential_alternative_to = [ "Calckey", "Mastodon", "Misskey", "Pleroma", "Threads", "X" ] state = "working" url = "https://github.com/YunoHost-Apps/firefish_ynh" @@ -1247,7 +1247,7 @@ url = "https://github.com/YunoHost-Apps/freshrss_ynh" [friendica] added_date = 1674232499 # 2023/01/20 category = "social_media" -level = 8 +level = 6 potential_alternative_to = [ "Facebook" ] state = "working" subtags = [ "microblogging" ] @@ -1373,7 +1373,7 @@ url = "https://github.com/YunoHost-Apps/glance_ynh" [glitchsoc] added_date = 1674232499 # 2023/01/20 category = "social_media" -level = 6 +level = 8 state = "working" subtags = [ "microblogging" ] url = "https://github.com/YunoHost-Apps/glitchsoc_ynh" @@ -2130,7 +2130,7 @@ url = "https://github.com/YunoHost-Apps/loki_ynh" [lstu] added_date = 1674232499 # 2023/01/20 category = "small_utilities" -level = 8 +level = 6 potential_alternative_to = [ "bitly" ] state = "working" subtags = [ "url_shortener" ] @@ -2612,7 +2612,7 @@ url = "https://github.com/YunoHost-Apps/nitter_ynh" [noalyss] added_date = 1674232499 # 2023/01/20 category = "productivity_and_management" -level = 8 +level = 0 potential_alternative_to = [ "Exact Online", "WinBooks", "Yooz" ] state = "working" subtags = [ "accounting", "business_and_ngos" ] @@ -2644,7 +2644,7 @@ url = "https://github.com/YunoHost-Apps/nodered_ynh" [nomad] added_date = 1674232499 # 2023/01/20 category = "dev" -level = 8 +level = 1 state = "working" url = "https://github.com/YunoHost-Apps/nomad_ynh" @@ -2933,7 +2933,7 @@ url = "https://github.com/YunoHost-Apps/petrolette_ynh" [pgadmin] added_date = 1674232499 # 2023/01/20 category = "system_tools" -level = 7 +level = 8 state = "working" subtags = [ "db" ] url = "https://github.com/YunoHost-Apps/pgadmin_ynh" @@ -3157,7 +3157,7 @@ added_date = 1674232499 # 2023/01/20 antifeatures = [ "deprecated-software" ] category = "publishing" deprecated_date = 1717071136 # 2024/05/30 -level = 8 +level = 7 potential_alternative_to = [ "Wix" ] state = "working" subtags = [ "website" ] @@ -3448,7 +3448,7 @@ url = "https://github.com/YunoHost-Apps/samba_ynh" [satdress] added_date = 1674232499 # 2023/01/20 category = "productivity_and_management" -level = 8 +level = 0 state = "working" url = "https://github.com/YunoHost-Apps/satdress_ynh" @@ -3473,7 +3473,7 @@ added_date = 1674232499 # 2023/01/20 antifeatures = [ "deprecated-software" ] category = "small_utilities" deprecated_date = 1717071136 # 2024/05/30 -level = 8 +level = 7 state = "working" url = "https://github.com/YunoHost-Apps/scrumblr_ynh" @@ -3761,7 +3761,7 @@ added_date = 1674232499 # 2023/01/20 antifeatures = [ "deprecated-software" ] category = "system_tools" deprecated_date = 1717071136 # 2024/05/30 -level = 8 +level = 7 state = "working" url = "https://github.com/YunoHost-Apps/ssh_chroot_dir_ynh" @@ -3885,7 +3885,7 @@ url = "https://github.com/YunoHost-Apps/teampass_ynh" [technitium-dns] added_date = 1674232499 # 2023/01/20 category = "system_tools" -level = 6 +level = 8 state = "working" subtags = [ "network" ] url = "https://github.com/YunoHost-Apps/technitium-dns_ynh" @@ -3990,7 +3990,7 @@ url = "https://github.com/YunoHost-Apps/traccar_ynh" [tracim] added_date = 1674232499 # 2023/01/20 category = "office" -level = 6 +level = 0 potential_alternative_to = [ "Dropbox", "Google Drive", "Slack", "Trello" ] state = "working" url = "https://github.com/YunoHost-Apps/tracim_ynh" @@ -4147,7 +4147,7 @@ url = "https://github.com/YunoHost-Apps/vikunja_ynh" [vore] added_date = 1690540859 # 2023/07/28 category = "reading" -level = 7 +level = 0 state = "working" subtags = [ "rssreader" ] url = "https://github.com/YunoHost-Apps/vore_ynh" @@ -4335,7 +4335,7 @@ url = "https://github.com/YunoHost-Apps/yacy_ynh" [yarr] added_date = 1715771420 # 2024/05/15 category = "reading" -level = 7 +level = 0 state = "working" subtags = [ "rssreader" ] url = "https://github.com/YunoHost-Apps/yarr_ynh" @@ -4412,7 +4412,7 @@ url = "https://github.com/YunoHost-Apps/zap_ynh" added_date = 1674232499 # 2023/01/20 antifeatures = [ "replaced-by-another-app" ] category = "small_utilities" -level = 7 +level = 4 potential_alternative_to = [ "Pastebin" ] state = "working" subtags = [ "pastebin" ]