2019-01-31 17:06:48 +01:00
//META{"name":"SendLargeMessages","website":"https://github.com/mwittrien/BetterDiscordAddons/tree/master/Plugins/SendLargeMessages","source":"https://raw.githubusercontent.com/mwittrien/BetterDiscordAddons/master/Plugins/SendLargeMessages/SendLargeMessages.plugin.js"}*//
2018-10-11 10:21:26 +02:00
class SendLargeMessages {
2019-01-17 23:48:29 +01:00
getName ( ) { return "SendLargeMessages" ; }
2019-02-28 20:09:44 +01:00
getVersion ( ) { return "1.5.3" ; }
2019-01-17 23:48:29 +01:00
getAuthor ( ) { return "DevilBro" ; }
getDescription ( ) { return "Opens a popout when your message is too large, which allows you to automatically send the message in several smaller messages." ; }
2019-01-26 22:45:19 +01:00
2018-10-11 10:21:26 +02:00
initConstructor ( ) {
2019-02-28 20:09:44 +01:00
this . changelog = {
"fixed" : [ [ "Sending" , "Fixed the issue where Messages are not being sent" ] ]
} ;
2018-10-11 10:21:26 +02:00
this . labels = { } ;
2019-01-26 22:45:19 +01:00
2018-12-27 08:57:16 +01:00
this . patchModules = {
"ChannelTextArea" : "componentDidMount"
} ;
2019-01-26 22:45:19 +01:00
2018-10-11 10:21:26 +02:00
this . messageDelay = 1000 ; //changing at own risk, might result in bans or mutes
2019-01-26 22:45:19 +01:00
2018-10-11 10:21:26 +02:00
this . css = `
2019-01-24 13:37:08 +01:00
. $ { this . name } - modal textarea {
2018-10-11 10:21:26 +02:00
rows : 0 ;
cols : 0 ;
height : 100 vw ;
resize : none ;
}
2019-01-24 13:37:08 +01:00
. $ { this . name } - modal # warning - message {
2018-10-11 10:21:26 +02:00
color : red ;
}
2019-01-26 22:45:19 +01:00
2019-01-24 13:37:08 +01:00
. $ { this . name } - modal # character - counter {
2018-10-11 10:21:26 +02:00
float : right ;
color : white ;
opacity : . 5 ;
} ` ;
this . sendMessageModalMarkup =
2019-04-18 09:28:20 +02:00
` <span class=" ${ this . name } -modal BDFDB-modal">
2018-10-11 10:21:26 +02:00
< div class = "${BDFDB.disCN.backdrop}" > < / d i v >
< div class = "${BDFDB.disCN.modal}" >
< div class = "${BDFDB.disCN.modalinner}" >
< div class = "${BDFDB.disCNS.modalsub + BDFDB.disCN.modalsizelarge}" >
< div class = "${BDFDB.disCNS.flex + BDFDB.disCNS.flex2 + BDFDB.disCNS.horizontal + BDFDB.disCNS.horizontal2 + BDFDB.disCNS.directionrow + BDFDB.disCNS.justifystart + BDFDB.disCNS.aligncenter + BDFDB.disCNS.nowrap + BDFDB.disCN.modalheader}" style = "flex: 0 0 auto;" >
< div class = "${BDFDB.disCN.flexchild}" style = "flex: 1 1 auto;" >
< h4 class = "${BDFDB.disCNS.h4 + BDFDB.disCNS.headertitle + BDFDB.disCNS.size16 + BDFDB.disCNS.height20 + BDFDB.disCNS.weightsemibold + BDFDB.disCNS.defaultcolor + BDFDB.disCNS.h4defaultmargin + BDFDB.disCN.marginreset}" > REPLACE _modal _header _text < / h 4 >
< div class = "${BDFDB.disCNS.modalguildname + BDFDB.disCNS.small + BDFDB.disCNS.size12 + BDFDB.disCNS.height16 + BDFDB.disCN.primary}" > < / d i v >
< / d i v >
2019-01-22 20:15:31 +01:00
< button type = "button" class = "${BDFDB.disCNS.modalclose + BDFDB.disCNS.flexchild + BDFDB.disCNS.button + BDFDB.disCNS.buttonlookblank + BDFDB.disCNS.buttoncolorbrand + BDFDB.disCN.buttongrow}" >
< div class = "${BDFDB.disCN.buttoncontents}" >
< svg name = "Close" width = "18" height = "18" viewBox = "0 0 12 12" style = "flex: 0 1 auto;" >
< g fill = "none" fill - rule = "evenodd" >
< path d = "M0 0h12v12H0" > < / p a t h >
< path class = "fill" fill = "currentColor" d = "M9.5 3.205L8.795 2.5 6 5.295 3.205 2.5l-.705.705L5.295 6 2.5 8.795l.705.705L6 6.705 8.795 9.5l.705-.705L6.705 6" > < / p a t h >
< / g >
< / s v g >
< / d i v >
< / b u t t o n >
2018-10-11 10:21:26 +02:00
< / d i v >
2018-11-12 14:32:18 +01:00
< div class = "${BDFDB.disCNS.scrollerwrap + BDFDB.disCNS.modalcontent + BDFDB.disCNS.scrollerthemed + BDFDB.disCNS.themeghosthairline + BDFDB.disCNS.inputwrapper + BDFDB.disCNS.vertical + BDFDB.disCNS.flex + BDFDB.disCNS.directioncolumn + BDFDB.disCNS.flexchild + BDFDB.disCN.modalsubinner}" style = "flex: 1 1 auto;" >
2018-10-11 10:21:26 +02:00
< textarea class = "${BDFDB.disCNS.scroller + BDFDB.disCNS.inputdefault + BDFDB.disCN.input}" id = "modal-inputtext" > < / t e x t a r e a >
< / d i v >
< div class = "${BDFDB.disCNS.flex + BDFDB.disCNS.flex2 + BDFDB.disCNS.horizontal + BDFDB.disCNS.horizontal2 + BDFDB.disCNS.directionrow + BDFDB.disCNS.justifystart + BDFDB.disCNS.alignstart + BDFDB.disCNS.nowrap + BDFDB.disCNS.modalsubinner + BDFDB.disCN.marginbottom8}" style = "flex: 0 0 auto;" >
2018-11-12 14:32:18 +01:00
< h5 id = "warning-message" class = "${BDFDB.disCNS.flexchild + BDFDB.disCNS.h5 + BDFDB.disCNS.size12 + BDFDB.disCNS.height16 + BDFDB.disCNS.weightbold + BDFDB.disCNS.h5defaultmargin}" style = "flex: 1 1 auto;" > < / h 5 >
< h5 id = "character-counter" class = "${BDFDB.disCNS.flexchild + BDFDB.disCNS.h5 + BDFDB.disCNS.size12 + BDFDB.disCNS.height16 + BDFDB.disCNS.weightmedium + BDFDB.disCNS.h5defaultmargin}" style = "flex: 0 0 auto;" > < / h 5 >
2018-10-11 10:21:26 +02:00
< / d i v >
< div class = "${BDFDB.disCNS.flex + BDFDB.disCNS.flex2 + BDFDB.disCNS.horizontalreverse + BDFDB.disCNS.horizontalreverse2 + BDFDB.disCNS.directionrowreverse + BDFDB.disCNS.justifystart + BDFDB.disCNS.alignstretch + BDFDB.disCNS.nowrap + BDFDB.disCN.modalfooter}" >
< button type = "button" class = "btn-send ${BDFDB.disCNS.button + BDFDB.disCNS.buttonlookfilled + BDFDB.disCNS.buttoncolorbrand + BDFDB.disCNS.buttonsizemedium + BDFDB.disCN.buttongrow}" >
< div class = "${BDFDB.disCN.buttoncontents}" > REPLACE _btn _send _text < / d i v >
< / b u t t o n >
< / d i v >
< / d i v >
< / d i v >
< / d i v >
< / s p a n > ` ;
}
//legacy
load ( ) { }
start ( ) {
2019-02-04 09:13:15 +01:00
if ( ! global . BDFDB ) global . BDFDB = { myPlugins : { } } ;
if ( global . BDFDB && global . BDFDB . myPlugins && typeof global . BDFDB . myPlugins == "object" ) global . BDFDB . myPlugins [ this . getName ( ) ] = this ;
2019-01-17 23:48:29 +01:00
var libraryScript = document . querySelector ( 'head script[src="https://mwittrien.github.io/BetterDiscordAddons/Plugins/BDFDB.js"]' ) ;
if ( ! libraryScript || performance . now ( ) - libraryScript . getAttribute ( "date" ) > 600000 ) {
2018-10-11 10:21:26 +02:00
if ( libraryScript ) libraryScript . remove ( ) ;
libraryScript = document . createElement ( "script" ) ;
libraryScript . setAttribute ( "type" , "text/javascript" ) ;
libraryScript . setAttribute ( "src" , "https://mwittrien.github.io/BetterDiscordAddons/Plugins/BDFDB.js" ) ;
2019-01-17 23:48:29 +01:00
libraryScript . setAttribute ( "date" , performance . now ( ) ) ;
2019-01-30 21:23:49 +01:00
libraryScript . addEventListener ( "load" , ( ) => { if ( global . BDFDB && typeof BDFDB === "object" && BDFDB . loaded ) this . initialize ( ) ; } ) ;
2018-10-11 10:21:26 +02:00
document . head . appendChild ( libraryScript ) ;
}
2019-01-17 23:48:29 +01:00
else if ( global . BDFDB && typeof BDFDB === "object" && BDFDB . loaded ) this . initialize ( ) ;
2018-10-11 10:21:26 +02:00
this . startTimeout = setTimeout ( ( ) => { this . initialize ( ) ; } , 30000 ) ;
}
initialize ( ) {
2019-01-17 23:48:29 +01:00
if ( global . BDFDB && typeof BDFDB === "object" && BDFDB . loaded ) {
2019-01-22 11:05:54 +01:00
if ( this . started ) return ;
2018-10-11 10:21:26 +02:00
BDFDB . loadMessage ( this ) ;
2019-01-26 22:45:19 +01:00
2018-11-25 10:11:08 +01:00
this . clipboard = require ( "electron" ) . clipboard ;
2019-01-26 22:45:19 +01:00
2018-12-27 08:57:16 +01:00
BDFDB . WebModules . forceAllUpdates ( this ) ;
2018-10-11 10:21:26 +02:00
}
else {
2019-02-12 21:56:34 +01:00
console . error ( ` %c[ ${ this . getName ( ) } ]%c ` , 'color: #3a71c1; font-weight: 700;' , '' , 'Fatal Error: Could not load BD functions!' ) ;
2018-10-11 10:21:26 +02:00
}
}
stop ( ) {
2019-01-26 22:45:19 +01:00
if ( global . BDFDB && typeof BDFDB === "object" && BDFDB . loaded ) {
2018-10-11 10:21:26 +02:00
BDFDB . unloadMessage ( this ) ;
}
}
2019-01-26 22:45:19 +01:00
2018-10-11 10:21:26 +02:00
// begin of own functions
changeLanguageStrings ( ) {
this . sendMessageModalMarkup = this . sendMessageModalMarkup . replace ( "REPLACE_modal_header_text" , this . labels . modal _header _text ) ;
this . sendMessageModalMarkup = this . sendMessageModalMarkup . replace ( "REPLACE_btn_cancel_text" , this . labels . btn _cancel _text ) ;
this . sendMessageModalMarkup = this . sendMessageModalMarkup . replace ( "REPLACE_btn_send_text" , this . labels . btn _send _text ) ;
}
2019-01-26 22:45:19 +01:00
2018-12-27 08:57:16 +01:00
processChannelTextArea ( instance , wrapper ) {
if ( instance . props && instance . props . type && instance . props . type == "normal" ) {
2019-01-17 23:48:29 +01:00
var textarea = wrapper . querySelector ( "textarea" ) ;
if ( ! textarea ) return ;
let modaltext , checkTextarea = ( ) => {
if ( BDFDB . getParsedLength ( textarea . value ) > 1950 ) {
textarea . selectionStart = 0 ;
textarea . selectionEnd = textarea . value . length ;
document . execCommand ( "insertText" , false , "" ) ;
this . showSendModal ( modaltext ) ;
}
} ;
BDFDB . addEventListener ( this , textarea , "keyup" , e => {
clearTimeout ( textarea . sendlargemessagestimeout ) ;
textarea . sendlargemessagestimeout = setTimeout ( ( ) => {
modaltext = textarea . value ;
checkTextarea ( ) ;
} , 100 ) ;
} ) ;
BDFDB . addEventListener ( this , textarea , "paste" , e => {
modaltext = textarea . value . slice ( 0 , textarea . selectionStart ) + this . clipboard . readText ( ) + textarea . value . slice ( textarea . selectionEnd ) ;
setImmediate ( ( ) => { checkTextarea ( textarea ) ; } ) ;
} ) ;
2018-12-27 08:57:16 +01:00
}
2018-10-11 10:21:26 +02:00
}
2019-01-26 22:45:19 +01:00
2018-10-11 10:21:26 +02:00
showSendModal ( text ) {
2019-01-17 23:48:29 +01:00
let sendMessageModal = BDFDB . htmlToElement ( this . sendMessageModalMarkup ) ;
let textinput = sendMessageModal . querySelector ( "#modal-inputtext" ) ;
let warning = sendMessageModal . querySelector ( "#warning-message" ) ;
let counter = sendMessageModal . querySelector ( "#character-counter" ) ;
2019-01-26 22:45:19 +01:00
2018-12-27 08:57:16 +01:00
let updateCounter = ( ) => {
2019-01-17 23:48:29 +01:00
let parsedlength = BDFDB . getParsedLength ( textinput . value ) ;
2018-12-27 08:57:16 +01:00
let messageAmount = Math . ceil ( parsedlength / 1900 ) ;
2019-01-17 23:48:29 +01:00
warning . innerText = messageAmount > 15 ? this . labels . modal _messages _warning : "" ;
counter . innerText = parsedlength + " (" + ( textinput . selectionEnd - textinput . selectionStart ) + ") => " + this . labels . modal _messages _translation + ": " + messageAmount ;
2018-10-11 10:21:26 +02:00
} ;
2019-01-26 22:45:19 +01:00
2018-10-11 10:21:26 +02:00
BDFDB . appendModal ( sendMessageModal ) ;
2019-01-26 22:45:19 +01:00
2019-01-17 23:48:29 +01:00
BDFDB . addChildEventListener ( sendMessageModal , "click" , ".btn-send" , e => {
let messages = this . formatText ( textinput . value || "" ) ;
messages . forEach ( ( message , i ) => {
2018-10-11 10:21:26 +02:00
setTimeout ( ( ) => {
2019-01-17 23:48:29 +01:00
this . sendMessage ( message ) ;
if ( i >= messages . length - 1 ) BDFDB . showToast ( this . labels . toast _allsent _text , { type : "success" } ) ;
} , this . messageDelay * i ) ;
2018-10-11 10:21:26 +02:00
} ) ;
2019-01-17 23:48:29 +01:00
} ) ;
2019-01-26 22:45:19 +01:00
2019-01-17 23:48:29 +01:00
textinput . value = text || "" ;
textinput . addEventListener ( "keyup" , ( ) => { setTimeout ( ( ) => { updateCounter ( ) ; } , 10 ) ; } ) ;
textinput . addEventListener ( "click" , ( ) => { updateCounter ( ) ; } ) ;
textinput . addEventListener ( "mousedown" , ( ) => {
var mouseup = ( ) => {
document . removeEventListener ( "mouseup" , mouseup ) ;
document . removeEventListener ( "mousemove" , mousemove ) ;
} ;
var mousemove = ( ) => {
setTimeout ( ( ) => { updateCounter ( ) ; } , 10 ) ;
} ;
document . addEventListener ( "mouseup" , mouseup ) ;
document . addEventListener ( "mousemove" , mousemove ) ;
} ) ;
2018-10-11 10:21:26 +02:00
updateCounter ( ) ;
2019-01-17 23:48:29 +01:00
textinput . focus ( ) ;
2018-10-11 10:21:26 +02:00
}
2019-01-26 22:45:19 +01:00
2018-10-11 10:21:26 +02:00
formatText ( text ) {
text = text . replace ( new RegExp ( "\t" , 'g' ) , " " ) ;
2018-12-27 08:57:16 +01:00
let longwords = text . match ( /[\S]{1800,}/gm ) ;
for ( let i in longwords ) {
2018-10-11 10:21:26 +02:00
let longword = longwords [ i ] ;
let count1 = 0 ;
let shortwords = [ ] ;
longword . split ( "" ) . forEach ( ( char ) => {
if ( shortwords [ count1 ] && BDFDB . getParsedLength ( shortwords [ count1 ] ) >= 1800 ) count1 ++ ;
shortwords [ count1 ] = shortwords [ count1 ] ? shortwords [ count1 ] + char : char ;
} ) ;
text = text . replace ( longword , shortwords . join ( " " ) ) ;
}
2018-12-27 08:57:16 +01:00
let messages = [ ] ;
let count2 = 0 ;
2018-10-11 10:21:26 +02:00
text . split ( " " ) . forEach ( ( word ) => {
if ( messages [ count2 ] && BDFDB . getParsedLength ( messages [ count2 ] + "" + word ) > 1900 ) count2 ++ ;
messages [ count2 ] = messages [ count2 ] ? messages [ count2 ] + " " + word : word ;
} ) ;
2019-01-26 22:45:19 +01:00
2018-12-27 08:57:16 +01:00
let insertCodeBlock = null , insertCodeLine = null ;
for ( let j = 0 ; j < messages . length ; j ++ ) {
2018-10-11 10:21:26 +02:00
if ( insertCodeBlock ) {
messages [ j ] = insertCodeBlock + messages [ j ] ;
insertCodeBlock = null ;
}
else if ( insertCodeLine ) {
messages [ j ] = insertCodeLine + messages [ j ] ;
insertCodeLine = null ;
}
2019-01-26 22:45:19 +01:00
2018-12-27 08:57:16 +01:00
let codeBlocks = messages [ j ] . match ( /`{3,}[\S]*\n|`{3,}/gm ) ;
let codeLines = messages [ j ] . match ( /[^`]{0,1}`{1,2}[^`]|[^`]`{1,2}[^`]{0,1}/gm ) ;
2019-01-26 22:45:19 +01:00
2018-10-11 10:21:26 +02:00
if ( codeBlocks && codeBlocks . length % 2 == 1 ) {
messages [ j ] = messages [ j ] + "```" ;
insertCodeBlock = codeBlocks [ codeBlocks . length - 1 ] + "\n" ;
}
else if ( codeLines && codeLines . length % 2 == 1 ) {
insertCodeLine = codeLines [ codeLines . length - 1 ] . replace ( /[^`]/g , "" ) ;
messages [ j ] = messages [ j ] + insertCodeLine ;
}
}
2019-01-26 22:45:19 +01:00
2018-10-11 10:21:26 +02:00
return messages ;
}
2019-01-26 22:45:19 +01:00
2018-10-11 10:21:26 +02:00
sendMessage ( text ) {
2018-12-27 08:57:16 +01:00
let textarea = document . querySelector ( BDFDB . dotCNS . textareawrapchat + "textarea" ) ;
2018-10-11 10:21:26 +02:00
if ( textarea ) {
2019-02-28 20:09:44 +01:00
let instance = BDFDB . getOwnerInstance ( { "node" : BDFDB . getParentEle ( BDFDB . dotCNS . chat + "form" , textarea ) , "name" : "ChannelTextAreaForm" , "up" : true } ) ;
2018-12-08 10:19:02 +01:00
if ( instance ) {
instance . setState ( { textValue : text } ) ;
BDFDB . triggerSend ( textarea ) ;
}
2018-10-11 10:21:26 +02:00
}
}
2019-01-26 22:45:19 +01:00
2018-10-11 10:21:26 +02:00
setLabelsByLanguage ( ) {
switch ( BDFDB . getDiscordLanguage ( ) . id ) {
case "hr" : //croatian
return {
toast _allsent _text : "Sve veliku poslane." ,
modal _messages _translation : "Vijesti" ,
modal _messages _warning : "Nemojte slati previše veliku!" ,
modal _header _text : "Pošalji veliku poruku:" ,
btn _cancel _text : "Prekid" ,
btn _send _text : "Poslati"
} ;
case "da" : //danish
return {
toast _allsent _text : "Alle beskeder sendes." ,
modal _messages _translation : "Beskeder" ,
modal _messages _warning : "Send ikke for mange beskeder!" ,
modal _header _text : "Send stor besked:" ,
btn _cancel _text : "Afbryde" ,
btn _send _text : "Sende"
} ;
case "de" : //german
return {
toast _allsent _text : "Alle Nachrichten versendet." ,
modal _messages _translation : "Nachrichten" ,
modal _messages _warning : "Schicke nicht zu viele Nachrichten!" ,
modal _header _text : "Große Nachricht senden:" ,
btn _cancel _text : "Abbrechen" ,
btn _send _text : "Senden"
} ;
case "es" : //spanish
return {
toast _allsent _text : "Todos los mensajes enviados." ,
modal _messages _translation : "Mensajes" ,
modal _messages _warning : "¡No envíe demasiados mensajes!" ,
modal _header _text : "Enviar mensaje grande:" ,
btn _cancel _text : "Cancelar" ,
btn _send _text : "Enviar"
} ;
case "fr" : //french
return {
toast _allsent _text : "Tous les messages envoyés" ,
modal _messages _translation : "Messages" ,
modal _messages _warning : "N'envoyez pas trop de messages!" ,
modal _header _text : "Envoyer un gros message:" ,
btn _cancel _text : "Abandonner" ,
btn _send _text : "Envoyer"
} ;
case "it" : //italian
return {
toast _allsent _text : "Tutti i messaggi inviati." ,
modal _messages _translation : "Messaggi" ,
modal _messages _warning : "Non inviare troppi messaggi!" ,
modal _header _text : "Invia grande messaggio:" ,
btn _cancel _text : "Cancellare" ,
btn _send _text : "Inviare"
} ;
case "nl" : //dutch
return {
toast _allsent _text : "Alle berichten verzonden." ,
modal _messages _translation : "Berichten" ,
modal _messages _warning : "Stuur niet te veel berichten!" ,
modal _header _text : "Stuur een groot bericht:" ,
btn _cancel _text : "Afbreken" ,
btn _send _text : "Sturen"
} ;
case "no" : //norwegian
return {
toast _allsent _text : "Alle meldinger sendt." ,
modal _messages _translation : "Meldinger" ,
modal _messages _warning : "Ikke send for mange meldinger!" ,
modal _header _text : "Send stor melding:" ,
btn _cancel _text : "Avbryte" ,
btn _send _text : "Sende"
} ;
case "pl" : //polish
return {
toast _allsent _text : "Wszystkie wiadomości zostały wysłane." ,
modal _messages _translation : "Wiadomości" ,
modal _messages _warning : "Nie wysyłaj zbyt wielu wiadomości!" ,
modal _header _text : "Wyślij dużą wiadomość:" ,
btn _cancel _text : "Anuluj" ,
btn _send _text : "Wyślij"
} ;
case "pt-BR" : //portuguese (brazil)
return {
toast _allsent _text : "Todas as mensagens enviadas." ,
modal _messages _translation : "Mensagens" ,
modal _messages _warning : "Não envie muitas mensagens!" ,
modal _header _text : "Enviar mensagem grande:" ,
btn _cancel _text : "Cancelar" ,
btn _send _text : "Enviar"
} ;
case "fi" : //finnish
return {
toast _allsent _text : "Kaikki lähetetyt viestit." ,
modal _messages _translation : "Viestien" ,
modal _messages _warning : "Älä lähetä liian monta viestiä!" ,
modal _header _text : "Lähetä suuri viesti:" ,
btn _cancel _text : "Peruuttaa" ,
btn _send _text : "Lähettää"
} ;
case "sv" : //swedish
return {
toast _allsent _text : "Alla meddelanden skickade." ,
modal _messages _translation : "Meddelanden" ,
modal _messages _warning : "Skicka inte för många meddelanden!" ,
modal _header _text : "Skicka stort meddelande:" ,
btn _cancel _text : "Avbryta" ,
btn _send _text : "Skicka"
} ;
case "tr" : //turkish
return {
toast _allsent _text : "Tüm mesajlar gönderildi." ,
modal _messages _translation : "Mesajları " ,
modal _messages _warning : "Çok fazla mesaj göndermeyin!" ,
modal _header _text : "Büyük mesaj gönder:" ,
btn _cancel _text : "Iptal" ,
btn _send _text : "Göndermek"
} ;
case "cs" : //czech
return {
toast _allsent _text : "Všechny zprávy byly odeslány." ,
modal _messages _translation : "Zpráv" ,
modal _messages _warning : "Neposílejte příliš mnoho zpráv!" ,
modal _header _text : "Odeslat velkou zprávu:" ,
btn _cancel _text : "Zrušení" ,
btn _send _text : "Poslat"
} ;
case "bg" : //bulgarian
return {
toast _allsent _text : "Всички изпратени съобщения." ,
modal _messages _translation : "Съобщения" ,
modal _messages _warning : "Н е изпращайте твърде много съобщения!" ,
modal _header _text : "Изпратете голямо съобщение:" ,
btn _cancel _text : "Зъбести" ,
btn _send _text : "изпращам"
} ;
case "ru" : //russian
return {
toast _allsent _text : "В с е отправленные сообщения." ,
modal _messages _translation : "Сообщения" ,
modal _messages _warning : "Н е отправляйте слишком много сообщений!" ,
modal _header _text : "Отправить сообщение:" ,
btn _cancel _text : "Отмена" ,
btn _send _text : "Послать"
} ;
case "uk" : //ukrainian
return {
toast _allsent _text : "В с і повідомлення надіслано." ,
modal _messages _translation : "Повідомлення" ,
modal _messages _warning : "Н е надсилайте надто багато повідомлень!" ,
modal _header _text : "Надіслати велике повідомлення:" ,
btn _cancel _text : "Скасувати" ,
btn _send _text : "Відправити"
} ;
case "ja" : //japanese
return {
toast _allsent _text : "すべてのメッセージが送信されました。" ,
modal _messages _translation : "メッセージ" ,
modal _messages _warning : "あまりにも多くのメッセージを送信しないでください!" ,
modal _header _text : "大きなメッセージを送信する:" ,
btn _cancel _text : "キャンセル" ,
btn _send _text : "送信"
} ;
case "zh-TW" : //chinese (traditional)
return {
toast _allsent _text : "發送的所有消息。" ,
modal _messages _translation : "消息" ,
modal _messages _warning : "不要發送太多信息!" ,
modal _header _text : "發送大信息:" ,
btn _cancel _text : "取消" ,
btn _send _text : "發送"
} ;
case "ko" : //korean
return {
toast _allsent _text : "모든 메시지가 전송되었습니다." ,
modal _messages _translation : "메시지" ,
modal _messages _warning : "너무 많은 메시지를 보내지 마십시오!" ,
modal _header _text : "큰 메시지 보내기:" ,
btn _cancel _text : "취소" ,
btn _send _text : "보내다"
} ;
default : //default: english
return {
toast _allsent _text : "All messages sent." ,
modal _messages _translation : "Messages" ,
modal _messages _warning : "Do not send too many messages!" ,
modal _header _text : "Send large message:" ,
btn _cancel _text : "Cancel" ,
btn _send _text : "Send"
} ;
}
}
}