From 07c36668f5c546bcaf3343f54397bc8a82c915fc Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 8 Nov 2006 10:50:40 +1300 Subject: [PATCH] More internationalisation. --- htdocs/user.php | 2 +- inc/RSCDSUser.php | 12 ++++++++---- inc/other_translated_strings.php | 9 +++++++++ 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/htdocs/user.php b/htdocs/user.php index 71859049..28a8e0e2 100644 --- a/htdocs/user.php +++ b/htdocs/user.php @@ -11,7 +11,7 @@ $user_no = intval(isset($_POST['user_no']) ? $_POST['user_no'] : $_GET['user_no'] ); $user = new RSCDSUser($user_no); if ( $user->user_no == 0 ) { - $c->page_title = ( $user_no != "" ? "User Unavailable" : "New User" ); + $c->page_title = ( $user_no != "" ? i18n("User Unavailable") : i18n("New User") ); } else { $c->page_title = sprintf("%s (%s)", $user->Get("fullname"), $user->Get("username")); diff --git a/inc/RSCDSUser.php b/inc/RSCDSUser.php index dbcb7b21..49bebfce 100644 --- a/inc/RSCDSUser.php +++ b/inc/RSCDSUser.php @@ -43,7 +43,7 @@ class RSCDSUser extends User $html = '
'; if ( $title != "" ) { - $html .= "

$title

\n"; + $html .= sprintf("

%s

\n", translate($title)); } if ( $ef->EditMode ) { @@ -125,21 +125,25 @@ SELECT user_no, fullname FROM usr OR (from_user = usr.user_no AND to_user = $this->user_no)) $group_target EOSQL; + if ( isset($this->roles['Group']) ) + $nullvalue = translate( "--- select a user, group or resource ---" ); + else + $nullvalue = translate( "--- select a user or resource ---" ); $person_selection = $ef->DataEntryField( "", "lookup", "relate_to", array("title" => translate("Select the user, resource or group to relate this user to"), - "_null" => "--- select a user ".( isset($this->roles['Group']) ? '' : ', group ' ).'or resource ---', + "_null" => $nullvalue, "_sql" => $sql ) ); $group_target = ( isset($this->roles['Group']) ? 'WHERE NOT rt_isgroup' : '' ); $relationship_type_selection = $ef->DataEntryField( "", "lookup", "relate_as", array("title" => translate("Select the type of relationship from this user"), - "_null" => "--- select a relationship type ---", + "_null" => translate("--- select a relationship type ---"), "_sql" => "SELECT rt_id, rt_name FROM relationship_type $group_target " ) ); $browser->AddRow( array( 'rt_name' => $relationship_type_selection, /* Since 'fullname' is formatted to display this value */ 'user_link' => $person_selection, - 'delete' => '' + 'delete' => sprintf('', htmlspecialchars(translate("Add Relationship"))) ) ); } diff --git a/inc/other_translated_strings.php b/inc/other_translated_strings.php index d19462b6..5c145826 100644 --- a/inc/other_translated_strings.php +++ b/inc/other_translated_strings.php @@ -26,4 +26,13 @@ i18n("Relationship ") i18n("No. "); i18n("No."); +i18n("Id "); +i18n("Id"); + +// The standard relationship names +i18n("Administers Group"); +i18n("Administers Resource"); +i18n("Is Assisted by"); +i18n("Is a member of group"); + ?> \ No newline at end of file