This commit is contained in:
Mirco Wittrien 2021-01-23 21:47:04 +01:00
parent d7234d55c2
commit c938617dc4
2 changed files with 376 additions and 47 deletions

View File

@ -15,9 +15,10 @@ module.exports = (_ => {
"name": "SpellCheck",
"author": "DevilBro",
"version": "1.5.4",
"description": "Add a spellcheck to all textareas. Select a word and rightclick it to add it to your dictionary"
"description": "Add a Spellcheck to all Textareas. Select a Word and Right Click it to add it to your Dictionary"
}
};
return !window.BDFDB_Global || (!window.BDFDB_Global.loaded && !window.BDFDB_Global.started) ? class {
getName () {return config.info.name;}
getAuthor () {return config.info.author;}
@ -69,11 +70,11 @@ module.exports = (_ => {
this.defaults = {
settings: {
downloadDictionary: {value: false, description: "Use local dictionary file (downloads dictionary on first usage)"}
downloadDictionary: {value: false, description: "Use local dictionary file (downloads dictionary on first usage)"}
},
choices: {
dictionaryLanguage: {value: "en", force: true, description: "Primary Language: "},
secondaryLanguage: {value: "-", force: false, description: "Secondary Language: "}
dictionaryLanguage: {value: "en", force: true, description: "Primary Language: "},
secondaryLanguage: {value: "-", force: false, description: "Secondary Language: "}
},
amounts: {
maxSimilarAmount: {value: 6, min: 1, max: 30, description: "Maximal Amount of suggested Words: "}
@ -88,9 +89,7 @@ module.exports = (_ => {
this.css = `
${BDFDB.dotCNS._spellcheckoverlay + BDFDB.dotCN._spellcheckerror} {
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAADCAYAAABbNsX4AAAACXBIWXMAAA7DAAAOwwHHb6hkAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jk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+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAACNJREFUeNpi+M/A8P////8McMzAgGAg0ygqYGwAAAAA//8DAOGVJ9llMWQlAAAAAElFTkSuQmCC');
background-repeat: repeat-x;
background-position: bottom;
background: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" width="4" height="3" viewBox="0 0 4 3" fill="red"><rect x="0" y="2" width="1" height="1"/><rect x="1" y="1" width="1" height="1"/><rect x="2" y="0" width="1" height="1"/><rect x="3" y="1" width="1" height="1"/></svg>') bottom repeat-x;
}
`;
}
@ -321,7 +320,7 @@ module.exports = (_ => {
if (!ownDictionary.includes(wordLow)) {
ownDictionary.push(wordLow);
BDFDB.DataUtils.save(ownDictionary, this, "owndics", choices.dictionaryLanguage);
BDFDB.NotificationUtils.toast(this.labels.toast_wordadd.replace("{{word}}", word).replace("{{dicName}}", this.getLanguageName(languages[choices.dictionaryLanguage])), {type: "success"});
BDFDB.NotificationUtils.toast(this.labels.toast_wordadd.replace("{{var0}}", word).replace("{{var1}}", this.getLanguageName(languages[choices.dictionaryLanguage])), {type: "success"});
dictionaries.dictionaryLanguage = this.formatDictionary(langDictionaries.dictionaryLanguage.concat(ownDictionary));
}
}
@ -332,9 +331,10 @@ module.exports = (_ => {
this.killLanguageToast(key);
if (languages[lang]) {
let ownDictionary = BDFDB.DataUtils.load(this, "owndics", lang) || [];
languageToasts[key] = BDFDB.NotificationUtils.toast("Grabbing dictionary (" + this.getLanguageName(languages[lang]) + "). Please wait", {timeout: 0});
let loadingString = `${this.labels.toast_dictionary.replace("{{var0}}", this.getLanguageName(languages[lang]))} - ${BDFDB.LanguageUtils.LibraryStrings.please_wait}`;
languageToasts[key] = BDFDB.NotificationUtils.toast(loadingString, {timeout: 0});
languageToasts[key].interval = BDFDB.TimeUtils.interval(_ => {
languageToasts[key].textContent = languageToasts[key].textContent.indexOf(".....") > -1 ? "Grabbing dictionary (" + this.getLanguageName(languages[lang]) + "). Please wait" : languageToasts[key].textContent + ".";
languageToasts[key].textContent = languageToasts[key].textContent.endsWith(".....") ? loadingString : languageToasts[key].textContent + ".";
}, 500);
languageToasts[key].lang = lang
@ -344,7 +344,7 @@ module.exports = (_ => {
let parse = (error, response, body, download) => {
this.killLanguageToast(key);
if (error || (response && body.toLowerCase().indexOf("<!doctype html>") > -1)) {
BDFDB.NotificationUtils.toast("Failed to grab dictionary (" + this.getLanguageName(languages[lang]) + ").", {type: "error"});
BDFDB.NotificationUtils.toast(this.labels.toast_dictionary_fail.replace("{{var0}}", this.getLanguageName(languages[lang])), {type: "error"});
}
else if (response && languageToasts[key].lang == lang) {
if (download) {
@ -353,7 +353,7 @@ module.exports = (_ => {
}
langDictionaries[key] = body.toLowerCase().replace(/\r/g, "").split("\n");
dictionaries[key] = this.formatDictionary(langDictionaries[key].concat(ownDictionary));
BDFDB.NotificationUtils.toast("Successfully grabbed dictionary (" + this.getLanguageName(languages[lang]) + ").", {type: "success"});
BDFDB.NotificationUtils.toast(this.labels.toast_dictionary_success.replace("{{var0}}", this.getLanguageName(languages[lang])), {type: "success"});
}
};
@ -382,9 +382,9 @@ module.exports = (_ => {
}
killLanguageToast (key) {
if (languageToasts[key] && typeof languageToasts[key].close == "function") {
if (languageToasts[key]) {
BDFDB.TimeUtils.clear(languageToasts[key].interval);
languageToasts[key].close();
languageToasts[key].close == "function" && languageToasts[key].close();
}
}
@ -462,163 +462,244 @@ module.exports = (_ => {
return {
context_nosimilarwords: "Няма подобни думи",
context_spellcheck: "Добавяне към речника",
toast_wordadd: "Думата '{{word}}' е добавена към речника '{{dicName}}'."
toast_dictionary: "Опит за извличане на речник ({{var0}})",
toast_dictionary_fail: "Извличането на речника не бе успешно ({{var0}})",
toast_dictionary_success: "Речник ({{var0}}) е извлечен успешно",
toast_wordadd: "Думата '{{var0}}' е добавена към речника ({{var1}})"
};
case "da": // Danish
return {
context_nosimilarwords: "Ingen lignende ord",
context_spellcheck: "Føj til ordbog",
toast_wordadd: "Ordet '{{word}}' blev føjet til ordbogen '{{dicName}}'."
toast_dictionary: "Forsøger at hente ordbog ({{var0}})",
toast_dictionary_fail: "Ordbogen ({{var0}}) kunne ikke hentes",
toast_dictionary_success: "Ordbogen ({{var0}}) hentet med succes",
toast_wordadd: "Ordet '{{var0}}' blev føjet til ordbogen ({{var1}})"
};
case "de": // German
return {
context_nosimilarwords: "Keine ähnlichen Wörter",
context_spellcheck: "Zum Wörterbuch hinzufügen",
toast_wordadd: "Wort '{{word}}' zum Wörterbuch '{{dicName}}' hinzugefügt."
toast_dictionary: "Versuch, das Wörterbuch abzurufen ({{var0}})",
toast_dictionary_fail: "Fehler beim Abrufen des Wörterbuchs ({{var0}})",
toast_dictionary_success: "Wörterbuch ({{var0}}) erfolgreich abgerufen",
toast_wordadd: "Wort '{{var0}}' zum Wörterbuch ({{var1}}) hinzugefügt"
};
case "el": // Greek
return {
context_nosimilarwords: "Δεν υπάρχουν παρόμοιες λέξεις",
context_spellcheck: "Προσθήκη στο λεξικό",
toast_wordadd: "Προστέθηκε η λέξη '{{word}}' στο λεξικό '{{dicName}}'."
toast_dictionary: "Προσπάθεια λήψης λεξικού ({{var0}})",
toast_dictionary_fail: "Αποτυχία ανάκτησης λεξικού ({{var0}})",
toast_dictionary_success: "Το λεξικό ({{var0}}) ανακτήθηκε με επιτυχία",
toast_wordadd: "Προστέθηκε η λέξη '{{var0}}' στο λεξικό ({{var1}})"
};
case "es": // Spanish
return {
context_nosimilarwords: "No hay palabras similares",
context_spellcheck: "Agregar al diccionario",
toast_wordadd: "Se agregó la palabra '{{word}}' al diccionario '{{dicName}}'."
toast_dictionary: "Intentando obtener el diccionario ({{var0}})",
toast_dictionary_fail: "No se pudo recuperar el diccionario ({{var0}})",
toast_dictionary_success: "Diccionario ({{var0}}) obtenido correctamente",
toast_wordadd: "Se agregó la palabra '{{var0}}' al diccionario ({{var1}})"
};
case "fi": // Finnish
return {
context_nosimilarwords: "Ei vastaavia sanoja",
context_spellcheck: "Lisää sanakirjaan",
toast_wordadd: "Sana '{{word}}' lisättiin sanakirjaan '{{dicName}}'."
toast_dictionary: "Sanaa yritetään noutaa ({{var0}})",
toast_dictionary_fail: "Sanakirjan noutaminen epäonnistui ({{var0}})",
toast_dictionary_success: "Sanakirjan ({{var0}}) haku onnistui",
toast_wordadd: "Sana '{{var0}}' lisättiin sanakirjaan ({{var1}})"
};
case "fr": // French
return {
context_nosimilarwords: "Pas de mots similaires",
context_spellcheck: "Ajouter au dictionnaire",
toast_wordadd: "Mot '{{word}}' ajouté au dictionnaire '{{dicName}}'."
toast_dictionary: "Tentative de récupération du dictionnaire ({{var0}})",
toast_dictionary_fail: "Échec de la récupération du dictionnaire ({{var0}})",
toast_dictionary_success: "Le dictionnaire ({{var0}}) a bien été récupéré",
toast_wordadd: "Mot '{{var0}}' ajouté au dictionnaire ({{var1}})"
};
case "hr": // Croatian
return {
context_nosimilarwords: "Nema sličnih riječi",
context_spellcheck: "Dodaj u rječnik",
toast_wordadd: "Riječ '{{word}}' dodana je u rječnik '{{dicName}}'."
toast_dictionary: "Pokušaj dohvaćanja Rječnika ({{var0}})",
toast_dictionary_fail: "Dohvaćanje Rječnika nije uspjelo ({{var0}})",
toast_dictionary_success: "Rječnik ({{var0}}) je uspješno dohvaćen",
toast_wordadd: "Riječ '{{var0}}' dodana je u rječnik ({{var1}})"
};
case "hu": // Hungarian
return {
context_nosimilarwords: "Nincsenek hasonló szavak",
context_spellcheck: "Hozzáadás a szótárhoz",
toast_wordadd: "A '{{word}}' szó hozzáadva a '{{dicName}}' szótárhoz."
toast_dictionary: "Szótár lekérése próbálkozik ({{var0}})",
toast_dictionary_fail: "Nem sikerült beolvasni a Szótárt ({{var0}})",
toast_dictionary_success: "A szótár ({{var0}}) letöltése sikeresen megtörtént",
toast_wordadd: "A '{{var0}}' szó hozzáadva a ({{var1}}) szótárhoz"
};
case "it": // Italian
return {
context_nosimilarwords: "Nessuna parola simile",
context_spellcheck: "Aggiungi al dizionario",
toast_wordadd: "Parola '{{word}}' aggiunta al dizionario '{{dicName}}'."
toast_dictionary: "Tentativo di recupero del dizionario ({{var0}})",
toast_dictionary_fail: "Impossibile recuperare il dizionario ({{var0}})",
toast_dictionary_success: "Dizionario ({{var0}}) recuperato correttamente",
toast_wordadd: "Parola '{{var0}}' aggiunta al dizionario ({{var1}})"
};
case "ja": // Japanese
return {
context_nosimilarwords: "同様の言葉はありません",
context_spellcheck: "辞書に追加",
toast_wordadd: "単語'{{word}}'が辞書'{{dicName}}'に追加されました。"
toast_dictionary: "辞書を取得しようとしています {{var0}} ",
toast_dictionary_fail: "辞書の取得に失敗しました {{var0}} ",
toast_dictionary_success: "辞書 {{var0}} が正常にフェッチされました",
toast_wordadd: "単語 '{{var0}}' が辞書 ({{var1}}) に追加されました"
};
case "ko": // Korean
return {
context_nosimilarwords: "유사한 단어 없음",
context_spellcheck: "사전에 추가",
toast_wordadd: "단어 '{{word}}'이 '{{dicName}}' 사전에 추가되었습니다."
toast_dictionary: "사전 ({{var0}}) 을 가져 오는 중",
toast_dictionary_fail: "사전 ({{var0}}) 을 가져 오지 못했습니다.",
toast_dictionary_success: "사전 ({{var0}}) 을 성공적으로 가져 왔습니다.",
toast_wordadd: "단어 '{{var0}}' 이 ({{var1}}) 사전에 추가되었습니다"
};
case "lt": // Lithuanian
return {
context_nosimilarwords: "Jokių panašių žodžių",
context_spellcheck: "Pridėti prie žodyno",
toast_wordadd: "Žodis '{{word}}' pridėtas prie žodyno '{{dicName}}'."
toast_dictionary: "Bandoma gauti žodyną ({{var0}})",
toast_dictionary_fail: "Nepavyko gauti žodyno ({{var0}})",
toast_dictionary_success: "Žodynas ({{var0}}) sėkmingai gautas",
toast_wordadd: "Žodis '{{var0}}' pridėtas prie žodyno ({{var1}})"
};
case "nl": // Dutch
return {
context_nosimilarwords: "Geen vergelijkbare woorden",
context_spellcheck: "Toevoegen aan woordenboek",
toast_wordadd: "Woord '{{word}}' toegevoegd aan woordenboek '{{dicName}}'."
toast_dictionary: "Probeert woordenboek op te halen ({{var0}})",
toast_dictionary_fail: "Ophalen van woordenboek ({{var0}}) is mislukt",
toast_dictionary_success: "Woordenboek ({{var0}}) succesvol opgehaald",
toast_wordadd: "Woord '{{var0}}' toegevoegd aan woordenboek ({{var1}})"
};
case "no": // Norwegian
return {
context_nosimilarwords: "Ingen lignende ord",
context_spellcheck: "Legg til ordbok",
toast_wordadd: "Ordet '{{word}}' ble lagt til ordboken '{{dicName}}'."
toast_dictionary: "Prøver å hente ordbok ({{var0}})",
toast_dictionary_fail: "Kunne ikke hente ordboken ({{var0}})",
toast_dictionary_success: "Ordbok ({{var0}}) hentet",
toast_wordadd: "Ordet '{{var0}}' ble lagt til ordboken ({{var1}})"
};
case "pl": // Polish
return {
context_nosimilarwords: "Brak podobnych słów",
context_spellcheck: "Dodaj do słownika",
toast_wordadd: "Słowo '{{word}}' zostało dodane do słownika '{{dicName}}'."
toast_dictionary: "Próba pobrania słownika ({{var0}})",
toast_dictionary_fail: "Nie udało się pobrać słownika ({{var0}})",
toast_dictionary_success: "Słownik ({{var0}}) został pobrany pomyślnie",
toast_wordadd: "Słowo '{{var0}}' zostało dodane do słownika ({{var1}})"
};
case "pt-BR": // Portuguese (Brazil)
return {
context_nosimilarwords: "Sem palavras semelhantes",
context_spellcheck: "Adicionar ao Dicionário",
toast_wordadd: "Palavra '{{word}}' adicionada ao dicionário '{{dicName}}'."
toast_dictionary: "Tentando obter Dicionário ({{var0}})",
toast_dictionary_fail: "Falha ao buscar dicionário ({{var0}})",
toast_dictionary_success: "Dicionário ({{var0}}) obtido com sucesso",
toast_wordadd: "Palavra '{{var0}}' adicionada ao dicionário ({{var1}})"
};
case "ro": // Romanian
return {
context_nosimilarwords: "Fără cuvinte similare",
context_spellcheck: "Adăugați la dicționar",
toast_wordadd: "Cuvântul '{{word}}' a fost adăugat în dicționar '{{dicName}}'."
toast_dictionary: "Încercarea de a prelua dicționar ({{var0}})",
toast_dictionary_fail: "Eroare la preluarea dicționarului ({{var0}})",
toast_dictionary_success: "Dicționarul ({{var0}}) a fost preluat cu succes",
toast_wordadd: "Cuvântul '{{var0}}' a fost adăugat în dicționar ({{var1}})"
};
case "ru": // Russian
return {
context_nosimilarwords: "Нет похожих слов",
context_spellcheck: "Добавить в словарь",
toast_wordadd: "Слово '{{word}}' добавлено в словарь '{{dicName}}'."
toast_dictionary: "Попытка получить словарь ({{var0}})",
toast_dictionary_fail: "Не удалось получить словарь ({{var0}})",
toast_dictionary_success: "Словарь ({{var0}}) получен успешно",
toast_wordadd: "Слово '{{var0}}' добавлено в словарь ({{var1}})"
};
case "sv": // Swedish
return {
context_nosimilarwords: "Inga liknande ord",
context_spellcheck: "Lägg till ordbok",
toast_wordadd: "Ordet '{{word}}' har lagts till i ordboken '{{dicName}}'."
toast_dictionary: "Försöker hämta ordbok ({{var0}})",
toast_dictionary_fail: "Det gick inte att hämta ordboken ({{var0}})",
toast_dictionary_success: "Ordbok ({{var0}}) hämtades framgångsrikt",
toast_wordadd: "Ordet '{{var0}}' har lagts till i ordboken ({{var1}})"
};
case "th": // Thai
return {
context_nosimilarwords: "ไม่มีคำที่คล้ายกัน",
context_spellcheck: "เพิ่มในพจนานุกรม",
toast_wordadd: "เพิ่มคำ '{{word}}' ในพจนานุกรม '{{dicName}}' แล้ว"
toast_dictionary: "กำลังพยายามดึงพจนานุกรม ({{var0}})",
toast_dictionary_fail: "ไม่สามารถดึงพจนานุกรม ({{var0}})",
toast_dictionary_success: "ดึงพจนานุกรม ({{var0}}) สำเร็จ",
toast_wordadd: "เพิ่มคำ '{{var0}}' ในพจนานุกรม ({{var1}}) แล้ว"
};
case "tr": // Turkish
return {
context_nosimilarwords: "Benzer kelime yok",
context_spellcheck: "Sözlüğe Ekle",
toast_wordadd: "'{{word}}' kelimesi, '{{dicName}}' sözlüğüne eklendi."
toast_dictionary: "Sözlük ({{var0}}) getirilmeye çalışılıyor",
toast_dictionary_fail: "Sözlük ({{var0}}) getirilemedi",
toast_dictionary_success: "Sözlük ({{var0}}) başarıyla getirildi",
toast_wordadd: "'{{var0}}' kelimesi, ({{var1}}) sözlüğüne eklendi"
};
case "uk": // Ukrainian
return {
context_nosimilarwords: "Немає подібних слів",
context_spellcheck: "Додати до словника",
toast_wordadd: "Слово '{{word}}' додано до словника '{{dicName}}'."
toast_dictionary: "Спроба отримати словник ({{var0}})",
toast_dictionary_fail: "Не вдалося отримати словник ({{var0}})",
toast_dictionary_success: "Словник ({{var0}}) отримано успішно",
toast_wordadd: "Слово '{{var0}}' додано до словника ({{var1}})"
};
case "vi": // Vietnamese
return {
context_nosimilarwords: "Không có từ tương tự",
context_spellcheck: "Thêm vào từ điển",
toast_wordadd: "Đã thêm từ '{{word}}' vào từ điển '{{dicName}}'."
toast_dictionary: "Đang cố gắng tìm nạp Từ điển ({{var0}})",
toast_dictionary_fail: "Không tìm nạp được Từ điển ({{var0}})",
toast_dictionary_success: "Từ điển ({{var0}}) được tìm nạp thành công",
toast_wordadd: "Đã thêm từ '{{var0}}' vào từ điển ({{var1}})"
};
case "zh-CN": // Chinese (China)
return {
context_nosimilarwords: "没有类似的词",
context_spellcheck: "添加到字典",
toast_wordadd: "将单词'{{word}}'添加到字典'{{dicName}}'中。"
toast_dictionary: "尝试获取字典 {{var0}} ",
toast_dictionary_fail: "无法获取字典 {{var0}} ",
toast_dictionary_success: "已成功获取字典 {{var0}} ",
toast_wordadd: "将单词 '{{var0}}' 添加到字典 ({{var1}}) 中"
};
case "zh-TW": // Chinese (Taiwan)
return {
context_nosimilarwords: "沒有類似的詞",
context_spellcheck: "添加到字典",
toast_wordadd: "將單詞'{{word}}'添加到字典'{{dicName}}'中。"
toast_dictionary: "嘗試獲取字典 {{var0}} ",
toast_dictionary_fail: "無法獲取字典 {{var0}} ",
toast_dictionary_success: "已成功獲取字典 {{var0}} ",
toast_wordadd: "將單詞 '{{var0}}' 添加到字典 ({{var1}}) 中"
};
default: // English
return {
context_nosimilarwords: "No similar Words",
context_spellcheck: "Add to Dictionary",
toast_wordadd: "Word '{{word}}' added to dictionary '{{dicName}}'."
toast_dictionary: "Trying to fetch Dictionary ({{var0}})",
toast_dictionary_fail: "Failed to fetch Dictionary ({{var0}})",
toast_dictionary_success: "Dictionary ({{var0}}) fetched successfully",
toast_wordadd: "Word '{{var0}}' added to Dictionary ({{var1}})"
};
}
}

View File

@ -178,7 +178,7 @@ module.exports = (_ => {
]
}),
BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.TooltipContainer, {
text: socketDevice.device.is_restricted ? "Can not control Spotify while playing on restricted device" : null,
text: socketDevice.device.is_restricted ? _this.labels.restricted_device : null,
tooltipConfig: {color: "red"},
children: BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Flex, {
grow: 0,
@ -191,9 +191,9 @@ module.exports = (_ => {
let url = BDFDB.ObjectUtils.get(playbackState, "item.external_urls.spotify") || BDFDB.ObjectUtils.get(playbackState, "context.external_urls.spotify");
if (url) {
BDFDB.LibraryRequires.electron.clipboard.write({text: url});
BDFDB.NotificationUtils.toast("Song URL was copied to clipboard", {type: "success"});
BDFDB.NotificationUtils.toast(_this.labels.toast_copyurl_fail, {type: "success"});
}
else BDFDB.NotificationUtils.toast("Could not copy song URL to clipboard", {type: "error"});
else BDFDB.NotificationUtils.toast(_this.labels.toast_copyurl_success, {type: "error"});
}
}),
BDFDB.ReactUtils.createElement(SpotifyControlsButtonComponent, {
@ -618,9 +618,9 @@ module.exports = (_ => {
if (!BDFDB.LibraryModules.SpotifyTrackUtils.hasConnectedAccount()) BDFDB.ModalUtils.open(this, {
size: "SMALL",
header: this.name + ": Something is missing...",
subHeader: "You need to connect a Spotify account",
text: "You are missing a connected Spotify account, without a connected account you won't be able to use Spotify Controls. To connect a Spotify account with your discord account click the button below.",
header: `${this.name}: ${this.labels.noaccount_header}...`,
subHeader: this.labels.noaccount_subheader,
text: this.labels.noaccount_text,
buttons: [{
contents: BDFDB.LanguageUtils.LanguageStrings.CONNECT,
color: "BRAND",
@ -732,6 +732,254 @@ module.exports = (_ => {
BDFDB.ReactUtils.forceUpdate(controls);
}
}
setLabelsByLanguage () {
switch (BDFDB.LanguageUtils.getLanguage().id) {
case "bg": // Bulgarian
return {
noaccount_header: "Нещо липсва",
noaccount_subheader: "Трябва да свържете акаунт в Spotify",
noaccount_text: "Липсва ви свързан акаунт в Spotify, без акаунт няма да можете да използвате Spotify Controls. За да свържете акаунт в Spotify с вашия акаунт в Discord, кликнете върху бутона по-долу.",
restricted_device: "Не може да контролира Spotify, докато възпроизвежда музика на ограничено устройство",
toast_copyurl_fail: "URL адресът на песента не може да бъде копиран в клипборда",
toast_copyurl_success: "URL адресът на песента беше копиран в клипборда"
};
case "da": // Danish
return {
noaccount_header: "Noget mangler",
noaccount_subheader: "Du skal oprette forbindelse til en Spotify-konto",
noaccount_text: "Du mangler en tilsluttet Spotify-konto, uden en konto kan du ikke bruge Spotify Controls. For at forbinde en Spotify-konto med din Discord-konto skal du klikke på knappen nedenfor.",
restricted_device: "Kan ikke kontrollere Spotify, mens du spiller musik på en begrænset enhed",
toast_copyurl_fail: "Sang-URL kunne ikke kopieres til udklipsholderen",
toast_copyurl_success: "Sang-URL blev kopieret til udklipsholderen"
};
case "de": // German
return {
noaccount_header: "Etwas fehlt",
noaccount_subheader: "Sie müssen ein Spotify-Konto verbinden",
noaccount_text: "Ihnen fehlt ein verbundenes Spotify-Konto. Ohne ein Konto können Sie Spotify Controls nicht verwenden. Um ein Spotify-Konto mit Ihrem Discord-Konto zu verbinden, klicken Sie auf die Schaltfläche unten.",
restricted_device: "Spotify kann nicht gesteuert werden, während Musik auf einem eingeschränkten Gerät abgespielt wird",
toast_copyurl_fail: "Die Song-URL konnte nicht in die Zwischenablage kopiert werden",
toast_copyurl_success: "Die Song-URL wurde in die Zwischenablage kopiert"
};
case "el": // Greek
return {
noaccount_header: "Κάτι λείπει",
noaccount_subheader: "Πρέπει να συνδέσετε έναν λογαριασμό Spotify",
noaccount_text: "Λείπει ένας συνδεδεμένος λογαριασμός Spotify, χωρίς λογαριασμό δεν θα μπορείτε να χρησιμοποιήσετε το Spotify Controls. Για να συνδέσετε έναν λογαριασμό Spotify με τον λογαριασμό σας Discord κάντε κλικ στο παρακάτω κουμπί.",
restricted_device: "Δεν είναι δυνατή ο έλεγχος του Spotify κατά την αναπαραγωγή μουσικής σε περιορισμένη συσκευή",
toast_copyurl_fail: "Δεν ήταν δυνατή η αντιγραφή του URL τραγουδιού στο πρόχειρο",
toast_copyurl_success: "Η διεύθυνση URL του τραγουδιού αντιγράφηκε στο πρόχειρο"
};
case "es": // Spanish
return {
noaccount_header: "Algo falta",
noaccount_subheader: "Necesitas conectar una cuenta de Spotify",
noaccount_text: "Falta una cuenta de Spotify conectada, sin una cuenta no podrá usar Spotify Controls. Para conectar una cuenta de Spotify con su cuenta de Discord, haga clic en el botón de abajo.",
restricted_device: "No se puede controlar Spotify mientras se reproduce música en un dispositivo restringido",
toast_copyurl_fail: "No se pudo copiar la URL de la canción al portapapeles",
toast_copyurl_success: "La URL de la canción se copió al portapapeles"
};
case "fi": // Finnish
return {
noaccount_header: "Jotain puuttuu",
noaccount_subheader: "Sinun on yhdistettävä Spotify-tili",
noaccount_text: "Sinulta puuttuu yhdistetty Spotify-tili. Ilman tiliä et voi käyttää Spotify Controls. Yhdistä Spotify-tili Discord-tili napsauttamalla alla olevaa painiketta.",
restricted_device: "Spotify ä ei voi hallita musiikkia toistettaessa rajoitetulla laitteella",
toast_copyurl_fail: "Kappaleen URL-osoitetta ei voitu kopioida leikepöydälle",
toast_copyurl_success: "Kappaleen URL-osoite kopioitiin leikepöydälle"
};
case "fr": // French
return {
noaccount_header: "Quelque chose manque",
noaccount_subheader: "Vous devez connecter un compte Spotify",
noaccount_text: "Il vous manque un compte Spotify connecté, sans compte, vous ne pourrez pas utiliser Spotify Controls. Pour connecter un compte Spotify à votre compte Discord, cliquez sur le bouton ci-dessous.",
restricted_device: "Impossible de contrôler Spotify lors de la lecture de musique sur un appareil restreint",
toast_copyurl_fail: "L'URL de la chanson n'a pas pu être copiée dans le presse-papiers",
toast_copyurl_success: "L'URL de la chanson a été copiée dans le presse-papiers"
};
case "hr": // Croatian
return {
noaccount_header: "Nešto nedostaje",
noaccount_subheader: "Morate povezati Spotify račun",
noaccount_text: "Nedostaje vam povezani Spotify račun, bez računa nećete moći koristiti Spotify Controls. Da biste povezali Spotify račun sa svojim Discord računom, kliknite gumb u nastavku.",
restricted_device: "Ne može kontrolirati Spotify tijekom reprodukcije glazbe na ograničenom uređaju",
toast_copyurl_fail: "URL pjesme nije se mogao kopirati u međuspremnik",
toast_copyurl_success: "URL pjesme kopiran je u međuspremnik"
};
case "hu": // Hungarian
return {
noaccount_header: "Valami hiányzik",
noaccount_subheader: "Csatlakoztatnia kell egy Spotify-fiókot",
noaccount_text: "Hiányzik egy csatlakoztatott Spotify-fiók, fiók nélkül nem fogja tudni használni a (z) Spotify Controls szolgáltatást. Ha Spotify-fiókot szeretne összekapcsolni Discord-fiókot, kattintson az alábbi gombra.",
restricted_device: "Nem lehet irányítani a Spotify szolgáltatást, miközben zenét játszik le korlátozott eszközön",
toast_copyurl_fail: "A dal URL-jét nem sikerült átmásolni a vágólapra",
toast_copyurl_success: "A dal URL-jét a vágólapra másolta"
};
case "it": // Italian
return {
noaccount_header: "Manca qualcosa",
noaccount_subheader: "Devi collegare un account Spotify",
noaccount_text: "Ti manca un account Spotify collegato, senza un account non sarai in grado di utilizzare Spotify Controls. Per collegare un account Spotify al tuo account Discord, fai clic sul pulsante in basso.",
restricted_device: "Non è possibile controllare Spotify durante la riproduzione di musica su un dispositivo limitato",
toast_copyurl_fail: "L'URL del brano non può essere copiato negli appunti",
toast_copyurl_success: "L'URL del brano è stato copiato negli appunti"
};
case "ja": // Japanese
return {
noaccount_header: "何かが欠けています",
noaccount_subheader: "Spotify アカウントを接続する必要があります",
noaccount_text: "接続されている Spotify アカウントがありません。アカウントがないと、 Spotify Controls を使用できません。 Spotify アカウントを Discord アカウントに接続するには、下のボタンをクリックしてください。",
restricted_device: "制限されたデバイスで音楽を再生している間は Spotify を制御できません",
toast_copyurl_fail: "曲のURLをクリップボードにコピーできませんでした",
toast_copyurl_success: "曲のURLがクリップボードにコピーされました"
};
case "ko": // Korean
return {
noaccount_header: "무언가가 빠졌어",
noaccount_subheader: "Spotify 계정을 연결해야합니다",
noaccount_text: "연결된 Spotify 계정이 없습니다. 계정이 없으면 Spotify Controls 을 사용할 수 없습니다. Spotify 계정을 Discord 계정과 연결하려면 아래 버튼을 클릭하세요.",
restricted_device: "제한된 장치에서 음악을 재생하는 동안 Spotify 를 제어 할 수 없습니다.",
toast_copyurl_fail: "노래 URL을 클립 보드에 복사 할 수 없습니다.",
toast_copyurl_success: "노래 URL이 클립 보드에 복사되었습니다. "
};
case "lt": // Lithuanian
return {
noaccount_header: "Kažko trūksta",
noaccount_subheader: "Turite prijungti „ Spotify “ paskyrą",
noaccount_text: "Trūksta prijungtos „ Spotify “ paskyros, be paskyros negalėsite naudoti Spotify Controls. Norėdami susieti „ Spotify “ paskyrą su Discord paskyra, spustelėkite toliau pateiktą mygtuką.",
restricted_device: "Nepavyksta valdyti „ Spotify “ grojant muziką ribotame įrenginyje",
toast_copyurl_fail: "Dainos URL nepavyko nukopijuoti į iškarpinę",
toast_copyurl_success: "Dainos URL buvo nukopijuotas į iškarpinę"
};
case "nl": // Dutch
return {
noaccount_header: "Er mist iets",
noaccount_subheader: "U moet een Spotify-account verbinden",
noaccount_text: "U mist een verbonden Spotify-account. Zonder account kunt u Spotify Controls niet gebruiken. Om een Spotify-account aan uw Discord-account te koppelen, klikt u op de onderstaande knop.",
restricted_device: "Kan Spotify niet bedienen tijdens het afspelen van muziek op een beperkt apparaat",
toast_copyurl_fail: "Nummer-URL kan niet naar klembord worden gekopieerd",
toast_copyurl_success: "Nummer-URL is naar klembord gekopieerd"
};
case "no": // Norwegian
return {
noaccount_header: "Noe mangler",
noaccount_subheader: "Du må koble til en Spotify-konto",
noaccount_text: "Du mangler en tilkoblet Spotify-konto, uten en konto kan du ikke bruke Spotify Controls. For å koble en Spotify-konto til Discord-konto din, klikk på knappen nedenfor.",
restricted_device: "Kan ikke kontrollere Spotify mens du spiller musikk på begrenset enhet",
toast_copyurl_fail: "Sangens URL kunne ikke kopieres til utklippstavlen",
toast_copyurl_success: "Sang-URL ble kopiert til utklippstavlen"
};
case "pl": // Polish
return {
noaccount_header: "Czegoś brakuje",
noaccount_subheader: "Musisz połączyć konto Spotify",
noaccount_text: "Brakuje połączonego konta Spotify, bez konta nie będziesz mógł korzystać z Spotify Controls. Aby połączyć konto Spotify z kontem Discord, kliknij przycisk poniżej.",
restricted_device: "Nie można sterować Spotify podczas odtwarzania muzyki na urządzeniu z ograniczeniami",
toast_copyurl_fail: "Nie udało się skopiować adresu URL utworu do schowka",
toast_copyurl_success: "URL utworu został skopiowany do schowka"
};
case "pt-BR": // Portuguese (Brazil)
return {
noaccount_header: "Algo está faltando",
noaccount_subheader: "Você precisa conectar uma conta Spotify",
noaccount_text: "Está faltando uma conta Spotify conectada, sem uma conta você não poderá usar Spotify Controls. Para conectar uma conta Spotify à sua conta Discord, clique no botão abaixo.",
restricted_device: "Não é possível controlar o Spotify enquanto reproduz música em dispositivo restrito",
toast_copyurl_fail: "O URL da música não pôde ser copiado para a área de transferência",
toast_copyurl_success: "O URL da música foi copiado para a área de transferência"
};
case "ro": // Romanian
return {
noaccount_header: "Ceva lipseste",
noaccount_subheader: "Trebuie să vă conectați un cont Spotify",
noaccount_text: "Vă lipsește un cont Spotify conectat, fără un cont pe care nu îl veți putea folosi Spotify Controls. Pentru a conecta un cont Spotify la contul dvs. Discord faceți clic pe butonul de mai jos.",
restricted_device: "Nu pot controla Spotify în timp ce redați muzică pe dispozitiv restricționat",
toast_copyurl_fail: "Adresa URL a melodiei nu a putut fi copiată în clipboard",
toast_copyurl_success: "Adresa URL a melodiei a fost copiată în clipboard"
};
case "ru": // Russian
return {
noaccount_header: "Что-то пропало",
noaccount_subheader: "Вам необходимо подключить учетную запись Spotify",
noaccount_text: "У вас отсутствует подключенная учетная запись Spotify, без нее вы не сможете использовать Spotify Controls. Чтобы связать учетную запись Spotify со своей учетной записью Discord, нажмите кнопку ниже.",
restricted_device: "Невозможно управлять Spotify во время воспроизведения музыки на ограниченном устройстве",
toast_copyurl_fail: "URL-адрес песни не может быть скопирован в буфер обмена",
toast_copyurl_success: "URL песни скопирован в буфер обмена"
};
case "sv": // Swedish
return {
noaccount_header: "Något saknas",
noaccount_subheader: "Du måste ansluta ett Spotify-konto",
noaccount_text: "Du saknar ett anslutet Spotify-konto utan ett konto kan du inte använda Spotify Controls. För att ansluta ett Spotify-konto till ditt Discord-konto, klicka på knappen nedan.",
restricted_device: "Kan inte styra Spotify när du spelar musik på en begränsad enhet",
toast_copyurl_fail: "Låtens URL kunde inte kopieras till Urklipp",
toast_copyurl_success: "Låtens URL kopierades till Urklipp"
};
case "th": // Thai
return {
noaccount_header: "มีบางอย่างหายไป",
noaccount_subheader: "คุณต้องเชื่อมต่อบัญชี Spotify",
noaccount_text: "คุณไม่มีบัญชี Spotify ที่เชื่อมต่อหากไม่มีบัญชีคุณจะไม่สามารถใช้ Spotify Controls ได้หากต้องการเชื่อมต่อบัญชี Spotify กับบัญชี Discord ของคุณให้คลิกปุ่มด้านล่าง",
restricted_device: "ไม่สามารถควบคุม Spotify ขณะเล่นเพลงบนอุปกรณ์ที่ จำกัด",
toast_copyurl_fail: "ไม่สามารถคัดลอก URL ของเพลงไปยังคลิปบอร์ด",
toast_copyurl_success: "คัดลอก URL ของเพลงไปยังคลิปบอร์ดแล้ว"
};
case "tr": // Turkish
return {
noaccount_header: "Bir şey eksik",
noaccount_subheader: "Spotify Hesabı bağlamanız gerekiyor",
noaccount_text: "Bağlı bir Spotify Hesabınız yok, bir Hesap olmadan Spotify Controls kullanamazsınız. Bir Spotify Hesabını Discord Hesabınıza bağlamak için aşağıdaki düğmeyi tıklayın.",
restricted_device: "Kısıtlı Cihazda Müzik çalarken Spotify 'ı kontrol edemez",
toast_copyurl_fail: "Şarkı URL'si panoya kopyalanamadı",
toast_copyurl_success: "Şarkı URL'si panoya kopyalandı"
};
case "uk": // Ukrainian
return {
noaccount_header: "Щось не вистачає",
noaccount_subheader: "Вам потрібно підключити акаунт Spotify",
noaccount_text: "У вас відсутній підключений обліковий запис Spotify, без якого ви не зможете використовувати Spotify Controls. Щоб підключити обліковий запис Spotify до свого облікового запису Discord, натисніть кнопку нижче.",
restricted_device: "Не вдається керувати Spotify під час відтворення музики на обмеженому пристрої",
toast_copyurl_fail: "URL-адресу пісні не вдалося скопіювати в буфер обміну",
toast_copyurl_success: "URL-адресу пісні скопійовано в буфер обміну"
};
case "vi": // Vietnamese
return {
noaccount_header: "Thiêu một thư gi đo",
noaccount_subheader: "Bạn cần kết nối Tài khoản Spotify",
noaccount_text: "Bạn đang thiếu Tài khoản Spotify được kết nối, nếu không có Tài khoản, bạn sẽ không thể sử dụng Spotify Controls. Để kết nối Tài khoản Spotify với Tài khoản Discord của bạn, hãy nhấp vào nút bên dưới.",
restricted_device: "Không thể điều khiển Spotify khi phát Nhạc trên Thiết bị bị hạn chế",
toast_copyurl_fail: "Không thể sao chép URL bài hát vào khay nhớ tạm",
toast_copyurl_success: "URL bài hát đã được sao chép vào khay nhớ tạm"
};
case "zh-CN": // Chinese (China)
return {
noaccount_header: "缺了点什么",
noaccount_subheader: "您需要连接一个 Spotify 帐户",
noaccount_text: "您缺少关联的 Spotify 帐户,如果没有帐户,将无法使用 Spotify Controls。要将 Spotify 帐户与您的 Discord 帐户关联,请单击下面的按钮。",
restricted_device: "在受限设备上播放音乐时无法控制 Spotify",
toast_copyurl_fail: "歌曲网址无法复制到剪贴板",
toast_copyurl_success: "歌曲网址已复制到剪贴板"
};
case "zh-TW": // Chinese (Taiwan)
return {
noaccount_header: "缺了點什麼",
noaccount_subheader: "您需要連接一個 Spotify 帳戶",
noaccount_text: "您缺少關聯的 Spotify 帳戶,如果沒有帳戶,將無法使用 Spotify Controls。要將 Spotify 帳戶與您的 Discord 帳戶關聯,請單擊下面的按鈕。",
restricted_device: "在受限設備上播放音樂時無法控制 Spotify",
toast_copyurl_fail: "歌曲網址無法複製到剪貼板",
toast_copyurl_success: "歌曲網址已復製到剪貼板"
};
default: // English
return {
noaccount_header: "Something is missing",
noaccount_subheader: "You need to connect a Spotify Account",
noaccount_text: "You are missing a connected Spotify Account, without an Account you won't be able to use Spotify Controls. To connect a Spotify Account with your Discord Account click the button below.",
restricted_device: "Can not control Spotify while playing Music on restricted Device",
toast_copyurl_fail: "Song URL could not be copied to clipboard",
toast_copyurl_success: "Song URL was copied to clipboard"
};
}
}
};
})(window.BDFDB_Global.PluginUtils.buildPlugin(config));
})();