This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Gcc and message catalogs
* Dennis Bjorklund (db@zigo.dhs.org) [20001113 18:07]:
> I've tried to create a swedish translation of cvs-gcc but I have
> some problems:
As I'm maintaining that part of GCC, I'll try to answer your questions.
> * xgettext is called with the flag "--defines" which does not
> exist in my xgettext. And I use getttext 0.10.35 which is
> the latest released version.
As Andreas told you already, you need the current CVS version of the gettext
tools (URL in gcc/ABOUT-GCC-NLS).
> But I solved this for now by removing "--defines". And it
> looked like it worked at least.
No, it only seems to work :) What is missing from the master catalog are the
help texts defined in platform specific headers (TARGET_SWITCHES and
TARGET_OPTIONS).
> * After I have created the sv.gmo file I copied it to
> {prefix}/share/locale/sv/LC_MESSAGES/gcc.mo but it didn't
> work. I still get no swedish output.
To just iron out possible problems, I'd advise a different approach:
- put sv.po in gcc/po
- edit gcc/configure.in and add sv to the variable ALL_LINGUAS, i.e.
it would look like this:
ALL_LINGUAS="en_GB sv"
- recreate configure by calling autoconf.
- configure gcc normally.
Now sv.gmo should be built automatically and 'make install' will install it
where gcc expects it to be.
> So I ran the compiler with ltrace and saw that it did call
> bindtextdomain() and other initialize functions but it
> never called any gettext() functions. That's a bit strange..
What is LANG set to?
> I have installed this version under /opt/gcc/ since I have
> my normal version of gcc in /usr.
If you either call it as /opt/gcc/bin/gcc or have /opt/gcc/bin preceeding
/usr/bin in PATH, you will get the right one.
Philipp
--
Philipp Thomas <pthomas@suse.de>
Development, SuSE GmbH, Schanzaecker Str. 10, D-90443 Nuremberg, Germany
Penguins shall save the dinosaurs
-- Handelsblatt about Linux on S/390