This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gettext markup of library sources


See libstdc++-v3/po for the current catalog. 

I once made notes on how to deal with this (and maybe the makefile rules
still work). I never got around to actually using the message catalogs
for the true/false string literals in the numpunct facet, as intended. I
think the issue was trying to figure out where the catalogs would be
installed (the testsuite uses some hackery to deal with the build-time
directory locations so that the testsuite can function.)

Maybe this will be useful:
http://gcc.gnu.org/onlinedocs/libstdc++/22_locale/messages.html

>I'd like to start noting the string literals so that xgettext can find them
>easily.  Elsewhere this has been done with (essentially)
>
>    #define _(x)       gettext(x)
>    #define N(x)       (x)
>
>An example patch follows for discussion.  Mainly I'm hoping to talk about
>good names for the wrapper macros.  They need to be short.  "_" and "N"
>are traditional.  We can't actually use _N like I've noted below; it's in
>the BADNAMES list for Solaris.

I'm in favor of not inventing a new syntax for this. If you can't use
_N, maybe __N? 

>Note that, as shown below, I'm /not/ proposing we actually use gettext()
>yet.  That will require some configury magic, and is probably best left
>for post-3.3.

Hmm: gettext is being used, now. See the std::messages facet. Are you
talking about the location issue at install time?

The configure problems are a whole separate issue. The current approach
is in violation of the recommended autoconf/automake guidelines, but is
blessed by Ulrich and is the only thing that seems to work,
consistently.

I don't have a problem with your patch.

>Index: include/bits/c++config
>===================================================================
>RCS file: /home/pme/Repositories/GCC/gcc/libstdc++-v3/include/bits/c++config,v
>retrieving revision 1.704
>diff -u -r1.704 c++config
>--- include/bits/c++config      20 Apr 2003 00:17:05 -0000      1.704
>+++ include/bits/c++config      20 Apr 2003 23:11:45 -0000
>@@ -97,4 +97,11 @@
> # define _GLIBCPP_FAST_MATH 0
> #endif
>
>+// XXX These are only placeholders.  They let people mark up the library
>+// sources without breaking things, and will be probably be somewhere else
>+// once localization of the library itself is functioning.
>+#define _(__msgid)               (__msgid)
>+#define _N(__msgid)              (__msgid)
>+#define gettext_noop(__msgid)    (__msgid)
>+

Don't need XXX here, I don't think.

-benjamin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]