Skip site navigation (1) Skip section navigation (2)

pgAdmin3 translation, Oid datatype

From: Andreas Pflug <Andy_P(at)gmx(dot)de>
To: pgadmin-hackers(at)postgresql(dot)org,Jean-Michel POURE <jm(dot)poure(at)freesurf(dot)fr>
Subject: pgAdmin3 translation, Oid datatype
Date: 2003-05-29 21:37:20
Message-ID: 3ED67D90.5050404@gmx.de (view raw or flat)
Thread:
Lists: pgadmin-hackers
Dear fellow developers,

I prepared pgAdmin3 for translation:

****************************************
To enable translation of pgAdmin3 strings, all candidates need to be marked.

1) A string that will not be translated (queries, log entries, setting 
tags etc)
    will be declared with wxT(""), as it is standard in wxWindows to 
enable unicode.

2) A string that is to be translated, needs to be declared with _(). 
This will mark
    the string for translation, and will return the translated string.

3) A string that needs translation, but should still be used 
non-translated at the
    place of definition, needs declaration with __(). Later in the code, 
the still
    non-translated string can be translated using wxGetTranslation().

The third method must be used for keywords, that sometimes need 
translation, sometimes
not. An example is typeNameList in pgObject.cpp. The keywords are used 
in queries, so
they need to remain untranslated, but may also be shown translated. 
wxLogError will
write the string untranslated to the log, but show the text translated 
in a message box.



Do not translate, using wxT():

- wxLogInfo, wxLogStatus, wxLogSql, wxLogTrace, wxLogDebug arguments
- sysSettings tag names and values
- queries
- reserved SQL words (usually recognizable as all-uppercase words)


Translate, using _():
- all user interface strings that aren't reused for query creation


Mark for translation, using __():
- wxLogFatalError wxLogError, wxLogWarning, wxLogMessage
- tables of keywords
**********************


This text is added to cvs as /notes/prepare_for_translation.txt for 
later reference.
Jean-Michel, could you give us hints on how to implement the xgettext 
process, unix and w32? The __() macro is intended to be the short form 
for gettext_noop().


To avoid any problems with oids, I dedicated the new datatype OID to it. 
I didn't like it being double, because I'm expecting queries like
	"..WHERE reloid=23,555,123"
or even worse
	"..WHERE reloid=23,555,122.9999998".
We don't like none of these...



Regards,
Andreas


pgadmin-hackers by date

Next:From: Andreas PflugDate: 2003-05-29 21:46:25
Subject: pgAdmin3 translation, Oid datatype
Previous:From: Adam H.PendletonDate: 2003-05-29 18:58:34
Subject: Re: lwx_gtkd_stc-2.4

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group