[OTR-dev] [Patch] Internationalisation for gaim-otr

Thomas B. Tommy.B at gmx.net
Sun Feb 11 12:17:01 EST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi!

A few days ago, there was a discussion on otr-users about the
translation of OTR, and I've commited to implement
internationalisation support. Here's the first result: I've attached a
tarball containing a patch with the changes I made to gaim-otr and
also some new files that should go into the new po/ subdirectory. I
was able to compile and run the patched gaim-otr on my Ubuntu 6.10
system with a Gaim 2.0.0beta6 (compiled from source) as well as on
Windows (see below). Please test it for yourselves and send me results
and comments.

Basically, I tried to follow these instructions while writing the patch:
http://gaim.sourceforge.net/api/plugin-i18n.html
So, to add new translations, follow the steps at the bottom of that page.

How to compile: Under Linux and similar systems, the usual "makedist"
followed by "configure; make; make install" should be all that's
needed, thanks to the autotools magic. Just be sure to have intltool
installed when you do "makedist".

I also wanted to test it under Windows, which was a bit trickier. I
don't know if this can be done in a better way (it's long ago that I
compiled something for Windows), but it worked for me. First, I
followed Ian's instructions to set up a cross-compiling environment
with MinGW under Linux:
http://lists.cypherpunks.ca/pipermail/otr-users/2006-November/000792.html
That worked quite well and enabled me to cross-compile the current CVS
version of gaim-otr. Then, after applying my patch, I needed two extra
steps:

1.) The MinGW environment was lacking a libintl.h. The libintl.h from
my system was not suitable, as it belongs to glibc (and the code of
libintl is built into glibc). So I downloaded the gettext package,
cross-compiled it and installed it into /usr/i586-mingw32msvc/, so
that I had a libintl.h and a libintl.a in my MinGW environment.

2.) Inside gaim-otr, LOCALEDIR needs to be correctly defined so that
the language files can be found. The tricky thing is that in Win32
Gaim, the directory containing the locale files is generally only
known at runtime (it depends on where the user has installed Gaim). So
in Gaim's win32dep.h, LOCALEDIR is defined as a function call to
wgaim_locale_dir(). Therefore I included that file in otr-plugin.c,
and placed win32dep.h and the other headers in libgaim/win32 (from the
Gaim source tarball) into /usr/i586-mingw32msvc/include/gaim.

Then, after making some adjustments to Makefile.mingw, I was able to
cross-compile the patched gaim-otr for Windows with a "make -f
Makefile.mingw".

So again, feel free to test the patch and send me your comments and
suggestions.

Thomas

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFz0+C0pI8wKmP0c4RAtzfAJ0Tan1gA2RRTZL+vzHx4Cr+vFGO8ACfWnP7
g5Y57UekNL0M6Df+nloA/Fg=
=gcz1
-----END PGP SIGNATURE-----

-------------- next part --------------
A non-text attachment was scrubbed...
Name: gaim-otr-i18n-patch.tar.gz
Type: application/x-gzip
Size: 10268 bytes
Desc: not available
URL: <http://lists.cypherpunks.ca/pipermail/otr-dev/attachments/20070211/0eddd4e2/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gaim-otr-i18n-patch.tar.gz.sig
Type: application/octet-stream
Size: 65 bytes
Desc: not available
URL: <http://lists.cypherpunks.ca/pipermail/otr-dev/attachments/20070211/0eddd4e2/attachment.obj>


More information about the OTR-dev mailing list