Merge lp:~unity-team/unity-lens-applications/i18n into lp:unity-lens-applications
- i18n
- Merge into trunk
Proposed by
Mikkel Kamstrup Erlandsen
Status: | Merged |
---|---|
Merged at revision: | 74 |
Proposed branch: | lp:~unity-team/unity-lens-applications/i18n |
Merge into: | lp:unity-lens-applications |
Diff against target: |
355 lines (+107/-54) 7 files modified
Makefile.am (+2/-2) configure.ac (+51/-14) po/POTFILES.in (+5/-0) po/POTFILES.skip (+4/-0) src/Makefile.am (+7/-3) src/daemon.vala (+36/-33) src/main.vala (+2/-2) |
To merge this branch: | bzr merge lp:~unity-team/unity-lens-applications/i18n |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Neil J. Patel (community) | Needs Fixing | ||
Review via email:
|
Commit message
Description of the change
Adds i18n support and marks all user visible strings for translation. Distcheck is passing.
To post a comment you must log in.
- 76. By Mikkel Kamstrup Erlandsen
-
Add AM_GLIB_GNU_GETTEXT
Prettify autoconf message
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Mikkel Kamstrup Erlandsen (kamstrup) wrote : | # |
I added the AM_GLIB_GNU_GETTEXT macro, but not the first ALL_LINGUAS one - as discussed on IRC
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 2010-07-22 16:33:41 +0000 | |||
3 | +++ Makefile.am 2010-08-23 14:42:46 +0000 | |||
4 | @@ -1,4 +1,4 @@ | |||
6 | 1 | SUBDIRS = src data | 1 | SUBDIRS = src data po |
7 | 2 | 2 | ||
8 | 3 | # | 3 | # |
9 | 4 | # Install the applications.place file | 4 | # Install the applications.place file |
10 | @@ -7,7 +7,7 @@ | |||
11 | 7 | applications_place_DATA = applications.place | 7 | applications_place_DATA = applications.place |
12 | 8 | 8 | ||
13 | 9 | 9 | ||
15 | 10 | DISTCHECK_CONFIGURE_FLAGS = | 10 | DISTCHECK_CONFIGURE_FLAGS = --enable-localinstall |
16 | 11 | 11 | ||
17 | 12 | # ChangeLog file created at distcheck time | 12 | # ChangeLog file created at distcheck time |
18 | 13 | dist-hook: | 13 | dist-hook: |
19 | 14 | 14 | ||
20 | === modified file 'configure.ac' | |||
21 | --- configure.ac 2010-08-19 14:40:28 +0000 | |||
22 | +++ configure.ac 2010-08-23 14:42:46 +0000 | |||
23 | @@ -3,14 +3,18 @@ | |||
24 | 3 | 3 | ||
25 | 4 | AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) | 4 | AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) |
26 | 5 | 5 | ||
28 | 6 | dnl Silent build rules | 6 | ############################################# |
29 | 7 | # Silent build rules | ||
30 | 8 | ############################################# | ||
31 | 7 | m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) | 9 | m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) |
32 | 8 | 10 | ||
33 | 9 | AC_PREREQ(2.59) | 11 | AC_PREREQ(2.59) |
34 | 10 | 12 | ||
35 | 11 | AC_CONFIG_HEADERS([config.h]) | 13 | AC_CONFIG_HEADERS([config.h]) |
36 | 12 | 14 | ||
38 | 13 | dnl Init the other things we depend on | 15 | ############################################# |
39 | 16 | # Init the other things we depend on | ||
40 | 17 | ############################################# | ||
41 | 14 | AM_MAINTAINER_MODE | 18 | AM_MAINTAINER_MODE |
42 | 15 | AM_PROG_VALAC([0.8.0]) | 19 | AM_PROG_VALAC([0.8.0]) |
43 | 16 | AS_IF([test -z "$VALAC"], [AC_MSG_ERROR(["No valac compiler found."])]) | 20 | AS_IF([test -z "$VALAC"], [AC_MSG_ERROR(["No valac compiler found."])]) |
44 | @@ -21,11 +25,26 @@ | |||
45 | 21 | LT_INIT | 25 | LT_INIT |
46 | 22 | AC_CONFIG_MACRO_DIR([m4]) | 26 | AC_CONFIG_MACRO_DIR([m4]) |
47 | 23 | 27 | ||
48 | 28 | ############################################# | ||
49 | 29 | # Gettext | ||
50 | 30 | ############################################# | ||
51 | 31 | GETTEXT_PACKAGE="$PACKAGE" | ||
52 | 32 | AC_SUBST(GETTEXT_PACKAGE) | ||
53 | 33 | AC_SUBST([CONFIG_STATUS_DEPENDENCIES],['$(top_srcdir)/po/LINGUAS']) | ||
54 | 34 | AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [gettext domain]) | ||
55 | 35 | AM_GNU_GETTEXT([external]) | ||
56 | 36 | AM_GNU_GETTEXT_VERSION([0.17]) | ||
57 | 37 | IT_PROG_INTLTOOL([0.35.0]) | ||
58 | 38 | |||
59 | 24 | AC_DEFINE_UNQUOTED(LOCALE_DIR, "${PREFIX}/${DATADIRNAME}/locale",[Locale directory]) | 39 | AC_DEFINE_UNQUOTED(LOCALE_DIR, "${PREFIX}/${DATADIRNAME}/locale",[Locale directory]) |
60 | 25 | AC_DEFINE_UNQUOTED(DATADIR, "${PREFIX}/${DATADIRNAME}",[Data directory]) | 40 | AC_DEFINE_UNQUOTED(DATADIR, "${PREFIX}/${DATADIRNAME}",[Data directory]) |
61 | 26 | AC_DEFINE_UNQUOTED(PREFIXDIR, "${PREFIX}",[Prefix directory]) | 41 | AC_DEFINE_UNQUOTED(PREFIXDIR, "${PREFIX}",[Prefix directory]) |
62 | 27 | 42 | ||
64 | 28 | dnl Check for module and library dependancies | 43 | AM_GLIB_GNU_GETTEXT |
65 | 44 | |||
66 | 45 | ############################################# | ||
67 | 46 | # Check for module and library dependancies | ||
68 | 47 | ############################################# | ||
69 | 29 | GLIB_REQUIRED=2.22 | 48 | GLIB_REQUIRED=2.22 |
70 | 30 | PKG_CHECK_MODULES(PLACE_DAEMON, | 49 | PKG_CHECK_MODULES(PLACE_DAEMON, |
71 | 31 | glib-2.0 >= $GLIB_REQUIRED | 50 | glib-2.0 >= $GLIB_REQUIRED |
72 | @@ -41,31 +60,47 @@ | |||
73 | 41 | AC_SUBST(PLACE_DAEMON_CFLAGS) | 60 | AC_SUBST(PLACE_DAEMON_CFLAGS) |
74 | 42 | AC_SUBST(PLACE_DAEMON_LIBS) | 61 | AC_SUBST(PLACE_DAEMON_LIBS) |
75 | 43 | 62 | ||
77 | 44 | dnl Expand variables needed for config.vala | 63 | ############################################# |
78 | 64 | # local install for distcheck and stand-alone running | ||
79 | 65 | ############################################# | ||
80 | 66 | with_localinstall="no" | ||
81 | 67 | AC_ARG_ENABLE(localinstall, | ||
82 | 68 | AS_HELP_STRING([--enable-localinstall], | ||
83 | 69 | [Install all of the files locally instead of in system directories (for distcheck)]), | ||
84 | 70 | with_localinstall=$enableval, | ||
85 | 71 | with_localinstall=no) | ||
86 | 72 | |||
87 | 73 | AM_CONDITIONAL([HAVE_LOCALINSTALL], [test "x$with_localinstall" = "xyes"]) | ||
88 | 74 | |||
89 | 75 | ############################################# | ||
90 | 76 | # Expand variables needed for config.vala | ||
91 | 77 | ############################################# | ||
92 | 45 | AS_AC_EXPAND(PREFIX, $prefix) | 78 | AS_AC_EXPAND(PREFIX, $prefix) |
93 | 46 | AC_SUBST(PREFIX) | 79 | AC_SUBST(PREFIX) |
94 | 47 | 80 | ||
95 | 48 | AS_AC_EXPAND(DATADIR, $datarootdir) | 81 | AS_AC_EXPAND(DATADIR, $datarootdir) |
96 | 49 | AC_SUBST(DATADIR) | 82 | AC_SUBST(DATADIR) |
97 | 50 | 83 | ||
107 | 51 | dnl look for dbus service dir | 84 | ############################################# |
108 | 52 | DBUSSERVICEDIR=`$PKG_CONFIG --variable=session_bus_services_dir dbus-1` | 85 | # look for dbus service dir |
109 | 53 | AC_ARG_WITH([dbus-services], | 86 | ############################################# |
110 | 54 | AC_HELP_STRING([--with-dbus-services=DBUS_SERVICES], | 87 | if test "x$with_localinstall" = "xyes"; then |
111 | 55 | [specify a directory to store dbus service files.]), | 88 | DBUSSERVICEDIR="${datadir}/dbus-1/services/" |
112 | 56 | [ | 89 | else |
113 | 57 | DBUSSERVICEDIR=$withval | 90 | DBUSSERVICEDIR=`$PKG_CONFIG --variable=session_bus_services_dir dbus-1` |
114 | 58 | ] | 91 | fi |
106 | 59 | ) | ||
115 | 60 | AC_SUBST(DBUSSERVICEDIR) | 92 | AC_SUBST(DBUSSERVICEDIR) |
116 | 61 | 93 | ||
118 | 62 | dnl Create the Makefiles | 94 | ############################################# |
119 | 95 | # Create the Makefiles | ||
120 | 96 | ############################################# | ||
121 | 63 | AC_CONFIG_FILES([ | 97 | AC_CONFIG_FILES([ |
122 | 64 | Makefile | 98 | Makefile |
123 | 65 | applications.place | 99 | applications.place |
124 | 66 | data/Makefile | 100 | data/Makefile |
125 | 67 | src/Makefile | 101 | src/Makefile |
126 | 68 | src/config.vala | 102 | src/config.vala |
127 | 103 | po/Makefile.in | ||
128 | 69 | ]) | 104 | ]) |
129 | 70 | AC_OUTPUT | 105 | AC_OUTPUT |
130 | 71 | 106 | ||
131 | @@ -76,6 +111,8 @@ | |||
132 | 76 | ------------------------------------ | 111 | ------------------------------------ |
133 | 77 | 112 | ||
134 | 78 | Prefix : ${prefix} | 113 | Prefix : ${prefix} |
135 | 114 | |||
136 | 115 | Local install : ${with_localinstall} | ||
137 | 79 | 116 | ||
138 | 80 | Extra CFlags : ${CPPFLAGS} $MAINTAINER_CFLAGS | 117 | Extra CFlags : ${CPPFLAGS} $MAINTAINER_CFLAGS |
139 | 81 | Extra ValaFlags: ${CPPFLAGS} $MAINTAINER_VALAFLAGS | 118 | Extra ValaFlags: ${CPPFLAGS} $MAINTAINER_VALAFLAGS |
140 | 82 | 119 | ||
141 | === added directory 'po' | |||
142 | === added file 'po/LINGUAS' | |||
143 | === added file 'po/POTFILES.in' | |||
144 | --- po/POTFILES.in 1970-01-01 00:00:00 +0000 | |||
145 | +++ po/POTFILES.in 2010-08-23 14:42:46 +0000 | |||
146 | @@ -0,0 +1,5 @@ | |||
147 | 1 | [encoding: UTF-8] | ||
148 | 2 | src/daemon.vala | ||
149 | 3 | src/utils.vala | ||
150 | 4 | src/main.vala | ||
151 | 5 | |||
152 | 0 | 6 | ||
153 | === added file 'po/POTFILES.skip' | |||
154 | --- po/POTFILES.skip 1970-01-01 00:00:00 +0000 | |||
155 | +++ po/POTFILES.skip 2010-08-23 14:42:46 +0000 | |||
156 | @@ -0,0 +1,4 @@ | |||
157 | 1 | src/main.c | ||
158 | 2 | src/daemon.c | ||
159 | 3 | src/utils.c | ||
160 | 4 | |||
161 | 0 | 5 | ||
162 | === modified file 'src/Makefile.am' | |||
163 | --- src/Makefile.am 2010-07-23 11:24:07 +0000 | |||
164 | +++ src/Makefile.am 2010-08-23 14:42:46 +0000 | |||
165 | @@ -53,19 +53,23 @@ | |||
166 | 53 | utils.vala \ | 53 | utils.vala \ |
167 | 54 | $(NULL) | 54 | $(NULL) |
168 | 55 | 55 | ||
171 | 56 | unity-package-search.o : unity-package-search.cc | 56 | unity-package-search.o : $(srcdir)/unity-package-search.cc $(srcdir)/unity-package-search.h |
172 | 57 | g++ $(unity_package_search_libs) `pkg-config --cflags --libs glib-2.0` -c unity-package-search.cc unity-package-search.h | 57 | g++ $(unity_package_search_libs) `pkg-config --cflags --libs glib-2.0` -c $(srcdir)/unity-package-search.cc |
173 | 58 | 58 | ||
174 | 59 | unity_applications_daemon_SOURCES = \ | 59 | unity_applications_daemon_SOURCES = \ |
175 | 60 | $(unity_applications_daemon_VALASOURCES:.vala=.c) \ | 60 | $(unity_applications_daemon_VALASOURCES:.vala=.c) \ |
176 | 61 | unity-package-search.h \ | 61 | unity-package-search.h \ |
177 | 62 | $(NULL) | 62 | $(NULL) |
178 | 63 | 63 | ||
180 | 64 | BUILT_SOURCES += unity_applications_daemon.vala.stamp | 64 | BUILT_SOURCES += \ |
181 | 65 | unity_applications_daemon.vala.stamp \ | ||
182 | 66 | $(NULL) | ||
183 | 67 | |||
184 | 65 | EXTRA_DIST += \ | 68 | EXTRA_DIST += \ |
185 | 66 | unity_applications_daemon.vala.stamp \ | 69 | unity_applications_daemon.vala.stamp \ |
186 | 67 | $(unity_applications_daemon_VALASOURCES) \ | 70 | $(unity_applications_daemon_VALASOURCES) \ |
187 | 68 | unity-package-search.cc \ | 71 | unity-package-search.cc \ |
188 | 72 | unity-package-search.h \ | ||
189 | 69 | $(NULL) | 73 | $(NULL) |
190 | 70 | 74 | ||
191 | 71 | # Major hack alert: https://bugzilla.gnome.org/show_bug.cgi?id=621292 | 75 | # Major hack alert: https://bugzilla.gnome.org/show_bug.cgi?id=621292 |
192 | 72 | 76 | ||
193 | === modified file 'src/daemon.vala' | |||
194 | --- src/daemon.vala 2010-08-23 09:52:14 +0000 | |||
195 | +++ src/daemon.vala 2010-08-23 14:42:46 +0000 | |||
196 | @@ -220,19 +220,19 @@ | |||
197 | 220 | sections.clear (); | 220 | sections.clear (); |
198 | 221 | } | 221 | } |
199 | 222 | 222 | ||
213 | 223 | sections.append (SectionsColumn.DISPLAY_NAME, "All Applications", | 223 | sections.append (SectionsColumn.DISPLAY_NAME, _("All Applications"), |
214 | 224 | SectionsColumn.ICON_HINT, "", -1); | 224 | SectionsColumn.ICON_HINT, "", -1); |
215 | 225 | sections.append (SectionsColumn.DISPLAY_NAME, "Accessories", | 225 | sections.append (SectionsColumn.DISPLAY_NAME, _("Accessories"), |
216 | 226 | SectionsColumn.ICON_HINT, "", -1); | 226 | SectionsColumn.ICON_HINT, "", -1); |
217 | 227 | sections.append (SectionsColumn.DISPLAY_NAME, "Games", | 227 | sections.append (SectionsColumn.DISPLAY_NAME, _("Games"), |
218 | 228 | SectionsColumn.ICON_HINT, "", -1); | 228 | SectionsColumn.ICON_HINT, "", -1); |
219 | 229 | sections.append (SectionsColumn.DISPLAY_NAME, "Internet", | 229 | sections.append (SectionsColumn.DISPLAY_NAME, _("Internet"), |
220 | 230 | SectionsColumn.ICON_HINT, "", -1); | 230 | SectionsColumn.ICON_HINT, "", -1); |
221 | 231 | sections.append (SectionsColumn.DISPLAY_NAME, "Media", | 231 | sections.append (SectionsColumn.DISPLAY_NAME, _("Media"), |
222 | 232 | SectionsColumn.ICON_HINT, "", -1); | 232 | SectionsColumn.ICON_HINT, "", -1); |
223 | 233 | sections.append (SectionsColumn.DISPLAY_NAME, "Office", | 233 | sections.append (SectionsColumn.DISPLAY_NAME, _("Office"), |
224 | 234 | SectionsColumn.ICON_HINT, "", -1); | 234 | SectionsColumn.ICON_HINT, "", -1); |
225 | 235 | sections.append (SectionsColumn.DISPLAY_NAME, "System", | 235 | sections.append (SectionsColumn.DISPLAY_NAME, _("System"), |
226 | 236 | SectionsColumn.ICON_HINT, "", -1); | 236 | SectionsColumn.ICON_HINT, "", -1); |
227 | 237 | } | 237 | } |
228 | 238 | 238 | ||
229 | @@ -248,19 +248,19 @@ | |||
230 | 248 | 248 | ||
231 | 249 | // FIXME: Bigger tiles for most used group | 249 | // FIXME: Bigger tiles for most used group |
232 | 250 | groups.append (GroupsColumn.RENDERER, "UnityDefaultRenderer", | 250 | groups.append (GroupsColumn.RENDERER, "UnityDefaultRenderer", |
240 | 251 | GroupsColumn.DISPLAY_NAME, "Most Used", | 251 | GroupsColumn.DISPLAY_NAME, _("Most Used"), |
241 | 252 | GroupsColumn.ICON_HINT, "", -1); | 252 | GroupsColumn.ICON_HINT, "", -1); |
242 | 253 | groups.append (GroupsColumn.RENDERER, "UnityDefaultRenderer", | 253 | groups.append (GroupsColumn.RENDERER, "UnityDefaultRenderer", |
243 | 254 | GroupsColumn.DISPLAY_NAME, "Installed", | 254 | GroupsColumn.DISPLAY_NAME, _("Installed"), |
244 | 255 | GroupsColumn.ICON_HINT, "", -1); | 255 | GroupsColumn.ICON_HINT, "", -1); |
245 | 256 | groups.append (GroupsColumn.RENDERER, "UnityDefaultRenderer", | 256 | groups.append (GroupsColumn.RENDERER, "UnityDefaultRenderer", |
246 | 257 | GroupsColumn.DISPLAY_NAME, "Available", | 257 | GroupsColumn.DISPLAY_NAME, _("Available"), |
247 | 258 | GroupsColumn.ICON_HINT, "", -1); | 258 | GroupsColumn.ICON_HINT, "", -1); |
248 | 259 | groups.append (GroupsColumn.RENDERER, "UnityEmptySearchRenderer", | 259 | groups.append (GroupsColumn.RENDERER, "UnityEmptySearchRenderer", |
250 | 260 | GroupsColumn.DISPLAY_NAME, "No search results", | 260 | GroupsColumn.DISPLAY_NAME, "No search results", // No i18n, should never be rendered |
251 | 261 | GroupsColumn.ICON_HINT, "", -1); | 261 | GroupsColumn.ICON_HINT, "", -1); |
252 | 262 | groups.append (GroupsColumn.RENDERER, "UnityEmptySectionRenderer", | 262 | groups.append (GroupsColumn.RENDERER, "UnityEmptySectionRenderer", |
254 | 263 | GroupsColumn.DISPLAY_NAME, "Empty section", | 263 | GroupsColumn.DISPLAY_NAME, "Empty section", // No i18n, should never be rendered |
255 | 264 | GroupsColumn.ICON_HINT, "", -1); | 264 | GroupsColumn.ICON_HINT, "", -1); |
256 | 265 | 265 | ||
257 | 266 | /* Always expand the Installed group */ | 266 | /* Always expand the Installed group */ |
258 | @@ -270,6 +270,7 @@ | |||
259 | 270 | 270 | ||
260 | 271 | private void populate_section_queries () | 271 | private void populate_section_queries () |
261 | 272 | { | 272 | { |
262 | 273 | /* XDG category names. Not for translation */ | ||
263 | 273 | section_queries.add (""); //ALL_APPLICATIONS | 274 | section_queries.add (""); //ALL_APPLICATIONS |
264 | 274 | section_queries.add ("category:Utility"); //ACCESSORIES | 275 | section_queries.add ("category:Utility"); //ACCESSORIES |
265 | 275 | section_queries.add ("category:Game"); //GAMES | 276 | section_queries.add ("category:Game"); //GAMES |
266 | @@ -281,6 +282,7 @@ | |||
267 | 281 | 282 | ||
268 | 282 | private void populate_section_categories () | 283 | private void populate_section_categories () |
269 | 283 | { | 284 | { |
270 | 285 | /* XDG category names. Not for translation */ | ||
271 | 284 | //ALL_APPLICATIONS | 286 | //ALL_APPLICATIONS |
272 | 285 | Set<string> cat = new TreeSet<string>(); | 287 | Set<string> cat = new TreeSet<string>(); |
273 | 286 | cat.add ("AudioVideo"); | 288 | cat.add ("AudioVideo"); |
274 | @@ -769,7 +771,7 @@ | |||
275 | 769 | ResultsColumn.ICON_HINT, "", | 771 | ResultsColumn.ICON_HINT, "", |
276 | 770 | ResultsColumn.GROUP_ID, Group.EMPTY_SEARCH, | 772 | ResultsColumn.GROUP_ID, Group.EMPTY_SEARCH, |
277 | 771 | ResultsColumn.MIMETYPE, "", | 773 | ResultsColumn.MIMETYPE, "", |
279 | 772 | ResultsColumn.DISPLAY_NAME, "You search did not match any applications", | 774 | ResultsColumn.DISPLAY_NAME, _("You search did not match any applications"), |
280 | 773 | ResultsColumn.COMMENT, "", | 775 | ResultsColumn.COMMENT, "", |
281 | 774 | -1); | 776 | -1); |
282 | 775 | 777 | ||
283 | @@ -779,7 +781,7 @@ | |||
284 | 779 | ResultsColumn.ICON_HINT, "", | 781 | ResultsColumn.ICON_HINT, "", |
285 | 780 | ResultsColumn.GROUP_ID, Group.EMPTY_SEARCH, | 782 | ResultsColumn.GROUP_ID, Group.EMPTY_SEARCH, |
286 | 781 | ResultsColumn.MIMETYPE, "", | 783 | ResultsColumn.MIMETYPE, "", |
288 | 782 | ResultsColumn.DISPLAY_NAME, "Search the web", | 784 | ResultsColumn.DISPLAY_NAME, _("Search the web"), |
289 | 783 | ResultsColumn.COMMENT, "", | 785 | ResultsColumn.COMMENT, "", |
290 | 784 | -1); | 786 | -1); |
291 | 785 | } | 787 | } |
292 | @@ -795,28 +797,29 @@ | |||
293 | 795 | switch (section) | 797 | switch (section) |
294 | 796 | { | 798 | { |
295 | 797 | case Section.ALL_APPLICATIONS: | 799 | case Section.ALL_APPLICATIONS: |
297 | 798 | section_name = "applications"; | 800 | section_name = _("applications"); |
298 | 799 | break; | 801 | break; |
299 | 800 | case Section.ACCESSORIES: | 802 | case Section.ACCESSORIES: |
301 | 801 | section_name = "accessories"; | 803 | section_name = _("accessories"); |
302 | 802 | break; | 804 | break; |
303 | 803 | case Section.GAMES: | 805 | case Section.GAMES: |
305 | 804 | section_name = "games"; | 806 | section_name = _("games"); |
306 | 805 | break; | 807 | break; |
307 | 806 | case Section.INTERNET: | 808 | case Section.INTERNET: |
309 | 807 | section_name = "internet applications"; | 809 | section_name = _("internet applications"); |
310 | 808 | break; | 810 | break; |
311 | 809 | case Section.MEDIA: | 811 | case Section.MEDIA: |
313 | 810 | section_name = "media applications"; | 812 | section_name = _("media applications"); |
314 | 811 | break; | 813 | break; |
315 | 812 | case Section.OFFICE: | 814 | case Section.OFFICE: |
317 | 813 | section_name = "office applications"; | 815 | section_name = _("office applications"); |
318 | 814 | break; | 816 | break; |
319 | 815 | case Section.SYSTEM: | 817 | case Section.SYSTEM: |
321 | 816 | section_name = "system applications"; | 818 | section_name = _("system applications"); |
322 | 817 | break; | 819 | break; |
323 | 818 | default: | 820 | default: |
325 | 819 | section_name = "applications"; | 821 | section_name = _("applications"); |
326 | 822 | warning ("Unknown section: %u", section); | ||
327 | 820 | break; | 823 | break; |
328 | 821 | } | 824 | } |
329 | 822 | 825 | ||
330 | @@ -824,7 +827,7 @@ | |||
331 | 824 | ResultsColumn.ICON_HINT, "", | 827 | ResultsColumn.ICON_HINT, "", |
332 | 825 | ResultsColumn.GROUP_ID, Group.EMPTY_SECTION, | 828 | ResultsColumn.GROUP_ID, Group.EMPTY_SECTION, |
333 | 826 | ResultsColumn.MIMETYPE, "", | 829 | ResultsColumn.MIMETYPE, "", |
335 | 827 | ResultsColumn.DISPLAY_NAME, @"There are no $section_name installed on this computer", | 830 | ResultsColumn.DISPLAY_NAME, _(@"There are no $section_name installed on this computer"), /* TRANSLATORS: section_name is plural */ |
336 | 828 | ResultsColumn.COMMENT, "", | 831 | ResultsColumn.COMMENT, "", |
337 | 829 | -1); | 832 | -1); |
338 | 830 | } | 833 | } |
339 | 831 | 834 | ||
340 | === modified file 'src/main.vala' | |||
341 | --- src/main.vala 2010-08-23 09:43:38 +0000 | |||
342 | +++ src/main.vala 2010-08-23 14:42:46 +0000 | |||
343 | @@ -46,11 +46,11 @@ | |||
344 | 46 | } | 46 | } |
345 | 47 | else | 47 | else |
346 | 48 | { | 48 | { |
348 | 49 | print ("Another Applications Place daemon appears to be running.\nBailing out."); | 49 | print (_("Another Applications Place daemon appears to be running.\nBailing out.")); |
349 | 50 | return 1; | 50 | return 1; |
350 | 51 | } | 51 | } |
351 | 52 | } catch (DBus.Error error) { | 52 | } catch (DBus.Error error) { |
353 | 53 | GLib.error ("Error connecting to session bus: %s.\nBailing out.", error.message); | 53 | print (_("Error connecting to session bus: %s.\nBailing out."), error.message); |
354 | 54 | return 2; | 54 | return 2; |
355 | 55 | } | 55 | } |
356 | 56 | 56 |
Looks good, though I think we're both missing:
ALL_LINGUAS="`cat "$srcdir/ po/LINGUAS" | grep -v '^#'`"
and
AM_GLIB_GNU_GETTEXT
in configure.ac, the former will actually load all the translations and the latter will do some glib gettext magic