Merge lp:~ted/indicator-session/string-checks into lp:indicator-session/0.1

Proposed by Ted Gould
Status: Merged
Merged at revision: 186
Proposed branch: lp:~ted/indicator-session/string-checks
Merge into: lp:indicator-session/0.1
Diff against target: 107 lines (+37/-5)
5 files modified
.bzrignore (+2/-0)
Makefile.am (+28/-1)
data/com.canonical.indicator.session.gschema.xml.in (+3/-3)
src/dialog.c (+1/-1)
src/user-menu-mgr.c (+3/-0)
To merge this branch: bzr merge lp:~ted/indicator-session/string-checks
Reviewer Review Type Date Requested Status
Conor Curran (community) Approve
Review via email: mp+72629@code.launchpad.net

Description of the change

String tests and fixes as discussed on ayatana-dev

To post a comment you must log in.
Revision history for this message
Conor Curran (cjcurran) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file '.bzrignore'
--- .bzrignore 2011-08-22 12:32:00 +0000
+++ .bzrignore 2011-08-23 21:50:13 +0000
@@ -203,3 +203,5 @@
203consolekit-seat-client.h203consolekit-seat-client.h
204data/com.canonical.indicator.session.gschema.valid204data/com.canonical.indicator.session.gschema.valid
205data/com.canonical.indicator.session.gschema.xml205data/com.canonical.indicator.session.gschema.xml
206test-ascii-quotes
207test-space-ellipsis
206208
=== modified file 'Makefile.am'
--- Makefile.am 2011-08-20 02:23:14 +0000
+++ Makefile.am 2011-08-23 21:50:13 +0000
@@ -35,8 +35,13 @@
35 fi35 fi
3636
37TESTS = \37TESTS = \
38 test-ellipsis38 test-ellipsis \
39 test-space-ellipsis \
40 test-ascii-quotes
3941
42#####
43# Tests for there being proper ellipsis instead of three periods in a row
44#####
40test-ellipsis: po45test-ellipsis: po
41 @echo "#!/bin/bash" > $@46 @echo "#!/bin/bash" > $@
42 @echo "(cd po && make $(GETTEXT_PACKAGE).pot)" >> $@47 @echo "(cd po && make $(GETTEXT_PACKAGE).pot)" >> $@
@@ -44,4 +49,26 @@
44 @echo "exit 0" >> $@49 @echo "exit 0" >> $@
45 @chmod +x $@50 @chmod +x $@
4651
52#####
53# Tests for there being a space before an ellipsis
54#####
55test-space-ellipsis: po
56 @echo "#!/bin/bash" > $@
57 @echo "(cd po && make $(GETTEXT_PACKAGE).pot)" >> $@
58 @echo "grep -c -e \"^msgid.* …\\\"\" po/$(GETTEXT_PACKAGE).pot > /dev/null && echo \"Space before ellipsis found in user visible strings\" >&2 && exit 1" >> $@
59 @echo "exit 0" >> $@
60 @chmod +x $@
61
62#####
63# Tests for ASCII quote types
64#####
65test-ascii-quotes: po
66 @echo "#!/bin/bash" > $@
67 @echo "(cd po && make $(GETTEXT_PACKAGE).pot)" >> $@
68 @echo "grep -c -e \"^msgid \\\".*'.*\\\"\" po/$(GETTEXT_PACKAGE).pot > /dev/null && echo \"ASCII apostrophy found in user visible strings\" >&2 && exit 1" >> $@
69 @echo "grep -c -e \"^msgid \\\".*\\\".*\\\"\" po/$(GETTEXT_PACKAGE).pot > /dev/null && echo \"ASCII quote found in user visible strings\" >&2 && exit 1" >> $@
70 @echo "grep -c -e \"^msgid \\\".*\\\`.*\\\"\" po/$(GETTEXT_PACKAGE).pot > /dev/null && echo \"ASCII backtick found in user visible strings\" >&2 && exit 1" >> $@
71 @echo "exit 0" >> $@
72 @chmod +x $@
73
47CLEANFILES = $(TESTS)74CLEANFILES = $(TESTS)
4875
=== modified file 'data/com.canonical.indicator.session.gschema.xml.in'
--- data/com.canonical.indicator.session.gschema.xml.in 2011-08-19 19:32:20 +0000
+++ data/com.canonical.indicator.session.gschema.xml.in 2011-08-23 21:50:13 +0000
@@ -8,17 +8,17 @@
8 <key name="suppress-logout-menuitem" type="b">8 <key name="suppress-logout-menuitem" type="b">
9 <default>false</default>9 <default>false</default>
10 <_summary>Remove the Log Out item from the session menu</_summary>10 <_summary>Remove the Log Out item from the session menu</_summary>
11 <_description>Makes it so that the logout button doesn't show in the session menu.</_description>11 <_description>Makes it so that the logout button doesn’t show in the session menu.</_description>
12 </key>12 </key>
13 <key name="suppress-restart-menuitem" type="b">13 <key name="suppress-restart-menuitem" type="b">
14 <default>false</default>14 <default>false</default>
15 <_summary>Remove the Restart item from the session menu</_summary>15 <_summary>Remove the Restart item from the session menu</_summary>
16 <_description>Makes it so that the restart button doesn't show in the session menu.</_description>16 <_description>Makes it so that the restart button doesn’t show in the session menu.</_description>
17 </key>17 </key>
18 <key name="suppress-shutdown-menuitem" type="b">18 <key name="suppress-shutdown-menuitem" type="b">
19 <default>false</default>19 <default>false</default>
20 <_summary>Remove the shutdown item from the session menu</_summary>20 <_summary>Remove the shutdown item from the session menu</_summary>
21 <_description>Makes it so that the shutdown button doesn't show in the session menu.</_description>21 <_description>Makes it so that the shutdown button doesn’t show in the session menu.</_description>
22 </key>22 </key>
23 </schema>23 </schema>
24</schemalist>24</schemalist>
2525
=== modified file 'src/dialog.c'
--- src/dialog.c 2011-08-20 02:23:57 +0000
+++ src/dialog.c 2011-08-23 21:50:13 +0000
@@ -62,7 +62,7 @@
62 in place of a log out. */62 in place of a log out. */
63static const gchar * restart_updates = N_("Restart Instead");63static const gchar * restart_updates = N_("Restart Instead");
64static const gchar * restart_auth = N_("Restart Instead…");64static const gchar * restart_auth = N_("Restart Instead…");
65static const gchar * body_logout_update = N_("Some software updates won't apply until the computer next restarts.");65static const gchar * body_logout_update = N_("Some software updates won’t apply until the computer next restarts.");
6666
67static const gchar * icon_strings[LOGOUT_DIALOG_TYPE_CNT] = {67static const gchar * icon_strings[LOGOUT_DIALOG_TYPE_CNT] = {
68 /* LOGOUT_DIALOG_LOGOUT, */ "system-log-out",68 /* LOGOUT_DIALOG_LOGOUT, */ "system-log-out",
6969
=== modified file 'src/user-menu-mgr.c'
--- src/user-menu-mgr.c 2011-08-23 11:51:51 +0000
+++ src/user-menu-mgr.c 2011-08-23 21:50:13 +0000
@@ -44,6 +44,9 @@
44static void activate_user_session (DbusmenuMenuitem *mi,44static void activate_user_session (DbusmenuMenuitem *mi,
45 guint timestamp,45 guint timestamp,
46 gpointer user_data);46 gpointer user_data);
47static void activate_user_accounts (DbusmenuMenuitem *mi,
48 guint timestamp,
49 gpointer user_data);
47static gint compare_users_by_username (const gchar *a,50static gint compare_users_by_username (const gchar *a,
48 const gchar *b);51 const gchar *b);
49static void activate_online_accounts (DbusmenuMenuitem *mi,52static void activate_online_accounts (DbusmenuMenuitem *mi,

Subscribers

People subscribed via source and target branches