MDL-42711 made all theme menu strings in chat popup translatable

This commit is contained in:
Aparup Banerjee 2013-11-13 16:22:34 +08:00
parent 9c53c70c3c
commit 6f8624f77a
3 changed files with 6 additions and 3 deletions

View File

@ -12,6 +12,7 @@ if ($groupid !== 0) {
}
$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);

View File

@ -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){

View File

@ -27,6 +27,7 @@ $string['activityoverview'] = 'You have upcoming chat sessions';
$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['configserverhost'] = 'The hostname of the computer where the server dae
$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';