[Vtigercrm-commits] [vtiger-commits] r10433 - in /vtigercrm/branches/5.0.3/include: language/en_us.lang.php utils/CommonUtils.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Wed Mar 14 10:16:35 EDT 2007
Author: saraj
Date: Wed Mar 14 08:16:25 2007
New Revision: 10433
Log:
fix for i18n issue - Notification emails and Allowed file types. Fixes #3056 --Minnie
Modified:
vtigercrm/branches/5.0.3/include/language/en_us.lang.php
vtigercrm/branches/5.0.3/include/utils/CommonUtils.php
Modified: vtigercrm/branches/5.0.3/include/language/en_us.lang.php
==============================================================================
--- vtigercrm/branches/5.0.3/include/language/en_us.lang.php (original)
+++ vtigercrm/branches/5.0.3/include/language/en_us.lang.php Wed Mar 14 08:16:25 2007
@@ -810,7 +810,21 @@
'DATABASE_CHANGE_CONFIRMATION' => 'Are you sure to apply the Database Changes from ',
'TO' => ' to ',
'DELETE_RSSFEED_CONFIRMATION' => 'Are you sure to delete the rss feed?',
-
+//Added for 5.0.3
+'MSG_DEAR'=>'Dear',
+'MSG_REGARDING'=>'Regarding',
+'MSG_UPDATION'=>'updation -',
+'MSG_THE'=>'The',
+'MSG_HAS_BEEN_UPDATED'=>'has been updated',
+'MSG_ASSIGNMENT'=>'assignment -',
+'MSG_HAS_BEEN_ASSIGNED_TO_YOU'=>'has been assigned to you',
+'MSG_DETAILS_ARE'=>'details are',
+'MSG_ID'=>'Id :',
+'MSG_THANK_YOU'=>'Thank You',
+'MSG_HAS_BEEN_CREATED_FOR'=>'has been created for',
+'MSG_THANKS'=>'Thanks,',
+'MSG_VTIGERTEAM'=>' vTiger Team',
+'MSG_IS_NOT_UPLOADED'=>'is not uploaded. Allowed file types - jpeg, png, jpg, pjpeg, x-png or gif',
);
$app_list_strings = array (
Modified: vtigercrm/branches/5.0.3/include/utils/CommonUtils.php
==============================================================================
--- vtigercrm/branches/5.0.3/include/utils/CommonUtils.php (original)
+++ vtigercrm/branches/5.0.3/include/utils/CommonUtils.php Wed Mar 14 08:16:25 2007
@@ -1999,7 +1999,7 @@
**/
function sendNotificationToOwner($module,$focus)
{
- global $log;
+ global $log,$app_strings;
$log->debug("Entering sendNotificationToOwner(".$module.",".$focus.") method ...");
require_once("modules/Emails/mail.php");
global $current_user;
@@ -2046,20 +2046,20 @@
if($module == "Accounts" || $module == "Potentials" || $module == "Contacts")
{
- $description = 'Dear '.$ownername.',<br><br>';
+ $description = $app_strings['MSG_DEAR'].' '.$ownername.',<br><br>';
if($focus->mode == 'edit')
{
- $subject = 'Regarding '.$mod_name.' updation - '.$objectname;
- $description .= 'The '.$mod_name.' has been updated.';
+ $subject = $app_strings['MSG_REGARDING'].' '.$mod_name.' '.$app_strings['MSG_UPDATION'].' '.$objectname;
+ $description .= $app_strings['MSG_THE'].' '.$mod_name.' '.$app_strings['MSG_HAS_BEEN_UPDATED'].'.';
}
else
{
- $subject = 'Regarding '.$mod_name.' assignment - '.$objectname;
- $description .= 'The '.$mod_name.' has been assigned to you.';
- }
- $description .= '<br>The '.$mod_name.' details are:<br><br>';
- $description .= $mod_name.' Id : '.$focus->id.'<br>';
+ $subject = $app_strings['MSG_REGARDING'].' '.$mod_name.' '.$app_strings['MSG_ASSIGNMENT'].' '.$objectname;
+ $description .= $app_strings['MSG_THE'].' '.$mod_name.' '.$app_strings['MSG_HAS_BEEN_ASSIGNED_TO_YOU'].'.';
+ }
+ $description .= '<br>'.$app_strings['MSG_THE'].' '.$mod_name.' '.$app_strings['MSG_DETAILS_ARE'].':<br><br>';
+ $description .= $mod_name.' '.$app_strings['MSG_ID'].' '.$focus->id.'<br>';
foreach($object_column_fields as $fieldname => $fieldlabel)
{
//Get the translated string
@@ -2068,7 +2068,7 @@
$description .= $temp_label.' : <b>'.$focus->column_fields[$fieldname].'</b><br>';
}
- $description .= '<br><br>Thank You <br>';
+ $description .= '<br><br>'.$app_strings['MSG_THANK_YOU'].'<br>';
$status = send_mail($module,$ownermailid,$current_user->user_name,'',$subject,$description);
$log->debug("Exiting sendNotificationToOwner method ...");
@@ -2079,7 +2079,7 @@
//Function to send notification to the users of a group
function sendNotificationToGroups($groupid,$crmid,$module)
{
- global $adb;
+ global $adb,$app_strings;
$returnEntity=Array();
$returnEntity=getEntityName($module,Array($crmid));
$mycrmid=$groupid;
@@ -2096,7 +2096,7 @@
$curr_userid = $adb->query_result($groupqry_res,$z,'id');
$tosender=$adb->query_result($groupqry_res,$z,'user_name');
$pmodule = 'Users';
- $description = "Dear $tosender,<br>$returnEntity[$crmid] has been created for $module.<br><br>Thanks,<br>vTiger Team.";
+ $description = $app_strings['MSG_DEAR']." ".$tosender.",<br>".$returnEntity[$crmid]." ".$app_strings['MSG_HAS_BEEN_CREATED_FOR']." ".$module."<br><br>".$app_strings['MSG_THANKS'].",<br>".$app_strings['MSG_VTIGERTEAM'];
require_once('modules/Emails/mail.php');
$mail_status = send_mail('Emails',$emailadd,$current_user->user_name,'','Record created-vTiger Team',$description,'','','all',$focus->id);
$all_to_emailids []= $emailadd;
@@ -2363,7 +2363,7 @@
*/
function validateImageFile($file_details)
{
- global $adb, $log;
+ global $adb, $log,$app_strings;
$log->debug("Entering into validateImageFile($file_details) method.");
$savefile = 'true';
@@ -2377,7 +2377,7 @@
else
{
$saveimage = 'false';
- $_SESSION['image_type_error'] .= "<br> <b>$file_details[name]</b> is not uploaded. Allowed file types - jpeg, png, jpg, pjpeg, x-png or gif.";
+ $_SESSION['image_type_error'] .= "<br> <b>".$file_details[name]."</b>".$app_strings['MSG_IS_NOT_UPLOADED'];
$log->debug("Invalid Image type == $filetype");
}
More information about the vtigercrm-commits
mailing list