chidiwilliams / buzz

Buzz transcribes and translates audio offline on your personal computer. Powered by OpenAI's Whisper.
https://chidiwilliams.github.io/buzz
MIT License
12.41k stars 938 forks source link

Adding ability to translate strings and a fix for .mo file generation #741

Closed raivisdejus closed 5 months ago

raivisdejus commented 5 months ago

Current version of msgfmt.py is producing .mo files that cause app crash with Latvian translations. Refactored it to use polib that works fine.

Also wrapping some string is translation function to make them translatable

codecov[bot] commented 5 months ago

Codecov Report

Attention: Patch coverage is 90.62500% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 74.22%. Comparing base (38f5d26) to head (99ece45). Report is 2 commits behind head on main.

:exclamation: Current head 99ece45 differs from pull request most recent head f17149b

Please upload reports for the commit f17149b to get more accurate results.

Files Patch % Lines
...ferences_dialog/folder_watch_preferences_widget.py 75.00% 2 Missing :warning:
...ts/preferences_dialog/models_preferences_widget.py 50.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #741 +/- ## ========================================== - Coverage 81.28% 74.22% -7.06% ========================================== Files 81 83 +2 Lines 3617 3884 +267 ========================================== - Hits 2940 2883 -57 - Misses 677 1001 +324 ``` | [Flag](https://app.codecov.io/gh/chidiwilliams/buzz/pull/741/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Chidi+Williams) | Coverage Δ | | |---|---|---| | [Linux](https://app.codecov.io/gh/chidiwilliams/buzz/pull/741/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Chidi+Williams) | `74.22% <90.62%> (?)` | | | [Windows](https://app.codecov.io/gh/chidiwilliams/buzz/pull/741/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Chidi+Williams) | `?` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Chidi+Williams#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

raivisdejus commented 5 months ago

Will recreate this PR against branch from original repo, so builds work as expected https://github.com/chidiwilliams/buzz/pull/752