diff --git a/src/components/SongItem.vue b/src/components/SongItem.vue index 153417e..040f590 100644 --- a/src/components/SongItem.vue +++ b/src/components/SongItem.vue @@ -8,12 +8,14 @@ import { useUpdatePlaylist } from '@/scripts/db.js'; import { useResults, useArtist } from '@/stores/results.js'; import { useData, usePlayer } from '@/stores/player.js'; +import { useI18n } from '@/stores/misc.js'; const rand = useRand(), data = useData(), results = useResults(), player = usePlayer(), - artist = useArtist(); + artist = useArtist(), + { t } = useI18n(); const props = defineProps({ index: Number, diff --git a/src/locales/de.json b/src/locales/de.json index a6f83a6..3c5fb95 100644 --- a/src/locales/de.json +++ b/src/locales/de.json @@ -70,7 +70,8 @@ "no_info": "Keine Informationen verfügbar", "see_all": "Alle sehen", "search": "Suche starten", - "saved": "Gespeichert!" + "saved": "Gespeichert!", + "copied_to_clipboard": "In die Zwischenablage kopiert" }, "instances": { "up_to_date": "Aktuell", diff --git a/src/locales/en.json b/src/locales/en.json index b69fc67..f008f65 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -70,7 +70,8 @@ "see_all": "See All", "search": "Start Searching", "no_info": "No Information Available", - "saved": "Saved!" + "saved": "Saved!", + "copied_to_clipboard": "Copied to Clipboard" }, "instances": { "hyp": "Hyperpipe Instance", diff --git a/src/scripts/util.js b/src/scripts/util.js index 5165db8..7f9dfbc 100644 --- a/src/scripts/util.js +++ b/src/scripts/util.js @@ -1,4 +1,5 @@ import DOMPurify from 'dompurify'; +import { useI18n } from '@/stores/misc.js'; export function useSanitize(txt) { return DOMPurify.sanitize(txt, { @@ -47,9 +48,10 @@ export function useShare(data) { console.err(err); }); } else { + const { t } = useI18n() navigator.clipboard.writeText(data.url).then( () => { - alert('Copied to Clipboard'); + alert(t('info.copied_to_clipboard')); }, err => { alert(err);