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

Bug#185831: Bug#196774: Plans for fixing this bug ?



Quoting Atsuhito Kohda (kohda@pm.tokushima-u.ac.jp):

> By the way, is the following format is okay?
> 
> Template: tetex-bin/hyphen
> Type: multiselect
> _Choices: bahasa, basque, british, croatian, czech, danish, dutch, finnish, french[=patois], german[=austrian-alte_Rechtschreibung], ngerman[=naustrian-neue_Rechtschreibung], greek, italian, latin, magyar, norsk[old], norsk[nohyphb.tex], norsk[nohyphbc.tex], polish, portuges, romanian, russian, slovak, slovene, spanish, turkish, ukrainian[ukrhyph.tex], ukrainian[ukrhyph.t2a], ukrainian[ukrhyph.lcy], ukrainian[ukrhyph.ot2]
> Default: french[=patois], german[=austrian-alte_Rechtschreibung], ngerman[=naustrian-neue_Rechtschreibung]
> _Description: What hyphenation patterns to load.
> 
> or should use underscore like
> 
> _Default: french[=patois], german[=austrian-alte_Rechtschreibung], ngerman[=naustrian-neue_Rechtschreibung]

You're puzzling me.. :-)

1st of all, the "Choices" field.

I would advise you to use the special "__Choices" entry.

With it, each single entry of the Choices will be one single string in
the templates.pot file. This allow you to easily add choices without
breaking translations completely. But this is up to you : keeping
"_Choices" is OK here.

2nd, the Default :

You should put there either "Default"-->this would mean that you don't
consider that having different defaults for different languages is
needed.

Otherwise, you may put "_Defaultchoice:". This special po-debconf
entry allow translators to use a default which is different for each
language.

Let me give an example, simpler than your own template :

Let's say we have a template for choosing the language of an
application :

Template : foo/bar
Type : select
__Choices : english, french, japanese
_Defaultchoice : english
_Description : Please choose your language

With this, translators will have 5 strings to be
translated in templates.pot :

French translation example

#. Choices
#: ../foo.templates:3
msgid "english"
msgstr "anglais"

#. Choices
#: ../foo.templates:3
msgid "french"
msgstr "français"

#. Choices
#: ../foo.templates:3
msgid "japonais"
msgstr "japanese"

#. DefaultChoice
#: ../foo.templates:4
msgid "english"
msgstr "french"

#. Description
#: ../foo.templates:5
msgid "Please choose your language"
msgstr "Veuillez choisir votre langue"



As you may see :

-each choice is a single string
-the default may be changed by the translator

The only crucial point here is for the default : THE TRANSLATOR HAS TO
PUT IT IN ENGLISH. If I put "français" this won't work.

I guess that the same applies to _DefaultChoice when the field is
multiselect.

As this last requirement may be confusing for translators, I use the
following trick (taken from my geneweb package.....I suggest you to
use it as a reference) :

in debian/templates :

Template: geneweb/lang
Type: select
__Choices: Afrikaans (af), Bulgarian (bu), Catalan (ca), Chinese (zh), Czech (cs), Danish (da), Dutch (nl), English (en), Esperanto (eo), Estonian (et), Finnish (fi), French (fr), German (de), Hebrew (he), Icelandic (is), Italian (it), Latvian (lv), Norwegian (no), Polish (pl), Portuguese (pt), Romanian (ro), Russian (ru), Spanish (es), Swedish (sv)
_DefaultChoice: English (en)[ default : do not put what's inside brackets into translations. Put your own language here but UNTRANSLATED]

The key here are the brackets. All things which are inside brackets
are not put in the final template by dh_installdebconf. So tis allows
you to put "comments" for translators, just as I did. Here the comment
says explicitely that the "translation" is only putting the desired
language exactly as it is in english....

Hope that all this is clear enough. __Choices and _Defaultchoice are
the only "complicated" stuff in po-debconf....but that is worth the
pain.... :-)

Feel free to ask again if something is confusing for you. And, also,
please send me the new templates.pot file as soon as you have it
ready.





Reply to: