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

Re: [Translation-i18n] translating via an intermediate language



Hi Bruno,

On Thursday at 13:51, Bruno Haible wrote:

> The syntax for a mixed PO file could like this:
>
>   msgid "Hello, world!"
>   msgid[ru] "Здравствуй, мир!"
>   msgstr "Chào thế giới !"

I think the following would make more sense (except that the syntax
would conflict plural forms syntax):

   msgid "Hello, world!"
   msgstr[ru] "Здравствуй, мир!"
   msgstr[vi] "Chào thế giới !"

I know that some may still feel this is English-centered (which it
is), but we can then even have things like:

   msgid "Hello, wrld!"
   msgstr[en] "Hello, world!"
   msgstr[ru] "Здравствуй, мир!"
   msgstr[sr] "Здраво свете!"
   msgstr[vi] "Chào thế giới !"

Now, this might make people expect changes to MO format as well, but
we can instead transform single PO to multiple MO files.

And there would be a problem that some developers might start using
this container-PO format for all translations, which would be crap for
translators if they have to extract and merge their stuff, watching
for conflicts with others, etc.  So, that's the big risk I see with an
approach like this: it's too tempting to put all translations in
there, which is where your suggestion beats this one.

Another thing to be careful about is many-to-one-to-many mappings,
eg. what if both "Blah" and "Foo" translate to something like "Bar" in
language "trt":

  msgid "Blah"
  msgid[trt] "Bar"
  msgstr ...

  msgid "Foo"
  msgid[trt] "Bar"
  msgstr ...

And we use "trt" as our base language, then "Bar" is clearly not a
unique msgid, which is exactly why I feel msgstr there makes more
sense.

(as a sidenote, I already have a working PHP and gettext-based system
which does gettext_in_alternate_language(msgid) instead of displaying
msgid; this can simply be done in PO tools with pointers to two PO
files: "use this one for base messages, translate into this one")

> The PO file editors would have to be taught to display msgid[ru] in preference
> to msgid if the translator has said so.

And I think it's no more work to ask them to simply support reading
translations from another PO file and use that in place of msgid's.


Cheers,
Danilo



Reply to: