diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-01-09 00:23:22 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-01-09 00:23:22 +0100 |
commit | da30a6d449e43cb253506fb3818e875cf84808b7 (patch) | |
tree | 80a3b8fe03da01b21748aafae79de754d91575ad /app/src/main | |
parent | 1ae10b8f45713b92cf6082dcb00ece6c58eda225 (diff) |
TunnelListFragment: fix plural grammar
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'app/src/main')
-rw-r--r-- | app/src/main/java/com/wireguard/android/fragment/TunnelListFragment.java | 7 |
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; |