Merge lp:~kelemeng/indicator-printers/bug1279605 into lp:indicator-printers/14.04

Proposed by Gabor Kelemen
Status: Merged
Approved by: Lars Karlitski
Approved revision: 66
Merged at revision: 66
Proposed branch: lp:~kelemeng/indicator-printers/bug1279605
Merge into: lp:indicator-printers/14.04
Diff against target: 52 lines (+20/-0)
2 files modified
configure.ac (+13/-0)
src/indicator-printers-service.c (+7/-0)
To merge this branch: bzr merge lp:~kelemeng/indicator-printers/bug1279605
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Lars Karlitski (community) Approve
Review via email: mp+206073@code.launchpad.net

Commit message

Add proper i18n support. Fixes LP:1279605

To post a comment you must log in.
Revision history for this message
Lars Karlitski (larsu) wrote :

Thanks a lot!

Any reason you didn't use AM_GLIB_DEFINE_LOCALEDIR in configure.ac?

Revision history for this message
Gabor Kelemen (kelemeng) wrote :

Uh, no, I didn't know about that, just copied from indicator-sound. Should I change it?

Revision history for this message
Lars Karlitski (larsu) wrote :

Nah, not important enough. Thanks again!

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Autolanding.
No commit message was specified in the merge proposal. Hit 'Add commit message' on the merge proposal web page or follow the link below. You can approve the merge proposal yourself to rerun.
https://code.launchpad.net/~kelemeng/indicator-printers/bug1279605/+merge/206073/+edit-commit-message

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'configure.ac'
2--- configure.ac 2012-04-04 20:05:17 +0000
3+++ configure.ac 2014-02-13 01:52:55 +0000
4@@ -11,10 +11,23 @@
5 AM_SILENT_RULES([yes])
6 AC_CONFIG_MACRO_DIR([m4])
7
8+AC_DEFUN([AC_DEFINE_PATH], [
9+ test "x$prefix" = xNONE && prefix="$ac_default_prefix"
10+ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
11+ ac_define_path=`eval echo [$]$2`
12+ ac_define_path=`eval echo [$]ac_define_path`
13+ $1="$ac_define_path"
14+ AC_SUBST($1)
15+ ifelse($3, ,
16+ AC_DEFINE_UNQUOTED($1, "$ac_define_path"),
17+ AC_DEFINE_UNQUOTED($1, "$ac_define_path", $3))
18+])
19+
20 IT_PROG_INTLTOOL([0.35.0])
21 GETTEXT_PACKAGE=indicator-printers
22 AC_SUBST(GETTEXT_PACKAGE)
23 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [gettext package])
24+AC_DEFINE_PATH(GNOMELOCALEDIR, "${datadir}/locale", [locale directory])
25 AM_GLIB_GNU_GETTEXT
26
27 AC_CONFIG_HEADER(config.h)
28
29=== modified file 'src/indicator-printers-service.c'
30--- src/indicator-printers-service.c 2012-09-07 15:03:59 +0000
31+++ src/indicator-printers-service.c 2014-02-13 01:52:55 +0000
32@@ -21,6 +21,7 @@
33 #include <gtk/gtk.h>
34 #include <cups/cups.h>
35 #include "dbus-names.h"
36+#include "config.h"
37
38 #include "cups-notifier.h"
39 #include "indicator-printers-menu.h"
40@@ -146,6 +147,12 @@
41
42 int main (int argc, char *argv[])
43 {
44+ /* Init i18n */
45+ setlocale (LC_ALL, "");
46+ bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
47+ bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
48+ textdomain (GETTEXT_PACKAGE);
49+
50 IndicatorService *service;
51 DbusmenuServer *menuserver;
52 CupsNotifier *cups_notifier;

Subscribers

People subscribed via source and target branches