1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-10-31 14:10:08 +00:00

Add language variable to JS

This commit is contained in:
Tim Düsterhus 2013-04-26 23:10:33 +02:00
parent d9842fcb8d
commit 5da28e7952
2 changed files with 7 additions and 5 deletions

View File

@ -420,11 +420,12 @@ Decrease `@shields` on error and disable PeriodicalExecuters once `@shields` rea
@pe.getMessages.stop()
@freeTheFish()
console.error 'We got destroyed, but could free our friend the fish before he was killed as well. Have a nice life in freedom!'
if not $.wcfIsset('timsChatLoadingErrorDialog') then $('<div id="timsChatLoadingErrorDialog">' + WCF.Language.get('chat.general.error.onMessageLoad') + '</div>').appendTo('body')
$('#timsChatLoadingErrorDialog').wcfDialog({
'closable': false,
$("""<div id="timsChatLoadingErrorDialog">#{WCF.Language.get('chat.general.error.onMessageLoad')}</div>""").appendTo('body') if not $.wcfIsset('timsChatLoadingErrorDialog')
$('#timsChatLoadingErrorDialog').wcfDialog
closable: false,
title: WCF.Language.get('wcf.global.error.title')
})
complete: =>
@loading = false

View File

@ -14,7 +14,8 @@
'chat.general.kick': '{lang}chat.general.kick{/lang}',
'chat.general.ban': '{lang}chat.general.ban{/lang}',
'chat.general.profile': '{lang}chat.general.profile{/lang}',
'chat.general.notify.title': '{lang}chat.general.notify.title{/lang}'
'chat.general.notify.title': '{lang}chat.general.notify.title{/lang}',
'chat.general.error.onMessageLoad': '{lang}chat.general.error.onMessageLoad{/lang}'
});
{event name='beforeInit'}