-
Notifications
You must be signed in to change notification settings - Fork 102
Translation enablement #325
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
Translation enablement #325
Conversation
e054fb2
to
8322f5e
Compare
ce879e4
to
4d4c1d1
Compare
cool looks good. How good is the translation? Are they high quality? Context ok? |
What do you mean "high quality" and "context OK"? Translations will be as good as the translators will do them. Spanish one will be very good, you can be sure :-) About the context, if you are talking about gettext context (msgctxt) then the answer is the pot files generated by po4a have no context. It should not be difficult to add something to them (e. g. the guide, page and section name) by modifying |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@paususe If you are happy with these changes then lets go ahead and merge. I see a few conflicts in the makefile and suma-site.yml? Will we stick with this considering the discussion over at antora?
I think for now this is what we will need to use. In the future, if Antora implements translation enablement, I'll be happy to move to it. I still need to do some changes to enable the language picker. I should be able to work on that mornings next week, before the kickoff. Rebasing my current changes to master requires manual conflict resolution, I'd rather squash all my changes and then conflict-resolve. Give me a few extra days. |
7a712dc
to
fab58a1
Compare
…es, and treat English language like any other language.
…nt for any translation) and PO files for Spanish
fab58a1
to
0f41de9
Compare
@jcayouette This is now ready for review and merge |
Description
This PR converts AsciiDoc to gettext and back (so that we can use WebLate, PoEdit or alike), and generates the translated docs with Antora.
Some details:
Makefile
has been split in threeMakefile
: lighter, only generic functionsMakefile.en
: English books. Keeps themake antora-suma
andmake antora-uyuni
targets.Makefile.es
: Spanish books. Introduces newmake antora-suma-es
andmake antora-uyuni-es
targets.suma-site.yml
/uyuni-site.yml
is generated in the temporary directory "./translations/$langcode" from the base (English)suma-site.yml
/uyuni-site.yml
. Thesite.url
variable is NOT set to the language, otherwise the only way to find the base URL for all languages is to backtrack (i. e. use "en/../es/page.html").make_pot.sh
(can be run withmake pot
) in "./l10n/pot". This also updates the PO files for all languages. Finally, it also rsync's the images/screenshot.make translations
) during build and never checked into git. The temporary "./translations/$langcode" directory is created and artifacts (AsciiDoc, Antora, etc files) are generated there.antora-suma-es
/antora-uyuni-es
andpdf-all-suma-es
/pdf-all-uyuni-es
Here is a detailed explanation of how this works (it's a bit outdated: the part about changing output paths is already implemented in this PR)
https://gitlab.com/antora/antora/-/merge_requests/548#note_379442440
This is now ready for review and best reviewed by first looking a the "small" commit (the one that makes the changes to Makefile, suma-site.yml, uyuni-site.yml, antora.yml, introduced use_po.sh and make_pot.sh), and then as a curiosity looking at the huge commit adding a ton of POT files, PO files and images to be translated.
Known issues:
make_pot.sh
fails when run from the Makefile target ("make pot"). Run it manually.make_pot.sh
is not automatically run on commit or alike, so translations must be updated manually.make_pot.sh
anduse_po.sh
will regenerate all translations every time. This is not a problem so far because there is only one translation (Spanish) but it's a waste of time when there are several languages. This will be fixed in the future.For testing, I translated 1.5 pages and the index of the Installation Guide to Spanish. This is how it looks:
Target branches
To what product version this document applies?
Links
Fixes https://github.com/SUSE/spacewalk/issues/11672