[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.8
From: |
Ralf Becker <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: developer_tools/inc class.bolangfile.inc.php,1.8.2.2.2.2,1.8.2.2.2.3 class.solangfile.inc.php,1.9.2.4.2.4,1.9.2.4.2.5 class.uilangfile.inc.php,1.10.2.1.2.3,1.10.2.1.2.4 |
Date: |
Sun, 06 Apr 2003 20:32:24 -0400 |
Update of /cvsroot/phpgroupware/developer_tools/inc
In directory subversions:/tmp/cvs-serv649
Modified Files:
Tag: Version-0_9_16-branch
class.bolangfile.inc.php class.solangfile.inc.php
class.uilangfile.inc.php
Log Message:
some more tweaks to get more phrases found and correct handled
Index: class.bolangfile.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/developer_tools/inc/class.bolangfile.inc.php,v
retrieving revision 1.8.2.2.2.2
retrieving revision 1.8.2.2.2.3
diff -C2 -r1.8.2.2.2.2 -r1.8.2.2.2.3
*** class.bolangfile.inc.php 5 Apr 2003 22:11:00 -0000 1.8.2.2.2.2
--- class.bolangfile.inc.php 7 Apr 2003 00:32:22 -0000 1.8.2.2.2.3
***************
*** 126,129 ****
--- 126,130 ----
}
}
+ //else echo "'$mess' not found in missing_langarray
!!!<br>\n";
}
***************
*** 135,139 ****
}
$plist = $this->so->missing_app($app,$userlang);
! while (list($p,$loc) = each($plist))
{
$_mess_id = strtolower(trim($p));
--- 136,140 ----
}
$plist = $this->so->missing_app($app,$userlang);
! foreach($plist as $p => $loc)
{
$_mess_id = strtolower(trim($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.4
retrieving revision 1.9.2.4.2.5
diff -C2 -r1.9.2.4.2.4 -r1.9.2.4.2.5
*** class.solangfile.inc.php 5 Apr 2003 23:27:00 -0000 1.9.2.4.2.4
--- class.solangfile.inc.php 7 Apr 2003 00:32:22 -0000 1.9.2.4.2.5
***************
*** 29,33 ****
'create_check_box' => array(1,3),
'create_select_box' => array(1,4),
! 'create_text_area' => array(1,3),
'create_password_box' => array(1,3)
);
--- 29,33 ----
'create_check_box' => array(1,3),
'create_select_box' => array(1,4),
! 'create_text_area' => array(1,5),
'create_password_box' => array(1,3)
);
***************
*** 92,96 ****
if
($args[0] == $i)
{
!
//echo ">>>$phrase<<<<br>\n";
$plist[$phrase] = $app;
array_shift($args);
--- 92,96 ----
if
($args[0] == $i)
{
!
//if (!isset($plist[$phrase])) echo ">>>$phrase<<<<br>\n";
$plist[$phrase] = $app;
array_shift($args);
Index: class.uilangfile.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/developer_tools/inc/class.uilangfile.inc.php,v
retrieving revision 1.10.2.1.2.3
retrieving revision 1.10.2.1.2.4
diff -C2 -r1.10.2.1.2.3 -r1.10.2.1.2.4
*** class.uilangfile.inc.php 6 Apr 2003 00:29:11 -0000 1.10.2.1.2.3
--- class.uilangfile.inc.php 7 Apr 2003 00:32:22 -0000 1.10.2.1.2.4
***************
*** 137,149 ****
}
$missingarray =
$this->bo->missing_app($app_name,$sourcelang);
if ($update)
{
$deleteme = $_POST['delete'];
while (list($_mess,$_checked) =
@each($deleteme))
{
if($_checked == 'on')
{
! $id =
$this->htmlspecialchars($_mess,True);
! $this->bo->movephrase($id);
/*
_debug_array($missingarray[$_mess]); */
unset($missingarray[$_mess]);
--- 137,152 ----
}
$missingarray =
$this->bo->missing_app($app_name,$sourcelang);
+ //echo "missingarray=<pre>"; print_r($missingarray);
echo "</pre>\n";
if ($update)
{
$deleteme = $_POST['delete'];
+ //echo "deleteme=<pre>"; print_r($deleteme);
echo "</pre>\n";
+
while (list($_mess,$_checked) =
@each($deleteme))
{
if($_checked == 'on')
{
! $_mess =
$this->recode_id($_mess);
! $this->bo->movephrase($_mess);
/*
_debug_array($missingarray[$_mess]); */
unset($missingarray[$_mess]);
***************
*** 171,208 ****
$this->template->set_var('lang_update',lang('Save'));
$this->template->set_var('lang_view',lang('Back'));
! $languages = $this->bo->list_langs();
! while (list($x,$_lang) = @each($languages))
! {
! $sourcelangs .= ' <option value="' .
$_lang['lang_id'] . '"';
! if ($sourcelang)
! {
! if ($_lang['lang_id'] == $sourcelang)
! {
! $sourcelangs .= ' selected';
! }
! }
! elseif ($_lang['lang_id'] == 'EN')
! {
! $sourcelangs .= ' selected';
! }
! $sourcelangs .= '>' . $_lang['lang_name'] .
'</option>' . "\n";
! }
! @reset($languages);
! while (list($x,$_lang) = @each($languages))
! {
! $targetlangs .= ' <option value="' .
$_lang['lang_id'] . '"';
! if ($targetlang)
! {
! if ($_lang['lang_id'] == $targetlang)
! {
! $targetlangs .= ' selected';
! }
! }
! elseif ($_lang['lang_id'] == 'EN')
! {
! $targetlangs .= ' selected';
! }
! $targetlangs .= '>' . $_lang['lang_name'] .
'</option>' . "\n";
! }
$this->template->set_var('action_url',$GLOBALS['phpgw']->link('/index.php','menuaction=developer_tools.uilangfile.missingphrase'));
$this->template->set_var('sourcelang',$sourcelang);
--- 174,178 ----
$this->template->set_var('lang_update',lang('Save'));
$this->template->set_var('lang_view',lang('Back'));
!
$this->template->set_var('action_url',$GLOBALS['phpgw']->link('/index.php','menuaction=developer_tools.uilangfile.missingphrase'));
$this->template->set_var('sourcelang',$sourcelang);
***************
*** 224,234 ****
);
$this->template->pfp('out','postheader');
- $translation =
$this->bo->load_app($app_name,$targetlang);
while(list($key,$data) = @each($missingarray))
{
! $mess_id =
$this->htmlspecialchars($key);
! $content = $data['content'];
$this->template->set_var('mess_id',$mess_id);
!
$this->template->set_var('source_content',htmlspecialchars($content));
$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());
--- 194,202 ----
);
$this->template->pfp('out','postheader');
while(list($key,$data) = @each($missingarray))
{
! $mess_id = $this->encode_id($key);
$this->template->set_var('mess_id',$mess_id);
!
$this->template->set_var('source_content',htmlspecialchars($data['content']));
$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());
***************
*** 404,408 ****
if($_mess)
{
! $_mess =
strtolower(trim($this->htmlspecialchars($_mess,True)));
$this->bo->source_langarray[$_mess]['app_name'] = $_app;
$this->bo->target_langarray[$_mess]['app_name'] = $_app;
--- 372,376 ----
if($_mess)
{
! $_mess =
strtolower(trim($this->recode_id($_mess)));
$this->bo->source_langarray[$_mess]['app_name'] = $_app;
$this->bo->target_langarray[$_mess]['app_name'] = $_app;
***************
*** 413,417 ****
if($_mess && $_cont)
{
! $_mess =
strtolower(trim($this->htmlspecialchars($_mess,True)));
//Known issue: if a message
containing a ] is used as index of array, when the array is posted the index
gets truncated;
$this->bo->target_langarray[$_mess]['message_id'] = $_mess;
--- 381,385 ----
if($_mess && $_cont)
{
! $_mess =
strtolower(trim($this->recode_id($_mess)));
//Known issue: if a message
containing a ] is used as index of array, when the array is posted the index
gets truncated;
$this->bo->target_langarray[$_mess]['message_id'] = $_mess;
***************
*** 429,433 ****
if($_checked == 'on')
{
! $_mess =
strtolower(trim($this->htmlspecialchars($_mess,True)));
unset($this->bo->source_langarray[$_mess]);
unset($this->bo->target_langarray[$_mess]);
--- 397,401 ----
if($_checked == 'on')
{
! $_mess =
strtolower(trim($this->recode_id($_mess)));
unset($this->bo->source_langarray[$_mess]);
unset($this->bo->target_langarray[$_mess]);
***************
*** 466,473 ****
while(list($key,$data) = @each($langarray))
{
! $mess_id =
$this->htmlspecialchars($key);
$content = $data['content'];
$transy =
$translation[$key]['content'];
!
$this->template->set_var('mess_id',$this->htmlspecialchars($key));
$this->template->set_var('source_content',htmlspecialchars($content));
$this->template->set_var('content',htmlspecialchars($transy));
--- 434,441 ----
while(list($key,$data) = @each($langarray))
{
! $mess_id = $this->encode_id($key);
$content = $data['content'];
$transy =
$translation[$key]['content'];
!
$this->template->set_var('mess_id',$mess_id);
$this->template->set_var('source_content',htmlspecialchars($content));
$this->template->set_var('content',htmlspecialchars($transy));
***************
*** 509,530 ****
}
! /*!
! @function htmlspecialchars
! @abstract converts / reverts a string, convert is similar to
htmlspecialchars(), but has to excape square brackets too
! @param $text
! */
! function htmlspecialchars($text,$reverse=False)
{
! if (!$reverse)
! {
! $ret =
str_replace(array('>','<','"','[',']','&'),array('>','<','"','%5B','%5D','&'),$text);
! }
! else
! {
! $ret =
str_replace(array('%5B','%5D'),array('[',']'),$text);
! }
! //echo
"htmlspecialchars('$text'".($reverse?',reverse':'').")='$ret'<br>\n";
! return $ret;
! }
function save($which,$userlang)
--- 477,489 ----
}
! function encode_id($id)
{
! return
str_replace(array('[',']','&','"'),array('%5B','%5D','&','"'),$id);
! }
!
! function recode_id($id)
! {
! return
str_replace(array('%5B','%5D'),array('[',']'),$id); // & + " are
recode by php
! }
function save($which,$userlang)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: developer_tools/inc class.bolangfile.inc.php,1.8.2.2.2.2,1.8.2.2.2.3 class.solangfile.inc.php,1.9.2.4.2.4,1.9.2.4.2.5 class.uilangfile.inc.php,1.10.2.1.2.3,1.10.2.1.2.4,
Ralf Becker <address@hidden> <=