Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is the crude working draft of the new infrastructure for translations.
TODO
build.sh
? Done, we can revert the commit if we decide otherwiseShortcomings
Sphinx defaults to creating a new pot/po file for every source file and there is no way (AFAIK) to make it use a single .pot. This is bad because:
"Presence: optional"
) because strings are not shared across different documents.include
works in an annoying way. Consider:included.rst
are now part offile.rst
as well, and you have to translate them twice. This is most likely a bug.IMHO, this is both a wrong default and a missing feature on Sphinx side. I'll open a bug and take care with that upstream, but in the meantime I had to resort to violence and monkey patched Sphinx to create just
publiccode.yml.pot
. I think this is worth doing and it's a temporary solution anyway.Looks like theFixed in the Sphinx extension (Preserve code blocks. davidfritzsche/sphinx-rst-builder#2), package with the patch available on pypi... code::
directive gets lost and doesn't end up in the generated files. I gotta try and fix that up.Some string must not be translated, like enumerators (ie. tags in
categories-list.rst
). Excluding those would mean less work for the translators and a lower chance for errors. Unfortunately it's not possible at the moment, but we can always add it later.Some string need to be translated, but should be handled with care, like "Key" strings in
schema.core.rst
. If the fix to Syntax to exclude words from i18n / gettext sphinx-doc/sphinx#1608 will allow to mark only certain words within a paragraph, it would fix this issue for us as well. Again, this can be a future enhancement.Fixes #75.