[Interest] Translation support totally broken
andre at familiesomers.nl
Thu Dec 19 09:44:32 CET 2013
Thiago Macieira schreef op 18-12-2013 17:58:
> On quarta-feira, 18 de dezembro de 2013 16:58:22, Till Oliver Knoll wrote:
>> "ID based translation" is the bigest fuckup since the invention of i18n!
>> Oh just how I hated that concept when back in Java. Or any other framework
>> for that matter.
>> In Qt you have the /actual messages/ in the source code, so I never have to
>> wonder what e.g.
>> dialog->showMessage(resourceBundle->msg('msg_12345', arg1, arg2, arg3); //
>> hold on! Does that message really take 3 args? WTF!
> One intermediate solution we used to use in Nokia products was to write
> "Engineering English" in the source code. If you've ever used a prototype, you
> might have seen strings with "!!" in the beginning. For example, you'd write:
> dialog->showMessage(tr("!! This is %1 and the date is the %2")
> And then you have a translation team translating from "Engineering English" to
> "Proper English", including fixing grammar errors like using an article before
> the date.
> (It might be that the double bang was added by the translation system, not
> written in the text)
> This has the following benefits:
> - developers don't have to have perfect command of English
> - fixing the English text doesn't affect other languages
> - immediately visible which strings didn't get translated yet, from the !!
I think one should make an English "translation" anyway. Indeed, don't
expect the source text to be perfect. That also allows you to deal with
tr("Copying files. %n File(s) remaining.", "", remainingFileCount);
The (s) should of course not show up in the final application. The
solution with the !! is a nice one. It allows automatically checking for
missing translations using a tool like Squish.
You like Qt?
I am looking for collegues to join me at i-Optics!
More information about the Interest