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

Clean up language items

This commit is contained in:
Tim Düsterhus 2013-05-24 19:26:29 +02:00
parent a99430779d
commit 2a9c3882aa
7 changed files with 19 additions and 18 deletions

View File

@ -41,7 +41,7 @@ public function execute() {
'roomID' => $room->roomID, 'roomID' => $room->roomID,
'time' => TIME_NOW, 'time' => TIME_NOW,
'type' => \chat\data\message\Message::TYPE_INFORMATION, 'type' => \chat\data\message\Message::TYPE_INFORMATION,
'message' => \wcf\system\WCF::getLanguage()->get('wcf.chat.information.chatUpdate') 'message' => \wcf\system\WCF::getLanguage()->get('chat.general.information.chatUpdate')
) )
)); ));
$messageAction->executeAction(); $messageAction->executeAction();

View File

@ -91,6 +91,8 @@ When **Tims Chat** loses the focus mark the chat as inactive.
Make the user leave the chat when **Tims Chat** is about to be unloaded. Make the user leave the chat when **Tims Chat** is about to be unloaded.
$(window).on 'beforeunload', -> $(window).on 'beforeunload', ->
return undefined if errorVisible
new WCF.Action.Proxy new WCF.Action.Proxy
autoSend: true autoSend: true
data: data:
@ -282,7 +284,7 @@ Enable duplicate tab detection.
$(window).on 'storage', (event) -> $(window).on 'storage', (event) ->
if event.originalEvent.key is 'be.bastelstu.chat.session' if event.originalEvent.key is 'be.bastelstu.chat.session'
if event.originalEvent.newValue isnt chatSession if event.originalEvent.newValue isnt chatSession
showError WCF.Language.get 'chat.general.error.duplicateTab' showError WCF.Language.get 'chat.error.duplicateTab'
Ask for permissions to use Desktop notifications when notifications are activated. Ask for permissions to use Desktop notifications when notifications are activated.
@ -381,7 +383,7 @@ Fetch new messages from the server and pass them to `handleMessages`. The userli
freeTheFish() freeTheFish()
console.error 'To many failures, aborting' console.error 'To many failures, aborting'
showError WCF.Language.get 'chat.general.error.onMessageLoad' showError WCF.Language.get 'chat.error.onMessageLoad'
complete: -> complete: ->
loading = false loading = false
@ -619,7 +621,7 @@ Shows an unrecoverable error with the given text.
""").appendTo 'body' """).appendTo 'body'
formSubmit = $("""<div class="formSubmit"></div>""").appendTo errorDialog formSubmit = $("""<div class="formSubmit"></div>""").appendTo errorDialog
reloadButton = $("""<button class="buttonPrimary">#{WCF.Language.get 'chat.general.error.reload'}</button>""").appendTo formSubmit reloadButton = $("""<button class="buttonPrimary">#{WCF.Language.get 'chat.error.reload'}</button>""").appendTo formSubmit
reloadButton.on 'click', -> reloadButton.on 'click', ->
window.location.reload() window.location.reload()

View File

@ -36,7 +36,6 @@ class Message extends \chat\data\CHATDatabaseObject {
const TYPE_CLEAR = 9; const TYPE_CLEAR = 9;
const TYPE_TEAM = 10; const TYPE_TEAM = 10;
const TYPE_GLOBALMESSAGE = 11; const TYPE_GLOBALMESSAGE = 11;
const TYPE_ERROR = 12;
/** /**
* cache for users * cache for users
@ -99,7 +98,6 @@ public function getFormattedMessage($type = 'text/html') {
public function getUsername($colored = false) { public function getUsername($colored = false) {
$username = $this->username; $username = $this->username;
if ($this->type == self::TYPE_INFORMATION) return WCF::getLanguage()->get('chat.general.information'); if ($this->type == self::TYPE_INFORMATION) return WCF::getLanguage()->get('chat.general.information');
if ($this->type == self::TYPE_ERROR) return WCF::getLanguage()->get('chat.error');
if ($colored) { if ($colored) {
$username = \chat\util\ChatUtil::gradient($username, $this->color1, $this->color2); $username = \chat\util\ChatUtil::gradient($username, $this->color1, $this->color2);
@ -122,7 +120,6 @@ public function getUsername($colored = false) {
public function jsonify($raw = false) { public function jsonify($raw = false) {
switch ($this->type) { switch ($this->type) {
case self::TYPE_NORMAL: case self::TYPE_NORMAL:
case self::TYPE_ERROR:
case self::TYPE_INFORMATION: case self::TYPE_INFORMATION:
case self::TYPE_WHISPER: case self::TYPE_WHISPER:
$separator = ':'; $separator = ':';

View File

@ -52,7 +52,7 @@ public function __construct(\chat\system\command\CommandHandler $commandHandler)
if (!$typeSuspension->isValid()) continue; if (!$typeSuspension->isValid()) continue;
$dateTime = DateUtil::getDateTimeByTimestamp($typeSuspension->expires); $dateTime = DateUtil::getDateTimeByTimestamp($typeSuspension->expires);
$name = WCF::getLanguage()->getDynamicVariable('chat.information.suspension', array( $name = WCF::getLanguage()->getDynamicVariable('chat.general.information.suspension', array(
'suspension' => $typeSuspension, 'suspension' => $typeSuspension,
'room' => \chat\data\room\RoomCache::getInstance()->getRoom($typeSuspension->roomID) 'room' => \chat\data\room\RoomCache::getInstance()->getRoom($typeSuspension->roomID)
)); ));

View File

@ -50,16 +50,20 @@
<item name="wcf.acp.option.chat_log_archivetime.description"><![CDATA[Zeit, die eine Nachricht im Protokoll abrufbar bleibt. [Zeit in Minuten, -1 für unendlich]]]></item> <item name="wcf.acp.option.chat_log_archivetime.description"><![CDATA[Zeit, die eine Nachricht im Protokoll abrufbar bleibt. [Zeit in Minuten, -1 für unendlich]]]></item>
</category> </category>
<category name="wcf.dashboard">
<item name="wcf.dashboard.box.be.bastelstu.chat.onlineList"><![CDATA[Chat]]></item>
</category>
<category name="chat.error"> <category name="chat.error">
<item name="chat.error"><![CDATA[Fehler]]></item>
<item name="chat.error.notFound"><![CDATA[Der Befehl wurde nicht gefunden.]]></item> <item name="chat.error.notFound"><![CDATA[Der Befehl wurde nicht gefunden.]]></item>
<item name="chat.error.userNotFound"><![CDATA[Der Benutzer „{$exception->getUsername()}“ wurde nicht gefunden.]]></item> <item name="chat.error.userNotFound"><![CDATA[Der Benutzer „{$exception->getUsername()}“ wurde nicht gefunden.]]></item>
<item name="chat.error.permissionDenied"><![CDATA[Sie dürfen diesen Befehl nicht verwenden.]]></item> <item name="chat.error.permissionDenied"><![CDATA[Sie dürfen diesen Befehl nicht verwenden.]]></item>
<item name="chat.error.exception"><![CDATA[Es gab ein Problem bei der Ausführung dieses Befehls. Bitte wenden Sie sich an einen Administrator.]]></item> <item name="chat.error.duplicateTab"><![CDATA[Der Chat wurde in einem weiteren Tab geöffnet.]]></item>
<item name="chat.error.reload"><![CDATA[Neu laden]]></item>
</category> </category>
<category name="chat.general"> <category name="chat.general">
<item name="chat.general.title"><![CDATA[Chat]]></item> <item name="chat.general.title"><![CDATA[{lang}chat.header.menu.chat{/lang}]]></item>
<item name="chat.general.protocol"><![CDATA[Protokoll]]></item> <item name="chat.general.protocol"><![CDATA[Protokoll]]></item>
<item name="chat.general.room"><![CDATA[Chatraum]]></item> <item name="chat.general.room"><![CDATA[Chatraum]]></item>
@ -90,7 +94,7 @@
<item name="chat.general.information"><![CDATA[Information]]></item> <item name="chat.general.information"><![CDATA[Information]]></item>
<item name="chat.general.information.chatUpdate"><![CDATA[Der Chat wurde aktualisiert. Bitte lade die Seite neu, da es sonst zu Fehlern kommen kann.]]></item> <item name="chat.general.information.chatUpdate"><![CDATA[Der Chat wurde aktualisiert. Bitte lade die Seite neu, da es sonst zu Fehlern kommen kann.]]></item>
<item name="chat.information.suspension"><![CDATA[{lang}chat.suspension.{$suspension->type}{/lang} ({if $room}{$room}{else}{lang}chat.room.global{/lang}{/if})]]></item> <item name="chat.general.information.suspension"><![CDATA[{lang}chat.suspension.{$suspension->type}{/lang} ({if $room}{$room}{else}{lang}chat.room.global{/lang}{/if})]]></item>
</category> </category>
<category name="chat.header"> <category name="chat.header">

View File

@ -5,7 +5,7 @@
<packagedescription><![CDATA[Chat for WoltLab Community Framework™.]]></packagedescription> <packagedescription><![CDATA[Chat for WoltLab Community Framework™.]]></packagedescription>
<packagedescription language="de"><![CDATA[Chat für WoltLab Community Framework™.]]></packagedescription> <packagedescription language="de"><![CDATA[Chat für WoltLab Community Framework™.]]></packagedescription>
<isapplication>1</isapplication> <isapplication>1</isapplication>
<version>3.0.0 Alpha 31</version><!-- Codename: Codenames are overrated --> <version>3.0.0 Alpha 34</version><!-- Codename: Codenames are overrated -->
<date>2011-11-26</date> <date>2011-11-26</date>
</packageinformation> </packageinformation>

View File

@ -15,7 +15,9 @@
'chat.general.ban': '{lang}chat.general.ban{/lang}', 'chat.general.ban': '{lang}chat.general.ban{/lang}',
'chat.general.profile': '{lang}chat.general.profile{/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}' 'chat.error.onMessageLoad': '{lang}chat.error.onMessageLoad{/lang}',
'chat.error.duplicateTab': '{lang}chat.error.duplicateTab{/lang}',
'chat.error.reload': '{lang}chat.error.reload{/lang}'
}); });
{event name='beforeInit'} {event name='beforeInit'}
@ -79,10 +81,6 @@
.timsChatMessage{$type|concat:'INFORMATION'|constant}::before { .timsChatMessage{$type|concat:'INFORMATION'|constant}::before {
content: "\f05a"; content: "\f05a";
} }
.timsChatMessage{$type|concat:'ERROR'|constant}::before {
content: "\f05e";
}
/*]]>*/ /*]]>*/
</style> </style>
</head> </head>