Thread: pgAdmin3 translation, Oid datatype
Sorry screwed up my mail accounts, reposting: 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
Le Jeudi 29 Mai 2003 23:46, Andreas Pflug a écrit : > 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(). Thanks Andreas. This is thrilling and so exciting. Before tagging source files, I will try to write a small howto explaining how to extract and merge .po files (this will also refresh my memory). Later, I will also build a merge and download Php interface. As usual, I have several silly questions: 1) wxGTK versions Could you outline the Unicode differences between: - wxGTK2.4 linked against GTK1.2, - wxGTK2.4 linked against GTK2.0+unicode support, - wxGTK2.5cvs linked against GTK2.0+unicode support (poEdit uses only this version). Unicode UTF-8 is highly needed if we want Asian languages support. Do you think we will be able to translate pgAdmin3 into Asian languages? If needed, I can build the required RPMs for any wxWindows version, including with debugging support. 2) Could someone have a look at poEdit CVS source code? It seems to be a major wxWindows project with very good UTF-8 support by definition. 3) I don't understand why a __() sting should not be translated and then translated. Will it enable you to create a translatable pair, like "développeur = developper". Could you point out examples of __() strings? Cheers, Jean-Michel
Jean-Michel POURE wrote: >As usual, I have several silly questions: > >1) wxGTK versions >Could you outline the Unicode differences between: >- wxGTK2.4 linked against GTK1.2, >- wxGTK2.4 linked against GTK2.0+unicode support, >- wxGTK2.5cvs linked against GTK2.0+unicode support (poEdit uses only this >version). > I can't; hopefully, it's just setting the right macros and compiling. > >Unicode UTF-8 is highly needed if we want Asian languages support. Do you >think we will be able to translate pgAdmin3 into Asian languages? > I'm lacking any experiences with that, but why not? >3) I don't understand why a __() sting should not be translated and then >translated. Will it enable you to create a translatable pair, like >"développeur = developper". Could you point out examples of __() strings? > Normally, it's no problem that tagging and runtime translation is done in the same place; that's what is performed using the _() macro. But in some cases, this will not be ok. Look at the table in pgObject.cpp; these strings represent both words that are used for sql command creation, but also for user display purposes. Thus these strings need to be tagged, so they are extracted for translation, but may *not* be replaced by the translated version in the table itself. Instead, the translation only may take place when used for displaying some information to the user. I tried to make this clear in my doc about this, feel free to propose a different wording to make it clearer. Regards, Andreas
Le Vendredi 30 Mai 2003 10:15, Andreas Pflug a écrit : > I'm lacking any experiences with that, but why not? I wonder why ./configure options include --enable-unicode --enable-gtk2, that's all. A look at poEdit might clarify some issues (why does it use wxWindows2.5 cvs?). Thanks for other explainations, now I understand __(). Cheers, Jean-Michel