summaryrefslogtreecommitdiffhomepage
path: root/app/src/main/java/com/wireguard
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-01-09 00:23:22 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2018-01-09 00:23:22 +0100
commit3295f94ea6265ccf5114a2627768dbc2dc1f6edf (patch)
tree80a3b8fe03da01b21748aafae79de754d91575ad /app/src/main/java/com/wireguard
parent396415d0719a8279e9c07245d0def868bfe5f7bf (diff)
TunnelListFragment: fix plural grammar
Diffstat (limited to 'app/src/main/java/com/wireguard')
-rw-r--r--app/src/main/java/com/wireguard/android/fragment/TunnelListFragment.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/src/main/java/com/wireguard/android/fragment/TunnelListFragment.java b/app/src/main/java/com/wireguard/android/fragment/TunnelListFragment.java
index 08d39bd5..4634889c 100644
--- a/app/src/main/java/com/wireguard/android/fragment/TunnelListFragment.java
+++ b/app/src/main/java/com/wireguard/android/fragment/TunnelListFragment.java
@@ -148,12 +148,13 @@ public class TunnelListFragment extends BaseFragment {
private void onTunnelDeletionFinished(final Integer count, final Throwable throwable) {
final String message;
+ final String plural = count == 1 ? "" : "s";
if (throwable == null) {
- message = "Successfully deleted " + count + " tunnels";
+ message = "Successfully deleted " + count + " tunnel" + plural;
} else {
- message = "Could not delete some tunnels: "
+ message = "Unable to delete tunnel" + plural + ": "
+ ExceptionLoggers.unwrap(throwable).getMessage();
- Log.e(TAG, "Cannot delete tunnel", throwable);
+ Log.e(TAG, "Cannot delete tunnel" + plural, throwable);
}
if (binding != null) {
final CoordinatorLayout container = binding.mainContainer;