aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ui/src/main/java
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2021-01-01 16:34:03 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2021-01-01 16:34:03 +0100
commit4a7969ef244c862429d56e74d90570d94a73b3e7 (patch)
tree3c58f630cdb569d902d343207d323f5db8553c4d /ui/src/main/java
parentversion: bump (diff)
downloadwireguard-android-4a7969ef244c862429d56e74d90570d94a73b3e7.tar.xz
wireguard-android-4a7969ef244c862429d56e74d90570d94a73b3e7.zip
ClipboardUtils: localize clipboard notification snack
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'ui/src/main/java')
-rw-r--r--ui/src/main/java/com/wireguard/android/util/ClipboardUtils.kt3
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/src/main/java/com/wireguard/android/util/ClipboardUtils.kt b/ui/src/main/java/com/wireguard/android/util/ClipboardUtils.kt
index 51f6486..b9d7e7e 100644
--- a/ui/src/main/java/com/wireguard/android/util/ClipboardUtils.kt
+++ b/ui/src/main/java/com/wireguard/android/util/ClipboardUtils.kt
@@ -11,6 +11,7 @@ import android.widget.TextView
import androidx.core.content.getSystemService
import com.google.android.material.snackbar.Snackbar
import com.google.android.material.textfield.TextInputEditText
+import com.wireguard.android.R
/**
* Standalone utilities for interacting with the system clipboard.
@@ -28,6 +29,6 @@ object ClipboardUtils {
}
val service = view.context.getSystemService<ClipboardManager>() ?: return
service.setPrimaryClip(ClipData.newPlainText(data.second, data.first))
- Snackbar.make(view, "${data.second} copied to clipboard", Snackbar.LENGTH_LONG).show()
+ Snackbar.make(view, view.context.getString(R.string.copied_to_clipboard, data.second), Snackbar.LENGTH_LONG).show()
}
}