Make check-weblate.py less brittle

This commit is contained in:
Micah Lee 2023-09-04 20:16:44 -07:00
parent 127397d0d9
commit fcd1ddc28a
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73
2 changed files with 7 additions and 2 deletions

View File

@ -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

View File

@ -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(