Show maintenance mode message while downloading, removing, renaming or creating folder operations

This commit is contained in:
davigonz 2016-12-23 12:26:47 +01:00 committed by AndyScherzinger
parent ad6d867971
commit c47970857c
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B
2 changed files with 14 additions and 1 deletions

View file

@ -106,6 +106,9 @@ public class ErrorMessageAdapter {
if (result.getCode() == ResultCode.FILE_NOT_FOUND) {
message = res.getString(R.string.downloader_download_file_not_found);
} else if (result.getCode() == ResultCode.MAINTENANCE_MODE) {
message = res.getString(R.string.maintenance_mode);
} else {
message = String.format(
res.getString(R.string.downloader_download_failed_content), new File(
@ -122,6 +125,9 @@ public class ErrorMessageAdapter {
// Error --> No permissions
message = String.format(res.getString(R.string.forbidden_permissions),
res.getString(R.string.forbidden_permissions_delete));
} else if (result.getCode() == ResultCode.MAINTENANCE_MODE) {
message = res.getString(R.string.maintenance_mode);
} else {
message = res.getString(R.string.remove_fail_msg);
}
@ -142,6 +148,9 @@ public class ErrorMessageAdapter {
} else if (result.getCode() == ResultCode.INVALID_CHARACTER_DETECT_IN_SERVER) {
message = res.getString(R.string.filename_forbidden_charaters_from_server);
} else if (result.getCode() == ResultCode.MAINTENANCE_MODE) {
message = res.getString(R.string.maintenance_mode);
} else {
message = res.getString(R.string.rename_server_fail_msg);
}
@ -161,6 +170,10 @@ public class ErrorMessageAdapter {
} else if (result.getCode() == ResultCode.INVALID_CHARACTER_DETECT_IN_SERVER) {
message = res.getString(R.string.filename_forbidden_charaters_from_server);
} else if (result.getCode() == ResultCode.MAINTENANCE_MODE) {
message = res.getString(R.string.maintenance_mode);
} else {
message = res.getString(R.string.create_dir_fail_msg);
}

View file

@ -543,7 +543,7 @@
<string name="local_file_not_found_toast">File not found in local file system</string>
<string name="confirmation_remove_files_alert">Do you really want to remove the selected items?</string>
<string name="confirmation_remove_folders_alert">Do you really want to remove the selected items and their contents?</string>
<string name="maintenance_mode">This Owncloud instance is in maintenance mode, so it may take a while.</string>
<string name="maintenance_mode">This Owncloud instance is in maintenance mode, please try again later or contact your system administrator.</string>
<string name="uploads_view_upload_status_waiting_for_charging">Awaiting charge</string>
<string name="actionbar_search">Search</string>