#5414 closed defect (fixed)

List of new/enhanced function fails due to translation

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

Description

The XSL generating the list is parsing text that's being translated and translation breaks it. Example: https://postgis.net/docs//manual-dev/postgis-fr.html#NewFunctions_3_4

Change History (7)

comment:1 by strk, 11 months ago

Regina see how you like availability-roles branch

The XSL to make actual use of it (in xsl/list_new_functions.xml.xls) is not done yet at time of writing.

comment:2 by robe, 11 months ago

should be xsl (xls is a spreadsheet format :) )

comment:3 by strk, 11 months ago

Doh, that explains why my .editorconfig line was not being effective :( Pushing a fix

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

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:5 by strk, 11 months ago

As of [42f417e1/git] it is possible to translate the availability tags and still make the generated list of functions work, but it depends on discipline of the translator who must be consistent in the way tags are translated (those in reference paragraphs need to have a specific format and match that in xsl-config.xml).

Using XML tag attributes would still be more robust than this, but we'd need to somehow abuse the docbook format and we'd still need to be consistent ourselves.

This would work (and break as shown):

<para role="availability" conformance="2.2.0"> Availability: 2.2.0 - say more</para>
<para role="changed" conformance="2.2.2"> Changed: 2.2.2 but could also not say</para>
<para role="enhanced" conformance="3.2.1">enhanChed 1.5.4 but I'm lying</para>

comment:6 by robe, 11 months ago

works for me the role/conformance approach.

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

Resolution: fixed
Status: assignedclosed

In b4005653/git:

Use xml attributes to encode availablity/enhanced/changed info

We use role and conformance common docbook attributes to not
break the parsers.

Use metadata to extract availability info

Closes #5414

Note: See TracTickets for help on using tickets.