RFC: How to handle nested tags in xml2po?



Hello to all the translators,

Here's a very simple question for you.

xml2po sometimes needs to put placeholders in messages it extracts for
translation.  They usually end up being something like:

"Hello there: <placeholder-1 />"

Now, translators don't have too much clue on what is all this about.
With release notes, some even tried translating this tag name. 

I'm considering changing this to include real tag name instead:

"Hello there: <itemizedlist-1 />"

But there're problems with this approach:
- it will break all existing translations with xml2po (BIG PROBLEM)!
- it will decrease the rate of successful fuzzy/exact matching of
  similar messages, i.e. instead of one message, we might have two or
  more:
    "Hello there: <itemizedlist-1 />"
    "Hello there: <orderedlist-1 />"
    "Hello there: <figure-1 />"
    ...

Now, please state your opinion on the issue, and whether you already
have used xml2po to translate some of the documentation (because I
think this will largely influence the response :).  I'm very much
reluctant to doing this now, even though I think it's a great idea
(and easily implemented), especially for this reason.


OTOH, I may also add another option such as
"--descriptive-placeholders" which will modify xml2po behaviour to not
use "<placeholder-%d />", which should ease transition.  I can do even
more hacks which will help transition, such as creating handlers which
will automatically print out maps of placeholder-to-descriptive tags,
which can then be used to automatically modify your translation.

Cheers,
Danilo


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]