Created attachment 51367 [details] German gettext translation please find attached the inital German translation of p11-kit by Chris Leick as submitted in http://bugs.debian.org/641994 thanks, cu andreas
Very nice! Could you provide this as a git commit on p11-kit master? If you're not able to let me know and I'll try to figure out how to integrate this in. Since this is the first translation, I'm sure i'll miss some detail though.
Created attachment 51572 [details] [review] Add and enable German gettext translation Find attached a patch against git HEAD which * enables installation/generation of gettext translations and * adds the German one. It looks ok to me, the catalogs are installed correctly, however as I could not figure out quickly how to trigger an error I could not test whether error messages are localized. cu andreas
I added a tool called tests/print-messages which prints out messages, so it's easy to check if a translation is working. However there must be something missing because the patch on this bug applies and builds nicely but on install it says: installing ./en@boldquot.gmo as /usr/share/locale/en@boldquot/LC_MESSAGES/p11-kit.mo /usr/bin/install: cannot stat `./en@quot.gmo': No such file or directory installing ./en@quot.gmo as /usr/share/locale/en@quot/LC_MESSAGES/p11-kit.mo /usr/bin/install: cannot stat `./de.gmo': No such file or directory
> However there must be something missing because the patch on this bug applies > and builds nicely but on install it says: > > installing ./en@boldquot.gmo as > /usr/share/locale/en@boldquot/LC_MESSAGES/p11-kit.mo > /usr/bin/install: cannot stat `./en@quot.gmo': No such file or directory Hello, Are you perhaps applying the patch to a a dirty checkout (e.g one containing po/stamp-po)? It works for me against clean GIT head. > I added a tool called tests/print-messages which prints out messages, so it's > easy to check if a translation is working. Afaict the library itself is missing a bindtextdomain (PACKAGE, LOCALEDIR), and the testprogram a "setlocale (LC_ALL, "");" in its main(). I am not sure where the bindtextdomain call would go in p11-kit, otherwise I would provide a patch. Is there a central initialization function which is always called? cu andreas ------------------------ diff -urBbp p11-kit-0.7.orig/p11-kit/Makefile.am p11-kit-0.7/p11-kit/Makefile.am --- p11-kit-0.7.orig/p11-kit/Makefile.am 2011-09-26 08:30:59.000000000 +0200 +++ p11-kit-0.7/p11-kit/Makefile.am 2011-10-01 18:18:58.000000000 +0200 @@ -1,5 +1,8 @@ NULL = +localedir = $(datadir)/locale +AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" + INCLUDES = \ -I$(top_srcdir) \ -DP11_KIT_FUTURE_UNSTABLE_API \ diff -urBbp p11-kit-0.7.orig/tests/print-messages.c p11-kit-0.7/tests/print-messages.c --- p11-kit-0.7.orig/tests/print-messages.c 2011-09-26 08:42:27.000000000 +0200 +++ p11-kit-0.7/tests/print-messages.c 2011-10-01 18:23:22.000000000 +0200 @@ -38,12 +38,14 @@ #include <string.h> #include <stdio.h> #include <stdlib.h> +#include <locale.h> #include "p11-kit.h" int main (int argc, char *argv[]) { + setlocale (LC_ALL, ""); if (argc != 1) { fprintf (stderr, "usage: print-messages\n"); exit (2);
Just a note: it could be better (for both translators and developers) to manage p11-kit translations using Transifex. Here is already a freedesktop.org "metagroup" to handle translations of projects hosted on fd.o, see https://www.transifex.net/projects/p/freedesktop/
Good plan. Sorry for the delay. I've created a p11-kit project at transifex and uploaded the pot file. Waiting for approval to get into the freedesktop.org metagroup.
Merged into git master.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.