[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: developer_tools/inc class.bolangfile.inc.php, 1.
From: |
Ralf Becker <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: developer_tools/inc class.bolangfile.inc.php, 1.8.2.2.2.6, 1.8.2.2.2.7 class.solangfile.inc.php, 1.9.2.4.2.10, 1.9.2.4.2.11 class.uilangfile.inc.php, 1.10.2.1.2.7, 1.10.2.1.2.8 |
Date: |
Sun, 10 Aug 2003 11:01:53 -0400 |
Update of /cvsroot/phpgroupware/developer_tools/inc
In directory subversions:/tmp/cvs-serv28823
Modified Files:
Tag: Version-0_9_16-branch
class.bolangfile.inc.php class.solangfile.inc.php
class.uilangfile.inc.php
Log Message:
quite a view improvements:
- not translated phrases got marked with red background now
- dev-tools work on setup now
- dev-tools understand/parse the config.tpl files now
- dev-tools preselect admin or preferences for new phrases from
hook_{admin|preferences} and config.tpl
- dev-tools check now against the admin or preferences lang-file too (was only
common before)
Index: class.bolangfile.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/developer_tools/inc/class.bolangfile.inc.php,v
retrieving revision 1.8.2.2.2.6
retrieving revision 1.8.2.2.2.7
diff -C2 -r1.8.2.2.2.6 -r1.8.2.2.2.7
*** class.bolangfile.inc.php 9 Jun 2003 16:38:06 -0000 1.8.2.2.2.6
--- class.bolangfile.inc.php 10 Aug 2003 15:01:51 -0000 1.8.2.2.2.7
***************
*** 21,25 ****
var $missing_langarray = '';
var $target_langarray = '';
! var $common_langarray = '';
var $src_file;
var $src_apps = array();
--- 21,25 ----
var $missing_langarray = '';
var $target_langarray = '';
! var $extra_langarray = array();
var $src_file;
var $src_apps = array();
***************
*** 106,113 ****
{
/* _debug_array($this->source_langarray);exit; */
! $mess_id = strtolower(trim($entry['message_id']));
$this->source_langarray[$mess_id] = array(
'message_id' => $mess_id,
! 'content' => $entry['content'],
'app_name' => $entry['app_name'] ==
'phpgwapi' ? 'common' : $entry['app_name'],
'lang' => 'en'
--- 106,113 ----
{
/* _debug_array($this->source_langarray);exit; */
! $mess_id =
stripslashes(strtolower(trim($entry['message_id'])));
$this->source_langarray[$mess_id] = array(
'message_id' => $mess_id,
! 'content' => stripslashes($entry['content']),
'app_name' => $entry['app_name'] ==
'phpgwapi' ? 'common' : $entry['app_name'],
'lang' => 'en'
***************
*** 142,163 ****
function missing_app($app,$userlang='en')
{
! if (!is_array($this->common_langarray))
{
! $this->common_langarray =
$this->so->add_app('phpgwapi',$userlang);
}
$plist = $this->so->missing_app($app =
trim($app),$userlang);
- if ($app == 'phpgwapi') // phpgwapi is not used ==>
common
- {
- $app = 'common';
- }
foreach($plist as $p => $loc)
{
$_mess_id = strtolower(trim($p));
! if (!empty($_mess_id) &&
!$this->source_langarray[$_mess_id] && !$this->common_langarray[$_mess_id])
{
!
$this->missing_langarray[$_mess_id]['message_id'] = $_mess_id;
!
$this->missing_langarray[$_mess_id]['app_name'] = $app;
!
$this->missing_langarray[$_mess_id]['content'] = $p;
}
}
--- 142,174 ----
function missing_app($app,$userlang='en')
{
! $this->missing_langarray = array();
!
! if (!is_array($this->extra_langarray['common']))
{
! $this->extra_langarray['common'] =
$this->so->add_app('phpgwapi',$userlang);
}
$plist = $this->so->missing_app($app =
trim($app),$userlang);
foreach($plist as $p => $loc)
{
$_mess_id = strtolower(trim($p));
! if ($loc != $app)
! {
! if
(!is_array($this->extra_langarray[$loc]))
! {
! $this->extra_langarray[$loc] =
$this->so->add_app($loc,$userlang);
! //echo "<p>loading translations
for '$loc'</p>\n";
! }
! }
! if (!empty($_mess_id) &&
!$this->source_langarray[$_mess_id] &&
!
!$this->extra_langarray['common'][$_mess_id] &&
! ($app == $loc ||
!$this->extra_langarray[$loc][$_mess_id]))
{
! //echo "Havn't found '$_mess_id'/$loc
!!!<br>\n";
! $this->missing_langarray[$_mess_id] =
array(
! 'message_id' => $_mess_id,
! 'app_name' => $loc,
! 'content' => $p
! );
}
}
Index: class.solangfile.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/developer_tools/inc/class.solangfile.inc.php,v
retrieving revision 1.9.2.4.2.10
retrieving revision 1.9.2.4.2.11
diff -C2 -r1.9.2.4.2.10 -r1.9.2.4.2.11
*** class.solangfile.inc.php 24 May 2003 16:33:57 -0000 1.9.2.4.2.10
--- class.solangfile.inc.php 10 Aug 2003 15:01:51 -0000 1.9.2.4.2.11
***************
*** 34,39 ****
);
var $files = array(
! 'hook_admin.inc.php' => 'file',
! 'hook_preferences.inc.php' => 'file',
'hook_sidebox_menu.inc.php' => 'file',
'hook_acl_manager.inc.php' => 'acl_manager'
--- 34,40 ----
);
var $files = array(
! 'config.tpl' => 'config',
! 'hook_admin.inc.php' => 'file_admin',
! 'hook_preferences.inc.php' => 'file_preferences',
'hook_sidebox_menu.inc.php' => 'file',
'hook_acl_manager.inc.php' => 'acl_manager'
***************
*** 61,71 ****
--- 62,107 ----
}
+ function config_file($app,$fname)
+ {
+ //echo
"<p>solangfile::config_file(app='$app',fname='$fname')</p>\n";
+ $lines = file($fname);
+
+ if ($app != 'setup')
+ {
+ $app = 'admin';
+ }
+ foreach($lines as $n => $line)
+ {
+ while
(ereg('\{lang_([^}]+)\}(.*)',$line,$found))
+ {
+ $lang = str_replace('_',' ',$found[1]);
+ $this->plist[$lang] = $app;
+
+ $line = $found[2];
+ }
+ }
+ }
+
function special_file($app,$fname,$langs_in)
{
//echo
"<p>solangfile::special_file(app='$app',fname='$fname',langs_in='$langs_in')</p>\n";
+ switch ($langs_in)
+ {
+ case 'config':
+ $this->config_file($app,$fname);
+ return;
+ case 'file_admin':
+ case 'file_preferences':
+ $app = substr($langs_in,5);
+ break;
+ case 'phpgwapi':
+ $app = 'common';
+ break;
+ }
if (!function_exists('display_sidebox'))
{
function
display_sidebox($appname,$menu_title,$file) // hook_sidebox_menu
{
+ unset($file['_NewLine_']);
$GLOBALS['file'] += $file;
}
***************
*** 130,134 ****
}
}
! elseif ((strpos($fn,'.php')>1) &&
(is_readable($fd.$fn)))
{
if (isset($this->files[$fn]))
--- 166,170 ----
}
}
! elseif (is_readable($fd.$fn))
{
if (isset($this->files[$fn]))
***************
*** 136,139 ****
--- 172,179 ----
$this->special_file($app,$fd.$fn,$this->files[$fn]);
}
+ if (strpos($fn,'.php') === False)
+ {
+ continue;
+ }
$lines = file($fd.$fn);
***************
*** 179,183 ****
$rest =
substr($rest,$next+1);
}
! if(!ereg("[
\t\n]*,[ \t\n]*(.*)$",$rest,$parts))
{
break;
// nothing found
--- 219,223 ----
$rest =
substr($rest,$next+1);
}
! if(!ereg("[
\t\n]*,[ \t\n]*(.*)$",$rest,$parts))
{
break;
// nothing found
***************
*** 199,203 ****
$fd = PHPGW_SERVER_ROOT . SEP . $app . SEP;
$this->plist = array();
! $this->parse_php_app($app,$fd);
reset($this->plist);
return($this->plist);
--- 239,244 ----
$fd = PHPGW_SERVER_ROOT . SEP . $app . SEP;
$this->plist = array();
! $this->parse_php_app($app == 'phpgwapi' ? 'common' :
$app,$fd);
!
reset($this->plist);
return($this->plist);
***************
*** 213,217 ****
define('SEP',filesystem_separator());
! $fd = PHPGW_SERVER_ROOT . SEP . $app . SEP . 'setup';
$fn = $fd . SEP . 'phpgw_' . $userlang . '.lang';
if (@is_writeable($fn) || is_writeable($fd))
--- 254,258 ----
define('SEP',filesystem_separator());
! $fd = PHPGW_SERVER_ROOT . SEP . $app . SEP . ($app ==
'setup' ? 'lang' : 'setup');
$fn = $fd . SEP . 'phpgw_' . $userlang . '.lang';
if (@is_writeable($fn) || is_writeable($fd))
***************
*** 265,269 ****
$langarray = array();
! $fd = PHPGW_SERVER_ROOT . SEP . $app . SEP . 'setup';
$fn = $fd . SEP . 'phpgw_' . $userlang . '.lang';
if (@is_writeable($fn) || is_writeable($fd))
--- 306,310 ----
$langarray = array();
! $fd = PHPGW_SERVER_ROOT . SEP . $app . SEP . ($app ==
'setup' ? 'lang' : 'setup');
$fn = $fd . SEP . 'phpgw_' . $userlang . '.lang';
if (@is_writeable($fn) || is_writeable($fd))
***************
*** 331,335 ****
function write_file($app_name,$langarray,$userlang)
{
! $fn = PHPGW_SERVER_ROOT . SEP . $app_name . SEP .
'setup' . SEP . 'phpgw_' . $userlang . '.lang';
if (file_exists($fn))
{
--- 372,376 ----
function write_file($app_name,$langarray,$userlang)
{
! $fn = PHPGW_SERVER_ROOT . SEP . $app_name . SEP . ($app
== 'setup' ? 'lang' : 'setup') . SEP . 'phpgw_' . $userlang . '.lang';
if (file_exists($fn))
{
Index: class.uilangfile.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/developer_tools/inc/class.uilangfile.inc.php,v
retrieving revision 1.10.2.1.2.7
retrieving revision 1.10.2.1.2.8
diff -C2 -r1.10.2.1.2.7 -r1.10.2.1.2.8
*** class.uilangfile.inc.php 9 Jun 2003 16:38:06 -0000 1.10.2.1.2.7
--- class.uilangfile.inc.php 10 Aug 2003 15:01:51 -0000 1.10.2.1.2.8
***************
*** 160,164 ****
}
$missingarray = $this->bo->missing_langarray;
! //echo "missingarray=<pre>"; print_r($missingarray);
echo "</pre>\n";
if ($update)
{
--- 160,164 ----
}
$missingarray = $this->bo->missing_langarray;
! //echo "missingarray=<pre>";
print_r($this->bo->missing_langarray); echo "</pre>\n";
if ($update)
{
***************
*** 462,466 ****
$this->template->set_var('content',htmlspecialchars($transy));
$this->template->set_var('transapp',$this->lang_option($app_name,$data['app_name'],$mess_id));
!
$this->template->set_var('tr_color',$this->nextmatchs->alternate_row_color());
if (strlen($key) > 50)
{
--- 462,466 ----
$this->template->set_var('content',htmlspecialchars($transy));
$this->template->set_var('transapp',$this->lang_option($app_name,$data['app_name'],$mess_id));
!
$this->template->set_var('tr_color',empty($transy) ?
$GLOBALS['phpgw_info']['theme']['bg06'] :
$this->nextmatchs->alternate_row_color());
if (strlen($key) > 50)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: developer_tools/inc class.bolangfile.inc.php, 1.8.2.2.2.6, 1.8.2.2.2.7 class.solangfile.inc.php, 1.9.2.4.2.10, 1.9.2.4.2.11 class.uilangfile.inc.php, 1.10.2.1.2.7, 1.10.2.1.2.8,
Ralf Becker <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: setup/lang phpgw_en.lang, 1.26.2.8, 1.26.2.9 phpgw_fr.lang, 1.9.2.7, 1.9.2.8
- Next by Date:
[Phpgroupware-cvs] CVS: developer_tools/inc class.solangfile.inc.php, 1.9.2.4.2.11, 1.9.2.4.2.12
- Previous by thread:
[Phpgroupware-cvs] CVS: setup/lang phpgw_en.lang, 1.26.2.8, 1.26.2.9 phpgw_fr.lang, 1.9.2.7, 1.9.2.8
- Next by thread:
[Phpgroupware-cvs] CVS: developer_tools/inc class.solangfile.inc.php, 1.9.2.4.2.11, 1.9.2.4.2.12
- Index(es):