Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add i18n checker and autogenerated AI translations #2160

Merged
merged 10 commits into from Dec 12, 2023
Merged

add i18n checker and autogenerated AI translations #2160

merged 10 commits into from Dec 12, 2023

Conversation

prusnak
Copy link
Collaborator

@prusnak prusnak commented Dec 8, 2023

As discussed in #2122, I came up with an i18n checker scripts. As we can see from running it, there are many unmaintained language files with lots of missing and unused strings.

$ python3 tools/i18n-check.py | grep Missing
Missing ids in language "br": 95
Missing ids in language "cn": 64
Missing ids in language "de": 70
Missing ids in language "es": 70
Missing ids in language "fr": 95
Missing ids in language "it": 95
Missing ids in language "jp": 71
Missing ids in language "kr": 2
Missing ids in language "nl": 95
Missing ids in language "pi": 95
Missing ids in language "pl": 95
Missing ids in language "pt": 95
Missing ids in language "we": 95

This PR adds the tools/i18n-check.py tool which is able to detect these unmaintained language files and it also adds another tool tools/i18n-ai-tool.py which uses GPT-4 API to translate missing strings.

This PR also contains several manual fixes as well as translations generated by the AI tool.

Copy link

codecov bot commented Dec 8, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (9f835f8) 60.44% compared to head (12825e4) 60.45%.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #2160      +/-   ##
==========================================
+ Coverage   60.44%   60.45%   +0.01%     
==========================================
  Files          58       58              
  Lines        8464     8464              
==========================================
+ Hits         5116     5117       +1     
+ Misses       3348     3347       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@prusnak prusnak force-pushed the i18n-ai branch 2 times, most recently from 636b118 to 6547e91 Compare December 8, 2023 14:34
@prusnak prusnak changed the title add i18n autogenerated AI translations add i18n checker and autogenerated AI translations Dec 8, 2023
@prusnak prusnak mentioned this pull request Dec 8, 2023
@prusnak prusnak added this to the 0.11.3 milestone Dec 8, 2023
Copy link
Member

@arcbtc arcbtc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is amazing

@arcbtc arcbtc merged commit cf4d575 into dev Dec 12, 2023
22 checks passed
@arcbtc arcbtc deleted the i18n-ai branch December 12, 2023 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants