Opened 3 years ago
Last modified 15 months ago
#5074 new task
Consider using itstool for localization
Reported by: | strk | Owned by: | strk |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS Fund Me |
Component: | l18n | Version: | |
Keywords: | Cc: |
Description
http://itstool.org/ seems to allow for marking sections immutable, and to also allow for merging multiple XML files into a single PO file.
Both features are interesting from our point of view.
Change History (7)
comment:1 by , 3 years ago
comment:2 by , 17 months ago
I've added experimental itstool usage in the docbook5
branch.
Another difference I noticed is presence of some tags indicators:
-msgid "This method supports Circular Strings and Curves." +msgid "<_:inlinemediaobject-1/> This method supports Circular Strings and Curves."
I dunno what are they used for
comment:3 by , 15 months ago
Ok this is actually a nice feature of itstool: the untranslatable tags are not fully included in message strings, but just placeholder are, see this string obtained with xml2pot:
"The code is built into a single PostgreSQL extension library called " "<code>address_standardizer</code> which can be installed with <code>CREATE " "EXTENSION address_standardizer;</code>. In addition to the " "address_standardizer extension, a sample data extension called " "<code>address_standardizer_data_us</code> extensions is built, which " "contains gaz, lex, and rules tables for US data. This extensions can be " "installed via: <code>CREATE EXTENSION address_standardizer_data_us;</code>"
Compare to the more succint one obtained with itstool, whereas the <code> blocks are removed:
msgid "The code is built into a single PostgreSQL extension library called <_:code-1/> which can be installed with <_:code-2/>. In addition to the address_standardizer extension, a sample data extension called <_:code-3/> extensions is built, which contains gaz, lex, and rules tables for US data. This extensions can be installed via: <_:code-4/>"
comment:4 by , 15 months ago
experimental branch is here: https://git.osgeo.org/gitea/postgis/postgis/pulls/154
comment:5 by , 15 months ago
Owner: | changed from | to
---|
comment:6 by , 15 months ago
Milestone: | → PostGIS GEOS |
---|
comment:7 by , 15 months ago
Milestone: | PostGIS GEOS → PostGIS Fund Me |
---|
As a first test I tried generating the pot file for the introduction.xml with no switches and no configuration (itstool introduction.xml > po/templates/introduction.xml.pot). Few interesting things I saw: