Re: Ticket 4: better i18n

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: pgadmin-hackers(at)postgresql(dot)org
Subject: Re: Ticket 4: better i18n
Date: 2010-06-29 20:51:08
Message-ID: 4C2A5CBC.9060901@lelarge.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Le 29/06/2010 22:41, Dave Page a écrit :
> On Tue, Jun 29, 2010 at 9:39 PM, Guillaume Lelarge
> <guillaume(at)lelarge(dot)info> wrote:
>
>> Sure, you're right. An example would be better.
>>
>> See this line of code:
>>
>> text = wxString::Format(_("Are you sure you wish to drop %s \"%s\"?"),
>> data->GetTranslatedTypeName().c_str(),
>> ((pgServer*)data)->GetFullIdentifier().c_str());
>>
>> On a table named "t1", text will have this value:
>> Are you sure you wish to drop table "t1"?
>>
>> Which is good english. But, once translated in french, it gives:
>> Êtes-vous sûr de vouloir supprimer table "t1"?
>>
>> Which is bad french. Because GetTranslatedTypeName returns "table" in
>> french, which is the right translation of the single word table in
>> english, but not in a complete sentence. It should be:
>> Êtes-vous sûr de vouloir supprimer la table "t1"?
>
> Ah - I see. Makes perfect sense - thanks!
>

The issue of doing this is that we have to add the sentence for each
object and each catalogs. Which adds a lot of strings to translate (and
quite the same, because they differ on a single word). But I don't think
there is a way to do better than the way I did.

--
Guillaume
http://www.postgresql.fr
http://dalibo.com

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2010-06-29 20:59:36 Re: Ticket 4: better i18n
Previous Message Dave Page 2010-06-29 20:41:43 Re: Ticket 4: better i18n