On Sun, Sep 25, 2005 at 11:25:38PM +0100, Colin Watson wrote:
> Package: po-debconf
> Version: 0.9.0
> Severity: wishlist
> 
> Hi,
> 
> It's rather common in d-i for us to want to do things like this:
> 
>   _Choices: no ethernet card, ${CHOICES}, none of the above
>   __Choices: Retry network autoconfiguration, Retry network autoconfiguration 
> with a DHCP hostname, Configure network manually, ${wifireconf}, Do not 
> configure the network at this time
>   __Choices: /dos, /windows, Enter manually, Do not mount it
> 
> The first is particularly nasty, since translators have to know to
> accurately transcribe the ${...} substitution, and in practice people
> often get this wrong in ways that are hard to test and the situation has
> to be corrected by clever searching tools.
> 
> The second is not so bad (as one might expect from __Choices), but it
> still results in msgids that must be translated to the exact same msgstr
> (the ${...} substitution in one case, and the literal directory names in
> the other), so we have essentially the same resulting problems and it's
> still hard to test that the code will behave correctly no matter what
> the selected language is. I've seen various hacks around this, such as
> substituting the translated description of a separate text template into
> the choices list, and I've seen a number of resulting bugs from code
> that fails to translate back from the localised text into C that are
> extremely hard to track down.
> 
> I think we could avoid a number of these problems, and get rid of some
> unnecessary load on translators, if there were a mechanism in po-debconf
> to declare that only some of the entries in a Choices list are to be
> translated. I appreciate that coming up with a reasonable syntax for
> declaring this might be tricky!

Hi Colin,

New versions of po-debconf/intltool-debian have been uploaded into experimental
to achieve this goal.  Your first example isn't implemented, because the
logical solution is to use __Choices instead.

In short, here is the syntax:
 * Mark the 3rd and 4th strings as translatable
   #flag:translate:3,4
   __Choices: /dos, /windows, Enter manually, Do not mount it
 * Translate everything but the 4th string
   #flag:translate!:4
   __Choices: Retry network autoconfiguration, Retry network autoconfiguration 
with a DHCP hostname, Configure network manually, ${wifireconf}, Do not 
configure the network at this time
Full documentation is in po-debconf(7).

I will also consider adding an = operator to specify strings instead of
numbers, as in
   #flag:translate=Enter manually, Do not mount it
   #flag:translate!=${wifireconf}
but only if it is not too tricky.

Some internal routines have been modified, so I will add unit tests to make sure
that nothing is broken, and then upload po-debconf 1.0 to unstable.
If you have time, please test these packages and let me know if you have
comments.  Thanks.

Denis


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to