Skip to content

Add build rules for po4a based documentation translation#1686

Merged
hansu merged 9 commits intoLinuxCNC:docs-develfrom
petterreinholdtsen:translate-po4a-close
Apr 13, 2022
Merged

Add build rules for po4a based documentation translation#1686
hansu merged 9 commits intoLinuxCNC:docs-develfrom
petterreinholdtsen:translate-po4a-close

Conversation

@petterreinholdtsen
Copy link
Collaborator

Use 'make translateddocs' to build the translations and 'make pofiles'
to update the POT and PO files. 'make postatus' show translation
statistics. Run 'make manpages' before updating translations to make sure
the generated manpages are available for po4a.

Added code to copy images into translated adoc directories.

Added po4a as new build dependency.

Require 0 translated strings to generate files, to make sure the documents are
buildable even if nothing is unfuzzied yet.

Drop translated files from docs.xml and use the same list for all languages.

@petterreinholdtsen
Copy link
Collaborator Author

This is the continuation of #1356 which was closed by mistake when it was pulled into a feature branch for testing on the buildbot system.

@hansu hansu added the po4a label Mar 30, 2022
@petterreinholdtsen petterreinholdtsen force-pushed the translate-po4a-close branch 10 times, most recently from bd35b03 to ccb90f8 Compare April 4, 2022 05:45
@petterreinholdtsen petterreinholdtsen changed the title WIP: Add build rules for po4a based documentation translation Add build rules for po4a based documentation translation Apr 4, 2022
@petterreinholdtsen
Copy link
Collaborator Author

I believe this is ready to go into production now. The only unsolved issue is how to handle translated help texts, which can be solved at a later time. I know @smoe and @silopolis is working on updated PO files for spanish and french, and we might want to wait for those before merging into master or a documentation branch.

petterreinholdtsen added a commit to petterreinholdtsen/linuxcnc that referenced this pull request Apr 5, 2022
This script help with combining source and translated adoc and
manual pages to generate PO files for use with po4a.

Related to LinuxCNC#1686 .
@petterreinholdtsen petterreinholdtsen force-pushed the translate-po4a-close branch 2 times, most recently from 3518d9e to 26666c2 Compare April 5, 2022 15:30
@andypugh andypugh changed the base branch from master to petterreinholdtsen/translate-po4a April 5, 2022 19:55
@andypugh andypugh changed the base branch from petterreinholdtsen/translate-po4a to master April 5, 2022 19:55
@andypugh
Copy link
Collaborator

andypugh commented Apr 5, 2022

How do you want to do it? Straight in to Master, or into a docs/po4a testing branch?

@hansu
Copy link
Member

hansu commented Apr 5, 2022

Good question. We thought to master after Jérémies changes are merged to master.
But we can also have this in a test branch before.

petterreinholdtsen added a commit to petterreinholdtsen/linuxcnc that referenced this pull request Apr 6, 2022
This script help with combining source and translated adoc and
manual pages to generate PO files for use with po4a.

Related to LinuxCNC#1686 .
@petterreinholdtsen
Copy link
Collaborator Author

petterreinholdtsen commented Apr 6, 2022 via email

@hansu
Copy link
Member

hansu commented Apr 6, 2022

Are you talking about <URL: #1702 >? At least some of my changes should not conflict with his and could to in before #1702.

Yes. But with Jérémies changes the po files have to be generated again, so I thought it would be better to have them first in master.

@petterreinholdtsen
Copy link
Collaborator Author

petterreinholdtsen commented Apr 6, 2022 via email

silopolis pushed a commit to silopolis/linuxcnc that referenced this pull request Apr 11, 2022
This script help with combining source and translated adoc and
manual pages to generate PO files for use with po4a.

Related to LinuxCNC#1686 .
silopolis pushed a commit to silopolis/linuxcnc that referenced this pull request Apr 11, 2022
This script help with combining source and translated adoc and
manual pages to generate PO files for use with po4a.

Related to LinuxCNC#1686 .
Use 'make translateddocs' to build the translations and 'make pofiles'
to update the POT and PO files.  'make postatus' show translation
statistics.  Run 'make manpages' before updating translations to make sure
the generated manpages are available for po4a.  The translateddocs target is
now a prerequisit for the docs target, to make sure the translated files are
available when checking links in the HTML pages.

Added code to copy images into translated adoc directories.

Added po4a as new build dependency.

Require 0 translated strings to generate files, to make sure the documents are
buildable even if nothing is unfuzzied yet.

Drop translated files from docs.xml and use the same list for all languages.

This change need po4a 0.62 or newer to handle UTF-8 properly in input and
output files.  Added configure check to enforce this.
Remove the use of roff macro definitions, as po4a do not understand
this.
Link checking for non-english is not working, and as all documents are
derived from the english source, it is no need to check the translated
links.
@hansu hansu changed the base branch from master to docs-devel April 12, 2022 21:26
@hansu
Copy link
Member

hansu commented Apr 12, 2022

Is this ok for you if it goes in docs-devel ?

@silopolis
Copy link
Contributor

silopolis commented Apr 12, 2022 via email

@petterreinholdtsen
Copy link
Collaborator Author

petterreinholdtsen commented Apr 13, 2022 via email

@hansu
Copy link
Member

hansu commented Apr 13, 2022

Sure, as long as docs-devel end up in master when we are ready. :)

That's the plan :)

But isn't this the merge that generates the initial po files?
Or will @smoe and/or @silopolis do an extra commit providing the po files?

@silopolis
Copy link
Contributor

silopolis commented Apr 13, 2022

Was thinking of providing initial _fr po file in the last commit of my fr_migration PR.

And as I'll have to make a last pass on _es after that, I can do the same there.

@hansu
Copy link
Member

hansu commented Apr 13, 2022

As far as I understood, with this change to the Submakefile, the po files are generated from the existing adoc files if no po files are existing. So as long as we haven't commit any po files, this shouldn't affect your syncronization work, right?
So I'll merge it right now?

@silopolis
Copy link
Contributor

silopolis commented Apr 13, 2022 via email

@hansu hansu merged commit 12aebfd into LinuxCNC:docs-devel Apr 13, 2022
silopolis pushed a commit to silopolis/linuxcnc that referenced this pull request May 3, 2022
This script help with combining source and translated adoc and
manual pages to generate PO files for use with po4a.

Related to LinuxCNC#1686 .
petterreinholdtsen added a commit to petterreinholdtsen/linuxcnc that referenced this pull request May 31, 2022
This script help with combining source and translated adoc and
manual pages to generate PO files for use with po4a.

Related to LinuxCNC#1686 .
silopolis pushed a commit to silopolis/linuxcnc that referenced this pull request May 31, 2022
This script help with combining source and translated adoc and
manual pages to generate PO files for use with po4a.

Related to LinuxCNC#1686 .
hansu pushed a commit to hansu/linuxcnc that referenced this pull request Jun 1, 2022
This script help with combining source and translated adoc and
manual pages to generate PO files for use with po4a.

Related to LinuxCNC#1686 .
hansu pushed a commit to hansu/linuxcnc that referenced this pull request Jun 1, 2022
This script help with combining source and translated adoc and
manual pages to generate PO files for use with po4a.

Related to LinuxCNC#1686 .
hansu pushed a commit that referenced this pull request Jun 3, 2022
This script help with combining source and translated adoc and
manual pages to generate PO files for use with po4a.

Related to #1686 .
@petterreinholdtsen
Copy link
Collaborator Author

petterreinholdtsen commented Oct 11, 2022 via email

@silopolis
Copy link
Contributor

silopolis commented Oct 11, 2022 via email

@petterreinholdtsen
Copy link
Collaborator Author

petterreinholdtsen commented Oct 11, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants