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

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

Hi Danilo,

> > 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 !"

The syntax could be reconciled with plurals. There is no problem writing
     msgstr[fr][0] "singulier"
     msgstr[fr][1] "pluriel"

But this syntax has two drawbacks:
  - It doesn't make it clear whether 'ru' or 'vi' is the target language.
    Whereas the syntax with msgid[ru] makes it more clear what is the
    input for the translator and where she puts her translation.
  - As you mentioned, there is a risk that people confuse it with a
    "multi-language PO file".

> 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.

There is no uniqueness requirement for msgid[trt], indeed. In a case
like this, the translator would have to look at the msgid line too,
not only at her preferred msgid[trt] line.

> (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")

Interesting! And what are the practical experiences you or translators
made with it so far (except that it's useful :-))?


Reply to: