Skip to content

Commit

Permalink
MDL-42711 made all theme menu strings in chat popup translatable
Browse files Browse the repository at this point in the history
  • Loading branch information
Aparup Banerjee committed Nov 13, 2013
1 parent 9c53c70 commit 6f8624f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions mod/chat/gui_ajax/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions mod/chat/gui_ajax/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand Down
2 changes: 2 additions & 0 deletions mod/chat/lang/en/chat.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.';
Expand All @@ -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';
Expand Down

0 comments on commit 6f8624f

Please sign in to comment.