mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-05 13:39:23 +01:00
fixed TranslationTools problem in trunk, caused by old copy of
solangfile in etemplate. --> moved that now completely to etemplate (Also updated the docu of TT a bit)
This commit is contained in:
parent
18372ab45e
commit
019dd988c8
@ -1,11 +1,12 @@
|
|||||||
<?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$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -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';
|
||||||
@ -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))
|
||||||
@ -401,4 +408,3 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
Loading…
Reference in New Issue
Block a user