Dbrant has submitted this change and it was merged.
Change subject: Improve layout and searching of History and Saved Pages.
......................................................................
Improve layout and searching of History and Saved Pages.
* Add small left and right margins to the empty text so that the text
presented when there are no search results wraps more cleanly.
* Change empty message to not include search query so that the text wraps more
consistently and cleanly.
* Tweak empty messages for History and Saved Pages to be more consistent with
each other.
* Added note that the getString() method for the empty messages should
eventually be removed once all of the empty messages are translated.
Bug: 70102
Change-Id: I7adebfb1c0a06dde7f2dedd3cead8cc983d4b968
---
M wikipedia/res/layout/activity_history.xml
M wikipedia/res/layout/activity_saved_pages.xml
M wikipedia/res/values-qq/strings.xml
M wikipedia/res/values/strings.xml
M wikipedia/src/main/java/org/wikipedia/history/HistoryActivity.java
M wikipedia/src/main/java/org/wikipedia/savedpages/SavedPagesActivity.java
6 files changed, 15 insertions(+), 7 deletions(-)
Approvals:
Dbrant: Looks good to me, approved
diff --git a/wikipedia/res/layout/activity_history.xml
b/wikipedia/res/layout/activity_history.xml
index f8f9634..4c73f41 100644
--- a/wikipedia/res/layout/activity_history.xml
+++ b/wikipedia/res/layout/activity_history.xml
@@ -25,6 +25,8 @@
android:textAppearance="?android:attr/textAppearanceLarge"
android:layout_marginTop="-32dp"
android:layout_marginBottom="16dp"
+ android:layout_marginLeft="16dp"
+ android:layout_marginRight="16dp"
android:text="@string/history_empty_title"
/>
<TextView
diff --git a/wikipedia/res/layout/activity_saved_pages.xml
b/wikipedia/res/layout/activity_saved_pages.xml
index f107ab2..e140d2d 100644
--- a/wikipedia/res/layout/activity_saved_pages.xml
+++ b/wikipedia/res/layout/activity_saved_pages.xml
@@ -24,6 +24,8 @@
android:gravity="center"
android:textAppearance="?android:attr/textAppearanceLarge"
android:layout_marginBottom="16dp"
+ android:layout_marginLeft="16dp"
+ android:layout_marginRight="16dp"
android:text="@string/saved_pages_empty_title"
/>
<TextView
diff --git a/wikipedia/res/values-qq/strings.xml
b/wikipedia/res/values-qq/strings.xml
index 034b22b..1580f21 100644
--- a/wikipedia/res/values-qq/strings.xml
+++ b/wikipedia/res/values-qq/strings.xml
@@ -65,7 +65,7 @@
<string name="toast_saved_page_deleted">Small toast (popup) message saying
that the selected saved pages have been deleted</string>
<string name="saved_pages_search_list_hint">Hint for textbox that searches
list of items in saved pages as user types.
{{Identical|Search}}</string>
- <string name="saved_pages_search_empty_message">Message shown when no saved
pages were found that match the user\'s query. %s is replaced with the query
string.</string>
+ <string name="saved_pages_search_empty_message">Message shown when no saved
pages were found that match the user\'s query.</string>
<string name="nearby_activity_title">Title for Nearby activity (top of
screen)</string>
<string name="nav_item_nearby">Entry in nav drawer for Nearby
feature</string>
@@ -76,7 +76,7 @@
<string name="nearby_distance_in_kilometers">Distance to the place mentioned
in the nearby page in kilometers. Please leave the %.2f as is. It represents a
floating point number with 2 digits after the decimal point.</string>
<string name="nearby_no_network">Error message when there was a network
error</string>
<string name="nearby_server_error">Error message when the app could not get
list of nearby places from the server.</string>
-
+
<string name="last_updated_text">Message in footer of article indicating
when the article was last updated. \'%s\' is substituted with the appropriately
formatted human-readable timestamp, such as \"seven days ago\".</string>
<string name="content_license_html">HTML specifying license of the Wiki and
link to appropriate CC page</string>
<string name="edit_save_action_license_logged_in">HTML specifying Terms of
Use and CC license before saving edits</string>
@@ -229,7 +229,7 @@
<string name="editing_error_spamblacklist">An error message, which appears
after trying to save a page with blacklisted links. The single string parameter
%s for this message gets substituted with the blocked domain.</string>
<string name="history_search_list_hint">Hint for textbox that searches list
of items in browsing history as user types.
{{Identical|Search}}</string>
- <string name="history_search_empty_message">Message shown when no history
items were found that match the user\'s query. %s is replaced with the query
string.</string>
+ <string name="history_search_empty_message">Message shown when no history
items were found that match the user\'s query.</string>
<string name="error_can_not_process_link">Message shown in a toast when the
app encounters a link it can not process.</string>
<string name="page_protected_autoconfirmed">Message shown to users when
editing a semi-protected page</string>
<string name="page_protected_sysop">Message shown to users when editing a
fully protected page</string>
diff --git a/wikipedia/res/values/strings.xml b/wikipedia/res/values/strings.xml
index 87c9313..98e4ba5 100644
--- a/wikipedia/res/values/strings.xml
+++ b/wikipedia/res/values/strings.xml
@@ -43,7 +43,7 @@
<string name="delete_selected_saved_pages">Delete</string>
<string name="toast_saved_page_deleted">Saved page(s) deleted</string>
<string name="saved_pages_search_list_hint">Search</string>
- <string name="saved_pages_search_empty_message">No pages found matching
\"%s\"</string>
+ <string name="saved_pages_search_empty_message">No pages found matching
your query.</string>
<string name="nearby_activity_title">Nearby</string>
<string name="nav_item_nearby">Nearby</string>
@@ -102,9 +102,9 @@
<string name="preference_summary_logout">Log out of your Wikipedia
account</string>
<string name="preference_summary_notloggedin">Not logged in.</string>
<string name="toast_logout_complete">Logged out</string>
- <string name="saved_pages_empty_title">No saved pages yet.</string>
+ <string name="saved_pages_empty_title">No saved pages here!</string>
<string name="saved_pages_empty_message">Saved pages are pretty awesome.
Think of them as bookmarks that you can read even when you are offline.</string>
- <string name="history_empty_title">No recent pages here.</string>
+ <string name="history_empty_title">No recent pages here!</string>
<string name="history_empty_message">You probably deleted all of them.
Next time you go to a page you can get back to it from here.</string>
<string
name="wp_stylized"><![CDATA[<big>W</big>IKIPEDI<big>A</big>]]></string>
<string name="wp_tag_line">The Free Encyclopedia</string>
@@ -174,7 +174,7 @@
<string name="preference_summary_eventlogging_opt_in">Allow Wikimedia to
collect information about how you use the app to make the app better</string>
<string name="editing_error_spamblacklist">Links to blocked domains (%s)
detected. Please remove them and try again.</string>
<string name="history_search_list_hint">Search</string>
- <string name="history_search_empty_message">No pages found matching
\"%s\"</string>
+ <string name="history_search_empty_message">No pages found matching your
query.</string>
<string name="error_can_not_process_link">Could not display this
link</string>
<string name="page_protected_autoconfirmed">This page has been
semi-protected.</string>
<string name="page_protected_sysop">This page has been fully
protected.</string>
diff --git a/wikipedia/src/main/java/org/wikipedia/history/HistoryActivity.java
b/wikipedia/src/main/java/org/wikipedia/history/HistoryActivity.java
index 8135e64..167832c 100644
--- a/wikipedia/src/main/java/org/wikipedia/history/HistoryActivity.java
+++ b/wikipedia/src/main/java/org/wikipedia/history/HistoryActivity.java
@@ -79,6 +79,8 @@
historyEmptyTitle.setText(R.string.history_empty_title);
historyEmptyMessage.setVisibility(View.VISIBLE);
} else {
+ //getString() is now redundant because this
message no longer has any parameters
+ //Left in for backwards compatibility until all
version of this message are translated
historyEmptyTitle.setText(getString(R.string.history_search_empty_message,
editable.toString()));
historyEmptyMessage.setVisibility(View.GONE);
}
diff --git
a/wikipedia/src/main/java/org/wikipedia/savedpages/SavedPagesActivity.java
b/wikipedia/src/main/java/org/wikipedia/savedpages/SavedPagesActivity.java
index 22414d5..944bc85 100644
--- a/wikipedia/src/main/java/org/wikipedia/savedpages/SavedPagesActivity.java
+++ b/wikipedia/src/main/java/org/wikipedia/savedpages/SavedPagesActivity.java
@@ -149,6 +149,8 @@
savedPagesEmptyImage.setVisibility(View.VISIBLE);
savedPagesEmptyMessage.setVisibility(View.VISIBLE);
} else {
+ //getString() is now redundant because this
message no longer has any parameters
+ //Left in for backwards compatibility until all
version of this message are translated
savedPagesEmptyTitle.setText(getString(R.string.saved_pages_search_empty_message,
editable.toString()));
savedPagesEmptyImage.setVisibility(View.GONE);
savedPagesEmptyMessage.setVisibility(View.GONE);
--
To view, visit https://gerrit.wikimedia.org/r/160217
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I7adebfb1c0a06dde7f2dedd3cead8cc983d4b968
Gerrit-PatchSet: 5
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Deskana <[email protected]>
Gerrit-Reviewer: BearND <[email protected]>
Gerrit-Reviewer: Brion VIBBER <[email protected]>
Gerrit-Reviewer: Dbrant <[email protected]>
Gerrit-Reviewer: Deskana <[email protected]>
Gerrit-Reviewer: Yuvipanda <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits