mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-08 15:08:59 +01:00
merged r26642 to 1.6, as problem is in 1.6 too (since r26615)
This commit is contained in:
parent
60444db1f1
commit
1c569982a3
@ -1,16 +1,17 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* eGroupWare - Translation Editor
|
* eGroupWare - TranslationTools
|
||||||
*
|
*
|
||||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
|
||||||
* @package etemplate
|
|
||||||
* @link http://www.egroupware.org
|
* @link http://www.egroupware.org
|
||||||
* @author Ralf Becker <RalfBecker@outdoor-training.de>
|
* @author Miles Lott <milos(at)groupwhere.org>
|
||||||
|
* @author Ralf Becker <RalfBecker(at)outdoor-training.de>
|
||||||
|
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||||
|
* @package translationtools
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class solangfile
|
class solangfile
|
||||||
{
|
{
|
||||||
var $total;
|
var $total;
|
||||||
var $debug = False;
|
var $debug = False;
|
||||||
|
|
||||||
@ -38,12 +39,14 @@
|
|||||||
'hook_sidebox_menu.inc.php' => 'file',
|
'hook_sidebox_menu.inc.php' => 'file',
|
||||||
'hook_acl_manager.inc.php' => 'acl_manager'
|
'hook_acl_manager.inc.php' => 'acl_manager'
|
||||||
);
|
);
|
||||||
|
/**
|
||||||
|
* Reference to global db-object
|
||||||
|
*
|
||||||
|
* @var egw_db
|
||||||
|
*/
|
||||||
|
var $db;
|
||||||
|
|
||||||
var $public_functions = array(
|
function __construct()
|
||||||
'index' => True
|
|
||||||
);
|
|
||||||
|
|
||||||
function solangfile()
|
|
||||||
{
|
{
|
||||||
$this->db = $GLOBALS['egw']->db;
|
$this->db = $GLOBALS['egw']->db;
|
||||||
}
|
}
|
||||||
@ -156,7 +159,7 @@
|
|||||||
{
|
{
|
||||||
if (@is_dir($fd.$fn.SEP))
|
if (@is_dir($fd.$fn.SEP))
|
||||||
{
|
{
|
||||||
if (($fn!='.')&&($fn!='..')&&($fn!='CVS'))
|
if (($fn!='.')&&($fn!='..')&&($fn!='CVS') && $fn != '.svn')
|
||||||
{
|
{
|
||||||
$this->parse_php_app($app,$fd.$fn.SEP);
|
$this->parse_php_app($app,$fd.$fn.SEP);
|
||||||
}
|
}
|
||||||
@ -251,7 +254,8 @@
|
|||||||
|
|
||||||
$langarray = array();
|
$langarray = array();
|
||||||
$fd = EGW_SERVER_ROOT . SEP . $app . SEP . ($app == 'setup' ? 'lang' : 'setup');
|
$fd = EGW_SERVER_ROOT . SEP . $app . SEP . ($app == 'setup' ? 'lang' : 'setup');
|
||||||
$fn = $fd . SEP . 'phpgw_' . $userlang . '.lang';
|
$fn = $fd . SEP . EGW_LANGFILE_PREFIX . $userlang . '.lang';
|
||||||
|
|
||||||
if (@is_writeable($fn) || is_writeable($fd))
|
if (@is_writeable($fn) || is_writeable($fd))
|
||||||
{
|
{
|
||||||
$wr = True;
|
$wr = True;
|
||||||
@ -321,7 +325,7 @@
|
|||||||
$from = $GLOBALS['egw']->translation->charset();
|
$from = $GLOBALS['egw']->translation->charset();
|
||||||
//echo "<p>solangfile::write_file('$app_name',,'$userlang') converting from '$from' to charset('$userlang')='$to'</p>\n";
|
//echo "<p>solangfile::write_file('$app_name',,'$userlang') converting from '$from' to charset('$userlang')='$to'</p>\n";
|
||||||
|
|
||||||
$fn = EGW_SERVER_ROOT . SEP . $app_name . SEP . ($app_name == 'setup' ? 'lang' : 'setup') . SEP . 'phpgw_' . $userlang . '.lang';
|
$fn = EGW_SERVER_ROOT . SEP . $app_name . SEP . ($app_name == 'setup' ? 'lang' : 'setup') . SEP . EGW_LANGFILE_PREFIX . $userlang . '.lang';
|
||||||
if (file_exists($fn))
|
if (file_exists($fn))
|
||||||
{
|
{
|
||||||
$backup = $fn . '.old';
|
$backup = $fn . '.old';
|
||||||
@ -362,13 +366,13 @@
|
|||||||
|
|
||||||
return lang('done');
|
return lang('done');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Helper functions for searching new phrases in sidebox, preferences or admin menus
|
* Helper functions for searching new phrases in sidebox, preferences or admin menus
|
||||||
*/
|
*/
|
||||||
if (!function_exists('display_sidebox') && $_GET['menuaction'] == 'developer_tools.uilangfile.missingphrase')
|
if (!function_exists('display_sidebox') && $_GET['menuaction'] == 'developer_tools.uilangfile.missingphrase')
|
||||||
{
|
{
|
||||||
function display_sidebox($appname,$menu_title,$file) // hook_sidebox_menu
|
function display_sidebox($appname,$menu_title,$file) // hook_sidebox_menu
|
||||||
{
|
{
|
||||||
if (!is_array($file)) return;
|
if (!is_array($file)) return;
|
||||||
@ -383,6 +387,9 @@
|
|||||||
$GLOBALS['file'] += $file;
|
$GLOBALS['file'] += $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (!function_exists('display_section') && $_GET['menuaction'] == 'developer_tools.uilangfile.missingphrase')
|
||||||
|
{
|
||||||
function display_section($appname,$file,$file2='') // hook_preferences, hook_admin
|
function display_section($appname,$file,$file2='') // hook_preferences, hook_admin
|
||||||
{
|
{
|
||||||
if (is_array($file2))
|
if (is_array($file2))
|
||||||
@ -400,5 +407,4 @@
|
|||||||
$GLOBALS['file'] += $file;
|
$GLOBALS['file'] += $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
Loading…
Reference in New Issue
Block a user