Commit 272faa326aefecfb022bac69aafd89e582d99211
1 parent
e5b9eaae
More translation support
Submitted by: freboulet SF Tracker: 1117965 git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@3339 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
17 changed files
with
86 additions
and
87 deletions
lib/alert/AlertContent.inc
| ... | ... | @@ -49,83 +49,71 @@ class AlertContent { |
| 49 | 49 | * @return string the alert content |
| 50 | 50 | */ |
| 51 | 51 | function getSubscriptionAlert($iSubscriptionAlertType, $aValues) { |
| 52 | - $sSubject = "DMS Subscription Alert- "; | |
| 53 | - $aAlertSubject = array(SubscriptionConstants::subscriptionAlertType("AddFolder") => $sSubject . "New Folder", | |
| 54 | - SubscriptionConstants::subscriptionAlertType("RemoveSubscribedFolder") => $sSubject . "Removed Folder", | |
| 55 | - SubscriptionConstants::subscriptionAlertType("RemoveChildFolder") => $sSubject . "Removed Folder", | |
| 56 | - SubscriptionConstants::subscriptionAlertType("AddDocument") => $sSubject . "New Document", | |
| 57 | - SubscriptionConstants::subscriptionAlertType("RemoveSubscribedDocument") => $sSubject . "Removed Document", | |
| 58 | - SubscriptionConstants::subscriptionAlertType("RemoveChildDocument") => $sSubject . "Removed Document", | |
| 59 | - SubscriptionConstants::subscriptionAlertType("ModifyDocument") => $sSubject . "Modified Document", | |
| 60 | - SubscriptionConstants::subscriptionAlertType("CheckInDocument") => $sSubject . "Checked In Document", | |
| 61 | - SubscriptionConstants::subscriptionAlertType("CheckOutDocument") => $sSubject . "Checked Out Document", | |
| 62 | - SubscriptionConstants::subscriptionAlertType("MovedDocument") => $sSubject . "Moved Document", | |
| 63 | - SubscriptionConstants::subscriptionAlertType("ArchivedDocument") => $sSubject . "Archived Document", | |
| 64 | - SubscriptionConstants::subscriptionAlertType("RestoredArchivedDocument") => $sSubject . "Restored Document"); | |
| 52 | + $sSubject = _("DMS Subscription Alert") . " - "; | |
| 53 | + $aAlertSubject = array(SubscriptionConstants::subscriptionAlertType("AddFolder") => $sSubject . _("New Folder"), | |
| 54 | + SubscriptionConstants::subscriptionAlertType("RemoveSubscribedFolder") => $sSubject . _("Removed Folder"), | |
| 55 | + SubscriptionConstants::subscriptionAlertType("RemoveChildFolder") => $sSubject . _("Removed Folder"), | |
| 56 | + SubscriptionConstants::subscriptionAlertType("AddDocument") => $sSubject . _("New Document"), | |
| 57 | + SubscriptionConstants::subscriptionAlertType("RemoveSubscribedDocument") => $sSubject . _("Removed Document"), | |
| 58 | + SubscriptionConstants::subscriptionAlertType("RemoveChildDocument") => $sSubject . _("Removed Document"), | |
| 59 | + SubscriptionConstants::subscriptionAlertType("ModifyDocument") => $sSubject . _("Modified Document"), | |
| 60 | + SubscriptionConstants::subscriptionAlertType("CheckInDocument") => $sSubject . _("Checked In Document"), | |
| 61 | + SubscriptionConstants::subscriptionAlertType("CheckOutDocument") => $sSubject . _("Checked Out Document"), | |
| 62 | + SubscriptionConstants::subscriptionAlertType("MovedDocument") => $sSubject . _("Moved Document"), | |
| 63 | + SubscriptionConstants::subscriptionAlertType("ArchivedDocument") => $sSubject . _("Archived Document"), | |
| 64 | + SubscriptionConstants::subscriptionAlertType("RestoredArchivedDocument") => $sSubject . _("Restored Document")); | |
| 65 | 65 | |
| 66 | 66 | $sViewAlertParams = "fSubscriptionID=" . $aValues["subscriptionID"] . "&fSubscriptionType=" . $aValues["subscriptionType"]; |
| 67 | 67 | $oUser = User::get($_SESSION["userID"]); |
| 68 | 68 | $sAttribution = $oUser ? " by " . $oUser->getName() : ""; |
| 69 | 69 | $aAlertContent = array(SubscriptionConstants::subscriptionAlertType("AddFolder") => |
| 70 | - "A new folder '" . $aValues["newFolderName"] . "' has been added to folder '" . $aValues["parentFolderName"] . "'$sAttribution.<br>" . | |
| 71 | - "Please clear this subscription alert by clicking on the following link: " . | |
| 72 | - generateControllerLink("viewAlert", $sViewAlertParams, $aValues["parentFolderName"]), | |
| 70 | + sprintf(_("A new folder ' %s ' has been added to folder ' %s '%s.<br>Please clear this subscription alert by clicking on the following link: %s"), $aValues["newFolderName"], $aValues["parentFolderName"],$sAttribution, | |
| 71 | + generateControllerLink("viewAlert", $sViewAlertParams, $aValues["parentFolderName"])), | |
| 73 | 72 | |
| 74 | 73 | SubscriptionConstants::subscriptionAlertType("RemoveSubscribedFolder") => |
| 75 | - "The folder '" . $aValues["removedFolderName"] . "' has been removed from folder '" . $aValues["parentFolderName"] . "'$sAttribution.<br>" . | |
| 76 | - "Your subscription to this folder has been removed also.", | |
| 74 | + sprintf(_("The folder '%s' has been removed from folder '%s'%s.<br>Your subscription to this folder has been removed also."),$aValues["removedFolderName"],$aValues["parentFolderName"], $sAttribution), | |
| 77 | 75 | |
| 78 | 76 | SubscriptionConstants::subscriptionAlertType("RemoveChildFolder") => |
| 79 | - "The folder '" . $aValues["removedFolderName"] . "' has been removed from folder '" . $aValues["parentFolderName"] . "'$sAttribution.<br>" . | |
| 80 | - "Please clear this subscription alert by clicking on the following link: " . | |
| 77 | + sprintf(_("The folder '%s' has been removed from folder '%s'%s.<br>Please clear this subscription alert by clicking on the following link: "), $aValues["removedFolderName"], $aValues["parentFolderName"], $sAttribution) . | |
| 81 | 78 | generateControllerLink("viewAlert", $sViewAlertParams, $aValues["parentFolderName"]), |
| 82 | 79 | |
| 83 | 80 | SubscriptionConstants::subscriptionAlertType("AddDocument") => |
| 84 | - "A new document '" . $aValues["newDocumentName"] . "' has been added to folder '" . $aValues["folderName"] . "'$sAttribution.<br>" . | |
| 85 | - "Please clear this subscription alert by clicking on the following link: " . | |
| 81 | + sprintf(_("A new document '%s' has been added to folder '%s'%s.<br>Please clear this subscription alert by clicking on the following link: "), $aValues["newDocumentName"], $aValues["folderName"], $sAttribution) . | |
| 86 | 82 | generateControllerLink("viewAlert", $sViewAlertParams, $aValues["newDocumentName"]), |
| 87 | 83 | |
| 88 | 84 | SubscriptionConstants::subscriptionAlertType("RemoveChildDocument") => |
| 89 | - "The document '" . $aValues["removedDocumentName"] . "' has been removed from folder '" . $aValues["folderName"] . "'$sAttribution.<br>" . | |
| 90 | - "Please clear this subscription alert by clicking on the following link: " . | |
| 85 | + sprintf(_("The document '%s' has been removed from folder '%s'.<br>Please clear this subscription alert by clicking on the following link: "), $aValues["removedDocumentName"], $aValues["folderName"], $sAttribution) . | |
| 91 | 86 | generateControllerLink("viewAlert", $sViewAlertParams, $aValues["removedDocumentName"]), |
| 92 | 87 | |
| 93 | 88 | SubscriptionConstants::subscriptionAlertType("RemoveSubscribedDocument") => |
| 94 | - "The document '" . $aValues["removedDocumentName"] . "' has been removed from folder '" . $aValues["folderName"] . "'$sAttribution.<br>" . | |
| 95 | - "Your subscription to this document has been removed also.", | |
| 89 | + sprintf(_("The document '%s' has been removed from folder '%s'%s.<br>Your subscription to this document has been removed also."), $aValues["removedDocumentName"], $aValues["folderName"], $sAttribution), | |
| 96 | 90 | |
| 97 | 91 | SubscriptionConstants::subscriptionAlertType("ModifyDocument") => |
| 98 | - "The document '" . $aValues["modifiedDocumentName"] . "' has been modified$sAttribution.<br>" . | |
| 99 | - "Please clear this subscription alert by clicking on the following link: " . | |
| 92 | + sprintf(_("The document '%s' has been modified%s.<br>Please clear this subscription alert by clicking on the following link: "), $aValues["modifiedDocumentName"], $sAttribution) . | |
| 100 | 93 | generateControllerLink("viewAlert", $sViewAlertParams, $aValues["modifiedDocumentName"]), |
| 101 | 94 | |
| 102 | 95 | SubscriptionConstants::subscriptionAlertType("CheckInDocument") => |
| 103 | - "The document '" . $aValues["modifiedDocumentName"] . "' has been checked in$sAttribution.<br>" . | |
| 104 | - "Please clear this subscription alert by clicking on the following link: " . | |
| 96 | + sprintf(_("The document '%s' has been checked in%s.<br>Please clear this subscription alert by clicking on the following link: "), $aValues["modifiedDocumentName"], $sAttribution) . | |
| 105 | 97 | generateControllerLink("viewAlert", $sViewAlertParams, $aValues["modifiedDocumentName"]), |
| 106 | 98 | |
| 107 | 99 | SubscriptionConstants::subscriptionAlertType("CheckOutDocument") => |
| 108 | - "The document '" . $aValues["modifiedDocumentName"] . "' has been checked out$sAttribution.<br>" . | |
| 109 | - "Please clear this subscription alert by clicking on the following link: " . | |
| 100 | + sprintf(_("The document '%s' has been checked out%s.<br>Please clear this subscription alert by clicking on the following link: "), $aValues["modifiedDocumentName"], $sAttribution) . | |
| 110 | 101 | generateControllerLink("viewAlert", $sViewAlertParams, $aValues["modifiedDocumentName"]), |
| 111 | 102 | |
| 112 | 103 | SubscriptionConstants::subscriptionAlertType("MovedDocument") => |
| 113 | - "The document '" . $aValues["modifiedDocumentName"] . "' has been moved from folder '" . $aValues["oldFolderName"] . "' to folder '" . $aValues["newFolderName"] . "'$sAttribution.<br>" . | |
| 114 | - "Please clear this subscription alert by clicking on the following link: " . | |
| 104 | + sprintf(_("The document '%s' has been moved from folder '%s' to folder '%s'%s.<br>Please clear this subscription alert by clicking on the following link: "), $aValues["modifiedDocumentName"], $aValues["oldFolderName"], $aValues["newFolderName"], $sAttribution) . | |
| 115 | 105 | generateControllerLink("viewAlert", $sViewAlertParams, $aValues["modifiedDocumentName"]), |
| 116 | 106 | |
| 117 | 107 | SubscriptionConstants::subscriptionAlertType("ArchivedDocument") => |
| 118 | - "The document '" . $aValues["modifiedDocumentName"] . "' has been archived$sAttribution.<br>" . | |
| 119 | - "Please clear this subscription alert by clicking on the following link: " . | |
| 108 | + sprintf(_("The document '%s' has been archived%s.<br>Please clear this subscription alert by clicking on the following link: "), $aValues["modifiedDocumentName"], $sAttribution) . | |
| 120 | 109 | generateControllerLink("viewAlert", $sViewAlertParams, $aValues["modifiedDocumentName"]), |
| 121 | 110 | |
| 122 | 111 | SubscriptionConstants::subscriptionAlertType("RestoredArchivedDocument") => |
| 123 | - "The document '" . $aValues["modifiedDocumentName"] . "' has been restored from the archive$sAttribution.<br>" . | |
| 124 | - "Please clear this subscription alert by clicking on the following link: " . | |
| 112 | + sprintf(_("The document '%s' has been restored from the archive%s.<br>Please clear this subscription alert by clicking on the following link: "), $aValues["modifiedDocumentName"], $sAttribution) . | |
| 125 | 113 | generateControllerLink("viewAlert", $sViewAlertParams, $aValues["modifiedDocumentName"])); |
| 126 | 114 | |
| 127 | 115 | return array ("subject" => $aAlertSubject[$iSubscriptionAlertType], |
| 128 | - "text" => "Hello " . $aValues["subscriberName"] . ",<br><br>" . $aAlertContent[$iSubscriptionAlertType]); | |
| 116 | + "text" => sprintf(_("Hello %s"), $aValues["subscriberName"]) . ",<br><br>" . $aAlertContent[$iSubscriptionAlertType]); | |
| 129 | 117 | } |
| 130 | 118 | } |
| 131 | -?> | |
| 132 | 119 | \ No newline at end of file |
| 120 | +?> | ... | ... |
lib/browse/DocumentTypeBrowser.inc
lib/email/Email.inc
| ... | ... | @@ -233,7 +233,7 @@ class Email { |
| 233 | 233 | $this->oMailer->FromName = $FromName; |
| 234 | 234 | $this->oMailer->AddAddress($ToEmail); |
| 235 | 235 | $this->oMailer->Subject = stripslashes($Subj) . ' ' . $hyperlink; //only difference from above |
| 236 | - $this->oMailer->Body = stripslashes($EmailBody) . " <br>This bug can be found on this page: " . "<a href = ". $hyperlink .">". $hyperlink ."</a>"; | |
| 236 | + $this->oMailer->Body = stripslashes($EmailBody) . " <br>" . _("This bug can be found on this page") . ": " . "<a href = ". $hyperlink .">". $hyperlink ."</a>"; | |
| 237 | 237 | |
| 238 | 238 | //send the email |
| 239 | 239 | if(!$this->oMailer->Send()) { | ... | ... |
lib/visualpatterns/PatternBrowsableSearchResults.inc
| ... | ... | @@ -131,7 +131,7 @@ class PatternBrowseableSearchResults { |
| 131 | 131 | //no results |
| 132 | 132 | $sToRender .= "<table width=\"100%\" height=\"80%\">\n"; |
| 133 | 133 | $sToRender .= "<tr>\n"; |
| 134 | - $sToRender .= "<td><p class=\"errorText\">No results matched your criteria</p></td>\n"; | |
| 134 | + $sToRender .= "<td><p class=\"errorText\">" . _("No results matched your criteria") . "</p></td>\n"; | |
| 135 | 135 | $sToRender .= "</tr>\n"; |
| 136 | 136 | $sToRender .= "</table>\n"; |
| 137 | 137 | } else { |
| ... | ... | @@ -142,10 +142,10 @@ class PatternBrowseableSearchResults { |
| 142 | 142 | $iEndIndex = $this->iStartIndex+$this->iResultsToDisplay-1 < $iTotalResults ? $this->iStartIndex+$this->iResultsToDisplay-1 : $iTotalResults; |
| 143 | 143 | |
| 144 | 144 | if ($this->sSearchText) { |
| 145 | - $sToRender .= "<tr><td colspan=\"3\">Searched the KnowledgeTree for '$this->sSearchText'.</td></tr>"; | |
| 146 | - } | |
| 145 | + $sToRender .= "<tr><td colspan=\"3\">" . sprintf(_("Searched the KnowledgeTree for '%s'."), $this->sSearchText) . "</td></tr>"; | |
| 146 | + } | |
| 147 | 147 | |
| 148 | - $sToRender .= "<tr><td colspan=\"3\" align=\"right\">Displaying results $this->iStartIndex - $iEndIndex of $iTotalResults</td></tr>\n"; | |
| 148 | + $sToRender .= "<tr><td colspan=\"3\" align=\"right\">" . sprintf(_("Displaying results %s - %s of %s"), $this->iStartIndex, $iEndIndex, $iTotalResults) . "</td></tr>\n"; | |
| 149 | 149 | |
| 150 | 150 | $sToRender .= "<tr>\n"; |
| 151 | 151 | for ($i = 0; $i < count($this->aColumnHeadings); $i++) { | ... | ... |
lib/visualpatterns/PatternEditableListFromQuery.inc
| ... | ... | @@ -178,7 +178,9 @@ class PatternEditableListFromQuery { |
| 178 | 178 | $sToRender .= "</table>\n"; |
| 179 | 179 | } else { |
| 180 | 180 | $sToRender .= "<tr>\n"; |
| 181 | - $sToRender .= "<td colspan=" . count($this->aDisplayColumns) . ">No " . (isset($this->sTableHeading) ? "$this->sTableHeading" : "") . " data</td>\n"; | |
| 181 | + $sToRender .= "<td colspan=" . count($this->aDisplayColumns) . ">" . | |
| 182 | + sprintf(_("No %s data"), (isset($this->sTableHeading) ? "$this->sTableHeading" : "")) . | |
| 183 | + "</td>\n"; | |
| 182 | 184 | $sToRender .= "</tr>\n"; |
| 183 | 185 | } |
| 184 | 186 | ... | ... |
lib/visualpatterns/PatternEditableTableSqlQuery.inc
| ... | ... | @@ -139,7 +139,9 @@ class PatternEditableTableSqlQuery { |
| 139 | 139 | if (isset($this->sEmptyTableMessage)) { |
| 140 | 140 | $sToRender .= "<td colspan=" . count($this->aStoreColumnNames) . ">$this->sEmptyTableMessage</td>\n"; |
| 141 | 141 | } else { |
| 142 | - $sToRender .= "<td colspan=" . count($this->aStoreColumnNames) . ">No " . (isset($this->sTableCaption) ? $this->sTableCaption : "") . " data</td>\n"; | |
| 142 | + $sToRender .= "<td colspan=" . count($this->aStoreColumnNames) . ">" . | |
| 143 | + sprintf(_("No %s data"), (isset($this->sTableCaption) ? $this->sTableCaption : "")) . | |
| 144 | + "</td>\n"; | |
| 143 | 145 | } |
| 144 | 146 | $sToRender .= "</tr>\n"; |
| 145 | 147 | } else { |
| ... | ... | @@ -203,7 +205,7 @@ class PatternEditableTableSqlQuery { |
| 203 | 205 | } |
| 204 | 206 | break; |
| 205 | 207 | case 3: |
| 206 | - $sToRender .= "<b>The column type for drop downs is not implemented yet</b>\n"; | |
| 208 | + $sToRender .= "<b>" . _("The column type for drop downs is not implemented yet") . "</b>\n"; | |
| 207 | 209 | break; |
| 208 | 210 | case 4: |
| 209 | 211 | //meta data |
| ... | ... | @@ -227,7 +229,10 @@ class PatternEditableTableSqlQuery { |
| 227 | 229 | |
| 228 | 230 | break; |
| 229 | 231 | default: |
| 230 | - $sToRender .= "<b>You are attempting to render an unknown column type " . ($this->aColumnTypes[$i]) . " in PatternEditableTableSqlQuery</b>\n"; | |
| 232 | + $sToRender .= "<b>" . | |
| 233 | + sprintf(_("You are attempting to render an unknown column type %s in PatternEditableTableSqlQuery"), | |
| 234 | + ($this->aColumnTypes[$i])) . | |
| 235 | + "</b>\n"; | |
| 231 | 236 | break; |
| 232 | 237 | } |
| 233 | 238 | ... | ... |
lib/visualpatterns/PatternListFromQuery.inc
| ... | ... | @@ -112,7 +112,9 @@ class PatternListFromQuery { |
| 112 | 112 | if (isset($this->sEmptyTableMessage)) { |
| 113 | 113 | $sToRender .= "<td colspan=" . count($this->aColumns) . ">$this->sEmptyTableMessage</td>\n"; |
| 114 | 114 | } else { |
| 115 | - $sToRender .= "<td colspan=" . count($this->aColumns) . ">No " . (isset($this->sTableHeading) ? "$this->sTableHeading" : "") . " data</td>\n"; | |
| 115 | + $sToRender .= "<td colspan=" . count($this->aColumns) . ">" . | |
| 116 | + sprintf(_("No %s data"), (isset($this->sTableHeading) ? "$this->sTableHeading" : "")) . | |
| 117 | + "</td>\n"; | |
| 116 | 118 | } |
| 117 | 119 | $sToRender .= "</tr>\n"; |
| 118 | 120 | } else { | ... | ... |
lib/visualpatterns/PatternTableGeneric.inc
| ... | ... | @@ -121,7 +121,9 @@ class PatternTableGeneric { |
| 121 | 121 | if (isset($this->sEmptyTableMessage)) { |
| 122 | 122 | $sToRender .= "<td colspan=" . count($this->aColumns) . ">$this->sEmptyTableMessage</td>\n"; |
| 123 | 123 | } else { |
| 124 | - $sToRender .= "<td colspan=" . count($this->aColumns) . ">No " . (isset($this->sTableHeading) ? $this->sTableHeading : "") . " data</td>\n"; | |
| 124 | + $sToRender .= "<td colspan=" . count($this->aColumns) . ">" . | |
| 125 | + sprintf(_("No %s data admin"), (isset($this->sTableHeading) ? $this->sTableHeading : "")) . | |
| 126 | + "</td>\n"; | |
| 125 | 127 | } |
| 126 | 128 | $sToRender .= "</tr>\n"; |
| 127 | 129 | } else { | ... | ... |
presentation/lookAndFeel/knowledgeTree/administration/usermanagement/editUserGroupsBL.php
| ... | ... | @@ -98,7 +98,7 @@ if (checkSession()) { |
| 98 | 98 | // Redirect edit groups page |
| 99 | 99 | redirect($_SERVER["PHP_SELF"] . "?fUserID=$fUserID"); |
| 100 | 100 | } else { |
| 101 | - $main->setErrorMessage("Some problems in updating groups. Please contact your administrator"); | |
| 101 | + $main->setErrorMessage(_("Some problems in updating groups") . ". " . _("Please contact your administrator") . "."); | |
| 102 | 102 | } |
| 103 | 103 | } |
| 104 | 104 | } | ... | ... |
presentation/lookAndFeel/knowledgeTree/administration/usermanagement/editUserGroupsUI.inc
| ... | ... | @@ -46,9 +46,9 @@ function renderGroupPicker($iUserID){ |
| 46 | 46 | |
| 47 | 47 | // Headings |
| 48 | 48 | $sToRender .= "<tr>"; |
| 49 | - $sToRender .= "<td ><strong>Assigned User to</strong></td>"; | |
| 49 | + $sToRender .= "<td ><strong>" . _("Assigned Groups") . "</strong></td>"; | |
| 50 | 50 | $sToRender .= "<td></td>"; |
| 51 | - $sToRender .= "<td ><strong>Available Groups</strong></td>"; | |
| 51 | + $sToRender .= "<td ><strong>" . _("Available Groups") . "</strong></td>"; | |
| 52 | 52 | $sToRender .= "</tr>"; |
| 53 | 53 | |
| 54 | 54 | // Initialise structure |
| ... | ... | @@ -78,9 +78,9 @@ function renderGroupPicker($iUserID){ |
| 78 | 78 | |
| 79 | 79 | // Filter Button |
| 80 | 80 | $sToRender .= "<tr>"; |
| 81 | - $sToRender .= "<td>Filter <BR><input type=\"text\" name=\"filterUG\" onkeyup=\"optGroup.sortSelectMatch(groupSelect, this.value)\" onchange=\"optGroup.sortSelectMatch(groupSelect, this.value)\"></td>"; | |
| 81 | + $sToRender .= "<td>" . _("Filter") . " <BR><input type=\"text\" name=\"filterUG\" onkeyup=\"optGroup.sortSelectMatch(groupSelect, this.value)\" onchange=\"optGroup.sortSelectMatch(groupSelect, this.value)\"></td>"; | |
| 82 | 82 | $sToRender .= "<td></td>"; |
| 83 | - $sToRender .= "<td>Filter <BR><input type=\"text\" name=\"filterOG\" onkeyup=\"optGroup.sortSelectMatch(chosenGroups, this.value)\" onchange=\"optGroup.sortSelectMatch(chosenGroups, this.value)\"></td>"; | |
| 83 | + $sToRender .= "<td>" . _("Filter") . " <BR><input type=\"text\" name=\"filterOG\" onkeyup=\"optGroup.sortSelectMatch(chosenGroups, this.value)\" onchange=\"optGroup.sortSelectMatch(chosenGroups, this.value)\"></td>"; | |
| 84 | 84 | $sToRender .= "</tr>"; |
| 85 | 85 | |
| 86 | 86 | // Assign/Cancel button | ... | ... |
presentation/lookAndFeel/knowledgeTree/administration/usermanagement/passwordManagementUI.inc
| ... | ... | @@ -31,15 +31,15 @@ function getPage($sUserName) { |
| 31 | 31 | $sToRender .= "<br>\n"; |
| 32 | 32 | $sToRender .= "<table cellpadding=\"5\">\n"; |
| 33 | 33 | $sToRender .= "<tr>\n"; |
| 34 | - $sToRender .= "<td bgcolor=\"6699FF\">User name: </td>\n"; | |
| 34 | + $sToRender .= "<td bgcolor=\"6699FF\">" . _("User name") . ": </td>\n"; | |
| 35 | 35 | $sToRender .= "<td bgcolor=\"F5F6EE\">$sUserName</td>\n"; |
| 36 | 36 | $sToRender .= "</tr>\n"; |
| 37 | 37 | $sToRender .= "<tr>\n"; |
| 38 | - $sToRender .= "<td bgcolor=\"6699FF\">New password: </td>\n"; | |
| 38 | + $sToRender .= "<td bgcolor=\"6699FF\">" . _("New password") . ": </td>\n"; | |
| 39 | 39 | $sToRender .= "<td><input type=\"password\" name=\"fNewPassword\"></td>\n"; |
| 40 | 40 | $sToRender .= "</tr>\n"; |
| 41 | 41 | $sToRender .= "<tr>\n"; |
| 42 | - $sToRender .= "<td bgcolor=\"6699FF\">Confirm password: </td>\n"; | |
| 42 | + $sToRender .= "<td bgcolor=\"6699FF\">" . _("Confirm password") . ": </td>\n"; | |
| 43 | 43 | $sToRender .= "<td bgcolor=\"F5F6EE\"><input type=\"password\" name=\"fNewPasswordConfirm\"></td>\n"; |
| 44 | 44 | $sToRender .= "</tr>\n"; |
| 45 | 45 | $sToRender .= "<tr>\n"; |
| ... | ... | @@ -61,7 +61,7 @@ function getPasswordUpdateSuccessPage() { |
| 61 | 61 | $sToRender .= renderHeading(_("Update user password")); |
| 62 | 62 | $sToRender .= "<br>\n"; |
| 63 | 63 | $sToRender .= "<table>\n"; |
| 64 | - $sToRender .= "<tr><td>The user's password was successfully updated</td></tr>\n"; | |
| 64 | + $sToRender .= "<tr><td>" . _("The user's password was successfully updated") . ".</td></tr>\n"; | |
| 65 | 65 | $sToRender .= "<tr></tr>\n"; |
| 66 | 66 | $sToRender .= "<tr></tr>\n"; |
| 67 | 67 | $sToRender .= "<tr>\n"; | ... | ... |
presentation/lookAndFeel/knowledgeTree/documentmanagement/bulkUploadBL.php
| ... | ... | @@ -57,8 +57,8 @@ $oPatternCustom = & new PatternCustom(); |
| 57 | 57 | /* CHECK: system has required features to handle bulk upload */ |
| 58 | 58 | if (!BulkUploadManager::isBulkUploadCapable()) { |
| 59 | 59 | // can't do bulk uploading |
| 60 | - $sErrorMessage = "This system is not capable of handling bulk uploads. <br/>\n" | |
| 61 | - . "Please contact your system administrator.<br />\n" | |
| 60 | + $sErrorMessage = _("This system is not capable of handling bulk uploads") . ". <br/>\n" | |
| 61 | + . _("Please contact your system administrator") . "<br />\n" | |
| 62 | 62 | . getCancelButton($fFolderID); |
| 63 | 63 | $main->setErrorMessage($sErrorMessage); |
| 64 | 64 | $main->setCentralPayload($oPatternCustom); |
| ... | ... | @@ -72,7 +72,7 @@ if (isset($fFolderID)) { |
| 72 | 72 | } else { |
| 73 | 73 | // no folder id was set when coming to this page, |
| 74 | 74 | // so display an error message |
| 75 | - $sErrorMessage = "You haven't selected a folder to bulk upload to."; | |
| 75 | + $sErrorMessage = _("You haven't selected a folder to bulk upload to") . "."; | |
| 76 | 76 | $main->setErrorMessage($sErrorMessage); |
| 77 | 77 | $main->setCentralPayload($oPatternCustom); |
| 78 | 78 | $main->render(); |
| ... | ... | @@ -83,7 +83,7 @@ if (isset($fFolderID)) { |
| 83 | 83 | if (!Permission::userHasFolderWritePermission($oFolder)) { |
| 84 | 84 | // user does not have write permission for this folder |
| 85 | 85 | $sErrorMessage = getCancelButton($fFolderID) |
| 86 | - . "You do not have permission to add a document to this folder."; | |
| 86 | + . _("You do not have permission to add a document to this folder") . "."; | |
| 87 | 87 | $main->setErrorMessage($sErrorMessage); |
| 88 | 88 | $main->setCentralPayload($oPatternCustom); |
| 89 | 89 | $main->render(); |
| ... | ... | @@ -192,7 +192,7 @@ while ($aIndividualFiles) { |
| 192 | 192 | $oDocument->setDocumentTypeID($fDocumentTypeID); |
| 193 | 193 | |
| 194 | 194 | if (Document::documentExists($oDocument->getFileName(), $oDocument->getFolderID())) { |
| 195 | - $aFileStatus[$sBasename] = "A document with this file name already exists in this folder."; | |
| 195 | + $aFileStatus[$sBasename] = _("A document with this file name already exists in this folder") . "."; | |
| 196 | 196 | continue; |
| 197 | 197 | } |
| 198 | 198 | |
| ... | ... | @@ -200,14 +200,14 @@ while ($aIndividualFiles) { |
| 200 | 200 | |
| 201 | 201 | if (!$oDocument->create()) { |
| 202 | 202 | $default->log->error("bulkUploadBL.php DB error storing document in folder $sFolderPath id=$fFolderID"); |
| 203 | - $aFileStatus[$sBasename] = "An error occured while storing the document in the database, please try again. Error code 0127."; | |
| 203 | + $aFileStatus[$sBasename] = _("An error occured while storing the document in the database, please try again") . "."; | |
| 204 | 204 | continue; |
| 205 | 205 | } |
| 206 | 206 | |
| 207 | 207 | // if the document was successfully created in the db, store it on the file system |
| 208 | 208 | if (!PhysicalDocumentManager::uploadPhysicalDocument($oDocument, $fFolderID, "None", $oFile->sFilename)) { |
| 209 | 209 | $default->log->error("bulkUploadBL.php DB error storing document in folder $sFolderPath id=$fFolderID"); |
| 210 | - $aFileStatus[$sBasename] = "An error occured while storing the document in the database, please try again. Error code 0128."; | |
| 210 | + $aFileStatus[$sBasename] = _("An error occured while storing the document in the database, please try again") . "."; | |
| 211 | 211 | continue; |
| 212 | 212 | } |
| 213 | 213 | |
| ... | ... | @@ -248,7 +248,7 @@ while ($aIndividualFiles) { |
| 248 | 248 | /* display a status page with per-file results for bulk upload */ |
| 249 | 249 | $default->log->info("bulkUploadBL.php successfully added document " . $oDocument->getFileName() . " to folder $sFolderPath id=$fFolderID"); |
| 250 | 250 | /* store status for this document for later display */ |
| 251 | - $aFileStatus[$oDocument->getName()] = "Successfully added document"; | |
| 251 | + $aFileStatus[$oDocument->getName()] = _("Successfully added document"); | |
| 252 | 252 | } |
| 253 | 253 | $oPatternCustom->setHtml(getStatusPage($fFolderID, $aFileStatus)); |
| 254 | 254 | ... | ... |
presentation/lookAndFeel/knowledgeTree/documentmanagement/bulkUploadUI.inc
| ... | ... | @@ -109,7 +109,7 @@ function getDocumentType($iFolderID) { |
| 109 | 109 | $oPatternListBox = & new PatternListBox("$default->document_types_table", "name", "id", "fDocumentTypeID",$sWhereClause); |
| 110 | 110 | $oPatternListBox->setIncludeDefaultValue(false); |
| 111 | 111 | $oPatternListBox->setFromClause("INNER JOIN $default->folder_doctypes_table AS FDL ON ST.id = FDL.document_type_id"); |
| 112 | - $oPatternListBox->setEmptyErrorMessage("No document types defined! Please contact an Administrator"); | |
| 112 | + $oPatternListBox->setEmptyErrorMessage(_("No document types defined") . "! " . _("Please contact an Administrator")); | |
| 113 | 113 | |
| 114 | 114 | $sHeading = "Please select the document type:"; |
| 115 | 115 | |
| ... | ... | @@ -159,13 +159,13 @@ function getPage($iFolderID, $iDocumentTypeID) { |
| 159 | 159 | $sToRender .= "<input type=\"hidden\" name=\"fStore\" value=\"1\">"; |
| 160 | 160 | $sToRender .= "<table>\n"; |
| 161 | 161 | $sToRender .= "<tr>\n"; |
| 162 | - $sToRender .= "<td colspan=\"2\"><b>Bulk Upload Zipfile: <b></td>\n"; | |
| 162 | + $sToRender .= "<td colspan=\"2\"><b>" . _("Bulk Upload Zipfile") . ": <b></td>\n"; | |
| 163 | 163 | $sToRender .= "</tr>\n"; |
| 164 | 164 | $sToRender .= "<tr><td>File: </td><td><input type=\"file\" name=\"fFile\"></td></tr>\n"; |
| 165 | - $sToRender .= "<tr><td colspan=\"2\">(Note: file should be a ZIP file without subdirectories. Details entered below apply to ALL documents to be added.)</td></tr>\n"; | |
| 165 | + $sToRender .= "<tr><td colspan=\"2\">(" . _("Note: file should be a ZIP file without subdirectories. Details entered below apply to ALL documents to be added.") . ")</td></tr>\n"; | |
| 166 | 166 | $sToRender .= "</table>\n"; |
| 167 | 167 | |
| 168 | - $sToRender .= "<table><tr><td><b>Document Type<b></td></tr><tr><td>" . lookupName($default->document_types_table, $iDocumentTypeID) . "</td></tr></table>"; | |
| 168 | + $sToRender .= "<table><tr><td><b>" . _("Document Type") . "<b></td></tr><tr><td>" . lookupName($default->document_types_table, $iDocumentTypeID) . "</td></tr></table>"; | |
| 169 | 169 | $sToRender .= getMetaDataForm($iFolderID, $iDocumentTypeID); |
| 170 | 170 | |
| 171 | 171 | // create "BACK" button (to go back to choose document type id) |
| ... | ... | @@ -184,13 +184,13 @@ function getPage($iFolderID, $iDocumentTypeID) { |
| 184 | 184 | function getStatusPage ($iFolderID, $aFileStatus) { |
| 185 | 185 | global $default; |
| 186 | 186 | |
| 187 | - $sToRender .= "Bulk Upload completed for ".count($aFileStatus)." documents. <br/>\n"; | |
| 187 | + $sToRender = sprintf(_("Bulk Upload completed for %s documents. <br/>"), count($aFileStatus)); | |
| 188 | 188 | if ($aFileStatus) { |
| 189 | 189 | $sToRender .= "<table>\n"; |
| 190 | 190 | $sToRender .= "<tr>\n"; |
| 191 | - $sToRender .= "<th> Document </th>\n"; | |
| 191 | + $sToRender .= "<th> " . _("Document") . " </th>\n"; | |
| 192 | 192 | $sToRender .= "<th> </th>\n"; |
| 193 | - $sToRender .= "<th> Status </th>\n"; | |
| 193 | + $sToRender .= "<th> " . _("Status") . " </th>\n"; | |
| 194 | 194 | $sToRender .= "</tr>\n"; |
| 195 | 195 | foreach ($aFileStatus as $sDocumentName => $sUploadStatus) { |
| 196 | 196 | $sToRender .= "<tr>\n"; |
| ... | ... | @@ -209,8 +209,8 @@ function getStatusPage ($iFolderID, $aFileStatus) { |
| 209 | 209 | } |
| 210 | 210 | |
| 211 | 211 | function getInvalidBulkUploadErrorMsg() { |
| 212 | - return "You did not select a valid document to upload. <br />\n" | |
| 213 | - ."Bulk upload currently only supports .ZIP files without subdirectories.<br />\n"; | |
| 212 | + return _("You did not select a valid document to upload") . ". <br />\n" . | |
| 213 | + _("Bulk upload currently only supports .ZIP files without subdirectories") . ".<br />\n"; | |
| 214 | 214 | } |
| 215 | 215 | |
| 216 | 216 | // image link ... BACK (try bulk upload again) | ... | ... |
presentation/lookAndFeel/knowledgeTree/documentmanagement/moveDocumentUI.inc
| ... | ... | @@ -35,7 +35,7 @@ function getConfirmationPage($iFolderID, $iDocumentIDs) { |
| 35 | 35 | |
| 36 | 36 | $oDocument = & Document::get($iDocumentIDs[$i]); |
| 37 | 37 | |
| 38 | - $sToRender .= "<tr><td><strong>" . $oDocument->getDisplayPath() . "</strong> <td> to </td> </td>\n"; | |
| 38 | + $sToRender .= "<tr><td><strong>" . $oDocument->getDisplayPath() . "</strong> <td> " . _("to") . " </td> </td>\n"; | |
| 39 | 39 | $sToRender .= "<td><strong>" . Folder::getFolderDisplayPath($iFolderID) . " > " . $oDocument->getFileName() . "</strong></td>\n"; |
| 40 | 40 | $sQueryString .= "fDocumentIDs[]=$iDocumentIDs[$i]&"; |
| 41 | 41 | } |
| ... | ... | @@ -85,7 +85,7 @@ function getPage($iFolderID, $iDocumentIDs, $sErrorMessage = "") { |
| 85 | 85 | function renderErrorPage($sErrorMessage, $iDocumentID = "") { |
| 86 | 86 | global $default; |
| 87 | 87 | if ($iDocumentID) { |
| 88 | - return statusPage("Delete Document", "", $sErrorMessage, "viewDocument", "fDocumentID=$iDocumentID"); | |
| 88 | + return statusPage(_("Delete Document"), "", $sErrorMessage, "viewDocument", "fDocumentID=$iDocumentID"); | |
| 89 | 89 | } else { |
| 90 | 90 | $sToRender = renderHeading(_("Delete Document")); |
| 91 | 91 | $sToRender .= "<table>\n"; | ... | ... |
presentation/lookAndFeel/knowledgeTree/foldermanagement/deleteFolderBL.php
| ... | ... | @@ -152,7 +152,7 @@ if (checkSession()) { |
| 152 | 152 | |
| 153 | 153 | if (Folder::folderIsUnitRootFolder($fFolderID) && $bUnitHasGroups) { |
| 154 | 154 | // you can't delete a unit root folder |
| 155 | - $oPatternCustom->setHtml(statusPage("Delete Folder", "", "You can't delete this folder because it is a Unit Root Folder and in use.", "browse", "fFolderID=" . $iFolderID)); | |
| 155 | + $oPatternCustom->setHtml(statusPage("Delete Folder", "", _("You can't delete this folder because it is a Unit Root Folder and in use") . ".", "browse", "fFolderID=" . $iFolderID)); | |
| 156 | 156 | |
| 157 | 157 | } else { |
| 158 | 158 | // get confirmation first | ... | ... |
presentation/lookAndFeel/knowledgeTree/foldermanagement/editUI.inc
| ... | ... | @@ -48,7 +48,7 @@ function getFolderData($iFolderID, $sDivName, $sStatusMessage = "") { |
| 48 | 48 | $aColumnTypes = array(1,1,2); |
| 49 | 49 | |
| 50 | 50 | $oPatternListFromQuery = & new PatternListFromQuery($sQuery, $aColumns, $aColumnHeaders, $aColumnTypes); |
| 51 | - $oPatternListFromQuery->setTableHeading("Folder Data"); | |
| 51 | + $oPatternListFromQuery->setTableHeading(_("Folder Data")); | |
| 52 | 52 | $oPatternListFromQuery->setTableWidth("610"); |
| 53 | 53 | |
| 54 | 54 | $sToRender .= "<table>"; |
| ... | ... | @@ -85,7 +85,7 @@ function getFolderRouting($iFolderID, $sDivName, $bCollaboration) { |
| 85 | 85 | $aLinkURLs = array(4=>"$default->rootUrl/control.php?action=modifyFolderCollaboration",5=>"$default->rootUrl/control.php?action=deleteFolderCollaboration", 6=>"$default->rootUrl/control.php?action=viewDependantDocument"); |
| 86 | 86 | |
| 87 | 87 | $oPatternTableSqlQuery = & new PatternTableSqlQuery($sQuery, $aColumns, $aColumnTypes, $aColumnHeaders, "610", $aLinkURLs, $aDBColumnArray,$aQueryStringVariableNames); |
| 88 | - $oPatternTableSqlQuery->setTableHeading("Document Routing"); | |
| 88 | + $oPatternTableSqlQuery->setTableHeading(_("Document Routing")); | |
| 89 | 89 | $oPatternTableSqlQuery->setDisplayColumnHeadings(true); |
| 90 | 90 | |
| 91 | 91 | $sToRender .= "<table>"; |
| ... | ... | @@ -119,7 +119,7 @@ function getFolderDocTypes($iFolderID, $sDivName) { |
| 119 | 119 | $aLinkURLs = array(1=>"$default->rootUrl/control.php?action=deleteFolderDocType"); |
| 120 | 120 | |
| 121 | 121 | $oPatternTableSqlQuery = & new PatternTableSqlQuery($sQuery, $aColumns, $aColumnTypes, $aColumnHeaders, "610", $aLinkURLs, $aDBColumnArray,$aQueryStringVariableNames); |
| 122 | - $oPatternTableSqlQuery->setTableHeading("Document Types"); | |
| 122 | + $oPatternTableSqlQuery->setTableHeading(_("Document Types")); | |
| 123 | 123 | $oPatternTableSqlQuery->setDisplayColumnHeadings(true); |
| 124 | 124 | |
| 125 | 125 | $sToRender .= "<table>"; |
| ... | ... | @@ -166,11 +166,11 @@ function getFolderGroupAccess($iFolderID, $sDivName) { |
| 166 | 166 | $aLinkURLs = array(3=>"$default->rootUrl/control.php?action=modifyGroupFolderLink",4=>"$default->rootUrl/control.php?action=deleteGroupFolderLink"); |
| 167 | 167 | |
| 168 | 168 | $oPatternTableSqlQuery = & new PatternTableSqlQuery(array($sQuery, $iInheritedFolderID), $aColumns, $aColumnTypes, $aColumnHeaders, "610", $aLinkURLs, $aDBColumnArray,$aQueryStringVariableNames); |
| 169 | - $oPatternTableSqlQuery->setTableHeading("Folder Permissions"); | |
| 169 | + $oPatternTableSqlQuery->setTableHeading(_("Folder Permissions")); | |
| 170 | 170 | $oPatternTableSqlQuery->setDisplayColumnHeadings(true); |
| 171 | 171 | if ($bInherited === true) { |
| 172 | 172 | $oPatternTableSqlQuery->setDisabled(true); |
| 173 | - $oPatternTableSqlQuery->setTableHeading("Folder Permissions (inherited)"); | |
| 173 | + $oPatternTableSqlQuery->setTableHeading(_("Folder Permissions") . "(" . _("inherited") . ")"); | |
| 174 | 174 | } |
| 175 | 175 | $sToRender .= "<table>"; |
| 176 | 176 | $sToRender .= "<tr><td>" . $oPatternTableSqlQuery->render() . "</td></tr>"; | ... | ... |
presentation/lookAndFeel/knowledgeTree/foldermanagement/modifyFolderDataUI.inc
| ... | ... | @@ -41,7 +41,7 @@ function getFolderData($iFolderID, $sStatusMessage = "") { |
| 41 | 41 | $sToRender .= "<table>"; |
| 42 | 42 | $sToRender .= "<tr><td>"; |
| 43 | 43 | $sToRender .= "<table cellpadding=\"5\" border=\"0\" width=\"610\">\n"; |
| 44 | - $sToRender .= "<caption><strong>Folder Data</strong></caption>"; | |
| 44 | + $sToRender .= "<caption><strong>" . _("Folder Data") . "</strong></caption>"; | |
| 45 | 45 | if ($sql->next_record()) { |
| 46 | 46 | $sToRender .= "<tr>\n"; |
| 47 | 47 | $sToRender .= "<td bgcolor=\"" . $sTDBGColour . "\">Name</td>\n"; | ... | ... |