Make toast after saving attachment translatable

Closes #7374
This commit is contained in:
FeuRenard 2018-01-31 20:22:15 +01:00 committed by Moxie Marlinspike
parent 4bdb2acd29
commit 0efda2df91
2 changed files with 5 additions and 1 deletions

View File

@ -689,6 +689,7 @@
<!-- SaveAttachmentTask --> <!-- SaveAttachmentTask -->
<string name="SaveAttachmentTask_open_directory">Open directory</string> <string name="SaveAttachmentTask_open_directory">Open directory</string>
<string name="SaveAttachmentTask_saved_to">Saved to %s</string>
<!-- SearchToolbar --> <!-- SearchToolbar -->
<string name="SearchToolbar_search">Search</string> <string name="SearchToolbar_search">Search</string>

View File

@ -188,7 +188,10 @@ public class SaveAttachmentTask extends ProgressDialogAsyncTask<SaveAttachmentTa
Toast.LENGTH_LONG).show(); Toast.LENGTH_LONG).show();
break; break;
case SUCCESS: case SUCCESS:
Toast.makeText(context, String.format("Saved to %s", result.second()), Toast.LENGTH_LONG).show(); Toast.makeText(context,
context.getResources().getString(R.string.SaveAttachmentTask_saved_to,
result.second()),
Toast.LENGTH_LONG).show();
break; break;
case WRITE_ACCESS_FAILURE: case WRITE_ACCESS_FAILURE:
Toast.makeText(context, R.string.ConversationFragment_unable_to_write_to_sd_card_exclamation, Toast.makeText(context, R.string.ConversationFragment_unable_to_write_to_sd_card_exclamation,