Merge lp:~evfool/midori/lp699944 into lp:midori

Proposed by Robert Roth
Status: Merged
Approved by: Cris Dywan
Approved revision: 6598
Merged at revision: 6695
Proposed branch: lp:~evfool/midori/lp699944
Merge into: lp:midori
Diff against target: 54 lines (+25/-10)
1 file modified
midori/midori-view.c (+25/-10)
To merge this branch: bzr merge lp:~evfool/midori/lp699944
Reviewer Review Type Date Requested Status
Cris Dywan Approve
Danielle Foré Pending
Review via email: mp+210462@code.launchpad.net

Commit message

Show different messages based on network connectivity.

Description of the change

Show different messages based on network connectivity.
* The messages are the ones proposed by Daniel Fore at https://docs.google.com/document/d/1ToyM9GFw7ULJS7DX-DKYbx1Q1F1oqrsChDf0xNFBzWM/edit
* network availability is checked using the glib functions g_network_monitor_get_network_available for checking if the computer is connected to a wired/wireless network and g_network_monitor_can_reach to check for internet connection settings by checking if www.midori-browser.org is reachable.

To post a comment you must log in.
Revision history for this message
Cris Dywan (kalikiana) wrote :

I feel it's not good to leave out the destination hostname/ URI - whatever the reason a website can't load I get very uneasy if the tab turns into a nameless error tab.

Slight concern on the wording of "there isn't anything located at" - what if the site is temporarily down due to an attack, power outage or whatever?

review: Needs Fixing
Revision history for this message
Danielle Foré (danrabbit) wrote :

Hey Christian and Robert,

I've reworded the messages (on the doc) so that they all contain a reference to the web address.

I've also reworded the "there isn't anything located at" message to a "cannot be found". This is in line with our current messaging.

I'm not sure I feel the bullet points are necessary since this branch reduces the suggestions to one line per message and other alerts seem to include the suggestion as part of the secondary text without bullets.

Christian, can you review the doc so we can give direction to Robert on how you'd like to proceed?

Revision history for this message
Robert Roth (evfool) wrote :

@Christian Dywan (kalikiana) : could you please review the doc again with Daniel's latest changes?

Revision history for this message
Cris Dywan (kalikiana) wrote :

Sorry, I was kinda assuming you would be updating the branch but didn't leave a comment in the doc. I think the updated wording in the docs is much better!

lp:~evfool/midori/lp699944 updated
6596. By Robert Roth

Merged from trunk

6597. By Robert Roth

Updated wording based on latest suggestions

6598. By Robert Roth

Do not use suggestions with single bullet point

Revision history for this message
Robert Roth (evfool) wrote :

Updated the branch:
* merged from the current trunk
* updated wording based on the current suggestions from DanRabbit
* use the single suggestions without bulletpoints, as suggested by DanRabbit in the translation document comments

Revision history for this message
Cris Dywan (kalikiana) wrote :

Very nice stuff!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'midori/midori-view.c'
2--- midori/midori-view.c 2014-04-16 23:19:21 +0000
3+++ midori/midori-view.c 2014-04-28 22:02:09 +0000
4@@ -1203,7 +1203,6 @@
5 #endif
6 gchar* title;
7 gchar* message;
8- GString* suggestions;
9 gboolean result;
10
11 /* The unholy trinity; also ignored in Webkit's default error handler */
12@@ -1218,17 +1217,33 @@
13 return FALSE;
14 }
15
16- title = g_strdup_printf (_("'%s' can't be found"), midori_uri_parse_hostname(uri, NULL));
17- message = g_strdup_printf (_("The page '%s' couldn't be loaded:"), midori_uri_parse_hostname(uri, NULL));
18-
19- suggestions = g_string_new ("<ul id=\"suggestions\"><li>");
20- g_string_append_printf (suggestions, "%s</li><li>%s</li><li>%s</li></ul>",
21- _("Check the address for typos"),
22- _("Make sure that an ethernet cable is plugged in or the wireless card is activated"),
23- _("Verify that your network settings are correct"));
24+ if (!g_network_monitor_get_network_available (g_network_monitor_get_default ()))
25+ {
26+ title = g_strdup_printf (_("You are not connected to a network"));
27+ message = g_strdup_printf (_("Your computer must be connected to a network to reach “%s”. "
28+ "Connect to a wireless access point or attach a network cable and try again."),
29+ midori_uri_parse_hostname(uri, NULL));
30+ }
31+ else if (!g_network_monitor_can_reach (g_network_monitor_get_default (),
32+ g_network_address_parse_uri ("http://midori-browser.org/", 80, NULL),
33+ NULL,
34+ NULL))
35+ {
36+ title = g_strdup_printf (_("You are not connected to the Internet"));
37+ message = g_strdup_printf (_("Your computer appears to be connected to a network, but can't reach “%s”. "
38+ "Check your network settings and try again."),
39+ midori_uri_parse_hostname(uri, NULL));
40+ }
41+ else
42+ {
43+ title = g_strdup_printf (_("Midori can't find the page you're looking for"));
44+ message = g_strdup_printf (_("The page located at “%s” cannot be found. "
45+ "Check the web address for misspelled words and try again."),
46+ midori_uri_parse_hostname(uri, NULL));
47+ }
48
49 result = midori_view_display_error (view, uri, "stock://dialog/network-error", title,
50- message, error->message, g_string_free (suggestions, FALSE),
51+ message, error->message, NULL,
52 _("Try Again"), web_frame);
53 g_free (message);
54 g_free (title);

Subscribers

People subscribed via source and target branches

to all changes: