diff --git a/scripts/analysis/findbugs-results.txt b/scripts/analysis/findbugs-results.txt index 9f8ebf73f9..6efca19ea0 100644 --- a/scripts/analysis/findbugs-results.txt +++ b/scripts/analysis/findbugs-results.txt @@ -1 +1 @@ -482 \ No newline at end of file +481 \ No newline at end of file diff --git a/src/main/java/com/owncloud/android/ui/activities/data/files/FilesServiceApiImpl.java b/src/main/java/com/owncloud/android/ui/activities/data/files/FilesServiceApiImpl.java index e8c36e3c9b..baedf4c7a0 100644 --- a/src/main/java/com/owncloud/android/ui/activities/data/files/FilesServiceApiImpl.java +++ b/src/main/java/com/owncloud/android/ui/activities/data/files/FilesServiceApiImpl.java @@ -25,6 +25,7 @@ import android.content.Context; import android.os.AsyncTask; import com.owncloud.android.MainApp; +import com.owncloud.android.R; import com.owncloud.android.authentication.AccountUtils; import com.owncloud.android.datamodel.OCFile; import com.owncloud.android.lib.common.OwnCloudAccount; @@ -101,16 +102,16 @@ public class FilesServiceApiImpl implements FilesServiceApi { return true; } catch (com.owncloud.android.lib.common.accounts.AccountUtils.AccountNotFoundException e) { Log_OC.e(TAG, "Account not found", e); - errorMessage = "Account not found"; + errorMessage = baseActivity.getString(R.string.account_not_found); } catch (IOException e) { Log_OC.e(TAG, "IO error", e); - errorMessage = "IO error"; + errorMessage = baseActivity.getString(R.string.io_error); } catch (OperationCanceledException e) { Log_OC.e(TAG, "Operation has been canceled", e); - errorMessage = "Operation has been canceled"; + errorMessage = baseActivity.getString(R.string.operation_canceled); } catch (AuthenticatorException e) { Log_OC.e(TAG, "Authentication Exception", e); - errorMessage = "Authentication Exception"; + errorMessage = baseActivity.getString(R.string.authentication_exception); } return false; @@ -125,7 +126,7 @@ public class FilesServiceApiImpl implements FilesServiceApi { callback.onLoaded(remoteOcFile); return; } else { - errorMessage = "File not found"; + errorMessage = baseActivity.getString(R.string.file_not_found); } } diff --git a/src/main/java/com/owncloud/android/ui/adapter/ActivityListAdapter.java b/src/main/java/com/owncloud/android/ui/adapter/ActivityListAdapter.java index ac32f3efec..21baa0c508 100644 --- a/src/main/java/com/owncloud/android/ui/adapter/ActivityListAdapter.java +++ b/src/main/java/com/owncloud/android/ui/adapter/ActivityListAdapter.java @@ -72,6 +72,7 @@ import com.owncloud.android.utils.svg.SvgSoftwareLayerSetter; import java.io.InputStream; import java.util.ArrayList; import java.util.List; +import java.util.Locale; import androidx.annotation.NonNull; import androidx.recyclerview.widget.RecyclerView; @@ -407,7 +408,11 @@ public class ActivityListAdapter extends RecyclerView.Adapter= android.os.Build.VERSION_CODES.JELLY_BEAN_MR2) { + pattern = DateFormat.getBestDateTimePattern(Locale.getDefault(), "EEEE, MMMM d"); + } + return DateFormat.format(pattern, modificationTimestamp); } } diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index de32cdaec0..7aa662fff3 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -870,4 +870,7 @@ Music Documents Downloads + IO error + Operation has been canceled + Authentication Exception