Merge lp:~cjcurran/indicator-sound/localise-vala-files into lp:~indicator-applet-developers/indicator-sound/trunk_3

Proposed by Conor Curran
Status: Merged
Merged at revision: 225
Proposed branch: lp:~cjcurran/indicator-sound/localise-vala-files
Merge into: lp:~indicator-applet-developers/indicator-sound/trunk_3
Diff against target: 165 lines (+34/-15)
7 files modified
Makefile.am (+4/-1)
po/POTFILES.in (+1/-0)
src/Makefile.am (+8/-8)
src/common-defs.h (+3/-0)
src/playlists-menu-item.vala (+7/-3)
src/sound-service.c (+3/-3)
vapi/config.vapi (+8/-0)
To merge this branch: bzr merge lp:~cjcurran/indicator-sound/localise-vala-files
Reviewer Review Type Date Requested Status
Sebastien Bacher Approve
David Barth Approve
Review via email: mp+53849@code.launchpad.net

Description of the change

fixes bug attached

To post a comment you must log in.
Revision history for this message
David Barth (dbarth) wrote :

Builds here. I trust you for the t10n calls themselves

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

you need to list playlists-menu-item in POTFILES.in as well to get it translated

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

ignore that, I can't read today it seems ;-)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Makefile.am'
2--- Makefile.am 2011-01-27 03:09:45 +0000
3+++ Makefile.am 2011-03-17 16:17:30 +0000
4@@ -4,7 +4,10 @@
5 data \
6 po
7
8-EXTRA_DIST = autogen.sh vapi/common-defs.vapi
9+EXTRA_DIST = \
10+ autogen.sh \
11+ vapi/common-defs.vapi \
12+ vapi/config.vapi
13
14 DISTCHECK_CONFIGURE_FLAGS = --enable-localinstall
15
16
17=== modified file 'po/POTFILES.in'
18--- po/POTFILES.in 2011-02-22 00:32:51 +0000
19+++ po/POTFILES.in 2011-03-17 16:17:30 +0000
20@@ -2,3 +2,4 @@
21 src/indicator-sound.c
22 src/mute-menu-item.c
23 src/sound-service-dbus.c
24+src/playlists-menu-item.c
25
26=== modified file 'src/Makefile.am'
27--- src/Makefile.am 2011-03-14 19:47:59 +0000
28+++ src/Makefile.am 2011-03-17 16:17:30 +0000
29@@ -56,8 +56,7 @@
30 settings-manager.vala \
31 playlists-menu-item.vala \
32 freedesktop-interfaces.vala \
33- fetch-file.vala
34-
35+ fetch-file.vala
36
37 music_bridge_VALAFLAGS = \
38 --ccode \
39@@ -69,10 +68,11 @@
40 --pkg gee-1.0 \
41 --pkg Dbusmenu-0.4 \
42 --pkg common-defs \
43- --pkg gio-2.0 \
44- --pkg gio-unix-2.0 \
45- --pkg gdk-pixbuf-2.0 \
46- --pkg libxml-2.0
47+ --pkg config \
48+ --pkg gio-2.0 \
49+ --pkg gio-unix-2.0 \
50+ --pkg gdk-pixbuf-2.0 \
51+ --pkg libxml-2.0
52
53 $(MAINTAINER_VALAFLAGS)
54
55@@ -137,10 +137,10 @@
56 #######################
57 BUILT_SOURCES = \
58 music_bridge_vala.stamp \
59- $(music_bridge_APIFILES) \
60+ $(music_bridge_APIFILES) \
61 gen-sound-service.xml.h \
62 gen-sound-service.xml.c \
63- $(music_bridge_VALASOURCES:.vala=.c)
64+ $(music_bridge_VALASOURCES:.vala=.c)
65
66 CLEANFILES = \
67 $(BUILT_SOURCES)
68
69=== modified file 'src/common-defs.h'
70--- src/common-defs.h 2011-03-15 12:22:21 +0000
71+++ src/common-defs.h 2011-03-17 16:17:30 +0000
72@@ -19,6 +19,9 @@
73 #ifndef __COMMON_DEFS_H__
74 #define __COMMON_DEFS_H__
75
76+#ifdef HAVE_CONFIG_H
77+#include "config.h"
78+#endif
79
80 typedef enum {
81 MUTED,
82
83=== modified file 'src/playlists-menu-item.vala'
84--- src/playlists-menu-item.vala 2011-03-11 16:33:04 +0000
85+++ src/playlists-menu-item.vala 2011-03-17 16:17:30 +0000
86@@ -17,11 +17,13 @@
87 with this program. If not, see <http://www.gnu.org/licenses/>.
88 */
89
90+using Config;
91 using Dbusmenu;
92 using DbusmenuPlaylists;
93 using DbusmenuPlaylist;
94 using Gee;
95
96+
97 public class PlaylistsMenuitem : PlayerItem
98 {
99 private HashMap<int, Dbusmenu.Menuitem> current_playlists;
100@@ -31,12 +33,14 @@
101 {
102 Object ( item_type: MENUITEM_TYPE, owner: parent );
103 }
104+
105 construct{
106 this.current_playlists = new HashMap<int, Dbusmenu.Menuitem>();
107 this.root_item = new Menuitem();
108
109- this.root_item.property_set ( MENUITEM_PROP_LABEL, "Choose Playlist" );
110+ this.root_item.property_set ( MENUITEM_PROP_LABEL, _("Choose Playlist") );
111 this.root_item.property_set ( MENUITEM_PATH, "" );
112+
113 }
114
115 public new void update (PlaylistDetails[] playlists)
116@@ -74,7 +78,7 @@
117 }
118 if (within == false){
119 if (this.root_item.property_get (MENUITEM_PATH) == item.property_get (MENUITEM_PATH)){
120- this.root_item.property_set (MENUITEM_PROP_LABEL, "Choose Playlist");
121+ this.root_item.property_set (MENUITEM_PROP_LABEL, _("Choose Playlist"));
122 }
123 this.root_item.child_delete (item);
124 }
125@@ -118,7 +122,7 @@
126 public void active_playlist_update (PlaylistDetails detail)
127 {
128 var update = detail.name;
129- if ( update == "" ) update = "Choose Playlist";
130+ if ( update == "" ) update = _("Choose Playlist");
131 this.root_item.property_set (MENUITEM_PROP_LABEL, update);
132 this.root_item.property_set (MENUITEM_PATH, detail.path);
133 }
134
135=== modified file 'src/sound-service.c'
136--- src/sound-service.c 2011-03-16 12:38:04 +0000
137+++ src/sound-service.c 2011-03-17 16:17:30 +0000
138@@ -51,11 +51,11 @@
139 int
140 main (int argc, char ** argv)
141 {
142+
143 g_type_init();
144-
145+ textdomain (GETTEXT_PACKAGE);
146+ bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
147 setlocale (LC_ALL, "");
148- bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
149- textdomain (GETTEXT_PACKAGE);
150
151 IndicatorService *service = indicator_service_new_version(INDICATOR_SOUND_DBUS_NAME,
152 INDICATOR_SOUND_DBUS_VERSION);
153
154=== added file 'vapi/config.vapi'
155--- vapi/config.vapi 1970-01-01 00:00:00 +0000
156+++ vapi/config.vapi 2011-03-17 16:17:30 +0000
157@@ -0,0 +1,8 @@
158+[CCode (cprefix = "", lower_case_cprefix = "", cheader_filename = "../config.h")]
159+namespace Config {
160+ public const string GETTEXT_PACKAGE;
161+ public const string LOCALEDIR;
162+ public const string PKGDATADIR;
163+ public const string PACKAGE_NAME;
164+ public const string PACKAGE_VERSION;
165+}

Subscribers

People subscribed via source and target branches