mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-07 14:39:56 +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
|
||||
/**
|
||||
* 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
|
||||
* @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$
|
||||
*/
|
||||
|
||||
class solangfile
|
||||
{
|
||||
class solangfile
|
||||
{
|
||||
var $total;
|
||||
var $debug = False;
|
||||
|
||||
@ -38,12 +39,14 @@
|
||||
'hook_sidebox_menu.inc.php' => 'file',
|
||||
'hook_acl_manager.inc.php' => 'acl_manager'
|
||||
);
|
||||
/**
|
||||
* Reference to global db-object
|
||||
*
|
||||
* @var egw_db
|
||||
*/
|
||||
var $db;
|
||||
|
||||
var $public_functions = array(
|
||||
'index' => True
|
||||
);
|
||||
|
||||
function solangfile()
|
||||
function __construct()
|
||||
{
|
||||
$this->db = $GLOBALS['egw']->db;
|
||||
}
|
||||
@ -156,7 +159,7 @@
|
||||
{
|
||||
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);
|
||||
}
|
||||
@ -251,7 +254,8 @@
|
||||
|
||||
$langarray = array();
|
||||
$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))
|
||||
{
|
||||
$wr = True;
|
||||
@ -321,7 +325,7 @@
|
||||
$from = $GLOBALS['egw']->translation->charset();
|
||||
//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))
|
||||
{
|
||||
$backup = $fn . '.old';
|
||||
@ -362,13 +366,13 @@
|
||||
|
||||
return lang('done');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* 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
|
||||
{
|
||||
if (!is_array($file)) return;
|
||||
@ -383,6 +387,9 @@
|
||||
$GLOBALS['file'] += $file;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!function_exists('display_section') && $_GET['menuaction'] == 'developer_tools.uilangfile.missingphrase')
|
||||
{
|
||||
function display_section($appname,$file,$file2='') // hook_preferences, hook_admin
|
||||
{
|
||||
if (is_array($file2))
|
||||
@ -400,5 +407,4 @@
|
||||
$GLOBALS['file'] += $file;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user