Opened 3 years ago

Closed 18 months ago

#5055 closed defect (fixed)

XSL headers not being translated

Reported by: robe Owned by: robe
Priority: medium Milestone: PostGIS 3.4.0
Component: l18n Version: master
Keywords: Cc:

Description

On the autogenerated file postgis_aggs_mm.xml

The headers are not being translated because they only are defined in the xsl/postgis_aggs_mm.xml.xsl file.

This makes the translated documents incomplete.

See for example:

https://postgis.net/docs/manual-dev/postgis-ja.html#PostGIS_Special_Functions_Index

To fix I'm assuming we'd need to:

  1. Generate a pot for the xsl file
  2. Add to template/xsl/pots
  3. Add to build
  4. Of course add the component to weblate (since the format is different we'd need a separate discovery for it, or just import as singleton reusing the same repo)

Change History (16)

comment:1 by strk, 3 years ago

I would put the header text in a separate XML file, marked as ENTITY, so it's easier to translate (only needs adding the new source file to the doc/Makefile.in)

comment:2 by robe, 2 years ago

Milestone: PostGIS 3.3.0PostGIS 3.4.0

comment:3 by robe, 18 months ago

Milestone: PostGIS 3.4.0PostGIS 3.5.0

I'll push this back to 3.4.0 if I get to it before release

comment:4 by strk, 18 months ago

Component: documentationl18n

See also #5412 for another missing translation opportunity

comment:5 by strk, 18 months ago

Another option is translating the xsl itself, seems to be doable, although it includes a lot of confusing tags for translators

comment:6 by robe, 18 months ago

I think your approach is better maybe define those items as tags and include them so it's separate from the xsl. Also as you mentioned a lot of that stuff is redundant so I'd be better looping and running replace on the text with the version number.

comment:7 by Sandro Santilli <strk@…>, 18 months ago

In 5092016/git:

Make special functions index translatable

References #5055

comment:8 by strk, 18 months ago

Big split of those generated snippet have been pushed, so we have more strings to translate. The looping "what's new" is still to be done though, I guess we'll need some xls parameters or similar

comment:9 by strk, 18 months ago

We have a problem with the Availability/Enhanced/Changed comments because we're using them programmatically and the program is broken due to translation… We'd need a machine-readable way to express that information, but I'm out of ideas at the moment (would xinclude allow for passing parameters ?)

comment:10 by strk, 18 months ago

Regina: what about using the "role" attribute on the <para> ? See https://tdg.docbook.org/tdg/4.5/ref-elements.html#common.attributes

We could maybe use "availability|enhanced|changed" as roles and still match on content for actual version

comment:11 by Sandro Santilli <strk@…>, 18 months ago

In 5986844/git:

Simplify list_new_functions.xml.xls by using a loop

References #5055

comment:12 by strk, 18 months ago

I've filed #5414 for the problem of broken list. Let's keep this ticket focused on the ability to translate headers of the "New Functions" list.

comment:13 by strk, 18 months ago

To be tested for loading the paragraph text and availability/enhancement/changed wording is this snippet:

<xsl:variable name="var1" select="string( doc('confix.xml')//var1 )" />

comment:14 by Sandro Santilli <strk@…>, 18 months ago

Resolution: fixed
Status: newclosed

In 42f417e1/git:

Make text in list of new functions translatable

Introduces a translatable xsl-config.xml file
that can be read by xsl scripts and uses it
from list_new_functions.xml.xsl

Add pot and po files for xsl-config.xml

Closes #5055

References #5414 as makes it possible to fix the new function
listing by being consistent in tags translation

Translates availability tags to French to show how the above
works.

comment:15 by robe, 18 months ago

Milestone: PostGIS 3.5.0PostGIS 3.4.0
Resolution: fixed
Status: closedreopened

strk I think these doc plumbing changes you are making are worthy of a note in the NEWS, don't you think? reopening until you add to the new

comment:16 by Sandro Santilli <strk@…>, 18 months ago

Resolution: fixed
Status: reopenedclosed

In 6770b65/git:

Add note about complete internationalization of PostGIS Manual

Closes #5055

Note: See TracTickets for help on using tickets.