From fcd1ddc28abe6249b43483649316caf4d61c94a0 Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Mon, 4 Sep 2023 20:16:44 -0700 Subject: [PATCH] Make check-weblate.py less brittle --- RELEASE.md | 6 +++++- docs/check-weblate.py | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index 82038797..edd1e51e 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -55,7 +55,11 @@ Update the versions of `meek`, `obfs4proxy`, and `snowflake` in the `desktop/scr ### Finalize localization -- [ ] Merge all the translations from weblate +- [ ] Merge all the translations from weblate: + ``` + git remote add weblate https://hosted.weblate.org/projects/onionshare/translations/ + git pull weblate main + ``` - [ ] In `docs` run `poetry run ./check-weblate.py [API_KEY]` to see which translations are >90% in the app and docs - [ ] Edit `cli/onionshare_cli/settings.py`, make sure `self.available_locales` lists only locales that are >90% translated - [ ] From the `desktop` folder in the virtual env, run `./scripts/countries-update-list.py` to make sure the localized country list for censorship circumvention is available in all available languages diff --git a/docs/check-weblate.py b/docs/check-weblate.py index 135c4b44..3eb1c052 100755 --- a/docs/check-weblate.py +++ b/docs/check-weblate.py @@ -50,7 +50,8 @@ async def app_percent_output(percent_min, percent_max=101): out = [] for lang_code in languages: if ( - app_translations[lang_code] >= percent_min + lang_code in app_translations + and app_translations[lang_code] >= percent_min and app_translations[lang_code] < percent_max ): out.append(