[Vtigercrm-commits] [vtiger-commits] r7906 - in /branches/VTIGERCRM-5.0.2-MMBRICH: Smarty/templates/ include/js/objects/ include/language/ modules/CommSystem/ modules/CommSystem/language/ themes/blue/

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Sat Jul 8 18:05:35 EDT 2006


Author: mmbrich
Date: Sat Jul  8 16:05:34 2006
New Revision: 7906

Log:
fixed internationalization

Modified:
    branches/VTIGERCRM-5.0.2-MMBRICH/Smarty/templates/Header.tpl
    branches/VTIGERCRM-5.0.2-MMBRICH/include/js/objects/CommSystem.js
    branches/VTIGERCRM-5.0.2-MMBRICH/include/language/en_us.lang.php
    branches/VTIGERCRM-5.0.2-MMBRICH/modules/CommSystem/CommSystemAjax.php
    branches/VTIGERCRM-5.0.2-MMBRICH/modules/CommSystem/language/en_us.lang.php
    branches/VTIGERCRM-5.0.2-MMBRICH/themes/blue/header.php

Modified: branches/VTIGERCRM-5.0.2-MMBRICH/Smarty/templates/Header.tpl
==============================================================================
--- branches/VTIGERCRM-5.0.2-MMBRICH/Smarty/templates/Header.tpl (original)
+++ branches/VTIGERCRM-5.0.2-MMBRICH/Smarty/templates/Header.tpl Sat Jul  8 16:05:34 2006
@@ -435,7 +435,7 @@
 var VtUser = {}
 new VtigerUser();
 addOnloadEvent(function() {
-	CS = new CommSystem("CommSliderDiv",VtUser);
+	CS = new CommSystem("CommSliderDiv",VtUser,{/literal}"{$APP.LBL_CHATTING_WITH}"{literal},{/literal}"{$APP.LBL_SEND_VALUE}"{literal});
 });
 
 </SCRIPT>

Modified: branches/VTIGERCRM-5.0.2-MMBRICH/include/js/objects/CommSystem.js
==============================================================================
--- branches/VTIGERCRM-5.0.2-MMBRICH/include/js/objects/CommSystem.js (original)
+++ branches/VTIGERCRM-5.0.2-MMBRICH/include/js/objects/CommSystem.js Sat Jul  8 16:05:34 2006
@@ -2,7 +2,7 @@
 CommSystem = Class.create();
 } catch(r){alert(r);}
 CommSystem.prototype = {
-    	initialize: function(element,CurrentUser) {
+    	initialize: function(element,CurrentUser,chatWith,sendValue) {
 		this.debug=true;
         	this.refreshtime = '1000'; 
         	this.username = VtUser.user_name;
@@ -15,6 +15,8 @@
 		this.user=CurrentUser;
 		this.tmpCount=0;
 		this.Focused='true';
+		this.ChattingWith=chatWith;
+		this.SendValue=sendValue;
     	},
 
 	/* 
@@ -181,7 +183,7 @@
 			user_name: usr_name,
 			timestamp: myDate.getHours()+":"+myDate.getMinutes()+":"+myDate.getSeconds()
 		}
-		this.ShowNewChatMessage(msgStruct, "Chatting with "+usr_name);
+		this.ShowNewChatMessage(msgStruct, this.ChattingWith+" "+usr_name);
 	},
 
 	/*
@@ -286,7 +288,7 @@
 							)] 
 						)],
 						[ Builder.node(
-							'p',{id:'status_bar_'+msg.sending_user},'Status Bar'
+							'p',{id:'status_bar_'+msg.sending_user}
 						)],
 						{width:'100%',colspan:'2'}
 					)]
@@ -306,7 +308,7 @@
 						$("chat_data_"+msg.sending_user).innerHTML += "<br>"+msg.msg_data;
 					}
 				    );
-					$("msg_wrapper_"+msg.sending_user).innerHTML += '<input type="submit" class="button" value="Send" id="send_button_'+msg.sending_user+'" name="'+msg.sending_user+'">';
+					$("msg_wrapper_"+msg.sending_user).innerHTML += '<input type="submit" class="button" value="'+globalCommSystem.SendValue+'" id="send_button_'+msg.sending_user+'" name="'+msg.sending_user+'">';
 					Event.observe($("msg_input_"+msg.sending_user), 'keypress', globalCommSystem.UserTyping.bindAsEventListener(this));
 					Event.observe($("send_button_"+msg.sending_user), 'click', globalCommSystem.SendMsg.bindAsEventListener(this));
 				}catch(g){alert(g);}
@@ -438,7 +440,7 @@
 				    switch(msg_type) {
 					case 'P2PIM':
 						window.setTimeout('globalCommSystem.MarkAsRead("'+msgid+'")',3000);
-						globalCommSystem.ShowNewChatMessage(msg,"Chatting with "+msg.user_name);
+						globalCommSystem.ShowNewChatMessage(msg,globalCommSystem.ChattingWith+" "+msg.user_name);
 					break;
 					case 'GRPIM':
 						window.setTimeout('globalCommSystem.MarkAsRead("'+msgid+'")',3000);

Modified: branches/VTIGERCRM-5.0.2-MMBRICH/include/language/en_us.lang.php
==============================================================================
--- branches/VTIGERCRM-5.0.2-MMBRICH/include/language/en_us.lang.php (original)
+++ branches/VTIGERCRM-5.0.2-MMBRICH/include/language/en_us.lang.php Sat Jul  8 16:05:34 2006
@@ -947,6 +947,11 @@
 'LBL_RECORD_ID'=>'Record ID',
 'LBL_ACTION_DATE'=>'Action Date',
 
+'LBL_CRM_USERS'=>'CRM Users:',
+'LBL_HELPDESK_USERS'=>'Help Desk Users',
+'LBL_CHATTING_WITH'=>'Chatting with ',
+'LBL_SEND_VALUE'=>'Send Message ',
+
 );
 
 

Modified: branches/VTIGERCRM-5.0.2-MMBRICH/modules/CommSystem/CommSystemAjax.php
==============================================================================
--- branches/VTIGERCRM-5.0.2-MMBRICH/modules/CommSystem/CommSystemAjax.php (original)
+++ branches/VTIGERCRM-5.0.2-MMBRICH/modules/CommSystem/CommSystemAjax.php Sat Jul  8 16:05:34 2006
@@ -1,4 +1,9 @@
 <?
+global $current_user;
+require_once('Smarty_setup.php');
+require_once("data/Tracker.php");
+require_once('themes/'.$theme.'/layout_utils.php');
+
 require_once('include/database/PearDatabase.php');
 require_once('include/logging.php');
 require_once('include/utils/utils.php');
@@ -118,12 +123,13 @@
 function send_typing_message($receivers) {
 	require_once("modules/CommSystem/CommSystem.php");
 	global $adb;
+	global $mod_strings;
 	$commSys = new CommSystem();
 
 	if($_REQUEST["period"] == "begin")
-		$tmsg = "User is typing a message";
+		$tmsg = $mod_strings['LBL_USER_TYPING'];
 	else
-		$tmsg = "User stopped typing";
+		$tmsg = $mod_strings['LBL_USER_STOP_TYPING'];
 
 	$adb->query("delete from vtiger_comm_system where msg_type='STATUS' AND sending_user='".$_SESSION["authenticated_user_id"]."' AND receivers='".$receivers."'");
 

Modified: branches/VTIGERCRM-5.0.2-MMBRICH/modules/CommSystem/language/en_us.lang.php
==============================================================================
--- branches/VTIGERCRM-5.0.2-MMBRICH/modules/CommSystem/language/en_us.lang.php (original)
+++ branches/VTIGERCRM-5.0.2-MMBRICH/modules/CommSystem/language/en_us.lang.php Sat Jul  8 16:05:34 2006
@@ -1,10 +1,9 @@
 <?php
 $mod_strings = Array(
-'LBL_MODULE_NAME'=>'Emails',
-'LBL_MODULE_TITLE'=>'Emails: Home',
-'LBL_SEARCH_FORM_TITLE'=>'Email Search',
-'LBL_LIST_FORM_TITLE'=>'Email List',
-'LBL_NEW_FORM_TITLE'=>'Track Email'
+'LBL_MODULE_NAME'=>'Communications System',
+'LBL_MODULE_TITLE'=>'Comm Sysytem Home',
+'LBL_USER_TYPING'=>'User is typing...',
+'LBL_USER_STOP_TYPING'=>'User stopped typing.'
 );
 
 ?>

Modified: branches/VTIGERCRM-5.0.2-MMBRICH/themes/blue/header.php
==============================================================================
--- branches/VTIGERCRM-5.0.2-MMBRICH/themes/blue/header.php (original)
+++ branches/VTIGERCRM-5.0.2-MMBRICH/themes/blue/header.php Sat Jul  8 16:05:34 2006
@@ -103,12 +103,12 @@
 
 $q = "select user_name,id from vtiger_users";
 $rs = $adb->query($q);
-$list = "<br><center><b><u>CRM Users:</u></b><br>";
+$list = "<br><center><b><u>".$app_strings['LBL_CRM_USERS']."</u></b><br>";
 while($row=$adb->fetch_array($rs)) {
 	if($row["id"] != $_SESSION["authenticated_user_id"])
 		$list .= "<br><a href='javascript:;' onclick='CS.OpenChatSession(\"".$row["id"]."\",\"".$row["user_name"]."\");'>".$row["user_name"]."</a>";
 }
-$list .= "<br><br><b><u>HelpDesk Users</u></b><br>";
+$list .= "<br><br><b><u>".$app_strings['LBL_HELPDESK_USERS']."</u></b><br>";
 $list .= "</center>";
 
 $smarty->assign("USERLIST",$list);





More information about the vtigercrm-commits mailing list