Skip to content

🎧 Your Personal Streaming Service

More share translations

Deluan72a12e344ee8
diff --git a/ui/src/dialogs/ShareDialog.js b/ui/src/dialogs/ShareDialog.js
index 14d152fc9..39228f04a 100644
--- a/ui/src/dialogs/ShareDialog.js
+++ b/ui/src/dialogs/ShareDialog.js
@@ -38,18 +38,21 @@ export const ShareDialog = ({ open, onClose, ids, resource, name }) => {
navigator.clipboard
.writeText(url)
.then(() => {
- notify(`URL copied to clipboard: ${url}`, {
+ notify(translate('message.shareSuccess', { url }), {
type: 'info',
multiLine: true,
duration: 0,
})
})
.catch((err) => {
- notify(`Error copying URL ${url} to clipboard: ${err.message}`, {
- type: 'warning',
- multiLine: true,
- duration: 0,
- })
+ notify(
+ translate('message.shareFailure', { url }) + ': ' + err.message,
+ {
+ type: 'warning',
+ multiLine: true,
+ duration: 0,
+ }
+ )
})
},
onFailure: (error) =>
diff --git a/ui/src/i18n/en.json b/ui/src/i18n/en.json
index e54e07377..dcaa41d56 100644
--- a/ui/src/i18n/en.json
+++ b/ui/src/i18n/en.json
@@ -371,6 +371,8 @@
"lastfmLink": "Read More...",
"shareOriginalFormat": "Share in original format",
"shareDialogTitle": "Share %{resource} '%{name}'",
+ "shareSuccess": "URL copied to clipboard: %{url}",
+ "shareFailure": "Error copying URL %{url} to clipboard",
"downloadDialogTitle": "Download %{resource} '%{name}' (%{size})",
"originalFormat": "Download in original format"
},