some fixes for setup:

- back-button for manage-header
- header-update shows lang-selection
- lang-selection is sorted now alphabetical
- lang-selection in header-admin shows up only if called the first time (without login)
- manage-languages and add-applications respekt now different translations for the same phrase in different apps
This commit is contained in:
Ralf Becker 2003-09-23 13:08:40 +00:00
parent 4347d7f9fc
commit 1ed1b0f431
7 changed files with 23 additions and 16 deletions

View File

@ -147,13 +147,14 @@
$GLOBALS['setup_tpl']->set_var('ConfigLoginMSG',@$GLOBALS['phpgw_info']['setup']['ConfigLoginMSG']);
$GLOBALS['setup_tpl']->set_var('HeaderLoginMSG',@$GLOBALS['phpgw_info']['setup']['HeaderLoginMSG']);
$GLOBALS['setup_tpl']->set_var('lang_select',lang_select());
if ($GLOBALS['phpgw_info']['setup']['stage']['header'] == '10')
{
/*
Begin use SUB-TEMPLATE login_stage_header,
fills V_login_stage_header used inside of login_main.tpl
*/
$GLOBALS['setup_tpl']->set_var('lang_select',lang_select());
if (count($GLOBALS['phpgw_domain']) > 1)
{
foreach($GLOBALS['phpgw_domain'] as $domain => $data)

View File

@ -198,14 +198,14 @@
while (list($null,$line) = @each($raw_file))
{
list($message_id,$app_name,$GLOBALS['phpgw_setup']->db_lang,$content) = explode("\t",$line);
$message_id = $GLOBALS['phpgw_setup']->db->db_addslashes(chop(substr($message_id,0,MAX_MESSAGE_ID_LENGTH)));
$message_id = $GLOBALS['phpgw_setup']->db->db_addslashes(strtolower(chop(substr($message_id,0,MAX_MESSAGE_ID_LENGTH))));
/* echo '<br>APPNAME:' . $app_name . ' PHRASE:' . $message_id; */
$app_name = $GLOBALS['phpgw_setup']->db->db_addslashes(chop($app_name));
$GLOBALS['phpgw_setup']->db_lang = $GLOBALS['phpgw_setup']->db->db_addslashes(chop($GLOBALS['phpgw_setup']->db_lang));
$content = $GLOBALS['phpgw_setup']->db->db_addslashes(chop($content));
$GLOBALS['phpgw_setup']->db->query("SELECT COUNT(*) FROM phpgw_lang WHERE message_id='$message_id' and lang='"
. $GLOBALS['phpgw_setup']->db_lang . "'",__LINE__,__FILE__);
$GLOBALS['phpgw_setup']->db->query("SELECT COUNT(*) FROM phpgw_lang WHERE message_id='$message_id' AND lang='"
. $GLOBALS['phpgw_setup']->db_lang . "' AND (app_name='$app_name' OR (app_name='common' AND content='$content'))",__LINE__,__FILE__);
$GLOBALS['phpgw_setup']->db->next_record();
if ($GLOBALS['phpgw_setup']->db->f(0) == 0)

View File

@ -103,13 +103,16 @@
return $languages;
}
function lang_select($onChange=False)
function lang_select($onChange=False,$ConfigLang='')
{
$ConfigLang = get_var('ConfigLang',Array('POST','COOKIE'));
if (!$ConfigLang)
{
$ConfigLang = get_var('ConfigLang',Array('POST','COOKIE'));
}
$select = '<select name="ConfigLang"'.($onChange ? ' onChange="this.form.submit();"' : '').'>' . "\n";
$languages = get_langs();
while(list($null,$data) = each($languages))
usort($languages,create_function('$a,$b','return strcmp($a[\'descr\'],$b[\'descr\']);'));
foreach($languages as $data)
{
if($data['available'] && !empty($data['lang']))
{

View File

@ -105,7 +105,7 @@
foreach($lines as $line)
{
list($message_id,$app_name,,$content) = explode("\t",$line);
$message_id = $GLOBALS['phpgw_setup']->db->db_addslashes(substr(chop($message_id),0,MAX_MESSAGE_ID_LENGTH));
$message_id = $GLOBALS['phpgw_setup']->db->db_addslashes(substr(strtolower(chop($message_id)),0,MAX_MESSAGE_ID_LENGTH));
$app_name = $GLOBALS['phpgw_setup']->db->db_addslashes(chop($app_name));
$content = $GLOBALS['phpgw_setup']->db->db_addslashes(chop($content));
@ -123,7 +123,7 @@
if ($upgrademethod == 'addmissing')
{
//echo '<br>Test: addmissing';
$GLOBALS['phpgw_setup']->db->query("SELECT COUNT(*) FROM phpgw_lang WHERE message_id='$message_id' and lang='$lang' and (app_name='$app_name' or app_name='common')",__LINE__,__FILE__);
$GLOBALS['phpgw_setup']->db->query("SELECT COUNT(*) FROM phpgw_lang WHERE message_id='$message_id' AND lang='$lang' AND (app_name='$app_name' OR app_name='common') AND content='$content'",__LINE__,__FILE__);
$GLOBALS['phpgw_setup']->db->next_record();
if ($GLOBALS['phpgw_setup']->db->f(0) == 0)
@ -195,7 +195,7 @@
}
$select_box_desc = lang('Select which languages you would like to use');
$select_box = '';
$GLOBALS['phpgw_setup']->db->query($q="select lang_id,lang_name from phpgw_languages where available='Yes'");
$GLOBALS['phpgw_setup']->db->query($q="SELECT lang_id,lang_name FROM phpgw_languages WHERE available='Yes' ORDER BY lang_name");
while ($GLOBALS['phpgw_setup']->db->next_record())
{
$id = $GLOBALS['phpgw_setup']->db->f('lang_id');

View File

@ -40,6 +40,7 @@ authentication / accounts setup de Authentifizierung / Benutzerkonten
auto create account records for authenticated users setup de Benutzerkonten für authentifiziere Benutzer automatisch anlegen
auto-created user accounts expire setup de Automatisch angelegte Benutzerkonten laufen ab am
available version setup de Verfügbare Version
back to the previous screen setup de Zurück zur vorhergehenden Seite
backupwarn setup de Aber wir <u>raten Ihnen dringend, eine Sicherungskopie</u> anzulegen f&uuml;r den Fall, da&szlig; dieses Script Ihre bestehenden Daten besch&auml;digt !<br><strong>Diese automatisierten Scripts k&ouml;nnen leicht Ihre Daten besch&auml;digen !.</strong><br
because an application it depends upon was upgraded setup de da eine Applikation von der sie abhängt upgeradet wurde
because it depends upon setup de weil es abhängt von
@ -221,7 +222,7 @@ only add new phrases setup de Nur neue Begriffe hinzuf
or setup de oder
or http://webdav.domain.com (webdav) setup de oder http://webdav.domain.com (für WebDAV)
or we can attempt to create the database for you: setup de Oder wir können versuchen die Datenbank für sie anzulegen:
password needed for configuration setup de Passwork wird für die Konfiguration benötigt
password needed for configuration setup de Password wird für die Konfiguration benötgt
password of db user setup de Passwort des Datenbank Benutzers
passwords did not match, please re-enter setup de Passworte stimmten nicht überein, bitte nocheinmal eingeben
path information setup de Pfadinformationen
@ -235,7 +236,7 @@ please consult the %1. setup de Bitte konsultieren sie das %1.
please install setup de Bitte installieren
please login setup de Bitte einlogen
please login to phpgroupware and run the admin application for additional site configuration setup de Bitte in phpGroupWare einloggen und die Administration für weitere Konfigurationen aufrufen.
please wait... setup de Please Wait...
please wait... setup de Bitte warten ...
possible reasons setup de Mögliche Gründe
possible solutions setup de Mögliche Lösungen
post-install dependency failure setup de Abhängigkeitsfehler nach der Installation

View File

@ -38,6 +38,7 @@ authentication / accounts setup en Authentication / Accounts
auto create account records for authenticated users setup en Auto create account records for authenticated users
auto-created user accounts expire setup en Auto-created user accounts expire
available version setup en Available Version
back to the previous screen setup en Back to the previous screen
backupwarn setup en but we <u>highly recommend backing up</u> your tables in case the script causes damage to your data.<br><strong>These automated scripts can easily destroy your data.</strong><br><em>Please backup before going any further!</em>
because an application it depends upon was upgraded setup en because an application it depends upon was upgraded
because it depends upon setup en because it depends upon

View File

@ -22,6 +22,7 @@
include('./inc/functions.inc.php');
$GLOBALS['phpgw_info']['server']['versions']['current_header'] = $setup_info['phpgwapi']['versions']['current_header'];
$GLOBALS['phpgw_info']['server']['versions']['phpgwapi'] = $setup_info['phpgwapi']['version'];
unset($setup_info);
#include('../version.inc.php');
@ -59,6 +60,7 @@
{
$GLOBALS['phpgw_setup']->html->show_header('Error',True);
echo $errors;
echo '<p><input type="submit" value="'.lang('Back to the previous screen').'" onClick="history.back()"></p>';
exit;
}
}
@ -183,10 +185,9 @@
$detected = '';
if (!$ConfigLang)
if (!get_var('ConfigLang',array('POST','COOKIE')))
{
$_POST['ConfigLang'] = 'en';
$detected .= '<br><form action="manageheader.php" method="Post">Please Select your language '.lang_select(True)."</form>\n";
$detected .= '<br><form action="manageheader.php" method="Post">Please Select your language '.lang_select(True,'en')."</form>\n";
}
$detected .= '<table border="0" width="100%" cellspacing="0" cellpadding="0" style="{ border: 1px solid #000000; }">' . "\n";