mirror of
https://github.com/moparisthebest/k-9
synced 2024-12-24 08:38:51 -05:00
Pluralize the "Move to spam" confirmation dialog since code paths were
unified in MessageList and multi-selection is now subject to this dialog.
This commit is contained in:
parent
de7b75a1df
commit
72870174ce
@ -1035,7 +1035,10 @@ Welcome to K-9 Mail setup. K-9 is an open source mail client for Android origin
|
||||
<string name="dialog_confirm_delete_cancel_button">Do not delete</string>
|
||||
|
||||
<string name="dialog_confirm_spam_title">Confirm move to spam folder</string>
|
||||
<string name="dialog_confirm_spam_message">Do you really want to move this message to the spam folder?</string>
|
||||
<plurals name="dialog_confirm_spam_message">
|
||||
<item quantity="one">Do you really want to move this message to the spam folder?</item>
|
||||
<item quantity="other">Do you really want to move %1$d messages to the spam folder?</item>
|
||||
</plurals>
|
||||
<string name="dialog_confirm_spam_confirm_button">Yes</string>
|
||||
<string name="dialog_confirm_spam_cancel_button">No</string>
|
||||
|
||||
|
@ -1277,7 +1277,7 @@ public class MessageList
|
||||
case R.id.dialog_confirm_spam:
|
||||
return ConfirmationDialog.create(this, id,
|
||||
R.string.dialog_confirm_spam_title,
|
||||
R.string.dialog_confirm_spam_message,
|
||||
"" /* text is refreshed by #onPrepareDialog(int, Dialog) below */,
|
||||
R.string.dialog_confirm_spam_confirm_button,
|
||||
R.string.dialog_confirm_spam_cancel_button,
|
||||
new Runnable() {
|
||||
@ -1294,7 +1294,7 @@ public class MessageList
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPrepareDialog(int id, Dialog dialog) {
|
||||
public void onPrepareDialog(final int id, final Dialog dialog) {
|
||||
switch (id) {
|
||||
case DIALOG_MARK_ALL_AS_READ: {
|
||||
if (mCurrentFolder != null) {
|
||||
@ -1303,6 +1303,13 @@ public class MessageList
|
||||
}
|
||||
break;
|
||||
}
|
||||
case R.id.dialog_confirm_spam: {
|
||||
final int selectionSize = mActiveMessages.size();
|
||||
final String message;
|
||||
message = getResources().getQuantityString(R.plurals.dialog_confirm_spam_message, selectionSize, Integer.valueOf(selectionSize));
|
||||
((AlertDialog) dialog).setMessage(message);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
super.onPrepareDialog(id, dialog);
|
||||
}
|
||||
|
@ -994,7 +994,7 @@ public class MessageView extends K9Activity implements OnClickListener {
|
||||
case R.id.dialog_confirm_spam:
|
||||
return ConfirmationDialog.create(this, id,
|
||||
R.string.dialog_confirm_spam_title,
|
||||
R.string.dialog_confirm_spam_message,
|
||||
getResources().getQuantityString(R.plurals.dialog_confirm_spam_message, 1),
|
||||
R.string.dialog_confirm_spam_confirm_button,
|
||||
R.string.dialog_confirm_spam_cancel_button,
|
||||
new Runnable() {
|
||||
|
Loading…
Reference in New Issue
Block a user