Re: Translation of numeric values (application gnome-schedule)



lör 2004-06-19 klockan 19.58 skrev Miloslav Trmac:
> On Sat, Jun 19, 2004 at 07:10:30PM +0200, Philip Van Hoof wrote:
> > Because our application uses numeric nth values like 'first',
> > 'second', ... a lot and because translating "1th" "2e", .. is 'also'
> > non-trivial, we decided to implement something that translates a numeric
> > nth to a written version of the value.
>
> This is probably much more complicated that you think.
> For languages like Czech, "fourth" depends on the gender
> (man, woman, child) and the declination (7 for singular, 7 for plural).
> Word splicing is simply Too Hard(tm).

Yes. Again, please don't rip out single words out of sentences for
seperate translation. Sentences can only be properly translated in their
entirety.

If you don't believe this, then you could try to adopt and generalize
your code to the different grammatic quirks and differences of every
possible language of the world, but at that point you would probably
find that your application was doing 99.999% translation stuff and
0.001% of what it was supposed to do originally. *If* generalizing that
way would even be possible. And hundreds of translators would at that
point still be confused to whether the sentence surgery code supported
the odd grammar rules of *their* particular language.

Thus, it's better to avoid such situations altogether, and remember the
golden rule:

        Sentences can only be properly translated in their entirety.

Following this rule, and hence not do any sentence splitting, will allow
for both coders and translators to stay sane and not have their heads
explode in the long run.

To be specific, in this example you could perhaps instead of this
sentence splitting:

_("Run the application every %s minute of every hour."), _("3rd")

do something like:

_("Run the application at this minute every hour: %s"), 3

The latter is perhaps not as pretty, but it will probably work with
translation for almost any language.


Christian


(cc:ing Philip and Gaute again as I don't think they're subscribed to
this list)



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