Jcasariego has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/370524 )
Change subject: Split yes-no strings used in dialog box questions into separate
strings tags
......................................................................
Split yes-no strings used in dialog box questions into separate strings tags
Currently, the yes-no strings in the Android app are used to confirm the
following dialog box questions:
- "This saved page may be out of date, and must be refreshed for editing to be
enabled. Would you like to refresh the page?"
- "The page has been modified. Are you sure you want to exit without saving
your changes?"
- "This will delete all of your browsing history, and close any currently open
tabs. Are you sure?"
- "Are you sure you want to cancel downloading this compilation?"
- "Are you sure you want to close all tabs?"
- "Are you sure you want to clear your search history?"
- "This will delete any previously synced reading lists from remote storage.
Proceed?"
These are the places where new tags were created for the yes-no string.
Bug: T69628
Change-Id: I620d5646a03a0744feab552a8bf3ae04c73de1b3
---
M app/src/main/java/org/wikipedia/edit/EditHandler.java
M app/src/main/java/org/wikipedia/edit/EditSectionActivity.java
M app/src/main/java/org/wikipedia/history/HistoryFragment.java
M app/src/main/java/org/wikipedia/offline/CompilationDownloadControlView.java
M app/src/main/java/org/wikipedia/page/tabs/TabsProvider.java
M app/src/main/java/org/wikipedia/search/RecentSearchesFragment.java
M app/src/main/java/org/wikipedia/settings/SettingsPreferenceLoader.java
M app/src/main/res/values-qq/strings.xml
M app/src/main/res/values/strings.xml
9 files changed, 44 insertions(+), 19 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia
refs/changes/24/370524/1
diff --git a/app/src/main/java/org/wikipedia/edit/EditHandler.java
b/app/src/main/java/org/wikipedia/edit/EditHandler.java
index 203f456..ef0cef8 100644
--- a/app/src/main/java/org/wikipedia/edit/EditHandler.java
+++ b/app/src/main/java/org/wikipedia/edit/EditHandler.java
@@ -72,13 +72,13 @@
new AlertDialog.Builder(fragment.getActivity())
.setCancelable(false)
.setMessage(R.string.edit_saved_page_refresh)
- .setPositiveButton(android.R.string.yes, new
DialogInterface.OnClickListener() {
+
.setPositiveButton(R.string.edit_saved_page_refresh_yes, new
DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface
dialogInterface, int i) {
fragment.refreshPage();
}
})
- .setNegativeButton(android.R.string.no, new
DialogInterface.OnClickListener() {
+
.setNegativeButton(R.string.edit_saved_page_refresh_no, new
DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface
dialogInterface, int i) {
dialogInterface.dismiss();
diff --git a/app/src/main/java/org/wikipedia/edit/EditSectionActivity.java
b/app/src/main/java/org/wikipedia/edit/EditSectionActivity.java
index 01f2313..9e0edb1 100644
--- a/app/src/main/java/org/wikipedia/edit/EditSectionActivity.java
+++ b/app/src/main/java/org/wikipedia/edit/EditSectionActivity.java
@@ -718,14 +718,14 @@
if (sectionTextModified) {
AlertDialog.Builder alert = new AlertDialog.Builder(this);
alert.setMessage(getString(R.string.edit_abandon_confirm));
- alert.setPositiveButton(getString(R.string.yes), new
DialogInterface.OnClickListener() {
+
alert.setPositiveButton(getString(R.string.edit_abandon_confirm_yes), new
DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int id) {
dialog.dismiss();
finish();
}
});
- alert.setNegativeButton(getString(R.string.no), new
DialogInterface.OnClickListener() {
+
alert.setNegativeButton(getString(R.string.edit_abandon_confirm_no), new
DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int id) {
dialog.dismiss();
diff --git a/app/src/main/java/org/wikipedia/history/HistoryFragment.java
b/app/src/main/java/org/wikipedia/history/HistoryFragment.java
index 8d2fd26..083c83d 100644
--- a/app/src/main/java/org/wikipedia/history/HistoryFragment.java
+++ b/app/src/main/java/org/wikipedia/history/HistoryFragment.java
@@ -176,7 +176,7 @@
new AlertDialog.Builder(getContext())
.setTitle(R.string.dialog_title_clear_history)
.setMessage(R.string.dialog_message_clear_history)
- .setPositiveButton(R.string.yes, new
DialogInterface.OnClickListener() {
+
.setPositiveButton(R.string.dialog_message_clear_history_yes, new
DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int
which) {
// Clear history!
@@ -184,7 +184,7 @@
onClearHistoryClick();
}
})
- .setNegativeButton(R.string.no, null).create().show();
+
.setNegativeButton(R.string.dialog_message_clear_history_no,
null).create().show();
return true;
case R.id.menu_search_history:
if (actionMode == null) {
diff --git
a/app/src/main/java/org/wikipedia/offline/CompilationDownloadControlView.java
b/app/src/main/java/org/wikipedia/offline/CompilationDownloadControlView.java
index d3ab33c..50f0ba6 100644
---
a/app/src/main/java/org/wikipedia/offline/CompilationDownloadControlView.java
+++
b/app/src/main/java/org/wikipedia/offline/CompilationDownloadControlView.java
@@ -95,7 +95,7 @@
void onCancelClicked() {
new AlertDialog.Builder(getContext())
.setMessage(R.string.compilation_download_cancel_confirm)
- .setPositiveButton(R.string.yes, new
DialogInterface.OnClickListener() {
+
.setPositiveButton(R.string.compilation_download_cancel_confirm_yes, new
DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int
i) {
if (callback != null) {
@@ -103,7 +103,7 @@
}
}
})
- .setNegativeButton(R.string.no, null)
+
.setNegativeButton(R.string.compilation_download_cancel_confirm_no, null)
.show();
}
diff --git a/app/src/main/java/org/wikipedia/page/tabs/TabsProvider.java
b/app/src/main/java/org/wikipedia/page/tabs/TabsProvider.java
index dc305ed..60e0066 100644
--- a/app/src/main/java/org/wikipedia/page/tabs/TabsProvider.java
+++ b/app/src/main/java/org/wikipedia/page/tabs/TabsProvider.java
@@ -178,13 +178,13 @@
case R.id.menu_close_all_tabs:
AlertDialog.Builder alert = new
AlertDialog.Builder(fragment.getContext());
alert.setMessage(R.string.close_all_tabs_confirm);
- alert.setPositiveButton(R.string.yes, new
DialogInterface.OnClickListener() {
+
alert.setPositiveButton(R.string.close_all_tabs_confirm_yes, new
DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int id) {
providerListener.onCloseAllTabs();
}
});
- alert.setNegativeButton(R.string.no, null);
+
alert.setNegativeButton(R.string.close_all_tabs_confirm_no, null);
alert.create().show();
return true;
default:
diff --git a/app/src/main/java/org/wikipedia/search/RecentSearchesFragment.java
b/app/src/main/java/org/wikipedia/search/RecentSearchesFragment.java
index 9e0cbfe..d053635 100644
--- a/app/src/main/java/org/wikipedia/search/RecentSearchesFragment.java
+++ b/app/src/main/java/org/wikipedia/search/RecentSearchesFragment.java
@@ -57,14 +57,14 @@
new AlertDialog.Builder(getContext())
.setMessage(getString(R.string.clear_recent_searches_confirm))
.setPositiveButton(
- getString(R.string.yes),
+
getString(R.string.clear_recent_searches_confirm_yes),
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface
dialog, int id) {
new
DeleteAllRecentSearchesTask(WikipediaApp.getInstance()).execute();
}
})
- .setNegativeButton(getString(R.string.no), null)
+
.setNegativeButton(getString(R.string.clear_recent_searches_confirm_no), null)
.create().show();
}
});
diff --git
a/app/src/main/java/org/wikipedia/settings/SettingsPreferenceLoader.java
b/app/src/main/java/org/wikipedia/settings/SettingsPreferenceLoader.java
index eba12a4..9521576 100644
--- a/app/src/main/java/org/wikipedia/settings/SettingsPreferenceLoader.java
+++ b/app/src/main/java/org/wikipedia/settings/SettingsPreferenceLoader.java
@@ -130,8 +130,8 @@
} else {
new AlertDialog.Builder(context)
.setMessage(R.string.reading_lists_confirm_remote_delete)
- .setPositiveButton(R.string.yes, new
DeleteRemoteListsYesListener(preference, synchronizer))
- .setNegativeButton(R.string.no, new
DeleteRemoteListsNoListener(preference))
+
.setPositiveButton(R.string.reading_lists_confirm_remote_delete_yes, new
DeleteRemoteListsYesListener(preference, synchronizer))
+
.setNegativeButton(R.string.reading_lists_confirm_remote_delete_no, new
DeleteRemoteListsNoListener(preference))
.show();
}
// clicks are handled and preferences updated accordingly; don't
pass the result through
diff --git a/app/src/main/res/values-qq/strings.xml
b/app/src/main/res/values-qq/strings.xml
index ce4f4cd..defd790 100644
--- a/app/src/main/res/values-qq/strings.xml
+++ b/app/src/main/res/values-qq/strings.xml
@@ -4,8 +4,6 @@
<string name="app_name_beta">Name of the beta version of the
application.\n{{Identical|Wikipedia Beta}}</string>
<string name="app_name_alpha">Name of the alpha version of the
application.</string>
<string name="wikimedia">Wikimedia\'s name.\n{{Identical|Wikimedia}}</string>
- <string name="yes">Affirmative answer to a dialog
box.\n{{Identical|Yes}}</string>
- <string name="no">Negative answer to a dialog box.\n{{Identical|No}}</string>
<string name="search_hint">Hint text for the search box</string>
<string name="search_hint_search_history">Hint text for the search box when
searching browsing history</string>
<string name="search_hint_search_my_lists">Hint text for the search box when
searching the set of reading lists</string>
@@ -20,6 +18,8 @@
<string name="history_item_delete_undo">Button label to undo the operation
of deleting an item from the browsing history.\n{{Identical|Undo}}</string>
<string name="dialog_title_clear_history">Title for dialog box asking if you
want to clear your reading history.</string>
<string name="dialog_message_clear_history">Message for the dialog box that
asks if the user wants to clear their browsing history, as well close any tabs
that are open.</string>
+ <string name="dialog_message_clear_history_yes">Affirmative answer to clear
the browsing history, as well close any tabs that are
open.\n{{Identical|Yes}}</string>
+ <string name="dialog_message_clear_history_no">Negative answer to clear the
browsing history, as well close any tabs that are
open.\n{{Identical|No}}</string>
<string name="nav_item_saved_pages">Text in navigation sidebar that when
tapped leads to the saved pages.\n{{Identical|Saved page}}</string>
<string name="share_via">Dialog title text for Share list.\n\nThe Share list
contains the following menu items (localized):\n* Mail\n* Message</string>
<string name="search_redirect_from">Label shown when a search result is
redirected from the original search query. The \"%s\" symbol is replaced with
the redirect source.</string>
@@ -71,6 +71,8 @@
<string name="title_captcha">A call to action to write the CAPTCHA
string.</string>
<string name="edit_section_captcha_reload">Call to action. \"Tap\" is
imperative verb, \"touch the touchscreen\".</string>
<string name="edit_saved_page_refresh">Dialog text that asks the user if
they want to refresh the saved page, so that editing would be enabled.</string>
+ <string name="edit_saved_page_refresh_yes">Affirmative answer to refresh the
saved page, so that editing would be enabled.\n{{Identical|Yes}}</string>
+ <string name="edit_saved_page_refresh_no">Negative answer to refresh the
saved page, so that editing would be enabled.\n{{Identical|No}}</string>
<string name="nav_item_login">{{Identical|Log in}}</string>
<string name="login_username_hint">{{Identical|Username}}</string>
<string name="login_password_hint">{{Identical|Password}}</string>
@@ -155,6 +157,8 @@
<string name="about_wmf">Text and link specifying that this app was
developed by the Wikimedia Foundation</string>
<string name="about_activity_title">{{Identical|About}}</string>
<string name="edit_abandon_confirm">Prompt for the user to abandon any
changes that were made during editing.</string>
+ <string name="edit_abandon_confirm_yes">Affirmative answer to abandon any
changes that were made during editing.\n{{Identical|Yes}}</string>
+ <string name="edit_abandon_confirm_no">Negative answer to abandon any
changes that were made during editing.\n{{Identical|No}}</string>
<string name="user_blocked_from_editing_title">{{Identical|Blocked}}</string>
<string name="user_logged_in_blocked_from_editing">Message shown in dialog
box to users who are blocked from editing when they attempt to save an
edit</string>
<string name="user_anon_blocked_from_editing">Message shown in dialog box to
users who are blocked from editing based on their IP address</string>
@@ -181,6 +185,8 @@
<string name="search_recent_header">Label at the top of the list of recent
searches that the user performed.</string>
<string name="button_clear_all_recent_searches">Button hint for clearing
search history; visible when in search mode.</string>
<string name="clear_recent_searches_confirm">Dialog message that asks if the
user really wants to clear the search history.</string>
+ <string name="clear_recent_searches_confirm_yes">Affirmative answer to clear
the search history.\n{{Identical|Yes}}</string>
+ <string name="clear_recent_searches_confirm_no">Negative answer to clear the
search history.\n{{Identical|No}}</string>
<string name="error_browser_not_found">Toast message shown when we try to
open an external browser but none seems to be installed.</string>
<string name="table_infobox">Text shown on the panel which, when tapped,
displays the full infobox to the user, therefore exposing a set of information
usually composed of factual and short statements.</string>
<string name="table_other">{{Identical|More information}}</string>
@@ -217,6 +223,9 @@
<string name="menu_new_tab">Text hint for the menu button used for creating
a new tab.</string>
<string name="menu_close_all_tabs">Text hint for the menu button used for
closing all tabs.</string>
<string name="close_all_tabs_confirm">Confirmation message shown when
closing all tabs.</string>
+ <string name="close_all_tabs_confirm_yes">Affirmative answer to closing all
tabs.\n{{Identical|Yes}}</string>
+ <string name="close_all_tabs_confirm_no">Negative answer to closing all
tabs.\n{{Identical|No}}</string>
+
<string name="button_close_tab">Text hint for the button used for closing a
tab.</string>
<string name="tool_tip_select_text">Very short advice on how to highlight
text for copying to the clipboard or sharing.</string>
<string name="tool_tip_share">Very short advice on sharing highlighted text
on social networks.</string>
@@ -325,6 +334,9 @@
<string name="reading_list_login_reminder_title">Title for a tutorial card
that reminds the user that logging in will enable syncing of reading
lists.</string>
<string name="reading_list_login_reminder_text">Text for a tutorial card
that reminds the user that logging in will enable syncing of reading
lists.</string>
<string name="reading_lists_confirm_remote_delete">Warning message shown to
a user to confirm that remotely stored reading list data used for syncing
across devices should be deleted.</string>
+ <string name="reading_lists_confirm_remote_delete_yes">Affirmative answer to
confirm that remotely stored reading list data used for syncing across devices
should be deleted.\n{{Identical|Yes}}</string>
+ <string name="reading_lists_confirm_remote_delete_no">Negative answer to
confirm that remotely stored reading list data used for syncing across devices
should be deleted.\n{{Identical|No}}</string>
+
<string name="reading_list_article_save_in_progress">Message shown when the
article is in the process of being downloaded, and is not yet available for
offline access.</string>
<plurals name="reading_list_article_offline_message">
<item quantity="one">Message shown when a single reading list article is
made available for offline use.</item>
@@ -431,6 +443,8 @@
<string
name="compilation_download_widget_button_pause_resume_hint">Accessibility hint
text for a button to pause or resume an offline compilation file
download</string>
<string name="compilation_download_widget_button_cancel_hint">Accessibility
hint text for a button to cancel an offline compilation file download</string>
<string name="compilation_download_cancel_confirm">Confirmation message
asking if the user really wants to cancel the download.</string>
+ <string name="compilation_download_cancel_confirm_yes">Affirmative answer to
cancel the download.\n{{Identical|Yes}}</string>
+ <string name="compilation_download_cancel_confirm_no">Negative answer to
cancel the download.\n{{Identical|No}}</string>
<string name="onboarding_skip">Button label to skip the current onboarding
or tutorial screen.\n{{Identical|Skip}}</string>
<string name="onboarding_continue">Button label to continue to the next
onboarding or tutorial screen.\n{{Identical|Continue}}</string>
<string name="onboarding_get_started">Button label to finish the current
onboarding or tutorial workflow.\n{{Identical|Get started}}</string>
diff --git a/app/src/main/res/values/strings.xml
b/app/src/main/res/values/strings.xml
index c412281..e5cca19 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -6,9 +6,6 @@
<string name="wikimedia">Wikimedia</string>
- <string name="yes">Yes</string>
- <string name="no">No</string>
-
<string name="search_hint">Search Wikipedia</string>
<string name="search_hint_search_history">Search history</string>
<string name="search_hint_search_my_lists">Search my lists</string>
@@ -25,6 +22,8 @@
<!-- Saved pages -->
<string name="dialog_title_clear_history">Clear browsing history</string>
<string name="dialog_message_clear_history">This will delete all of your
browsing history, and close any currently open tabs. Are you sure?</string>
+ <string name="dialog_message_clear_history_yes">Yes</string>
+ <string name="dialog_message_clear_history_no">No</string>
<string name="nav_item_saved_pages">Saved pages</string>
<string name="share_via">Share via</string>
<string name="search_redirect_from">Redirected from %s</string>
@@ -85,6 +84,8 @@
<string name="title_captcha">Enter CAPTCHA</string>
<string name="edit_section_captcha_reload">Tap CAPTCHA to reload</string>
<string name="edit_saved_page_refresh">This saved page may be out of date,
and must be refreshed for editing to be enabled. Would you like to refresh the
page?</string>
+ <string name="edit_saved_page_refresh_yes">Yes</string>
+ <string name="edit_saved_page_refresh_no">No</string>
<string name="nav_item_login">Log in to Wikipedia</string>
<string name="login_username_hint">Username</string>
<string name="login_password_hint">Password</string>
@@ -169,6 +170,8 @@
<string name="about_wmf"><![CDATA[A product of the <a
href="http://m.wikimediafoundation.org/wiki/Home">Wikimedia
Foundation</a>]]></string>
<string name="about_activity_title">About</string>
<string name="edit_abandon_confirm">The page has been modified. Are you
sure you want to exit without saving your changes?</string>
+ <string name="edit_abandon_confirm_yes">Yes</string>
+ <string name="edit_abandon_confirm_no">No</string>
<string name="user_blocked_from_editing_title">Blocked</string>
<string name="user_logged_in_blocked_from_editing" type="id">Your user
account has been blocked from editing on this wiki.</string>
<string name="user_anon_blocked_from_editing" type="id">Your IP address
has been blocked from editing.</string>
@@ -196,6 +199,8 @@
<string name="search_recent_header">Recent searches:</string>
<string name="button_clear_all_recent_searches">Clear recent
searches</string>
<string name="clear_recent_searches_confirm">Are you sure you want to
clear your search history?</string>
+ <string name="clear_recent_searches_confirm_yes">Yes</string>
+ <string name="clear_recent_searches_confirm_no">No</string>
<string name="error_browser_not_found">Could not open web page (no browser
app found).</string>
<string name="table_infobox">Quick facts</string>
<string name="table_other">More information</string>
@@ -232,6 +237,8 @@
<string name="menu_new_tab">New tab</string>
<string name="menu_close_all_tabs">Close all tabs</string>
<string name="close_all_tabs_confirm">Are you sure you want to close all
tabs?</string>
+ <string name="close_all_tabs_confirm_yes">Yes</string>
+ <string name="close_all_tabs_confirm_no">No</string>
<string name="button_close_tab">Close tab</string>
<string name="tool_tip_select_text">Press and hold anywhere in the text to
highlight it for copying and sharing.</string>
<string name="tool_tip_share">After highlighting an interesting fact, try
sharing it on your favorite networks!</string>
@@ -351,6 +358,8 @@
<string name="reading_list_login_reminder_title">Sync reading
lists</string>
<string name="reading_list_login_reminder_text">Your reading lists may now
be saved to your Wikipedia account. Simply log in to your account, and your
reading lists will be synchronized automatically.</string>
<string name="reading_lists_confirm_remote_delete">This will delete any
previously synced reading lists from remote storage. Proceed?</string>
+ <string name="reading_lists_confirm_remote_delete_yes">Yes</string>
+ <string name="reading_lists_confirm_remote_delete_no">No</string>
<string name="reading_list_article_save_in_progress">The article is being
downloaded, and it will be available offline when complete.</string>
<plurals name="reading_list_article_offline_message">
<item quantity="one">This article will now be available offline.</item>
@@ -485,6 +494,8 @@
<string name="compilation_download_widget_button_pause_resume_hint">Pause
or resume download</string>
<string name="compilation_download_widget_button_cancel_hint">Cancel
download</string>
<string name="compilation_download_cancel_confirm">Are you sure you want
to cancel downloading this compilation?</string>
+ <string name="compilation_download_cancel_confirm_yes">Yes</string>
+ <string name="compilation_download_cancel_confirm_no">No</string>
<!-- /Offline -->
<!-- Onboarding -->
--
To view, visit https://gerrit.wikimedia.org/r/370524
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I620d5646a03a0744feab552a8bf3ae04c73de1b3
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Jcasariego <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits