I18N

I'd like to see moc talking my native language. Therefore I've internationalised the source code using GNU gettext.

Patch can be found on http://xpisar.wz.cz/moc-i18n/.

Patch introduces gettext infrastructure, configure --enable-nls flag, sample i18n of "mocp --help" output and Czech translation as a demo.

Because I don't know much about autotools, the patch contains some needless files. I think maintainer can filter the files.

Don't forget to run autoreconf after applying the patch.

If you like it, incorporate it into mainline code. If you dislike something, tell it me, I will try to fix it. I would like to get some feed back before i18ning the whole application.

Thanks for starting this topic, it's on the TODO list for long time. I've added gettext support to MOC (it's in SVN) based on your patch. It wasn't so easy, because the patch was 95kB big (compressed) and 99% of that was changes/adding generated code. Please, don't do that :) I don't know gettext usage, but ./mocp --help works as expected, so everything is probably OK and MOC can now be translated. Please download the latest source from SVN and take a look at it.

--
Damian Pietras - MOC developer

I'm sory for delay. Next portion of changes is available on the above advertised site against revision 2088.

It adds po/LINGUAS where availabe translation are registered. I met few problems when message buffers are small for unicode strings. E.g. status message buffer info_win->stats_msg in interface_elements.c:213 or short file type buffer in decoder.c:60 and others. I think buffer should be big enough to hold UTF-8 string (up to 6 bytes per character) and size of the string should count code points instead of bytes. I've enlarged the buffer but it's not final solution. It has some ncurses-layout impacts. Also I met problem while writing U+2013 into xterm title. I've marked all problems with FIXME or TODO tags.

Yet another problem is current code doesn't install translation catalatogs because make -C po doesn't produce binary catalogs. I think it's somewhere configureable (it's feature, it allows users not to have msgfmt tool installed), but I can't remember where. So maintainer is required to make them with make -C po update-po before releasing tarball. I will try too look on it.