mirror of
https://github.com/YunoHost/apps.git
synced 2024-09-03 20:06:07 +02:00
feat(translate_apps): add message to the PR
This commit is contained in:
parent
85e2fb47c1
commit
6afaaf37c9
1 changed files with 19 additions and 1 deletions
|
@ -156,7 +156,7 @@ def extract_strings_to_translate_from_apps(apps, translations_repository):
|
||||||
|
|
||||||
# if no PR exist, create one
|
# if no PR exist, create one
|
||||||
if not repository.run_command("hub pr list -h manifest_toml_i18n", capture_output=True):
|
if not repository.run_command("hub pr list -h manifest_toml_i18n", capture_output=True):
|
||||||
repository.run_command(["hub", "pull-request", "-m", "Update translations for manifest.toml", "-b", branch, "-h", "manifest_toml_i18n", "-p"])
|
repository.run_command(["hub", "pull-request", "-m", "Update translations for manifest.toml", "-b", branch, "-h", "manifest_toml_i18n", "-p", "-m", f"This pull request is automatically generated by scripts from the [YunoHost/apps](https://github.com/YunoHost/apps) repository.\n\nThe translation is pull from weblate and is located here: https://translate.yunohost.org/projects/yunohost-apps/{app}/\n\nIf you wish to modify the translation (other than in english), please do that directly on weblate since this is now the source of authority for it.\n\nDon't hesitate to reach the YunoHost team on [matrix](https://matrix.to/#/#yunohost:matrix.org) if there is any problem :heart:"])
|
||||||
|
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
|
|
||||||
|
@ -168,3 +168,21 @@ if __name__ == "__main__":
|
||||||
f"https://{login}:{token}@github.com/yunohost/apps_translations", "main"
|
f"https://{login}:{token}@github.com/yunohost/apps_translations", "main"
|
||||||
) as repository:
|
) as repository:
|
||||||
extract_strings_to_translate_from_apps(apps, repository)
|
extract_strings_to_translate_from_apps(apps, repository)
|
||||||
|
if not repository.run_command(
|
||||||
|
"hub pr list -h manifest_toml_i18n", capture_output=True
|
||||||
|
):
|
||||||
|
repository.run_command(
|
||||||
|
[
|
||||||
|
"hub",
|
||||||
|
"pull-request",
|
||||||
|
"-m",
|
||||||
|
"Update translations for manifest.toml",
|
||||||
|
"-b",
|
||||||
|
branch,
|
||||||
|
"-h",
|
||||||
|
"manifest_toml_i18n",
|
||||||
|
"-p",
|
||||||
|
"-m",
|
||||||
|
f"This pull request is automatically generated by scripts from the [YunoHost/apps](https://github.com/YunoHost/apps) repository.\n\nThe translation is pull from weblate and is located here: https://translate.yunohost.org/projects/yunohost-apps/{app}/\n\nIf you wish to modify the translation (other than in english), please do that directly on weblate since this is now the source of authority for it.\n\nDon't hesitate to reach the YunoHost team on [matrix](https://matrix.to/#/#yunohost:matrix.org) if there is any problem :heart:",
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
Loading…
Add table
Reference in a new issue