diff --git a/mod/chat/gui_ajax/index.php b/mod/chat/gui_ajax/index.php index e49cd47d312d6..30040d8fd747d 100644 --- a/mod/chat/gui_ajax/index.php +++ b/mod/chat/gui_ajax/index.php @@ -12,6 +12,7 @@ } $PAGE->set_url($url); $PAGE->set_popup_notification_allowed(false); // No popup notifications in the chat window +$PAGE->requires->strings_for_js(array('coursetheme', 'bubble', 'compact'), 'mod_chat'); $chat = $DB->get_record('chat', array('id'=>$id), '*', MUST_EXIST); $course = $DB->get_record('course', array('id'=>$chat->course), '*', MUST_EXIST); diff --git a/mod/chat/gui_ajax/module.js b/mod/chat/gui_ajax/module.js index 5972f45ae10a4..fe872839327d1 100644 --- a/mod/chat/gui_ajax/module.js +++ b/mod/chat/gui_ajax/module.js @@ -118,11 +118,11 @@ M.mod_chat_ajax.init = function(Y, cfg) { // Create and initalise theme changing menu this.thememenu = new Y.YUI2.widget.Menu('basicmenu', {xy:[0,0]}); this.thememenu.addItems([ - {text: "Bubble", url: this.cfg.chaturl+'&theme=bubble'}, - {text: "Compact", url: this.cfg.chaturl+'&theme=compact'} + {text: M.util.get_string('bubble', 'mod_chat'), url: this.cfg.chaturl+'&theme=bubble'}, + {text: M.util.get_string('compact', 'mod_chat'), url: this.cfg.chaturl+'&theme=compact'} ]); if (this.cfg.showcoursetheme == 1) { - this.thememenu.addItem({text: "Course theme", url: this.cfg.chaturl+'&theme=course_theme'}); + this.thememenu.addItem({text: M.util.get_string('coursetheme', 'mod_chat'), url: this.cfg.chaturl+'&theme=course_theme'}); } this.thememenu.render(document.body); Y.one('#choosetheme').on('click', function(e){ diff --git a/mod/chat/lang/en/chat.php b/mod/chat/lang/en/chat.php index c8508f58b62f6..139ef6d4978c4 100644 --- a/mod/chat/lang/en/chat.php +++ b/mod/chat/lang/en/chat.php @@ -27,6 +27,7 @@ $string['ajax'] = 'Version using Ajax'; $string['autoscroll'] = 'Auto scroll'; $string['beep'] = 'Beep'; +$string['bubble'] = 'Bubble'; $string['cantlogin'] = 'Could not log in to chat room!!'; $string['composemessage'] = 'Compose a message'; $string['configmethod'] = 'The ajax chat method provide an ajax based chat interface, it contacts server regularly for update. The normal chat method involves the clients regularly contacting the server for updates. It requires no configuration and works everywhere, but it can create a large load on the server with many chatters. Using a server daemon requires shell access to Unix, but it results in a fast scalable chat environment.'; @@ -38,6 +39,7 @@ $string['configserverip'] = 'The numerical IP address that matches the above hostname'; $string['configservermax'] = 'Max number of clients allowed'; $string['configserverport'] = 'Port to use on the server for the daemon'; +$string['compact'] = 'Compact'; $string['coursetheme'] = 'Course theme'; $string['currentchats'] = 'Active chat sessions'; $string['currentusers'] = 'Current users';