diff --git a/lib/browse/Browser.inc b/lib/browse/Browser.inc index 49b870d..7754d2d 100644 --- a/lib/browse/Browser.inc +++ b/lib/browse/Browser.inc @@ -60,18 +60,18 @@ class Browser { // default sort criteria global $browse_folder_sort_title, $browse_folder_sort_description, $browse_folder_sort_creator, $browse_folder_sort_date_created, $browse_folder_sort_document_type; if (count($aNewSortCriteria) == 0) { - $aNewSortCriteria = array ( "name" => array ("display" => $browse_folder_sort_title), - "filename" => array ("display" => $browse_folder_sort_description), - "creator_id" => array ("display" => $browse_folder_sort_creator, + $aNewSortCriteria = array ( "name" => array ("display" => _("Title")), + "filename" => array ("display" => _("Description")), + "creator_id" => array ("display" => _("Creator"), "lookup" => array ("table" => "users", "field" => "name")), - "id" => array ("display" => $browse_folder_sort_date_created, + "id" => array ("display" => _("Date Created"), "lookup" => array("table" => "document_transactions", "field" => "datetime", "joinColumn" => "document_id", "whereClause" => "transaction_id=1")), - "document_type_id" => array ("display" => $browse_folder_sort_document_type, + "document_type_id" => array ("display" => _("Document Type"), "lookup" => array ("table" => "document_types_lookup", "field" => "name")) ); } diff --git a/presentation/login.php b/presentation/login.php index 3d16588..8247efc 100644 --- a/presentation/login.php +++ b/presentation/login.php @@ -68,18 +68,18 @@ if ($loginAction == "loginForm") {

\n - + + \t \t - \t + \t\n \n - +
Please enter your details below to login
" . _("Please enter your details below to login") . "
" . sanitize($errorMessage) . "
- \t
Username:
" . _("Username") . ":
Password:
" . _("Password") . ":
graphicsUrl/icons/login.jpg\" border=\"0\">
Version: " . $default->system->get("knowledgeTreeVersion") . "
" . _("Version") . ": " . $default->system->get("knowledgeTreeVersion") . "
@@ -138,18 +138,18 @@ if ($loginAction == "loginForm") { break; // login disabled case 2: - $url = $url . "&errorMessage=" . urlencode("Account has been DISABLED, contact the System Adminstrator"); + $url = $url . "&errorMessage=" . urlencode(_("Account has been DISABLED, contact the System Adminstrator")); break; // too many sessions case 3 : - $url = $url . "&errorMessage=" . urlencode("Maximum sessions for user reached.
Contact the System Administrator"); + $url = $url . "&errorMessage=" . urlencode(_("Maximum sessions for user reached.
Contact the System Administrator")); break; // not a unit user case 4 : - $url = $url . "&errorMessage=" . urlencode("Not unit user- contact an Administrator"); + $url = $url . "&errorMessage=" . urlencode(_("Not unit user- contact an Administrator")); break; default : - $url = $url . "&errorMessage=" . urlencode("Login failure"); + $url = $url . "&errorMessage=" . urlencode(_("Login failure")); } } else { // didn't receive any login parameters, so redirect login form diff --git a/presentation/lookAndFeel/knowledgeTree/dashboardUI.inc b/presentation/lookAndFeel/knowledgeTree/dashboardUI.inc index a845e50..d8a75f7 100644 --- a/presentation/lookAndFeel/knowledgeTree/dashboardUI.inc +++ b/presentation/lookAndFeel/knowledgeTree/dashboardUI.inc @@ -53,7 +53,7 @@ function renderPendingWebDocuments($aPendingDocumentList) { } function renderRestorationRequests($aRestorationRequests) { - global $default, $dashboard_archived_document_restoration_heading; + global $default; if (count($aRestorationRequests) > 0) { $sBgColor = "#9D9D7F"; @@ -62,7 +62,7 @@ function renderRestorationRequests($aRestorationRequests) { } $sToRender = "\t\t\t\n"; - $sToRender .= "\t\t\t\t" . $$dashboard_archived_document_restoration_heading . "\n"; + $sToRender .= "\t\t\t\t" . _("Archived Document Restoration Requests") . "\n"; $sToRender .= "\t\t\t\n"; for ($i = 0; $i < count($aRestorationRequests); $i++) { $oDocument = Document::get($aRestorationRequests[$i]->getDocumentID()); @@ -90,7 +90,7 @@ function renderPendingCollaborationDocuments($aPendingDocumentList) { } $sToRender = "\t\t\t\n"; - $sToRender .= "\t\t\t\t" . $dashboard_pending_documents_heading . "\n"; + $sToRender .= "\t\t\t\t" . _("Pending Documents") . "\n"; $sToRender .= "\t\t\t\n"; for ($i = 0; $i < count($aPendingDocumentList); $i++) { $oDocument = $aPendingDocumentList[$i]; @@ -109,14 +109,14 @@ function renderPendingCollaborationDocuments($aPendingDocumentList) { * @param array of checked out documents */ function renderCheckedOutDocuments($aCheckedOutDocumentList) { - global $default, $dashboard_checked_out_documents_heading; + global $default; if (count($aCheckedOutDocumentList) > 0) { $sBgColor = "#9D9D7F"; } else { $sBgColor = "#CECEBF"; } $sToRender = "\t\t\t\n"; - $sToRender .= "\t\t\t\t" . $dashboard_checked_out_documents_heading . "\n"; + $sToRender .= "\t\t\t\t" . _("Checked Out Documents") . "\n"; $sToRender .= "\t\t\t\n"; if (count($aCheckedOutDocumentList) > 0) { @@ -146,14 +146,14 @@ function renderCheckedOutDocuments($aCheckedOutDocumentList) { * @param array of subscription alerts */ function renderSubscriptionAlerts($aSubscriptionAlertList) { - global $default, $dashboard_subscription_alerts_heading; + global $default; if (count($aSubscriptionAlertList) > 0) { $sBgColor = "#9D9D7F"; } else { $sBgColor = "#CECEBF"; } $sToRender = "\t\t\t\n"; - $sToRender .= "\t\t\t\t" . $dashboard_subscription_alerts_heading . "\n"; + $sToRender .= "\t\t\t\t" . _("Subscription Alerts") . "\n"; $sToRender .= "\t\t\t\n"; for ($i = 0; $i < count($aSubscriptionAlertList); $i++) { $sToRender .= "\t\t\t\n"; @@ -164,14 +164,14 @@ function renderSubscriptionAlerts($aSubscriptionAlertList) { } function renderDependantDocuments($aDependantDocumentList) { - global $default, $dashboard_dependant_documents_heading; + global $default; if (count($aDependantDocumentList) > 0) { $sBgColor = "#9D9D7F"; } else { $sBgColor = "#CECEBF"; } $sToRender = "\t\t\t\n"; - $sToRender .= "\t\t\t\t" . $dashboard_dependant_documents_heading . "\n"; + $sToRender .= "\t\t\t\t" . _("Dependant Documents") . "\n"; $sToRender .= "\t\t\t\n"; if (count($aDependantDocumentList) > 0) { @@ -206,9 +206,9 @@ function renderDependantDocuments($aDependantDocumentList) { * Displays the quicklinks */ function renderQuickLinks($aQuickLinks) { - global $default, $dashboard_quick_links_heading; + global $default; $sToRender .= "\t\t\t\n"; - $sToRender .= "\t\t\t\t" . $dashboard_quick_links_heading . "\n"; + $sToRender .= "\t\t\t\t" . _("Quick Links") . "\n"; $sToRender .= "\t\t\t\n"; for ($i = 0; $i < count($aQuickLinks); $i++) { $sToRender .= "\t\t\t\n"; @@ -260,7 +260,7 @@ function renderDashboardNews() { return $sToRender; } - + /** * Renders the dashboard * @@ -269,16 +269,18 @@ function renderDashboardNews() { * @param array subscription alerts for this user */ function renderPage($aPendingDocumentList, $aCheckedOutDocumentList, $aSubscriptionAlertList, $aQuickLinks, $aWebDocuments, $aDependantDocuments, $aRestorationRequests) { - global $default, $dashboard_welcome; + global $default; $sToRender = "\n"; $sToRender .= "\t\n"; - $sToRender .= "\t\t\n"; + $sToRender .= "\t\t\n"; // some arb welcoming text goes here $oUser = & User::get($_SESSION["userID"]); - $sUserName = $oUser->getName(); - $sToRender .= "\t\t\n"; + $sUserName = $oUser->getName(); + $sToRender .= "\t\t\n"; // dashboard news $sToRender .= "\t\t\n"; } } else { - $sToRender .= ""; + $sToRender .= ""; } - $sToRender .= "\n"; + $sToRender .= "\n"; return $sToRender; } @@ -332,12 +334,12 @@ function appendCounts($aFolderPath, $iFolderCount, $iDocumentCount) { */ function renderPage($aResults, $sBrowseType, $sSortBy, $sSortDirection, $bTemplateBrowsing = false) { - global $default, $browse_collection_heading; + global $default; $sSectionName = $default->siteMap->getSectionName(substr($_SERVER["PHP_SELF"], strlen($default->rootUrl), strlen($_SERVER["PHP_SELF"]))); $sTDBGColour = $default->siteMap->getSectionColour($sSectionName, "td"); - $sToRender = renderHeading($browse_collection_heading); + $sToRender = renderHeading(_("Browse collection")); $sToRender .= "
graphicsUrl/welcome.gif\" border=\"0\"/>" . getTranslatedString($dashboard_welcome, array(0 => (strlen($sUserName) > 0 ? " " . $sUserName : ""), 1 => lookupField($default->organisations_table, "name", "id", $default->organisationID))) . "" . sprintf(_('Hi %1$s, welcome back to the %2$s DMS, part of the Knowledge Tree'), + (strlen($sUserName) > 0 ? " " . $sUserName : ""), + lookupField($default->organisations_table, "name", "id", $default->organisationID)) . "\n"; diff --git a/presentation/lookAndFeel/knowledgeTree/documentmanagement/browseUI.inc b/presentation/lookAndFeel/knowledgeTree/documentmanagement/browseUI.inc index 95c0878..ba6f36f 100644 --- a/presentation/lookAndFeel/knowledgeTree/documentmanagement/browseUI.inc +++ b/presentation/lookAndFeel/knowledgeTree/documentmanagement/browseUI.inc @@ -37,15 +37,14 @@ require_once("$default->uiDirectory/foldermanagement/addFolderUI.inc"); * @param string the selected browse by option */ function renderBrowseTypeSelect($sBrowseType) { - global $browse_view_documents_by_heading, $browse_view_documents_by_folder, $browse_view_documents_by_category, $browse_view_documents_by_doctype; // TODO: write function for onChange that checks if the new value return "\n - \t" . $browse_view_documents_by_heading . ": " . $browse_view_documents_by_folder ."\n" . + \t" . _("View documents by") . ": " . _("Folders") ."\n" . " " . $browse_view_documents_by_category . "\n" . + (($sBrowseType=="category") ? " checked=\"checked\"" : "") . "/> " . _("Category") . "\n" . " " . $browse_view_documents_by_doctype . "\n"; + (($sBrowseType=="documentType") ? " checked=\"checked\"" : "") . "/> " . _("Document Type") . "\n"; } // @@ -193,7 +192,7 @@ function renderDocumentTypeResults($aResults) { * @param array the browse result objects */ function renderFolderResults($aResults, $bTemplateBrowsing = false) { - global $default, $browse_no_sub_folders, $browse_no_documents, $browse_no_document_permission; + global $default; $sToRender = ""; // now loop through the rest of the folders and display links @@ -217,10 +216,13 @@ function renderFolderResults($aResults, $bTemplateBrowsing = false) { $sToRender .= "
" . $browse_no_sub_folders . "
" . _("This folder contains no sub folders") . "
" . renderDocumentList($aResults, $browse_no_documents, $browse_no_document_permission, false, $bTemplateBrowsing) . "
" . renderDocumentList($aResults, _("This folder contains no documents"), + _("You don't have access to the documents in this folder"), + false, $bTemplateBrowsing) . + "
"; switch ($sBrowseType) {