TunnelListFragment: fix plural grammar
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
1ae10b8f45
commit
da30a6d449
@ -148,12 +148,13 @@ public class TunnelListFragment extends BaseFragment {
|
|||||||
|
|
||||||
private void onTunnelDeletionFinished(final Integer count, final Throwable throwable) {
|
private void onTunnelDeletionFinished(final Integer count, final Throwable throwable) {
|
||||||
final String message;
|
final String message;
|
||||||
|
final String plural = count == 1 ? "" : "s";
|
||||||
if (throwable == null) {
|
if (throwable == null) {
|
||||||
message = "Successfully deleted " + count + " tunnels";
|
message = "Successfully deleted " + count + " tunnel" + plural;
|
||||||
} else {
|
} else {
|
||||||
message = "Could not delete some tunnels: "
|
message = "Unable to delete tunnel" + plural + ": "
|
||||||
+ ExceptionLoggers.unwrap(throwable).getMessage();
|
+ ExceptionLoggers.unwrap(throwable).getMessage();
|
||||||
Log.e(TAG, "Cannot delete tunnel", throwable);
|
Log.e(TAG, "Cannot delete tunnel" + plural, throwable);
|
||||||
}
|
}
|
||||||
if (binding != null) {
|
if (binding != null) {
|
||||||
final CoordinatorLayout container = binding.mainContainer;
|
final CoordinatorLayout container = binding.mainContainer;
|
||||||
|
Loading…
Reference in New Issue
Block a user