Closed rffontenelle closed 4 months ago
@rffontenelle thanks, I review this carefully during the week.
Also, let me brain-dump something regarding the packaging and distribution issues... this is what I think we should do for now to get done with this in way we achieve our most important goals: gettextize this WHILE not making it harder for people to build this project.
pandoc
nor mdpo
at build time and therefore generating nothing at build time.*.HTML
file as a source.The pros are:
The cons are:
The process (e.g., say to update the docs) could be like this:
docs/basics/en/index.md
, a.k.a the source.ninja gameeky-docs-update
to update the template and translation files.ninja gameeky-docs-generate
to first (re)generate the *.md
file and then the *.HTML
file. *.HTML
files and sends a PR.So it's basically 2 steps, plus regular change/git stuff.
Notes:
*.HTML
files can be done by someone or something else.dist
pipeline.We would document this process in a docs/README.md
.
The alternative to this would be to move to something completely different.
We can set up a GitHub workflow that runs triggered by push event with a path filter of doc/po/*.po, that converts po -> markdown -> html. Finally, auto commit or open a pull requests.
The PO update process could also be an workflow that is run manually from rhe workflows page (Actions > select workflow > run manually). It could be used to run before a new release.
We can set up a GitHub workflow that runs triggered by push event with a path filter of doc/po/*.po, that converts po -> markdown -> html. Finally, auto commit or open a pull requests.
The PO update process could also be an workflow that is run manually from rhe workflows page (Actions > select workflow > run manually). It could be used to run before a new release.
Correct, that's what I meant by dist
pipeline, it can generate a tar with the generated HTML (so we don't need to include it as source anymore). Then people can build it from there, without the need of these tools.
EDIT: See meson's add_dist_script, so the HTML will be generated during meson dist
and these HTML
files will be included in final tarball (and not source)
@rffontenelle finally found the time to work on this.. this is the "manual" version of what we discussed earlier (the version where we includes the final HTML, so that we don't need to generate it at build time and therefore simplify users installations)... This is still WIP though (still need to polish things)
@rffontenelle I think this is ready for merging now... with a few caveats:
$ python3 docs/tools/update_pot.py docs/basics/src/en/index.md docs/basics/po/gameeky.pot
$ python3 docs/tools/update_po.py docs/basics/po --language es
$ python3 docs/tools/update_md.py docs/basics/src/ docs/basics/po/ --language es
$ python3 docs/tools/update_html.py docs/basics/src/ docs/basics/data/headers.xml docs/basics/po docs/basics/html/ --language es
Let's us have another shot at documentation translation via Gettext
The first commit adds three new Python scripts in
docs/po
:generate_po.py
: generategameekey.pot
; run without argumentupdate_po.py
: update PO file(s) from current POT file; takes one language code or 'all' for all PO files foundbuild_md.py
: generate thedocs/basics/$LANG/index.md
; takes one language code or 'all' for all PO files foundNote: Installing mdpo is required.
The second commit contributed removes docs/basics/es/index.md, so the changes after running build_md.py are visible.
The third commit updates CONTRIBUTING.md with the use of these scripts for updating documentation translation.
For reference, other discussions on this matter: #69 and #109