Merge lp:~charlesk/indicator-transfer-buteo/fix-i18n-lib into lp:indicator-transfer-buteo

Proposed by Charles Kerr
Status: Merged
Approved by: Renato Araujo Oliveira Filho
Approved revision: 6
Merged at revision: 5
Proposed branch: lp:~charlesk/indicator-transfer-buteo/fix-i18n-lib
Merge into: lp:indicator-transfer-buteo
Diff against target: 37 lines (+1/-9)
2 files modified
src/buteo-plugin.cpp (+0/-8)
src/buteo-transfer.cpp (+1/-1)
To merge this branch: bzr merge lp:~charlesk/indicator-transfer-buteo/fix-i18n-lib
Reviewer Review Type Date Requested Status
Renato Araujo Oliveira Filho (community) Approve
Review via email: mp+273607@code.launchpad.net

Commit message

Fix i18n conflict with indicator-transfer

Description of the change

Make the plugin's i18n behave like a library instead of an app so that indicator-transfer's text domain doesn't get overwritten, breaking its i18n (e.g. the "Files" title).

Background information on i18n for libs vs apps in glib: https://developer.gnome.org/glib/unstable/glib-I18N.html#glib-I18N.description

To post a comment you must log in.
Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

looks good.

review: Approve
Revision history for this message
Sebastien Bacher (seb128) wrote :

since you drop the only usage of GNOMELOCALEDIR you could maybe also clean out the definition from the cmake (which seems buggy any, current build logs have -DGNOMELOCALEDIR=\"\")

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/buteo-plugin.cpp'
2--- src/buteo-plugin.cpp 2015-09-02 13:39:30 +0000
3+++ src/buteo-plugin.cpp 2015-10-06 19:48:05 +0000
4@@ -20,9 +20,6 @@
5 #include "buteo-source.h"
6
7 #include <gmodule.h>
8-#include <glib/gi18n.h> // bindtextdomain()
9-#include <locale.h>
10-
11
12 using namespace unity::indicator::transfer;
13
14@@ -31,11 +28,6 @@
15
16 G_MODULE_EXPORT Source* get_source()
17 {
18- // boilerplate i18n
19- setlocale(LC_ALL, "");
20- bindtextdomain(GETTEXT_PACKAGE, GNOMELOCALEDIR);
21- textdomain(GETTEXT_PACKAGE);
22-
23 return new ButeoSource;
24 }
25
26
27=== modified file 'src/buteo-transfer.cpp'
28--- src/buteo-transfer.cpp 2015-09-28 15:40:41 +0000
29+++ src/buteo-transfer.cpp 2015-10-06 19:48:05 +0000
30@@ -29,7 +29,7 @@
31 #include <url-dispatcher.h>
32 #include <indicator-transfer/transfer/transfer.h>
33
34-#include <glib/gi18n.h>
35+#include <glib/gi18n-lib.h>
36
37 using namespace unity::indicator::transfer;
38

Subscribers

People subscribed via source and target branches