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

chore: run babel_update.sh to update po files #29476

Merged
merged 4 commits into from
Jul 3, 2024
Merged

chore: run babel_update.sh to update po files #29476

merged 4 commits into from
Jul 3, 2024

Conversation

mistercrunch
Copy link
Member

@mistercrunch mistercrunch commented Jul 3, 2024

Summary

Periodically we need to run this script to rebuild the list of translatable strings from static analysis of the code base.

Also adding --no-location to pybabel extract fixing merge conflicts issues we've been having around these .po files.

Also fixing the docs builds, they've been broken.

About the fact that merge conflicts are really tricky around translation work in general, I was thinking it may be doable to write a simple utility that would strip all comments from po files, as they are just comments referencing where the msgid exists, and operate at that level if/when needed. Like you hit a merge conflict, strip both files from comment, diff them, and commit without comments. I think the next pybabel script run would bring back the comments.

~~Maybe we even want to pass a flag to pybabel to compeltely avoid adding source references as comments. We'd loose the ability to easily find where the string lives in the codebase, but for that you can just git grep. ~~

Periodically we need to run this script to rebuild the list of translatable strings from static analysis of the code base.
@github-actions github-actions bot added i18n Namespace | Anything related to localization i18n:spanish Translation related to Spanish language i18n:italian Translation related to Italian language i18n:french Translation related to French language i18n:chinese Translation related to Chinese language i18n:japanese Translation related to Japanese language i18n:russian Translation related to Russian language i18n:korean Translation related to Korean language i18n:dutch i18n:slovak i18n:ukrainian i18n:portuguese i18n:brazilian i18n:traditional-chinese labels Jul 3, 2024
@dosubot dosubot bot added the i18n:general Related to translations label Jul 3, 2024
@github-actions github-actions bot added the doc Namespace | Anything related to documentation label Jul 3, 2024
@github-actions github-actions bot added the github_actions Pull requests that update GitHub Actions code label Jul 3, 2024
Copy link
Member

@rusackas rusackas left a comment

Choose a reason for hiding this comment

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

LGTM! And the codebase is getting not just more maintainable, but also smaller, which is always good in my book!

@rusackas rusackas merged commit 145694d into master Jul 3, 2024
36 checks passed
@rusackas rusackas deleted the run_pybabel branch July 3, 2024 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Namespace | Anything related to documentation github_actions Pull requests that update GitHub Actions code i18n:brazilian i18n:chinese Translation related to Chinese language i18n:dutch i18n:french Translation related to French language i18n:general Related to translations i18n:italian Translation related to Italian language i18n:japanese Translation related to Japanese language i18n:korean Translation related to Korean language i18n:portuguese i18n:russian Translation related to Russian language i18n:slovak i18n:spanish Translation related to Spanish language i18n:traditional-chinese i18n:ukrainian i18n Namespace | Anything related to localization preset-io size/XXL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants