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

Update translations automatically #1683

Merged
merged 3 commits into from
Apr 23, 2023

Conversation

jerabekjiri
Copy link
Contributor

@jerabekjiri jerabekjiri commented Apr 19, 2023

Issue: AAH-2265

Automate running django-admin makemessages --all, django-admin compilemessages and committing translation files weekly.

Solution taken from https://github.com/ansible/ansible-hub-ui/blob/master/.github/workflows/i18n.yml

@netlify
Copy link

netlify bot commented Apr 19, 2023

Deploy Preview for galaxyng ready!

Name Link
🔨 Latest commit cc168db
🔍 Latest deploy log https://app.netlify.com/sites/galaxyng/deploys/6442a4ae5b9e420008a68c39
😎 Deploy Preview https://deploy-preview-1683--galaxyng.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Issue: AAH-2265
@himdel
Copy link
Collaborator

himdel commented Apr 20, 2023

Looks good! :)

2 potential issues:

  • django makemessages will try to match new strings and add fuzzy translations .. which will cause linter issues when the untranslated text does interpolation but the "matching" translation doesn't, or vice versa (lingui doesn't do that)

  • git push might trigger some branch protection rules here and fail, I know we had to change ui repo settings for this to work .. but merging is probably the only way to know for sure :)

@jerabekjiri
Copy link
Contributor Author

jerabekjiri commented Apr 20, 2023

@himdel I thought of fuzzy matching, weird that it doesn't generate/add any fuzzy strings when running django-admin makemessages --all locally. I'll test it more

@himdel
Copy link
Collaborator

himdel commented Apr 20, 2023

Try adding new strings, it only does that if the string is not already in the pot file. (And it has to be similar enough to an existing string.) .. or you can try reverting #1659 locally and trying again

Issue: AAH-2265
@jerabekjiri
Copy link
Contributor Author

Try adding new strings, it only does that if the string is not already in the pot file. (And it has to be similar enough to an existing string.) .. or you can try reverting #1659 locally and trying again

reverting worked, thanks :)

Added msgattrib --clear-fuzzy script for every language folder

@jerabekjiri
Copy link
Contributor Author

Merging this, so it can be tested.

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.

2 participants