pgAdmin3 translation, Oid datatype - Mailing list pgadmin-hackers

From Andreas Pflug
Subject pgAdmin3 translation, Oid datatype
Date
Msg-id 3ED67D90.5050404@gmx.de
Whole thread Raw
List 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:

Previous
From: Andreas Pflug
Date:
Subject: Re: Find Dialog in SQL box (Admin3)?
Next
From: "Dave Page"
Date:
Subject: Re: Find Dialog in SQL box (Admin3)?