summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--ui/src/main/java/com/wireguard/android/util/ClipboardUtils.kt3
-rw-r--r--ui/src/main/res/values/strings.xml1
2 files changed, 3 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 51f6486f..b9d7e7e1 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()
}
}
diff --git a/ui/src/main/res/values/strings.xml b/ui/src/main/res/values/strings.xml
index 869cf7d9..d569ccfe 100644
--- a/ui/src/main/res/values/strings.xml
+++ b/ui/src/main/res/values/strings.xml
@@ -97,6 +97,7 @@
<string name="create_output_dir_error">Cannot create output directory</string>
<string name="create_temp_dir_error">Cannot create local temporary directory</string>
<string name="create_tunnel">Create Tunnel</string>
+ <string name="copied_to_clipboard">%s copied to clipboard</string>
<string name="dark_theme_summary_off">Currently using light (day) theme</string>
<string name="dark_theme_summary_on">Currently using dark (night) theme</string>
<string name="dark_theme_title">Use dark theme</string>