Bug 41017 - German gettext translation
Summary: German gettext translation
Status: RESOLVED FIXED
Alias: None
Product: p11-glue
Classification: Unclassified
Component: p11-kit (show other bugs)
Version: unspecified
Hardware: x86 (IA32) All
: medium enhancement
Assignee: Stef Walter
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-19 10:57 UTC by Andreas Metzler
Modified: 2013-02-12 15:18 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
German gettext translation (10.53 KB, text/plain)
2011-09-19 10:57 UTC, Andreas Metzler
Details
Add and enable German gettext translation (12.04 KB, patch)
2011-09-24 07:28 UTC, Andreas Metzler
Details | Splinter Review

Description Andreas Metzler 2011-09-19 10:57:12 UTC
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
Comment 1 Stef Walter 2011-09-24 00:52:35 UTC
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.
Comment 2 Andreas Metzler 2011-09-24 07:28:41 UTC
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
Comment 3 Stef Walter 2011-09-26 00:01:15 UTC
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
Comment 4 Andreas Metzler 2011-10-01 09:33:31 UTC
> 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);
Comment 5 Luca Ferretti 2012-01-27 09:03:37 UTC
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/
Comment 6 Stef Walter 2012-02-29 01:24:35 UTC
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.
Comment 7 Stef Walter 2013-02-12 15:18:58 UTC
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.