Re: 7.2 items
От | Franck Martin |
---|---|
Тема | Re: 7.2 items |
Дата | |
Msg-id | 3AFF963A.F9D9B147@sopac.org обсуждение исходный текст |
Ответ на | Re: 7.2 items (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
#ifdef ENABLE_NLS # include <libintl.h> # define _(String) gettext (String) # define N_(String) (String) #else /* Stubs that do something close enough. */ # define textdomain(String) # define gettext(String) (String) # define dgettext(Domain,Message) (Message) # define dcgettext(Domain,Message,Type) (Message) # define bindtextdomain(Domain,Directory) # define _(String) (String) # define N_(String) (String) #endif Just add the above code to each file, and each time that you use a string "my string" encapsulate it with _("my string"). gettext will parse the code and extract all the strings for future translation. Cheers Karel Zak wrote: > On Sat, May 12, 2001 at 11:21:44PM +0200, Peter Eisentraut wrote: > > Tom Lane writes: > > > > > Peter E. had implied that he wanted to tackle the elog issues for 7.2, > > > but I'm not sure if he's committed to it or not. > > > > Well... > > > > * Automatically add filename, line, function name: Easy to code, lots of > > labour. Should be lumped in with some other large change. > > > > * Error codes: I think there are only a handful of key messages that > > users (programs) need to detect cleanly, mostly constraint violations. > > The rest are "the query you sent is wrong -- fix your application" and > > "something went really wrong -- manual repair needed" > > > > So maybe this could be a smallish change. > > > > * Translation: If we want to use gettext I can get started. I don't > > think I'm interested in using any other interface. > > What dissect this work to two parts? First implement error codes and later > translation. IMHO transaction hasn't big importance (and will encapsulate > in elog() stuff) and is possible speculate about it later. Do you plannig > gettext stuff as a ./configure option? > > Karel > > -- > Karel Zak <zakkr@zf.jcu.cz> > http://home.zf.jcu.cz/~zakkr/ > > C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://www.postgresql.org/search.mpl
В списке pgsql-hackers по дате отправления: