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

FIX: Translation support in GitHub Actions #684

Merged
merged 1 commit into from
Feb 19, 2023
Merged

Conversation

AakashGfude
Copy link
Member

@AakashGfude AakashGfude commented Feb 17, 2023

  • fix _compile_translations.py , so that .mo files are present in build folder
  • add missing translations

fixes #584

@AakashGfude AakashGfude changed the title FIX: translation support and add new translations FIX: Translation support and add new translations Feb 17, 2023
@AakashGfude
Copy link
Member Author

@choldgraf it seems I can only translate to 9 languages from smodin. Do you have a premium account? As it seems other words have translations in more languages.

@choldgraf
Copy link
Member

choldgraf commented Feb 17, 2023

Let's just go with the 9 languages - this is just a start anyway, I think that it will likely require manual updates for many languages anyway since automatic translating is likely to some things slightly incorrectly

@AakashGfude
Copy link
Member Author

ooh okay cool. I reckon we need to find words manually of what we want to update. Some words already found are:-
Last updated on and By as mentioned in the issue #584 . So, I will just go with that for now.

@choldgraf
Copy link
Member

Yeah that makes sense - we can do the best we can now, and if we miss something we can always improve it in a future PR !

@choldgraf
Copy link
Member

choldgraf commented Feb 17, 2023

By the way, do you know how to handle translation strings when there is a word that isn't supposed to be translated? Eg "edit on GitHub" - we want "GitHub" to be part of the phrase (so that for example German speakers see it at the beginning of the phrase instead of the end), but it isn't translatable. I think there are guidelines for how to handle this but I don't know what they are.

Ah i just remembered this PR might have some recommendations (though it uses gettext directly rather than our middle-layer custom translation stuff)

@AakashGfude
Copy link
Member Author

By the way, Last updated on and By are already here https://github.com/executablebooks/sphinx-book-theme/tree/master/src/sphinx_book_theme/assets/translations/jsons . So, I guess we don't need to add any translations at the moment?

@choldgraf
Copy link
Member

Ah nice - so we don't need to change anything for now? If that's the case I think we should just merge this and cut a release candidate

@AakashGfude
Copy link
Member Author

AakashGfude commented Feb 19, 2023

Ah nice - so we don't need to change anything for now?

Seems like it. But I don't know why it was not working in the first place. Because of lack of .mo files?

@choldgraf
Copy link
Member

choldgraf commented Feb 19, 2023

Yes without those files present sphinx
Sphinx cannot generate any translations

@choldgraf choldgraf merged commit 1a8350f into master Feb 19, 2023
@choldgraf choldgraf deleted the translations-fix branch February 19, 2023 14:45
@choldgraf choldgraf changed the title FIX: Translation support and add new translations FIX: Translation support in GitHub Actions Feb 19, 2023
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.

Language support is broken - .mo files not bundled with this theme's wheel
2 participants