Merge lp:~unity-team/unity-lens-applications/i18n into lp:unity-lens-applications

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
Reviewer Review Type Date Requested Status
Neil J. Patel (community) Needs Fixing
Review via email: mp+33381@code.launchpad.net

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.
Revision history for this message
Neil J. Patel (njpatel) wrote :

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

review: Needs Fixing
76. By Mikkel Kamstrup Erlandsen

Add AM_GLIB_GNU_GETTEXT

Prettify autoconf message

Revision history for this message
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
=== modified file 'Makefile.am'
--- Makefile.am 2010-07-22 16:33:41 +0000
+++ Makefile.am 2010-08-23 14:42:46 +0000
@@ -1,4 +1,4 @@
1SUBDIRS = src data1SUBDIRS = src data po
22
3#3#
4# Install the applications.place file4# Install the applications.place file
@@ -7,7 +7,7 @@
7applications_place_DATA = applications.place7applications_place_DATA = applications.place
88
99
10DISTCHECK_CONFIGURE_FLAGS = 10DISTCHECK_CONFIGURE_FLAGS = --enable-localinstall
1111
12# ChangeLog file created at distcheck time12# ChangeLog file created at distcheck time
13dist-hook:13dist-hook:
1414
=== modified file 'configure.ac'
--- configure.ac 2010-08-19 14:40:28 +0000
+++ configure.ac 2010-08-23 14:42:46 +0000
@@ -3,14 +3,18 @@
33
4AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)4AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
55
6dnl Silent build rules6#############################################
7# Silent build rules
8#############################################
7m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])9m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
810
9AC_PREREQ(2.59)11AC_PREREQ(2.59)
1012
11AC_CONFIG_HEADERS([config.h])13AC_CONFIG_HEADERS([config.h])
1214
13dnl Init the other things we depend on15#############################################
16# Init the other things we depend on
17#############################################
14AM_MAINTAINER_MODE18AM_MAINTAINER_MODE
15AM_PROG_VALAC([0.8.0])19AM_PROG_VALAC([0.8.0])
16AS_IF([test -z "$VALAC"], [AC_MSG_ERROR(["No valac compiler found."])])20AS_IF([test -z "$VALAC"], [AC_MSG_ERROR(["No valac compiler found."])])
@@ -21,11 +25,26 @@
21LT_INIT25LT_INIT
22AC_CONFIG_MACRO_DIR([m4])26AC_CONFIG_MACRO_DIR([m4])
2327
28#############################################
29# Gettext
30#############################################
31GETTEXT_PACKAGE="$PACKAGE"
32AC_SUBST(GETTEXT_PACKAGE)
33AC_SUBST([CONFIG_STATUS_DEPENDENCIES],['$(top_srcdir)/po/LINGUAS'])
34AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [gettext domain])
35AM_GNU_GETTEXT([external])
36AM_GNU_GETTEXT_VERSION([0.17])
37IT_PROG_INTLTOOL([0.35.0])
38
24AC_DEFINE_UNQUOTED(LOCALE_DIR, "${PREFIX}/${DATADIRNAME}/locale",[Locale directory])39AC_DEFINE_UNQUOTED(LOCALE_DIR, "${PREFIX}/${DATADIRNAME}/locale",[Locale directory])
25AC_DEFINE_UNQUOTED(DATADIR, "${PREFIX}/${DATADIRNAME}",[Data directory])40AC_DEFINE_UNQUOTED(DATADIR, "${PREFIX}/${DATADIRNAME}",[Data directory])
26AC_DEFINE_UNQUOTED(PREFIXDIR, "${PREFIX}",[Prefix directory])41AC_DEFINE_UNQUOTED(PREFIXDIR, "${PREFIX}",[Prefix directory])
2742
28dnl Check for module and library dependancies43AM_GLIB_GNU_GETTEXT
44
45#############################################
46# Check for module and library dependancies
47#############################################
29GLIB_REQUIRED=2.2248GLIB_REQUIRED=2.22
30PKG_CHECK_MODULES(PLACE_DAEMON,49PKG_CHECK_MODULES(PLACE_DAEMON,
31 glib-2.0 >= $GLIB_REQUIRED50 glib-2.0 >= $GLIB_REQUIRED
@@ -41,31 +60,47 @@
41AC_SUBST(PLACE_DAEMON_CFLAGS)60AC_SUBST(PLACE_DAEMON_CFLAGS)
42AC_SUBST(PLACE_DAEMON_LIBS)61AC_SUBST(PLACE_DAEMON_LIBS)
4362
44dnl Expand variables needed for config.vala63#############################################
64# local install for distcheck and stand-alone running
65#############################################
66with_localinstall="no"
67AC_ARG_ENABLE(localinstall,
68 AS_HELP_STRING([--enable-localinstall],
69 [Install all of the files locally instead of in system directories (for distcheck)]),
70 with_localinstall=$enableval,
71 with_localinstall=no)
72
73AM_CONDITIONAL([HAVE_LOCALINSTALL], [test "x$with_localinstall" = "xyes"])
74
75#############################################
76# Expand variables needed for config.vala
77#############################################
45AS_AC_EXPAND(PREFIX, $prefix)78AS_AC_EXPAND(PREFIX, $prefix)
46AC_SUBST(PREFIX)79AC_SUBST(PREFIX)
4780
48AS_AC_EXPAND(DATADIR, $datarootdir)81AS_AC_EXPAND(DATADIR, $datarootdir)
49AC_SUBST(DATADIR)82AC_SUBST(DATADIR)
5083
51dnl look for dbus service dir84#############################################
52DBUSSERVICEDIR=`$PKG_CONFIG --variable=session_bus_services_dir dbus-1`85# look for dbus service dir
53AC_ARG_WITH([dbus-services],86#############################################
54 AC_HELP_STRING([--with-dbus-services=DBUS_SERVICES],87if test "x$with_localinstall" = "xyes"; then
55 [specify a directory to store dbus service files.]),88 DBUSSERVICEDIR="${datadir}/dbus-1/services/"
56 [89else
57 DBUSSERVICEDIR=$withval90 DBUSSERVICEDIR=`$PKG_CONFIG --variable=session_bus_services_dir dbus-1`
58 ]91fi
59)
60AC_SUBST(DBUSSERVICEDIR)92AC_SUBST(DBUSSERVICEDIR)
6193
62dnl Create the Makefiles94#############################################
95# Create the Makefiles
96#############################################
63AC_CONFIG_FILES([97AC_CONFIG_FILES([
64 Makefile98 Makefile
65 applications.place99 applications.place
66 data/Makefile100 data/Makefile
67 src/Makefile101 src/Makefile
68 src/config.vala102 src/config.vala
103 po/Makefile.in
69])104])
70AC_OUTPUT105AC_OUTPUT
71106
@@ -76,6 +111,8 @@
76 ------------------------------------111 ------------------------------------
77112
78 Prefix : ${prefix}113 Prefix : ${prefix}
114
115 Local install : ${with_localinstall}
79116
80 Extra CFlags : ${CPPFLAGS} $MAINTAINER_CFLAGS117 Extra CFlags : ${CPPFLAGS} $MAINTAINER_CFLAGS
81 Extra ValaFlags: ${CPPFLAGS} $MAINTAINER_VALAFLAGS118 Extra ValaFlags: ${CPPFLAGS} $MAINTAINER_VALAFLAGS
82119
=== added directory 'po'
=== added file 'po/LINGUAS'
=== added file 'po/POTFILES.in'
--- po/POTFILES.in 1970-01-01 00:00:00 +0000
+++ po/POTFILES.in 2010-08-23 14:42:46 +0000
@@ -0,0 +1,5 @@
1[encoding: UTF-8]
2src/daemon.vala
3src/utils.vala
4src/main.vala
5
06
=== added file 'po/POTFILES.skip'
--- po/POTFILES.skip 1970-01-01 00:00:00 +0000
+++ po/POTFILES.skip 2010-08-23 14:42:46 +0000
@@ -0,0 +1,4 @@
1src/main.c
2src/daemon.c
3src/utils.c
4
05
=== modified file 'src/Makefile.am'
--- src/Makefile.am 2010-07-23 11:24:07 +0000
+++ src/Makefile.am 2010-08-23 14:42:46 +0000
@@ -53,19 +53,23 @@
53 utils.vala \53 utils.vala \
54 $(NULL)54 $(NULL)
5555
56unity-package-search.o : unity-package-search.cc56unity-package-search.o : $(srcdir)/unity-package-search.cc $(srcdir)/unity-package-search.h
57 g++ $(unity_package_search_libs) `pkg-config --cflags --libs glib-2.0` -c unity-package-search.cc unity-package-search.h57 g++ $(unity_package_search_libs) `pkg-config --cflags --libs glib-2.0` -c $(srcdir)/unity-package-search.cc
5858
59unity_applications_daemon_SOURCES = \59unity_applications_daemon_SOURCES = \
60 $(unity_applications_daemon_VALASOURCES:.vala=.c) \60 $(unity_applications_daemon_VALASOURCES:.vala=.c) \
61 unity-package-search.h \61 unity-package-search.h \
62 $(NULL)62 $(NULL)
6363
64BUILT_SOURCES += unity_applications_daemon.vala.stamp64BUILT_SOURCES += \
65 unity_applications_daemon.vala.stamp \
66 $(NULL)
67
65EXTRA_DIST += \68EXTRA_DIST += \
66 unity_applications_daemon.vala.stamp \69 unity_applications_daemon.vala.stamp \
67 $(unity_applications_daemon_VALASOURCES) \70 $(unity_applications_daemon_VALASOURCES) \
68 unity-package-search.cc \71 unity-package-search.cc \
72 unity-package-search.h \
69 $(NULL)73 $(NULL)
7074
71# Major hack alert: https://bugzilla.gnome.org/show_bug.cgi?id=62129275# Major hack alert: https://bugzilla.gnome.org/show_bug.cgi?id=621292
7276
=== modified file 'src/daemon.vala'
--- src/daemon.vala 2010-08-23 09:52:14 +0000
+++ src/daemon.vala 2010-08-23 14:42:46 +0000
@@ -220,19 +220,19 @@
220 sections.clear ();220 sections.clear ();
221 }221 }
222222
223 sections.append (SectionsColumn.DISPLAY_NAME, "All Applications",223 sections.append (SectionsColumn.DISPLAY_NAME, _("All Applications"),
224 SectionsColumn.ICON_HINT, "", -1);224 SectionsColumn.ICON_HINT, "", -1);
225 sections.append (SectionsColumn.DISPLAY_NAME, "Accessories",225 sections.append (SectionsColumn.DISPLAY_NAME, _("Accessories"),
226 SectionsColumn.ICON_HINT, "", -1);226 SectionsColumn.ICON_HINT, "", -1);
227 sections.append (SectionsColumn.DISPLAY_NAME, "Games",227 sections.append (SectionsColumn.DISPLAY_NAME, _("Games"),
228 SectionsColumn.ICON_HINT, "", -1);228 SectionsColumn.ICON_HINT, "", -1);
229 sections.append (SectionsColumn.DISPLAY_NAME, "Internet",229 sections.append (SectionsColumn.DISPLAY_NAME, _("Internet"),
230 SectionsColumn.ICON_HINT, "", -1);230 SectionsColumn.ICON_HINT, "", -1);
231 sections.append (SectionsColumn.DISPLAY_NAME, "Media",231 sections.append (SectionsColumn.DISPLAY_NAME, _("Media"),
232 SectionsColumn.ICON_HINT, "", -1);232 SectionsColumn.ICON_HINT, "", -1);
233 sections.append (SectionsColumn.DISPLAY_NAME, "Office",233 sections.append (SectionsColumn.DISPLAY_NAME, _("Office"),
234 SectionsColumn.ICON_HINT, "", -1);234 SectionsColumn.ICON_HINT, "", -1);
235 sections.append (SectionsColumn.DISPLAY_NAME, "System",235 sections.append (SectionsColumn.DISPLAY_NAME, _("System"),
236 SectionsColumn.ICON_HINT, "", -1);236 SectionsColumn.ICON_HINT, "", -1);
237 }237 }
238238
@@ -248,19 +248,19 @@
248248
249 // FIXME: Bigger tiles for most used group249 // FIXME: Bigger tiles for most used group
250 groups.append (GroupsColumn.RENDERER, "UnityDefaultRenderer",250 groups.append (GroupsColumn.RENDERER, "UnityDefaultRenderer",
251 GroupsColumn.DISPLAY_NAME, "Most Used",251 GroupsColumn.DISPLAY_NAME, _("Most Used"),
252 GroupsColumn.ICON_HINT, "", -1);252 GroupsColumn.ICON_HINT, "", -1);
253 groups.append (GroupsColumn.RENDERER, "UnityDefaultRenderer",253 groups.append (GroupsColumn.RENDERER, "UnityDefaultRenderer",
254 GroupsColumn.DISPLAY_NAME, "Installed",254 GroupsColumn.DISPLAY_NAME, _("Installed"),
255 GroupsColumn.ICON_HINT, "", -1);255 GroupsColumn.ICON_HINT, "", -1);
256 groups.append (GroupsColumn.RENDERER, "UnityDefaultRenderer",256 groups.append (GroupsColumn.RENDERER, "UnityDefaultRenderer",
257 GroupsColumn.DISPLAY_NAME, "Available",257 GroupsColumn.DISPLAY_NAME, _("Available"),
258 GroupsColumn.ICON_HINT, "", -1);258 GroupsColumn.ICON_HINT, "", -1);
259 groups.append (GroupsColumn.RENDERER, "UnityEmptySearchRenderer",259 groups.append (GroupsColumn.RENDERER, "UnityEmptySearchRenderer",
260 GroupsColumn.DISPLAY_NAME, "No search results",260 GroupsColumn.DISPLAY_NAME, "No search results", // No i18n, should never be rendered
261 GroupsColumn.ICON_HINT, "", -1);261 GroupsColumn.ICON_HINT, "", -1);
262 groups.append (GroupsColumn.RENDERER, "UnityEmptySectionRenderer",262 groups.append (GroupsColumn.RENDERER, "UnityEmptySectionRenderer",
263 GroupsColumn.DISPLAY_NAME, "Empty section",263 GroupsColumn.DISPLAY_NAME, "Empty section", // No i18n, should never be rendered
264 GroupsColumn.ICON_HINT, "", -1);264 GroupsColumn.ICON_HINT, "", -1);
265 265
266 /* Always expand the Installed group */266 /* Always expand the Installed group */
@@ -270,6 +270,7 @@
270270
271 private void populate_section_queries ()271 private void populate_section_queries ()
272 {272 {
273 /* XDG category names. Not for translation */
273 section_queries.add (""); //ALL_APPLICATIONS274 section_queries.add (""); //ALL_APPLICATIONS
274 section_queries.add ("category:Utility"); //ACCESSORIES275 section_queries.add ("category:Utility"); //ACCESSORIES
275 section_queries.add ("category:Game"); //GAMES276 section_queries.add ("category:Game"); //GAMES
@@ -281,6 +282,7 @@
281 282
282 private void populate_section_categories ()283 private void populate_section_categories ()
283 {284 {
285 /* XDG category names. Not for translation */
284 //ALL_APPLICATIONS286 //ALL_APPLICATIONS
285 Set<string> cat = new TreeSet<string>();287 Set<string> cat = new TreeSet<string>();
286 cat.add ("AudioVideo");288 cat.add ("AudioVideo");
@@ -769,7 +771,7 @@
769 ResultsColumn.ICON_HINT, "",771 ResultsColumn.ICON_HINT, "",
770 ResultsColumn.GROUP_ID, Group.EMPTY_SEARCH,772 ResultsColumn.GROUP_ID, Group.EMPTY_SEARCH,
771 ResultsColumn.MIMETYPE, "",773 ResultsColumn.MIMETYPE, "",
772 ResultsColumn.DISPLAY_NAME, "You search did not match any applications",774 ResultsColumn.DISPLAY_NAME, _("You search did not match any applications"),
773 ResultsColumn.COMMENT, "",775 ResultsColumn.COMMENT, "",
774 -1); 776 -1);
775 777
@@ -779,7 +781,7 @@
779 ResultsColumn.ICON_HINT, "",781 ResultsColumn.ICON_HINT, "",
780 ResultsColumn.GROUP_ID, Group.EMPTY_SEARCH,782 ResultsColumn.GROUP_ID, Group.EMPTY_SEARCH,
781 ResultsColumn.MIMETYPE, "",783 ResultsColumn.MIMETYPE, "",
782 ResultsColumn.DISPLAY_NAME, "Search the web",784 ResultsColumn.DISPLAY_NAME, _("Search the web"),
783 ResultsColumn.COMMENT, "",785 ResultsColumn.COMMENT, "",
784 -1);786 -1);
785 }787 }
@@ -795,28 +797,29 @@
795 switch (section)797 switch (section)
796 {798 {
797 case Section.ALL_APPLICATIONS:799 case Section.ALL_APPLICATIONS:
798 section_name = "applications";800 section_name = _("applications");
799 break;801 break;
800 case Section.ACCESSORIES:802 case Section.ACCESSORIES:
801 section_name = "accessories";803 section_name = _("accessories");
802 break;804 break;
803 case Section.GAMES:805 case Section.GAMES:
804 section_name = "games";806 section_name = _("games");
805 break;807 break;
806 case Section.INTERNET:808 case Section.INTERNET:
807 section_name = "internet applications";809 section_name = _("internet applications");
808 break;810 break;
809 case Section.MEDIA:811 case Section.MEDIA:
810 section_name = "media applications";812 section_name = _("media applications");
811 break;813 break;
812 case Section.OFFICE:814 case Section.OFFICE:
813 section_name = "office applications";815 section_name = _("office applications");
814 break;816 break;
815 case Section.SYSTEM:817 case Section.SYSTEM:
816 section_name = "system applications";818 section_name = _("system applications");
817 break;819 break;
818 default:820 default:
819 section_name = "applications";821 section_name = _("applications");
822 warning ("Unknown section: %u", section);
820 break;823 break;
821 }824 }
822 825
@@ -824,7 +827,7 @@
824 ResultsColumn.ICON_HINT, "",827 ResultsColumn.ICON_HINT, "",
825 ResultsColumn.GROUP_ID, Group.EMPTY_SECTION,828 ResultsColumn.GROUP_ID, Group.EMPTY_SECTION,
826 ResultsColumn.MIMETYPE, "",829 ResultsColumn.MIMETYPE, "",
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 */
828 ResultsColumn.COMMENT, "",831 ResultsColumn.COMMENT, "",
829 -1);832 -1);
830 }833 }
831834
=== modified file 'src/main.vala'
--- src/main.vala 2010-08-23 09:43:38 +0000
+++ src/main.vala 2010-08-23 14:42:46 +0000
@@ -46,11 +46,11 @@
46 }46 }
47 else47 else
48 {48 {
49 print ("Another Applications Place daemon appears to be running.\nBailing out.");49 print (_("Another Applications Place daemon appears to be running.\nBailing out."));
50 return 1;50 return 1;
51 }51 }
52 } catch (DBus.Error error) {52 } catch (DBus.Error error) {
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);
54 return 2;54 return 2;
55 }55 }
5656

Subscribers

People subscribed via source and target branches