-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dc80205
commit d721ee4
Showing
2 changed files
with
38 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -128,19 +128,19 @@ def extract_strings_to_translate_from_apps(apps, translations_repository): | |
) | ||
translations_repository.run_command(["git", "push"]) | ||
|
||
if newly_created_translation or not get_weblate_component(weblate, f"yunohost-apps/{app}"): | ||
if newly_created_translation or not get_weblate_component( | ||
weblate, f"yunohost-apps/{app}" | ||
): | ||
print("Creating component on weblate...") | ||
weblate.create_component( | ||
"yunohost-apps", | ||
name=app, | ||
slug=app, | ||
if newly_created_translation or not get_weblate_component( | ||
weblate, f"yunohost-apps/{app}" | ||
): | ||
filemask=f"translations/apps/{app}/*.json", | ||
file_format="json", | ||
filemask=f"translations/apps/{app}/manifest/*.json", | ||
repo="https://github.com/yunohost/apps_translations", | ||
new_base=f"translations/apps/{app}/en.json", | ||
template=f"translations/apps/{app}/en.json", | ||
new_base=f"translations/apps/{app}/manifest/en.json", | ||
template=f"translations/apps/{app}/manifest/en.json", | ||
push="[email protected]:yunohost/apps_translations.git", | ||
) | ||
print(f"Component created at https://translate.yunohost.org/projects/yunohost-apps/{app}/") | ||
|
@@ -149,9 +149,7 @@ def extract_strings_to_translate_from_apps(apps, translations_repository): | |
|
||
|
||
if __name__ == "__main__": | ||
print( | ||
f"Component created at https://translate.yunohost.org/projects/yunohost-apps/{app}/" | ||
) | ||
apps = json.load(open("../../builds/default/v3/apps.json"))["apps"] | ||
|
||
with Repository( | ||
f"https://{login}:{token}@github.com/yunohost/apps_translations", "main" | ||
|