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
1=== modified file '.bzrignore'
2--- .bzrignore 2011-08-22 12:32:00 +0000
3+++ .bzrignore 2011-08-23 21:50:13 +0000
4@@ -203,3 +203,5 @@
5 consolekit-seat-client.h
6 data/com.canonical.indicator.session.gschema.valid
7 data/com.canonical.indicator.session.gschema.xml
8+test-ascii-quotes
9+test-space-ellipsis
10
11=== modified file 'Makefile.am'
12--- Makefile.am 2011-08-20 02:23:14 +0000
13+++ Makefile.am 2011-08-23 21:50:13 +0000
14@@ -35,8 +35,13 @@
15 fi
16
17 TESTS = \
18- test-ellipsis
19+ test-ellipsis \
20+ test-space-ellipsis \
21+ test-ascii-quotes
22
23+#####
24+# Tests for there being proper ellipsis instead of three periods in a row
25+#####
26 test-ellipsis: po
27 @echo "#!/bin/bash" > $@
28 @echo "(cd po && make $(GETTEXT_PACKAGE).pot)" >> $@
29@@ -44,4 +49,26 @@
30 @echo "exit 0" >> $@
31 @chmod +x $@
32
33+#####
34+# Tests for there being a space before an ellipsis
35+#####
36+test-space-ellipsis: po
37+ @echo "#!/bin/bash" > $@
38+ @echo "(cd po && make $(GETTEXT_PACKAGE).pot)" >> $@
39+ @echo "grep -c -e \"^msgid.* …\\\"\" po/$(GETTEXT_PACKAGE).pot > /dev/null && echo \"Space before ellipsis found in user visible strings\" >&2 && exit 1" >> $@
40+ @echo "exit 0" >> $@
41+ @chmod +x $@
42+
43+#####
44+# Tests for ASCII quote types
45+#####
46+test-ascii-quotes: po
47+ @echo "#!/bin/bash" > $@
48+ @echo "(cd po && make $(GETTEXT_PACKAGE).pot)" >> $@
49+ @echo "grep -c -e \"^msgid \\\".*'.*\\\"\" po/$(GETTEXT_PACKAGE).pot > /dev/null && echo \"ASCII apostrophy found in user visible strings\" >&2 && exit 1" >> $@
50+ @echo "grep -c -e \"^msgid \\\".*\\\".*\\\"\" po/$(GETTEXT_PACKAGE).pot > /dev/null && echo \"ASCII quote found in user visible strings\" >&2 && exit 1" >> $@
51+ @echo "grep -c -e \"^msgid \\\".*\\\`.*\\\"\" po/$(GETTEXT_PACKAGE).pot > /dev/null && echo \"ASCII backtick found in user visible strings\" >&2 && exit 1" >> $@
52+ @echo "exit 0" >> $@
53+ @chmod +x $@
54+
55 CLEANFILES = $(TESTS)
56
57=== modified file 'data/com.canonical.indicator.session.gschema.xml.in'
58--- data/com.canonical.indicator.session.gschema.xml.in 2011-08-19 19:32:20 +0000
59+++ data/com.canonical.indicator.session.gschema.xml.in 2011-08-23 21:50:13 +0000
60@@ -8,17 +8,17 @@
61 <key name="suppress-logout-menuitem" type="b">
62 <default>false</default>
63 <_summary>Remove the Log Out item from the session menu</_summary>
64- <_description>Makes it so that the logout button doesn't show in the session menu.</_description>
65+ <_description>Makes it so that the logout button doesn’t show in the session menu.</_description>
66 </key>
67 <key name="suppress-restart-menuitem" type="b">
68 <default>false</default>
69 <_summary>Remove the Restart item from the session menu</_summary>
70- <_description>Makes it so that the restart button doesn't show in the session menu.</_description>
71+ <_description>Makes it so that the restart button doesn’t show in the session menu.</_description>
72 </key>
73 <key name="suppress-shutdown-menuitem" type="b">
74 <default>false</default>
75 <_summary>Remove the shutdown item from the session menu</_summary>
76- <_description>Makes it so that the shutdown button doesn't show in the session menu.</_description>
77+ <_description>Makes it so that the shutdown button doesn’t show in the session menu.</_description>
78 </key>
79 </schema>
80 </schemalist>
81
82=== modified file 'src/dialog.c'
83--- src/dialog.c 2011-08-20 02:23:57 +0000
84+++ src/dialog.c 2011-08-23 21:50:13 +0000
85@@ -62,7 +62,7 @@
86 in place of a log out. */
87 static const gchar * restart_updates = N_("Restart Instead");
88 static const gchar * restart_auth = N_("Restart Instead…");
89-static const gchar * body_logout_update = N_("Some software updates won't apply until the computer next restarts.");
90+static const gchar * body_logout_update = N_("Some software updates won’t apply until the computer next restarts.");
91
92 static const gchar * icon_strings[LOGOUT_DIALOG_TYPE_CNT] = {
93 /* LOGOUT_DIALOG_LOGOUT, */ "system-log-out",
94
95=== modified file 'src/user-menu-mgr.c'
96--- src/user-menu-mgr.c 2011-08-23 11:51:51 +0000
97+++ src/user-menu-mgr.c 2011-08-23 21:50:13 +0000
98@@ -44,6 +44,9 @@
99 static void activate_user_session (DbusmenuMenuitem *mi,
100 guint timestamp,
101 gpointer user_data);
102+static void activate_user_accounts (DbusmenuMenuitem *mi,
103+ guint timestamp,
104+ gpointer user_data);
105 static gint compare_users_by_username (const gchar *a,
106 const gchar *b);
107 static void activate_online_accounts (DbusmenuMenuitem *mi,

Subscribers

People subscribed via source and target branches