Commit b37c493e4a642016549a10373c5293bd2eda93af

Authored by Neil Blakey-Milner
1 parent 1fe30aee

Change all references to gettext's _ to _kt


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@5136 c91229c3-7414-0410-bfa2-8a42b809f60b
lib/actions/documentaction.inc.php
@@ -145,7 +145,7 @@ class KTDocumentAction extends KTStandardDispatcher { @@ -145,7 +145,7 @@ class KTDocumentAction extends KTStandardDispatcher {
145 KTBrowseUtil::breadcrumbsForDocument($this->oDocument, $aOptions)); 145 KTBrowseUtil::breadcrumbsForDocument($this->oDocument, $aOptions));
146 146
147 $actions = KTDocumentActionUtil::getDocumentActionsForDocument($this->oDocument, $this->oUser); 147 $actions = KTDocumentActionUtil::getDocumentActionsForDocument($this->oDocument, $this->oUser);
148 - $oPortlet = new KTActionPortlet(_("Document Actions")); 148 + $oPortlet = new KTActionPortlet(_kt("Document Actions"));
149 $oPortlet->setActions($actions, $this->sName); 149 $oPortlet->setActions($actions, $this->sName);
150 $this->oPage->addPortlet($oPortlet); 150 $this->oPage->addPortlet($oPortlet);
151 151
@@ -155,7 +155,7 @@ class KTDocumentAction extends KTStandardDispatcher { @@ -155,7 +155,7 @@ class KTDocumentAction extends KTStandardDispatcher {
155 } 155 }
156 156
157 function do_main() { 157 function do_main() {
158 - return _("Dispatcher component of action not implemented."); 158 + return _kt("Dispatcher component of action not implemented.");
159 } 159 }
160 } 160 }
161 161
lib/actions/folderaction.inc.php
@@ -139,7 +139,7 @@ class KTFolderAction extends KTStandardDispatcher { @@ -139,7 +139,7 @@ class KTFolderAction extends KTStandardDispatcher {
139 $this->aBreadcrumbs = array_merge($this->aBreadcrumbs, 139 $this->aBreadcrumbs = array_merge($this->aBreadcrumbs,
140 KTBrowseUtil::breadcrumbsForFolder($this->oFolder, $aOptions)); 140 KTBrowseUtil::breadcrumbsForFolder($this->oFolder, $aOptions));
141 141
142 - $portlet = new KTActionPortlet(_("Folder Actions")); 142 + $portlet = new KTActionPortlet(_kt("Folder Actions"));
143 $aActions = KTFolderActionUtil::getFolderActionsForFolder($this->oFolder, $this->oUser); 143 $aActions = KTFolderActionUtil::getFolderActionsForFolder($this->oFolder, $this->oUser);
144 $portlet->setActions($aActions,null); 144 $portlet->setActions($aActions,null);
145 $this->oPage->addPortlet($portlet); 145 $this->oPage->addPortlet($portlet);
@@ -150,7 +150,7 @@ class KTFolderAction extends KTStandardDispatcher { @@ -150,7 +150,7 @@ class KTFolderAction extends KTStandardDispatcher {
150 } 150 }
151 151
152 function do_main() { 152 function do_main() {
153 - return _("Dispatcher component of action not implemented."); 153 + return _kt("Dispatcher component of action not implemented.");
154 } 154 }
155 155
156 } 156 }
lib/authentication/authenticationprovider.inc.php
@@ -81,10 +81,10 @@ class KTAuthenticationProvider extends KTStandardDispatcher { @@ -81,10 +81,10 @@ class KTAuthenticationProvider extends KTStandardDispatcher {
81 } 81 }
82 82
83 function do_editSourceProvider() { 83 function do_editSourceProvider() {
84 - return $this->errorRedirectTo('viewsource', _("Provider does not support editing"), 'source_id=' . $_REQUEST['source_id']); 84 + return $this->errorRedirectTo('viewsource', _kt("Provider does not support editing"), 'source_id=' . $_REQUEST['source_id']);
85 } 85 }
86 86
87 function do_performEditSourceProvider() { 87 function do_performEditSourceProvider() {
88 - return $this->errorRedirectTo('viewsource', _("Provider does not support editing"), 'source_id=' . $_REQUEST['source_id']); 88 + return $this->errorRedirectTo('viewsource', _kt("Provider does not support editing"), 'source_id=' . $_REQUEST['source_id']);
89 } 89 }
90 } 90 }
lib/authentication/builtinauthenticationprovider.inc.php
@@ -43,7 +43,7 @@ class KTBuiltinAuthenticationProvider extends KTAuthenticationProvider { @@ -43,7 +43,7 @@ class KTBuiltinAuthenticationProvider extends KTAuthenticationProvider {
43 function showUserSource($oUser, $oSource) { 43 function showUserSource($oUser, $oSource) {
44 $sQuery = sprintf('action=setPassword&user_id=%d', $oUser->getId()); 44 $sQuery = sprintf('action=setPassword&user_id=%d', $oUser->getId());
45 $sUrl = KTUtil::addQueryString($_SERVER['PHP_SELF'], $sQuery); 45 $sUrl = KTUtil::addQueryString($_SERVER['PHP_SELF'], $sQuery);
46 - return '<p class="descriptiveText"><a href="' . $sUrl . '">' . sprintf(_("Change %s's password"), $oUser->getName()) . '</a></p>'; 46 + return '<p class="descriptiveText"><a href="' . $sUrl . '">' . sprintf(_kt("Change %s's password"), $oUser->getName()) . '</a></p>';
47 } 47 }
48 } 48 }
49 49
lib/browse/BrowseColumns.inc.php
@@ -57,7 +57,7 @@ class BrowseColumn { @@ -57,7 +57,7 @@ class BrowseColumn {
57 } 57 }
58 // FIXME is it _really_ worth using a template here? 58 // FIXME is it _really_ worth using a template here?
59 function renderHeader($sReturnURL) { 59 function renderHeader($sReturnURL) {
60 - $text = _("Abstract") . ": " . $this->label; 60 + $text = _kt("Abstract") . ": " . $this->label;
61 $href = $sReturnURL . "&sort_on=" . $this->name . "&sort_order="; 61 $href = $sReturnURL . "&sort_on=" . $this->name . "&sort_order=";
62 if ($this->sort_on) { 62 if ($this->sort_on) {
63 $href .= $this->sort_direction == "asc" ? "desc" : "asc" ; 63 $href .= $this->sort_direction == "asc" ? "desc" : "asc" ;
@@ -93,7 +93,7 @@ class TitleColumn extends BrowseColumn { @@ -93,7 +93,7 @@ class TitleColumn extends BrowseColumn {
93 } 93 }
94 // unlike others, this DOESN'T give its name. 94 // unlike others, this DOESN'T give its name.
95 function renderHeader($sReturnURL) { 95 function renderHeader($sReturnURL) {
96 - $text = _("Title"); 96 + $text = _kt("Title");
97 $href = $sReturnURL . "&sort_on=" . $this->name . "&sort_order="; 97 $href = $sReturnURL . "&sort_on=" . $this->name . "&sort_order=";
98 if ($this->sort_on) { 98 if ($this->sort_on) {
99 $href .= $this->sort_direction == "asc" ? "desc" : "asc" ; 99 $href .= $this->sort_direction == "asc" ? "desc" : "asc" ;
@@ -380,7 +380,7 @@ class DownloadColumn extends BrowseColumn { @@ -380,7 +380,7 @@ class DownloadColumn extends BrowseColumn {
380 380
381 // FIXME at some point we may want to hide this if the user doens't have the download action, but its OK for now. 381 // FIXME at some point we may want to hide this if the user doens't have the download action, but its OK for now.
382 $link = KTUtil::ktLink('action.php','ktcore.actions.document.view', 'fDocumentId=' . $aDataRow['document']->getId()); 382 $link = KTUtil::ktLink('action.php','ktcore.actions.document.view', 'fDocumentId=' . $aDataRow['document']->getId());
383 - $outStr = sprintf('<a href="%s" class="ktAction ktDownload" title="%s">%s</a>', $link, _('Download Document'), _('Download Document')); 383 + $outStr = sprintf('<a href="%s" class="ktAction ktDownload" title="%s">%s</a>', $link, _kt('Download Document'), _kt('Download Document'));
384 return $outStr; 384 return $outStr;
385 } 385 }
386 } 386 }
lib/browse/Criteria.inc
@@ -624,40 +624,40 @@ class Criteria { @@ -624,40 +624,40 @@ class Criteria {
624 global $default; 624 global $default;
625 switch ($iID) { 625 switch ($iID) {
626 case -1: 626 case -1:
627 - $oCriterion =& new NameCriterion(_("Name"), 'filename', 'filename', -1); 627 + $oCriterion =& new NameCriterion(_kt("Name"), 'filename', 'filename', -1);
628 break; 628 break;
629 case -2: 629 case -2:
630 - $oCriterion =& new TitleCriterion(_("Title"), 'name', 'name', -2); 630 + $oCriterion =& new TitleCriterion(_kt("Title"), 'name', 'name', -2);
631 break; 631 break;
632 case -3: 632 case -3:
633 - $oCriterion =& new CreatorCriterion(_("Creator"), 'creator_id', 'creator_id', -3); 633 + $oCriterion =& new CreatorCriterion(_kt("Creator"), 'creator_id', 'creator_id', -3);
634 break; 634 break;
635 case -4: 635 case -4:
636 - $oCriterion =& new DateCreatedCriterion(_("Date Created"), 'created', 'created', -4); 636 + $oCriterion =& new DateCreatedCriterion(_kt("Date Created"), 'created', 'created', -4);
637 break; 637 break;
638 case -5: 638 case -5:
639 - $oCriterion =& new DocumentTypeCriterion(_("Document Type"), 'document_type_id', 'document_type_id', -5); 639 + $oCriterion =& new DocumentTypeCriterion(_kt("Document Type"), 'document_type_id', 'document_type_id', -5);
640 break; 640 break;
641 case -6: 641 case -6:
642 - $oCriterion =& new IDCriterion(_("ID"), 'id', 'id', -6); 642 + $oCriterion =& new IDCriterion(_kt("ID"), 'id', 'id', -6);
643 break; 643 break;
644 case -7: 644 case -7:
645 - $oCriterion =& new DateModifiedCriterion(_("Date Modified"), 'modified', 'modified', -7); 645 + $oCriterion =& new DateModifiedCriterion(_kt("Date Modified"), 'modified', 'modified', -7);
646 break; 646 break;
647 case -8: 647 case -8:
648 - $oCriterion =& new SizeCriterion(_("File Size"), 'size', 'size', -8); 648 + $oCriterion =& new SizeCriterion(_kt("File Size"), 'size', 'size', -8);
649 break; 649 break;
650 case -9: 650 case -9:
651 - $oCriterion =& new ContentCriterion(_("Document Contents"), 'content', 'content', -9); 651 + $oCriterion =& new ContentCriterion(_kt("Document Contents"), 'content', 'content', -9);
652 break; 652 break;
653 case -10: 653 case -10:
654 - $oCriterion =& new WorkflowStateCriterion(_("Workflow state"), 'state', 'state', -10); 654 + $oCriterion =& new WorkflowStateCriterion(_kt("Workflow state"), 'state', 'state', -10);
655 break; 655 break;
656 case -11: 656 case -11:
657 - $oCriterion =& new TransactionTextCriterion(_("Transaction Text"), 'transactiontext', 'transactiontext', -11); 657 + $oCriterion =& new TransactionTextCriterion(_kt("Transaction Text"), 'transactiontext', 'transactiontext', -11);
658 break; 658 break;
659 case -12: 659 case -12:
660 - $oCriterion =& new SearchableTextCriterion(_("Searchable Text"), 'searchabletext', 'searchabletext', -12); 660 + $oCriterion =& new SearchableTextCriterion(_kt("Searchable Text"), 'searchabletext', 'searchabletext', -12);
661 break; 661 break;
662 } 662 }
663 return $oCriterion; 663 return $oCriterion;
lib/browse/browseutil.inc.php
@@ -178,7 +178,7 @@ class KTBrowseUtil { @@ -178,7 +178,7 @@ class KTBrowseUtil {
178 if (!empty($sAction)) { 178 if (!empty($sAction)) {
179 $url = generateControllerUrl($sAction, "fFolderId=1"); 179 $url = generateControllerUrl($sAction, "fFolderId=1");
180 } 180 }
181 - $aBreadcrumbs[] = array("url" => $url, "name" => _('Folders')); 181 + $aBreadcrumbs[] = array("url" => $url, "name" => _kt('Folders'));
182 182
183 if ($parents != 0) { 183 if ($parents != 0) {
184 foreach (range(0, $parents - 1) as $index) { 184 foreach (range(0, $parents - 1) as $index) {
lib/dashboard/Notification.inc.php
@@ -146,7 +146,7 @@ class KTNotificationHandler { @@ -146,7 +146,7 @@ class KTNotificationHandler {
146 146
147 // called to resolve the notification (typically from /notify.php?id=xxxxx 147 // called to resolve the notification (typically from /notify.php?id=xxxxx
148 function resolveNotification($oKTNotification) { 148 function resolveNotification($oKTNotification) {
149 - $_SESSION['KTErrorMessage'][] = _("This notification handler does not support publication."); 149 + $_SESSION['KTErrorMessage'][] = _kt("This notification handler does not support publication.");
150 exit(redirect(generateControllerLink('dashboard'))); 150 exit(redirect(generateControllerLink('dashboard')));
151 } 151 }
152 } 152 }
@@ -189,18 +189,18 @@ class KTSubscriptionNotification extends KTNotificationHandler { @@ -189,18 +189,18 @@ class KTSubscriptionNotification extends KTNotificationHandler {
189 189
190 function KTSubscriptionNotification() { 190 function KTSubscriptionNotification() {
191 $this->_eventTypeNames = array( 191 $this->_eventTypeNames = array(
192 - "AddFolder" => _('Folder added'),  
193 - "RemoveSubscribedFolder" => _('Folder removed'), // nothing. your subscription is now gone.  
194 - "RemoveChildFolder" => _('Folder removed'),  
195 - "AddDocument" => _('Document added'),  
196 - "RemoveSubscribedDocument" => _('Document removed'), // nothing. your subscription is now gone.  
197 - "RemoveChildDocument" => _('Document removed'),  
198 - "ModifyDocument" => _('Document modified'),  
199 - "CheckInDocument" => _('Document checked in'),  
200 - "CheckOutDocument" => _('Document checked out'),  
201 - "MovedDocument" => _('Document moved'),  
202 - "ArchivedDocument" => _('Document archived'), // can go through and request un-archival (?)  
203 - "RestoredArchivedDocument" => _('Document restored') 192 + "AddFolder" => _kt('Folder added'),
  193 + "RemoveSubscribedFolder" => _kt('Folder removed'), // nothing. your subscription is now gone.
  194 + "RemoveChildFolder" => _kt('Folder removed'),
  195 + "AddDocument" => _kt('Document added'),
  196 + "RemoveSubscribedDocument" => _kt('Document removed'), // nothing. your subscription is now gone.
  197 + "RemoveChildDocument" => _kt('Document removed'),
  198 + "ModifyDocument" => _kt('Document modified'),
  199 + "CheckInDocument" => _kt('Document checked in'),
  200 + "CheckOutDocument" => _kt('Document checked out'),
  201 + "MovedDocument" => _kt('Document moved'),
  202 + "ArchivedDocument" => _kt('Document archived'), // can go through and request un-archival (?)
  203 + "RestoredArchivedDocument" => _kt('Document restored')
204 ); 204 );
205 //parent::KTNotificationHandler(); 205 //parent::KTNotificationHandler();
206 } 206 }
@@ -378,7 +378,7 @@ class KTWorkflowNotification extends KTNotificationHandler { @@ -378,7 +378,7 @@ class KTWorkflowNotification extends KTNotificationHandler {
378 378
379 if ($oUser->getEmailNotification() && (strlen($oUser->getEmail()) > 0)) { 379 if ($oUser->getEmailNotification() && (strlen($oUser->getEmail()) > 0)) {
380 $emailContent = $handler->handleNotification($oNotification); 380 $emailContent = $handler->handleNotification($oNotification);
381 - $emailSubject = sprintf(_('Workflow Notification: %s'), $oDocument->getName()); 381 + $emailSubject = sprintf(_kt('Workflow Notification: %s'), $oDocument->getName());
382 $oEmail = new EmailAlert($oUser->getEmail(), $emailSubject, $emailContent); 382 $oEmail = new EmailAlert($oUser->getEmail(), $emailSubject, $emailContent);
383 $oEmail->send(); 383 $oEmail->send();
384 } 384 }
@@ -409,7 +409,7 @@ class KTWorkflowNotification extends KTNotificationHandler { @@ -409,7 +409,7 @@ class KTWorkflowNotification extends KTNotificationHandler {
409 function resolveNotification($oKTNotification) { 409 function resolveNotification($oKTNotification) {
410 $notify_action = KTUtil::arrayGet($_REQUEST, 'notify_action', null); 410 $notify_action = KTUtil::arrayGet($_REQUEST, 'notify_action', null);
411 if ($notify_action == 'clear') { 411 if ($notify_action == 'clear') {
412 - $_SESSION['KTInfoMessage'][] = _('Workflow Notification cleared.'); 412 + $_SESSION['KTInfoMessage'][] = _kt('Workflow Notification cleared.');
413 $oKTNotification->delete(); 413 $oKTNotification->delete();
414 exit(redirect(generateControllerLink('dashboard'))); 414 exit(redirect(generateControllerLink('dashboard')));
415 } 415 }
lib/dashboard/dashlet.inc.php
@@ -36,7 +36,7 @@ class KTBaseDashlet { @@ -36,7 +36,7 @@ class KTBaseDashlet {
36 36
37 // precondition check. 37 // precondition check.
38 function is_active($oUser) { return true; } 38 function is_active($oUser) { return true; }
39 - function render() { return '<div class="ktError"><p>' . _("This Dashlet is incomplete.") . '</p></div>'; } 39 + function render() { return '<div class="ktError"><p>' . _kt("This Dashlet is incomplete.") . '</p></div>'; }
40 } 40 }
41 41
42 //$oDashletRegistry =& KTDashletRegistry::getSingleton(); 42 //$oDashletRegistry =& KTDashletRegistry::getSingleton();
lib/dispatcher.inc.php
@@ -183,8 +183,8 @@ class KTStandardDispatcher extends KTDispatcher { @@ -183,8 +183,8 @@ class KTStandardDispatcher extends KTDispatcher {
183 function permissionDenied () { 183 function permissionDenied () {
184 global $default; 184 global $default;
185 185
186 - $msg = '<h2>' . _('Permission Denied') . '</h2>';  
187 - $msg .= '<p>' . _('If you feel that this is incorrect, please report both the action and your username to a system administrator.') . '</p>'; 186 + $msg = '<h2>' . _kt('Permission Denied') . '</h2>';
  187 + $msg .= '<p>' . _kt('If you feel that this is incorrect, please report both the action and your username to a system administrator.') . '</p>';
188 188
189 $this->oPage->setPageContents($msg); 189 $this->oPage->setPageContents($msg);
190 $this->oPage->setUser($this->oUser); 190 $this->oPage->setUser($this->oUser);
@@ -304,7 +304,7 @@ class KTAdminDispatcher extends KTStandardDispatcher { @@ -304,7 +304,7 @@ class KTAdminDispatcher extends KTStandardDispatcher {
304 304
305 function KTAdminDispatcher() { 305 function KTAdminDispatcher() {
306 $this->aBreadcrumbs = array( 306 $this->aBreadcrumbs = array(
307 - array('action' => 'administration', 'name' => _('Administration')), 307 + array('action' => 'administration', 'name' => _kt('Administration')),
308 ); 308 );
309 return parent::KTStandardDispatcher(); 309 return parent::KTStandardDispatcher();
310 } 310 }
lib/documentmanagement/DocumentTransaction.inc
@@ -94,7 +94,7 @@ class DocumentTransaction { @@ -94,7 +94,7 @@ class DocumentTransaction {
94 function & getTransactionType() { return KTDocumentTransactionType::getByNamespace($this->sTransactionNS); } 94 function & getTransactionType() { return KTDocumentTransactionType::getByNamespace($this->sTransactionNS); }
95 function getAction() { 95 function getAction() {
96 $oType = $this->getTransactionType(); 96 $oType = $this->getTransactionType();
97 - $action = _('Unknown Action'); 97 + $action = _kt('Unknown Action');
98 if (!PEAR::isError($oType)) { $action = $oType->getName(); } 98 if (!PEAR::isError($oType)) { $action = $oType->getName(); }
99 99
100 return $action; 100 return $action;
lib/documentmanagement/documentutil.inc.php
@@ -62,7 +62,7 @@ class KTDocumentUtil { @@ -62,7 +62,7 @@ class KTDocumentUtil {
62 copy($sBackupPath, $oDocument->getPath()); 62 copy($sBackupPath, $oDocument->getPath());
63 // remove the backup 63 // remove the backup
64 unlink($sBackupPath); 64 unlink($sBackupPath);
65 - return PEAR::raiseError(_("An error occurred while storing the new file")); 65 + return PEAR::raiseError(_kt("An error occurred while storing the new file"));
66 } 66 }
67 67
68 $oDocument->setLastModifiedDate(getCurrentDateTime()); 68 $oDocument->setLastModifiedDate(getCurrentDateTime());
@@ -77,7 +77,7 @@ class KTDocumentUtil { @@ -77,7 +77,7 @@ class KTDocumentUtil {
77 if (PEAR::isError($bSuccess)) { 77 if (PEAR::isError($bSuccess)) {
78 return $bSuccess; 78 return $bSuccess;
79 } 79 }
80 - return PEAR::raiseError(_("An error occurred while storing this document in the database")); 80 + return PEAR::raiseError(_kt("An error occurred while storing this document in the database"));
81 } 81 }
82 82
83 // create the document transaction record 83 // create the document transaction record
@@ -127,7 +127,7 @@ class KTDocumentUtil { @@ -127,7 +127,7 @@ class KTDocumentUtil {
127 127
128 $oDocument->setIsCheckedOut(true); 128 $oDocument->setIsCheckedOut(true);
129 $oDocument->setCheckedOutUserID($oUser->getId()); 129 $oDocument->setCheckedOutUserID($oUser->getId());
130 - if (!$oDocument->update()) { return PEAR::raiseError(_("There was a problem checking out the document.")); } 130 + if (!$oDocument->update()) { return PEAR::raiseError(_kt("There was a problem checking out the document.")); }
131 131
132 $oKTTriggerRegistry = KTTriggerRegistry::getSingleton(); 132 $oKTTriggerRegistry = KTTriggerRegistry::getSingleton();
133 $aTriggers = $oKTTriggerRegistry->getTriggers('checkout', 'postValidate'); 133 $aTriggers = $oKTTriggerRegistry->getTriggers('checkout', 'postValidate');
@@ -165,7 +165,7 @@ class KTDocumentUtil { @@ -165,7 +165,7 @@ class KTDocumentUtil {
165 } else { 165 } else {
166 $iDocumentTypeId = 1; 166 $iDocumentTypeId = 1;
167 } 167 }
168 - $oUploadChannel->sendMessage(new KTUploadGenericMessage(_("Creating database entry"))); 168 + $oUploadChannel->sendMessage(new KTUploadGenericMessage(_kt("Creating database entry")));
169 $oDocument =& Document::createFromArray(array( 169 $oDocument =& Document::createFromArray(array(
170 'name' => $sDescription, 170 'name' => $sDescription,
171 'description' => $sDescription, 171 'description' => $sDescription,
@@ -185,7 +185,7 @@ class KTDocumentUtil { @@ -185,7 +185,7 @@ class KTDocumentUtil {
185 return $res; 185 return $res;
186 } 186 }
187 } else { 187 } else {
188 - // $oUploadChannel->sendMessage(new KTUploadGenericMessage(_("Storing contents"))); 188 + // $oUploadChannel->sendMessage(new KTUploadGenericMessage(_kt("Storing contents")));
189 $res = KTDocumentUtil::storeContents($oDocument, $oContents, $aOptions); 189 $res = KTDocumentUtil::storeContents($oDocument, $oContents, $aOptions);
190 if (PEAR::isError($res)) { 190 if (PEAR::isError($res)) {
191 $oDocument->delete(); 191 $oDocument->delete();
@@ -200,7 +200,7 @@ class KTDocumentUtil { @@ -200,7 +200,7 @@ class KTDocumentUtil {
200 return $res; 200 return $res;
201 } 201 }
202 } else { 202 } else {
203 - // $oUploadChannel->sendMessage(new KTUploadGenericMessage(_("Saving metadata"))); 203 + // $oUploadChannel->sendMessage(new KTUploadGenericMessage(_kt("Saving metadata")));
204 $res = KTDocumentUtil::saveMetadata($oDocument, $aMetadata); 204 $res = KTDocumentUtil::saveMetadata($oDocument, $aMetadata);
205 if (PEAR::isError($res)) { 205 if (PEAR::isError($res)) {
206 $oDocument->delete(); 206 $oDocument->delete();
@@ -387,12 +387,12 @@ class KTDocumentUtil { @@ -387,12 +387,12 @@ class KTDocumentUtil {
387 if (KTDocumentUtil::fileExists($oFolder, $sFilename)) { 387 if (KTDocumentUtil::fileExists($oFolder, $sFilename)) {
388 $oDoc = Document::getByFilenameAndFolder($sFilename, $oFolder->getId()); 388 $oDoc = Document::getByFilenameAndFolder($sFilename, $oFolder->getId());
389 if (PEAR::isError($oDoc)) { 389 if (PEAR::isError($oDoc)) {
390 - return PEAR::raiseError(_("Document with that filename already exists in this folder, and appears to be invalid. Please contact the system administrator.")); 390 + return PEAR::raiseError(_kt("Document with that filename already exists in this folder, and appears to be invalid. Please contact the system administrator."));
391 } else { 391 } else {
392 if ($oDoc->getStatusID != LIVE) { 392 if ($oDoc->getStatusID != LIVE) {
393 - return PEAR::raiseError(_("Document with that filename already exists in this folder, but it has been archived or deleted and is still available for restoration. To prevent it being overwritten, you are not allowed to add a document with the same title or filename.")); 393 + return PEAR::raiseError(_kt("Document with that filename already exists in this folder, but it has been archived or deleted and is still available for restoration. To prevent it being overwritten, you are not allowed to add a document with the same title or filename."));
394 } else { 394 } else {
395 - return PEAR::raiseError(_("Document with that filename already exists in this folder.")); 395 + return PEAR::raiseError(_kt("Document with that filename already exists in this folder."));
396 } 396 }
397 } 397 }
398 } 398 }
@@ -400,12 +400,12 @@ class KTDocumentUtil { @@ -400,12 +400,12 @@ class KTDocumentUtil {
400 if (KTDocumentUtil::nameExists($oFolder, $sName)) { 400 if (KTDocumentUtil::nameExists($oFolder, $sName)) {
401 $oDoc = Document::getByNameAndFolder($sName, $oFolder->getId()); 401 $oDoc = Document::getByNameAndFolder($sName, $oFolder->getId());
402 if (PEAR::isError($oDoc)) { 402 if (PEAR::isError($oDoc)) {
403 - return PEAR::raiseError(_("Document with that title already exists in this folder, and appears to be invalid. Please contact the system administrator.")); 403 + return PEAR::raiseError(_kt("Document with that title already exists in this folder, and appears to be invalid. Please contact the system administrator."));
404 } else { 404 } else {
405 if ($oDoc->getStatusID != LIVE) { 405 if ($oDoc->getStatusID != LIVE) {
406 - return PEAR::raiseError(_("Document with that title already exists in this folder, but it has been archived or deleted and is still available for restoration. To prevent it being overwritten, you are not allowed to add a document with the same title or filename.")); 406 + return PEAR::raiseError(_kt("Document with that title already exists in this folder, but it has been archived or deleted and is still available for restoration. To prevent it being overwritten, you are not allowed to add a document with the same title or filename."));
407 } else { 407 } else {
408 - return PEAR::raiseError(_("Document with that title already exists in this folder.")); 408 + return PEAR::raiseError(_kt("Document with that title already exists in this folder."));
409 } 409 }
410 } 410 }
411 411
@@ -413,12 +413,12 @@ class KTDocumentUtil { @@ -413,12 +413,12 @@ class KTDocumentUtil {
413 $oUploadChannel =& KTUploadChannel::getSingleton(); 413 $oUploadChannel =& KTUploadChannel::getSingleton();
414 $oUploadChannel->sendMessage(new KTUploadNewFile($sFilename)); 414 $oUploadChannel->sendMessage(new KTUploadNewFile($sFilename));
415 $oDocument =& KTDocumentUtil::_add($oFolder, $sFilename, $oUser, $aOptions); 415 $oDocument =& KTDocumentUtil::_add($oFolder, $sFilename, $oUser, $aOptions);
416 - // $oUploadChannel->sendMessage(new KTUploadGenericMessage(_("Document created"))); 416 + // $oUploadChannel->sendMessage(new KTUploadGenericMessage(_kt("Document created")));
417 if (PEAR::isError($oDocument)) { 417 if (PEAR::isError($oDocument)) {
418 return $oDocument; 418 return $oDocument;
419 } 419 }
420 420
421 - // $oUploadChannel->sendMessage(new KTUploadGenericMessage(_("Scanning file"))); 421 + // $oUploadChannel->sendMessage(new KTUploadGenericMessage(_kt("Scanning file")));
422 $oKTTriggerRegistry = KTTriggerRegistry::getSingleton(); 422 $oKTTriggerRegistry = KTTriggerRegistry::getSingleton();
423 $aTriggers = $oKTTriggerRegistry->getTriggers('content', 'scan'); 423 $aTriggers = $oKTTriggerRegistry->getTriggers('content', 'scan');
424 $iTrigger = 0; 424 $iTrigger = 0;
@@ -426,7 +426,7 @@ class KTDocumentUtil { @@ -426,7 +426,7 @@ class KTDocumentUtil {
426 $sTrigger = $aTrigger[0]; 426 $sTrigger = $aTrigger[0];
427 $oTrigger = new $sTrigger; 427 $oTrigger = new $sTrigger;
428 $oTrigger->setDocument($oDocument); 428 $oTrigger->setDocument($oDocument);
429 - // $oUploadChannel->sendMessage(new KTUploadGenericMessage(sprintf(_(" (trigger %s)"), $sTrigger))); 429 + // $oUploadChannel->sendMessage(new KTUploadGenericMessage(sprintf(_kt(" (trigger %s)"), $sTrigger)));
430 $ret = $oTrigger->scan(); 430 $ret = $oTrigger->scan();
431 if (PEAR::isError($ret)) { 431 if (PEAR::isError($ret)) {
432 $oDocument->delete(); 432 $oDocument->delete();
@@ -434,7 +434,7 @@ class KTDocumentUtil { @@ -434,7 +434,7 @@ class KTDocumentUtil {
434 } 434 }
435 } 435 }
436 436
437 - $oUploadChannel->sendMessage(new KTUploadGenericMessage(_("Transforming file"))); 437 + $oUploadChannel->sendMessage(new KTUploadGenericMessage(_kt("Transforming file")));
438 $oKTTriggerRegistry = KTTriggerRegistry::getSingleton(); 438 $oKTTriggerRegistry = KTTriggerRegistry::getSingleton();
439 $aTriggers = $oKTTriggerRegistry->getTriggers('content', 'transform'); 439 $aTriggers = $oKTTriggerRegistry->getTriggers('content', 'transform');
440 foreach ($aTriggers as $aTrigger) { 440 foreach ($aTriggers as $aTrigger) {
@@ -444,11 +444,11 @@ class KTDocumentUtil { @@ -444,11 +444,11 @@ class KTDocumentUtil {
444 } 444 }
445 $oTrigger = new $sTrigger; 445 $oTrigger = new $sTrigger;
446 $oTrigger->setDocument($oDocument); 446 $oTrigger->setDocument($oDocument);
447 - // $oUploadChannel->sendMessage(new KTUploadGenericMessage(sprintf(_(" (trigger %s)"), $sTrigger))); 447 + // $oUploadChannel->sendMessage(new KTUploadGenericMessage(sprintf(_kt(" (trigger %s)"), $sTrigger)));
448 $oTrigger->transform(); 448 $oTrigger->transform();
449 } 449 }
450 450
451 - // $oUploadChannel->sendMessage(new KTUploadGenericMessage(_("Creating transaction"))); 451 + // $oUploadChannel->sendMessage(new KTUploadGenericMessage(_kt("Creating transaction")));
452 $aOptions = array('user' => $oUser); 452 $aOptions = array('user' => $oUser);
453 //create the document transaction record 453 //create the document transaction record
454 $oDocumentTransaction = & new DocumentTransaction($oDocument, "Document created", 'ktcore.transactions.create', $aOptions); 454 $oDocumentTransaction = & new DocumentTransaction($oDocument, "Document created", 'ktcore.transactions.create', $aOptions);
@@ -458,7 +458,7 @@ class KTDocumentUtil { @@ -458,7 +458,7 @@ class KTDocumentUtil {
458 return $res; 458 return $res;
459 } 459 }
460 460
461 - // $oUploadChannel->sendMessage(new KTUploadGenericMessage(_("Sending subscriptions"))); 461 + // $oUploadChannel->sendMessage(new KTUploadGenericMessage(_kt("Sending subscriptions")));
462 // fire subscription alerts for the checked in document 462 // fire subscription alerts for the checked in document
463 $oSubscriptionEvent = new SubscriptionEvent(); 463 $oSubscriptionEvent = new SubscriptionEvent();
464 $oFolder = Folder::get($oDocument->getFolderID()); 464 $oFolder = Folder::get($oDocument->getFolderID());
@@ -479,7 +479,7 @@ class KTDocumentUtil { @@ -479,7 +479,7 @@ class KTDocumentUtil {
479 } 479 }
480 KTDocumentUtil::updateSearchableText($oDocument, true); 480 KTDocumentUtil::updateSearchableText($oDocument, true);
481 481
482 - $oUploadChannel->sendMessage(new KTUploadGenericMessage(_("All done..."))); 482 + $oUploadChannel->sendMessage(new KTUploadGenericMessage(_kt("All done...")));
483 483
484 return $oDocument; 484 return $oDocument;
485 } 485 }
@@ -593,7 +593,7 @@ class KTDocumentUtil { @@ -593,7 +593,7 @@ class KTDocumentUtil {
593 } 593 }
594 if (PEAR::isError($oDocument) || ($oDocument == false)) { return PEAR::raiseError('Invalid document object.'); } 594 if (PEAR::isError($oDocument) || ($oDocument == false)) { return PEAR::raiseError('Invalid document object.'); }
595 595
596 - if ($oDocument->getIsCheckedOut() == true) { return PEAR::raiseError(sprintf(_('The document is checked out and cannot be deleted: %s'), $oDocument->getName())); } 596 + if ($oDocument->getIsCheckedOut() == true) { return PEAR::raiseError(sprintf(_kt('The document is checked out and cannot be deleted: %s'), $oDocument->getName())); }
597 597
598 // IF we're deleted ... 598 // IF we're deleted ...
599 if ($oDocument->getStatusID() == DELETED) { return true; } 599 if ($oDocument->getStatusID() == DELETED) { return true; }
@@ -607,7 +607,7 @@ class KTDocumentUtil { @@ -607,7 +607,7 @@ class KTDocumentUtil {
607 $res = $oDocument->update(); 607 $res = $oDocument->update();
608 if (PEAR::isError($res) || ($res == false)) { 608 if (PEAR::isError($res) || ($res == false)) {
609 DBUtil::rollback(); 609 DBUtil::rollback();
610 - return PEAR::raiseError(_("There was a problem deleting the document from the database.")); 610 + return PEAR::raiseError(_kt("There was a problem deleting the document from the database."));
611 } 611 }
612 612
613 // now move the document to the delete folder 613 // now move the document to the delete folder
@@ -629,7 +629,7 @@ class KTDocumentUtil { @@ -629,7 +629,7 @@ class KTDocumentUtil {
629 $oDocument->update(); 629 $oDocument->update();
630 */ 630 */
631 631
632 - return PEAR::raiseError(_("There was a problem deleting the document from storage.")); 632 + return PEAR::raiseError(_kt("There was a problem deleting the document from storage."));
633 } 633 }
634 634
635 $oDocumentTransaction = & new DocumentTransaction($oDocument, "Document deleted: " . $sReason, 'ktcore.transactions.delete'); 635 $oDocumentTransaction = & new DocumentTransaction($oDocument, "Document deleted: " . $sReason, 'ktcore.transactions.delete');
@@ -774,7 +774,7 @@ class KTDocumentUtil { @@ -774,7 +774,7 @@ class KTDocumentUtil {
774 $res = $oStorage->renameDocument($oDocument, $oOldContentVersion, $sNewFilename); 774 $res = $oStorage->renameDocument($oDocument, $oOldContentVersion, $sNewFilename);
775 775
776 if (!$res) { 776 if (!$res) {
777 - return PEAR::raiseError(_("An error occurred while storing the new file")); 777 + return PEAR::raiseError(_kt("An error occurred while storing the new file"));
778 } 778 }
779 779
780 $oDocument->setLastModifiedDate(getCurrentDateTime()); 780 $oDocument->setLastModifiedDate(getCurrentDateTime());
@@ -786,7 +786,7 @@ class KTDocumentUtil { @@ -786,7 +786,7 @@ class KTDocumentUtil {
786 if (PEAR::isError($bSuccess)) { 786 if (PEAR::isError($bSuccess)) {
787 return $bSuccess; 787 return $bSuccess;
788 } 788 }
789 - return PEAR::raiseError(_("An error occurred while storing this document in the database")); 789 + return PEAR::raiseError(_kt("An error occurred while storing this document in the database"));
790 } 790 }
791 791
792 // create the document transaction record 792 // create the document transaction record
@@ -806,7 +806,7 @@ class KTDocumentUtil { @@ -806,7 +806,7 @@ class KTDocumentUtil {
806 class KTMetadataValidationError extends PEAR_Error { 806 class KTMetadataValidationError extends PEAR_Error {
807 function KTMetadataValidationError ($aFailed) { 807 function KTMetadataValidationError ($aFailed) {
808 $this->aFailed = $aFailed; 808 $this->aFailed = $aFailed;
809 - $message = _('Validation Failed'); 809 + $message = _kt('Validation Failed');
810 parent::PEAR_Error($message); 810 parent::PEAR_Error($message);
811 } 811 }
812 } 812 }
lib/email/Email.inc
@@ -212,7 +212,7 @@ class Email { @@ -212,7 +212,7 @@ class Email {
212 $this->oMailer->FromName = $FromName; 212 $this->oMailer->FromName = $FromName;
213 $this->oMailer->AddAddress($ToEmail); 213 $this->oMailer->AddAddress($ToEmail);
214 $this->oMailer->Subject = stripslashes($Subj) . ' ' . $hyperlink; //only difference from above 214 $this->oMailer->Subject = stripslashes($Subj) . ' ' . $hyperlink; //only difference from above
215 - $this->oMailer->Body = stripslashes($EmailBody) . " <br>" . _("This bug can be found on this page") . ": " . "<a href = ". $hyperlink .">". $hyperlink ."</a>"; 215 + $this->oMailer->Body = stripslashes($EmailBody) . " <br>" . _kt("This bug can be found on this page") . ": " . "<a href = ". $hyperlink .">". $hyperlink ."</a>";
216 216
217 //send the email 217 //send the email
218 if(!$this->oMailer->Send()) { 218 if(!$this->oMailer->Send()) {
lib/foldermanagement/folderutil.inc.php
@@ -259,12 +259,12 @@ class KTFolderUtil { @@ -259,12 +259,12 @@ class KTFolderUtil {
259 $sFD = ''; 259 $sFD = '';
260 $sFF = ''; 260 $sFF = '';
261 if (!empty($aFailedDocuments)) { 261 if (!empty($aFailedDocuments)) {
262 - $sFD = _('Documents: ') . implode(', ', $aFailedDocuments) . '. '; 262 + $sFD = _kt('Documents: ') . implode(', ', $aFailedDocuments) . '. ';
263 } 263 }
264 if (!empty($aFailedFolders)) { 264 if (!empty($aFailedFolders)) {
265 - $sFF = _('Folders: ') . implode(', ', $aFailedFolders) . '.'; 265 + $sFF = _kt('Folders: ') . implode(', ', $aFailedFolders) . '.';
266 } 266 }
267 - return PEAR::raiseError(_('You do not have permission to delete these items. ') . $sFD . $sFF); 267 + return PEAR::raiseError(_kt('You do not have permission to delete these items. ') . $sFD . $sFF);
268 } 268 }
269 269
270 // now we can go ahead. 270 // now we can go ahead.
@@ -272,7 +272,7 @@ class KTFolderUtil { @@ -272,7 +272,7 @@ class KTFolderUtil {
272 $res = KTDocumentUtil::delete($oDocument, $sReason); 272 $res = KTDocumentUtil::delete($oDocument, $sReason);
273 if (PEAR::isError($res)) { 273 if (PEAR::isError($res)) {
274 DBUtil::rollback(); 274 DBUtil::rollback();
275 - return PEAR::raiseError(_('Delete Aborted. Unexpected failure to delete document: ') . $oDocument->getName() . $res->getMessage()); 275 + return PEAR::raiseError(_kt('Delete Aborted. Unexpected failure to delete document: ') . $oDocument->getName() . $res->getMessage());
276 } 276 }
277 } 277 }
278 278
@@ -287,7 +287,7 @@ class KTFolderUtil { @@ -287,7 +287,7 @@ class KTFolderUtil {
287 287
288 if (PEAR::isError($res)) { 288 if (PEAR::isError($res)) {
289 DBUtil::rollback(); 289 DBUtil::rollback();
290 - return PEAR::raiseError(_('Failure deleting folders.')); 290 + return PEAR::raiseError(_kt('Failure deleting folders.'));
291 } 291 }
292 292
293 // and store 293 // and store
@@ -307,7 +307,7 @@ class KTFolderUtil { @@ -307,7 +307,7 @@ class KTFolderUtil {
307 $oBaseFolderPerm = KTPermission::getByName('ktcore.permissions.addFolder'); 307 $oBaseFolderPerm = KTPermission::getByName('ktcore.permissions.addFolder');
308 308
309 if (!KTPermissionUtil::userHasPermissionOnItem($oUser, $oBaseFolderPerm, $oDestFolder)) { 309 if (!KTPermissionUtil::userHasPermissionOnItem($oUser, $oBaseFolderPerm, $oDestFolder)) {
310 - return PEAR::raiseError(_('You are not allowed to create folders in the destination.')); 310 + return PEAR::raiseError(_kt('You are not allowed to create folders in the destination.'));
311 } 311 }
312 312
313 $aFolderIds = array(); // of oFolder 313 $aFolderIds = array(); // of oFolder
@@ -353,12 +353,12 @@ class KTFolderUtil { @@ -353,12 +353,12 @@ class KTFolderUtil {
353 $sFD = ''; 353 $sFD = '';
354 $sFF = ''; 354 $sFF = '';
355 if (!empty($aFailedDocuments)) { 355 if (!empty($aFailedDocuments)) {
356 - $sFD = _('Documents: ') . implode(', ', $aFailedDocuments) . '. '; 356 + $sFD = _kt('Documents: ') . implode(', ', $aFailedDocuments) . '. ';
357 } 357 }
358 if (!empty($aFailedFolders)) { 358 if (!empty($aFailedFolders)) {
359 - $sFF = _('Folders: ') . implode(', ', $aFailedFolders) . '.'; 359 + $sFF = _kt('Folders: ') . implode(', ', $aFailedFolders) . '.';
360 } 360 }
361 - return PEAR::raiseError(_('You do not have permission to copy these items. ') . $sFD . $sFF); 361 + return PEAR::raiseError(_kt('You do not have permission to copy these items. ') . $sFD . $sFF);
362 } 362 }
363 363
364 // first we walk the tree, creating in the new location as we go. 364 // first we walk the tree, creating in the new location as we go.
@@ -433,7 +433,7 @@ class KTFolderUtil { @@ -433,7 +433,7 @@ class KTFolderUtil {
433 if (PEAR::isError($res) || ($res === false)) { 433 if (PEAR::isError($res) || ($res === false)) {
434 $oStorage->removeFolder($oNewBaseFolder); 434 $oStorage->removeFolder($oNewBaseFolder);
435 DBUtil::rollback(); 435 DBUtil::rollback();
436 - return PEAR::raiseError(_('Delete Aborted. Unexpected failure to copydocument: ') . $oDocument->getName() . $res->getMessage()); 436 + return PEAR::raiseError(_kt('Delete Aborted. Unexpected failure to copydocument: ') . $oDocument->getName() . $res->getMessage());
437 } 437 }
438 } 438 }
439 439
lib/groups/GroupUtil.php
@@ -340,7 +340,7 @@ class GroupUtil { @@ -340,7 +340,7 @@ class GroupUtil {
340 340
341 // short circuit 341 // short circuit
342 342
343 - if ($oGroup->hasMember($oUser)) { return sprintf(_('%s is a direct member.'), $oUser->getName()); } 343 + if ($oGroup->hasMember($oUser)) { return sprintf(_kt('%s is a direct member.'), $oUser->getName()); }
344 344
345 345
346 $aSubgroups = (array) $aGroupArray[$oGroup->getId()]; 346 $aSubgroups = (array) $aGroupArray[$oGroup->getId()];
@@ -363,7 +363,7 @@ class GroupUtil { @@ -363,7 +363,7 @@ class GroupUtil {
363 $oSubgroup = Group::get($res['group_id']); 363 $oSubgroup = Group::get($res['group_id']);
364 if (PEAR::isError($oSubgroup)) { return $oSubgroup; } 364 if (PEAR::isError($oSubgroup)) { return $oSubgroup; }
365 365
366 - return sprintf(_('%s is a member of %s'), $oUser->getName(), $oSubgroup->getName()); // could be error, but errors are caught. 366 + return sprintf(_kt('%s is a member of %s'), $oUser->getName(), $oSubgroup->getName()); // could be error, but errors are caught.
367 367
368 // } 368 // }
369 } 369 }
lib/mime.inc.php
@@ -101,14 +101,14 @@ class KTMime { @@ -101,14 +101,14 @@ class KTMime {
101 if ($sql->next_record()) { 101 if ($sql->next_record()) {
102 $friendly_name = $sql->f("friendly_name"); 102 $friendly_name = $sql->f("friendly_name");
103 if (!empty($friendly_name)) { 103 if (!empty($friendly_name)) {
104 - return _($sql->f("friendly_name")); 104 + return _kt($sql->f("friendly_name"));
105 } else { 105 } else {
106 - return sprintf(_('%s File'), strtoupper($sql->f('filetypes'))); 106 + return sprintf(_kt('%s File'), strtoupper($sql->f('filetypes')));
107 } 107 }
108 } 108 }
109 109
110 110
111 - return _('Unknown Type'); 111 + return _kt('Unknown Type');
112 } 112 }
113 113
114 /** 114 /**
lib/subscriptions/subscriptions.inc.php
@@ -668,18 +668,18 @@ class SubscriptionContent { @@ -668,18 +668,18 @@ class SubscriptionContent {
668 // have to be instantiated, or the i18n can't work. 668 // have to be instantiated, or the i18n can't work.
669 function SubscriptionContent() { 669 function SubscriptionContent() {
670 $this->_eventTypeNames = array( 670 $this->_eventTypeNames = array(
671 - "AddFolder" => _('Folder added'),  
672 - "RemoveSubscribedFolder" => _('Folder removed'), // nothing. your subscription is now gone.  
673 - "RemoveChildFolder" => _('Folder removed'),  
674 - "AddDocument" => _('Document added'),  
675 - "RemoveSubscribedDocument" => _('Document removed'), // nothing. your subscription is now gone.  
676 - "RemoveChildDocument" => _('Document removed'),  
677 - "ModifyDocument" => _('Document modified'),  
678 - "CheckInDocument" => _('Document checked in'),  
679 - "CheckOutDocument" => _('Document checked out'),  
680 - "MovedDocument" => _('Document moved'),  
681 - "ArchivedDocument" => _('Document archived'), // can go through and request un-archival (?)  
682 - "RestoredArchivedDocument" => _('Document restored') 671 + "AddFolder" => _kt('Folder added'),
  672 + "RemoveSubscribedFolder" => _kt('Folder removed'), // nothing. your subscription is now gone.
  673 + "RemoveChildFolder" => _kt('Folder removed'),
  674 + "AddDocument" => _kt('Document added'),
  675 + "RemoveSubscribedDocument" => _kt('Document removed'), // nothing. your subscription is now gone.
  676 + "RemoveChildDocument" => _kt('Document removed'),
  677 + "ModifyDocument" => _kt('Document modified'),
  678 + "CheckInDocument" => _kt('Document checked in'),
  679 + "CheckOutDocument" => _kt('Document checked out'),
  680 + "MovedDocument" => _kt('Document moved'),
  681 + "ArchivedDocument" => _kt('Document archived'), // can go through and request un-archival (?)
  682 + "RestoredArchivedDocument" => _kt('Document restored')
683 ); 683 );
684 } 684 }
685 685
lib/templating/kt3template.inc.php
@@ -102,7 +102,7 @@ class KTPage { @@ -102,7 +102,7 @@ class KTPage {
102 $this->requireJSResources($aJS); 102 $this->requireJSResources($aJS);
103 103
104 // this is horrid, but necessary. 104 // this is horrid, but necessary.
105 - $this->requireJSStandalone('addLoadEvent(partial(initDeleteProtection, "' . _('Are you sure you wish to delete this item?') . '"));'); 105 + $this->requireJSStandalone('addLoadEvent(partial(initDeleteProtection, "' . _kt('Are you sure you wish to delete this item?') . '"));');
106 106
107 /* menu initialisation*/ 107 /* menu initialisation*/
108 // FIXME: how do we want to handle the menu? 108 // FIXME: how do we want to handle the menu?
@@ -118,14 +118,14 @@ class KTPage { @@ -118,14 +118,14 @@ class KTPage {
118 // FIXME: we lost the getDefaultAction stuff - do we care? 118 // FIXME: we lost the getDefaultAction stuff - do we care?
119 // note that key == action. this is _important_, since we crossmatch the breadcrumbs against this for "active" 119 // note that key == action. this is _important_, since we crossmatch the breadcrumbs against this for "active"
120 $this->menu = array( 120 $this->menu = array(
121 - "dashboard" => $this->_actionHelper(array("name" => _("Dashboard"), "action" => "dashboard", "active" => 0)),  
122 - "browse" => $this->_actionHelper(array("name" => _("Browse Documents"), "action" => "browse", "active" => 0)),  
123 - "administration" => $this->_actionHelper(array("name" => _("DMS Administration"), "action" => "administration", "active" => 0)), 121 + "dashboard" => $this->_actionHelper(array("name" => _kt("Dashboard"), "action" => "dashboard", "active" => 0)),
  122 + "browse" => $this->_actionHelper(array("name" => _kt("Browse Documents"), "action" => "browse", "active" => 0)),
  123 + "administration" => $this->_actionHelper(array("name" => _kt("DMS Administration"), "action" => "administration", "active" => 0)),
124 ); 124 );
125 125
126 $this->userMenu = array( 126 $this->userMenu = array(
127 - "preferences" => $this->_actionHelper(array("name" => _("Preferences"), "action" => "preferences", "active" => 0)),  
128 - "logout" => $this->_actionHelper(array("name" => _("Logout"), "action" => "logout", "active" => 0)), 127 + "preferences" => $this->_actionHelper(array("name" => _kt("Preferences"), "action" => "preferences", "active" => 0)),
  128 + "logout" => $this->_actionHelper(array("name" => _kt("Logout"), "action" => "logout", "active" => 0)),
129 ); 129 );
130 } 130 }
131 131
@@ -219,26 +219,26 @@ class KTPage { @@ -219,26 +219,26 @@ class KTPage {
219 // assume this is admin for now. 219 // assume this is admin for now.
220 function setSection($sSection) { 220 function setSection($sSection) {
221 if ($sSection == 'administration') { 221 if ($sSection == 'administration') {
222 - $this->componentLabel = _('DMS Administration'); 222 + $this->componentLabel = _kt('DMS Administration');
223 $this->componentClass = 'administration'; 223 $this->componentClass = 'administration';
224 $this->menu['administration']['active'] = 1; 224 $this->menu['administration']['active'] = 1;
225 } else if ($sSection == 'dashboard') { 225 } else if ($sSection == 'dashboard') {
226 - $this->componentLabel = _('Dashboard'); 226 + $this->componentLabel = _kt('Dashboard');
227 $this->componentClass = 'dashboard'; 227 $this->componentClass = 'dashboard';
228 } else if ($sSection == 'browse') { 228 } else if ($sSection == 'browse') {
229 - $this->componentLabel = _('Browse Documents'); 229 + $this->componentLabel = _kt('Browse Documents');
230 $this->componentClass = 'browse_collections'; 230 $this->componentClass = 'browse_collections';
231 } else if ($sSection == 'view_details') { 231 } else if ($sSection == 'view_details') {
232 - $this->componentLabel = _('Document Details'); 232 + $this->componentLabel = _kt('Document Details');
233 $this->componentClass = 'document_details'; 233 $this->componentClass = 'document_details';
234 } else if ($sSection == 'search') { 234 } else if ($sSection == 'search') {
235 - $this->componentLabel = _('Search'); 235 + $this->componentLabel = _kt('Search');
236 $this->componentClass = 'search'; 236 $this->componentClass = 'search';
237 } else if ($sSection == 'preferences') { 237 } else if ($sSection == 'preferences') {
238 - $this->componentLabel = _('Preferences'); 238 + $this->componentLabel = _kt('Preferences');
239 $this->componentClass = 'preferences'; 239 $this->componentClass = 'preferences';
240 } else { 240 } else {
241 - $this->componentLabel = _('Dashboard'); 241 + $this->componentLabel = _kt('Dashboard');
242 $this->componentClass = 'dashboard'; 242 $this->componentClass = 'dashboard';
243 } 243 }
244 244
@@ -277,7 +277,7 @@ class KTPage { @@ -277,7 +277,7 @@ class KTPage {
277 } 277 }
278 278
279 if (is_string($this->contents) && (trim($this->contents) === "")) { 279 if (is_string($this->contents) && (trim($this->contents) === "")) {
280 - $this->addError(_("This page did not produce any content")); 280 + $this->addError(_kt("This page did not produce any content"));
281 $this->contents = ""; 281 $this->contents = "";
282 } 282 }
283 283
lib/validation/dispatchervalidation.inc.php
@@ -57,7 +57,7 @@ class KTDispatcherValidation { @@ -57,7 +57,7 @@ class KTDispatcherValidation {
57 if (KTPermissionUtil::userHasPermissionOnItem($oUser, $oPermission, $oItem)) { 57 if (KTPermissionUtil::userHasPermissionOnItem($oUser, $oPermission, $oItem)) {
58 return; 58 return;
59 } 59 }
60 - $this->oDispatcher->errorPage(_("Insufficient permissions to perform action")); 60 + $this->oDispatcher->errorPage(_kt("Insufficient permissions to perform action"));
61 } 61 }
62 62
63 function &validateEntity($entity_name, $iId, $aOptions = null) { 63 function &validateEntity($entity_name, $iId, $aOptions = null) {
@@ -66,7 +66,7 @@ class KTDispatcherValidation { @@ -66,7 +66,7 @@ class KTDispatcherValidation {
66 $aFunc = array($entity_name, KTUtil::arrayGet($aOptions, 'method', 'get')); 66 $aFunc = array($entity_name, KTUtil::arrayGet($aOptions, 'method', 'get'));
67 $oEntity =& call_user_func($aFunc, $iId); 67 $oEntity =& call_user_func($aFunc, $iId);
68 if (PEAR::isError($oEntity) || ($oEntity === false)) { 68 if (PEAR::isError($oEntity) || ($oEntity === false)) {
69 - $aOptions['message'] = KTUtil::arrayGet($aOptions, 'message', sprintf(_("Invalid identifier provided for: %s"), $entity_name)); 69 + $aOptions['message'] = KTUtil::arrayGet($aOptions, 'message', sprintf(_kt("Invalid identifier provided for: %s"), $entity_name));
70 $this->handleError($aOptions); 70 $this->handleError($aOptions);
71 } 71 }
72 return $oEntity; 72 return $oEntity;
@@ -116,7 +116,7 @@ class KTDispatcherValidation { @@ -116,7 +116,7 @@ class KTDispatcherValidation {
116 } elseif ($sDefaultMessage) { 116 } elseif ($sDefaultMessage) {
117 $sMessage = $sDefaultMessage; 117 $sMessage = $sDefaultMessage;
118 } else { 118 } else {
119 - $sMessage = _("An error occurred, and no error message was given"); 119 + $sMessage = _kt("An error occurred, and no error message was given");
120 } 120 }
121 } else { 121 } else {
122 if ($oException) { 122 if ($oException) {
@@ -135,7 +135,7 @@ class KTDispatcherValidation { @@ -135,7 +135,7 @@ class KTDispatcherValidation {
135 function &validateTemplate($sTemplateName, $aOptions = null) { 135 function &validateTemplate($sTemplateName, $aOptions = null) {
136 $oTemplating =& KTTemplating::getSingleton(); 136 $oTemplating =& KTTemplating::getSingleton();
137 $oTemplate =& $oTemplating->loadTemplate($sTemplateName); 137 $oTemplate =& $oTemplating->loadTemplate($sTemplateName);
138 - $aOptions['message'] = KTUtil::arrayGet($aOptions, 'message', _('Failed to locate template')); 138 + $aOptions['message'] = KTUtil::arrayGet($aOptions, 'message', _kt('Failed to locate template'));
139 $this->notError($oTemplate, $aOptions); 139 $this->notError($oTemplate, $aOptions);
140 return $oTemplate; 140 return $oTemplate;
141 } 141 }
@@ -198,7 +198,7 @@ class KTDispatcherValidation { @@ -198,7 +198,7 @@ class KTDispatcherValidation {
198 return $oSearch; 198 return $oSearch;
199 } 199 }
200 $aOptions = KTUTil::meldOptions($aOptions, array( 200 $aOptions = KTUTil::meldOptions($aOptions, array(
201 - 'message' => _("Condition is a saved search, but not a condition"), 201 + 'message' => _kt("Condition is a saved search, but not a condition"),
202 )); 202 ));
203 $this->handleError($aOptions); 203 $this->handleError($aOptions);
204 } 204 }
@@ -207,7 +207,7 @@ class KTDispatcherValidation { @@ -207,7 +207,7 @@ class KTDispatcherValidation {
207 $sString = trim($sString); 207 $sString = trim($sString);
208 if (empty($sString)) { 208 if (empty($sString)) {
209 $aOptions['message'] = KTUtil::arrayGet($aOptions, 209 $aOptions['message'] = KTUtil::arrayGet($aOptions,
210 - 'message', _("An empty string was given")); 210 + 'message', _kt("An empty string was given"));
211 $this->handleError($aOptions); 211 $this->handleError($aOptions);
212 } 212 }
213 return $sString; 213 return $sString;
@@ -223,19 +223,19 @@ class KTDispatcherValidation { @@ -223,19 +223,19 @@ class KTDispatcherValidation {
223 } 223 }
224 224
225 if ($bError) { 225 if ($bError) {
226 - $message = _("You did not select a valid document to upload"); 226 + $message = _kt("You did not select a valid document to upload");
227 227
228 $errors = array( 228 $errors = array(
229 - 1 => _("The uploaded file is larger than the PHP upload_max_filesize setting"),  
230 - 2 => _("The uploaded file is larger than the MAX_FILE_SIZE directive that was specified in the HTML form"),  
231 - 3 => _("The uploaded file was not fully uploaded to the document management system"),  
232 - 4 => _("No file was selected to be uploaded to the document management system"),  
233 - 6 => _("An internal error occurred receiving the uploaded document"), 229 + 1 => _kt("The uploaded file is larger than the PHP upload_max_filesize setting"),
  230 + 2 => _kt("The uploaded file is larger than the MAX_FILE_SIZE directive that was specified in the HTML form"),
  231 + 3 => _kt("The uploaded file was not fully uploaded to the document management system"),
  232 + 4 => _kt("No file was selected to be uploaded to the document management system"),
  233 + 6 => _kt("An internal error occurred receiving the uploaded document"),
234 ); 234 );
235 $message = KTUtil::arrayGet($errors, $aFile['error'], $message); 235 $message = KTUtil::arrayGet($errors, $aFile['error'], $message);
236 236
237 if (@ini_get("file_uploads") == false) { 237 if (@ini_get("file_uploads") == false) {
238 - $message = _("File uploads are disabled in your PHP configuration"); 238 + $message = _kt("File uploads are disabled in your PHP configuration");
239 } 239 }
240 $aOptions['message'] = $message; 240 $aOptions['message'] = $message;
241 $this->handleError($aOptions); 241 $this->handleError($aOptions);
@@ -268,7 +268,7 @@ class KTDispatcherValidation { @@ -268,7 +268,7 @@ class KTDispatcherValidation {
268 } 268 }
269 } 269 }
270 $aOptions = $aOptions; 270 $aOptions = $aOptions;
271 - $aOptions['message'] = KTUtil::arrayGet($aOptions, 'message', _("Invalid authentication source")); 271 + $aOptions['message'] = KTUtil::arrayGet($aOptions, 'message', _kt("Invalid authentication source"));
272 $this->handleError($aOptions); 272 $this->handleError($aOptions);
273 return $sNamespace; 273 return $sNamespace;
274 } 274 }
@@ -285,12 +285,12 @@ class KTDispatcherValidation { @@ -285,12 +285,12 @@ class KTDispatcherValidation {
285 $aValidatedDict[$k] = ''; 285 $aValidatedDict[$k] = '';
286 } 286 }
287 */ 287 */
288 - $aErrors[$k] = PEAR::raiseError(sprintf(_("Required value %s not set"), $k)); 288 + $aErrors[$k] = PEAR::raiseError(sprintf(_kt("Required value %s not set"), $k));
289 continue; 289 continue;
290 } 290 }
291 $sValidationFunction = $this->_generateValidationFunction($aValidatorInfo['type']); 291 $sValidationFunction = $this->_generateValidationFunction($aValidatorInfo['type']);
292 if (!method_exists($this, $sValidationFunction)) { 292 if (!method_exists($this, $sValidationFunction)) {
293 - $aErrors[$k] = PEAR::raiseError(sprintf(_("Unknown validation function for required value %s"), $k)); 293 + $aErrors[$k] = PEAR::raiseError(sprintf(_kt("Unknown validation function for required value %s"), $k));
294 continue; 294 continue;
295 } 295 }
296 $aKeyInfo = array('var' => $k); 296 $aKeyInfo = array('var' => $k);
@@ -330,7 +330,7 @@ class KTDispatcherValidation { @@ -330,7 +330,7 @@ class KTDispatcherValidation {
330 $aFunc = array($entity_name, KTUtil::arrayGet($aOptions, 'method', 'get')); 330 $aFunc = array($entity_name, KTUtil::arrayGet($aOptions, 'method', 'get'));
331 $oEntity =& call_user_func($aFunc, $iId); 331 $oEntity =& call_user_func($aFunc, $iId);
332 if (PEAR::isError($oEntity) || ($oEntity === false)) { 332 if (PEAR::isError($oEntity) || ($oEntity === false)) {
333 - return PEAR::raiseError(sprintf(_("Provided variable %s is not a valid %s"), $aKeyInfo['var'], $entity_name)); 333 + return PEAR::raiseError(sprintf(_kt("Provided variable %s is not a valid %s"), $aKeyInfo['var'], $entity_name));
334 } 334 }
335 return $oEntity; 335 return $oEntity;
336 } 336 }
@@ -346,7 +346,7 @@ class KTDispatcherValidation { @@ -346,7 +346,7 @@ class KTDispatcherValidation {
346 if (!ereg ("^[^@ ]+@[^@ ]+\.[^@ \.]+$", $sEmailAddress )) { 346 if (!ereg ("^[^@ ]+@[^@ ]+\.[^@ \.]+$", $sEmailAddress )) {
347 $aOptions['message'] = KTUtil::arrayGet($aOptions, 347 $aOptions['message'] = KTUtil::arrayGet($aOptions,
348 'message', 348 'message',
349 - _("An invalid email address was given")); 349 + _kt("An invalid email address was given"));
350 $this->handleError($aOptions); 350 $this->handleError($aOptions);
351 } 351 }
352 return $sEmailAddress; 352 return $sEmailAddress;
@@ -355,11 +355,11 @@ class KTDispatcherValidation { @@ -355,11 +355,11 @@ class KTDispatcherValidation {
355 355
356 /* just does an empty string validation with an appropriate message, and then a duplicate name validation */ 356 /* just does an empty string validation with an appropriate message, and then a duplicate name validation */
357 function validateEntityName($sEntityTypeName, $sName, $aOptions = null) { 357 function validateEntityName($sEntityTypeName, $sName, $aOptions = null) {
358 - $aOptions['message'] = KTUtil::arrayGet($aOptions, 'empty_message', _("No name was given for this item")); 358 + $aOptions['message'] = KTUtil::arrayGet($aOptions, 'empty_message', _kt("No name was given for this item"));
359 359
360 // FIXME BD: don't you mean $sName = $this->validateString ... 360 // FIXME BD: don't you mean $sName = $this->validateString ...
361 $this->validateString($sName, $aOptions); 361 $this->validateString($sName, $aOptions);
362 - $aOptions['message'] = KTUtil::arrayGet($aOptions, 'duplicate_message', _("An item with this name already exists")); 362 + $aOptions['message'] = KTUtil::arrayGet($aOptions, 'duplicate_message', _kt("An item with this name already exists"));
363 return $this->validateDuplicateName($sEntityTypeName, $sName, $aOptions); 363 return $this->validateDuplicateName($sEntityTypeName, $sName, $aOptions);
364 } 364 }
365 365
@@ -375,7 +375,7 @@ class KTDispatcherValidation { @@ -375,7 +375,7 @@ class KTDispatcherValidation {
375 $aOptions['multi'] = true; 375 $aOptions['multi'] = true;
376 $aList = call_user_func($aMethod, $sClass, $aConditions, $aOptions); 376 $aList = call_user_func($aMethod, $sClass, $aConditions, $aOptions);
377 if(count($aList)) { 377 if(count($aList)) {
378 - $aOptions['defaultmessage'] = sprintf(_("An entity with that name already exists: class %s, name %s"), $sClass, $sName); 378 + $aOptions['defaultmessage'] = sprintf(_kt("An entity with that name already exists: class %s, name %s"), $sClass, $sName);
379 $this->handleError($aOptions); 379 $this->handleError($aOptions);
380 } 380 }
381 return $sName; 381 return $sName;
lib/validation/errorviewer.inc.php
@@ -89,7 +89,7 @@ class KTErrorViewerRegistry { @@ -89,7 +89,7 @@ class KTErrorViewerRegistry {
89 } 89 }
90 90
91 // Give up. 91 // Give up.
92 - return new KTStringErrorViewer(_("Unknown error")); 92 + return new KTStringErrorViewer(_kt("Unknown error"));
93 } 93 }
94 } 94 }
95 95
@@ -129,7 +129,7 @@ $oEVRegistry-&gt;register(&quot;KTErrorViewer&quot;, &quot;PEAR_Error&quot;); @@ -129,7 +129,7 @@ $oEVRegistry-&gt;register(&quot;KTErrorViewer&quot;, &quot;PEAR_Error&quot;);
129 129
130 class KTDBErrorViewer extends KTErrorViewer { 130 class KTDBErrorViewer extends KTErrorViewer {
131 function view() { 131 function view() {
132 - return _("Database error:") . " " . $this->oError->getMessage(); 132 + return _kt("Database error:") . " " . $this->oError->getMessage();
133 } 133 }
134 134
135 function page() { 135 function page() {
lib/widgets/fieldsetDisplay.inc.php
@@ -83,7 +83,7 @@ function getWidgetForMetadataField($field, $current_value, $page, $errors = null @@ -83,7 +83,7 @@ function getWidgetForMetadataField($field, $current_value, $page, $errors = null
83 if ($vocab === null) { // allow override 83 if ($vocab === null) { // allow override
84 $lookups = MetaData::getEnabledByDocumentField($field); 84 $lookups = MetaData::getEnabledByDocumentField($field);
85 $fieldOptions["vocab"] = array(); // FIXME handle lookups 85 $fieldOptions["vocab"] = array(); // FIXME handle lookups
86 - $fieldOptions['vocab'][''] = _('No value'); 86 + $fieldOptions['vocab'][''] = _kt('No value');
87 foreach ($lookups as $md) { 87 foreach ($lookups as $md) {
88 $fieldOptions["vocab"][$md->getName()] = $md->getName(); 88 $fieldOptions["vocab"][$md->getName()] = $md->getName();
89 } 89 }
@@ -142,13 +142,13 @@ class KTFieldsetDisplay { @@ -142,13 +142,13 @@ class KTFieldsetDisplay {
142 $res = DBUtil::getOneResult(array($sQuery, array($iMimeTypeId))); 142 $res = DBUtil::getOneResult(array($sQuery, array($iMimeTypeId)));
143 143
144 if (PEAR::isError($res)) { 144 if (PEAR::isError($res)) {
145 - return _('unknown type'); 145 + return _kt('unknown type');
146 } 146 }
147 147
148 if (!empty($res['friendly_name'])) { 148 if (!empty($res['friendly_name'])) {
149 - return _($res['friendly_name']); 149 + return _kt($res['friendly_name']);
150 } else { 150 } else {
151 - return sprintf(_('%s File'), strtoupper($res['filetypes'])); 151 + return sprintf(_kt('%s File'), strtoupper($res['filetypes']));
152 } 152 }
153 153
154 } 154 }
@@ -190,13 +190,13 @@ class GenericFieldsetDisplay extends KTFieldsetDisplay { @@ -190,13 +190,13 @@ class GenericFieldsetDisplay extends KTFieldsetDisplay {
190 // creation 190 // creation
191 $creator =& User::get($document->getCreatorId()); 191 $creator =& User::get($document->getCreatorId());
192 if (PEAR::isError($creator)) { 192 if (PEAR::isError($creator)) {
193 - $creator = "<span class='ktError'>" . _("Unable to find the document's creator") . "</span>"; 193 + $creator = "<span class='ktError'>" . _kt("Unable to find the document's creator") . "</span>";
194 } else { 194 } else {
195 $creator = $creator->getName(); 195 $creator = $creator->getName();
196 } 196 }
197 $modified_user =& User::get($document->getModifiedUserId()); 197 $modified_user =& User::get($document->getModifiedUserId());
198 if (PEAR::isError($modified_user)) { 198 if (PEAR::isError($modified_user)) {
199 - $modified_user = "<span class='ktError'>" . _("Unable to find the document's creator") . "</span>"; 199 + $modified_user = "<span class='ktError'>" . _kt("Unable to find the document's creator") . "</span>";
200 } else { 200 } else {
201 $modified_user = $modified_user->getName(); 201 $modified_user = $modified_user->getName();
202 } 202 }
@@ -244,7 +244,7 @@ class GenericFieldsetDisplay extends KTFieldsetDisplay { @@ -244,7 +244,7 @@ class GenericFieldsetDisplay extends KTFieldsetDisplay {
244 // creation 244 // creation
245 $creator =& User::get($document->getCreatorId()); 245 $creator =& User::get($document->getCreatorId());
246 if (PEAR::isError($creator)) { 246 if (PEAR::isError($creator)) {
247 - $creator = "<span class='ktError'>" . _("Unable to find the document's creator") . "</span>"; 247 + $creator = "<span class='ktError'>" . _kt("Unable to find the document's creator") . "</span>";
248 } else { 248 } else {
249 $creator = $creator->getName(); 249 $creator = $creator->getName();
250 } 250 }
@@ -260,7 +260,7 @@ class GenericFieldsetDisplay extends KTFieldsetDisplay { @@ -260,7 +260,7 @@ class GenericFieldsetDisplay extends KTFieldsetDisplay {
260 260
261 $modified_user =& User::get($document->getModifiedUserId()); 261 $modified_user =& User::get($document->getModifiedUserId());
262 if (PEAR::isError($modified_user)) { 262 if (PEAR::isError($modified_user)) {
263 - $modified_user = "<span class='ktError'>" . _("Unable to find the document's modifier") . "</span>"; 263 + $modified_user = "<span class='ktError'>" . _kt("Unable to find the document's modifier") . "</span>";
264 } else { 264 } else {
265 $modified_user = $modified_user->getName(); 265 $modified_user = $modified_user->getName();
266 } 266 }
@@ -269,7 +269,7 @@ class GenericFieldsetDisplay extends KTFieldsetDisplay { @@ -269,7 +269,7 @@ class GenericFieldsetDisplay extends KTFieldsetDisplay {
269 269
270 $comparison_modified_user =& User::get($comparison_document->getModifiedUserId()); 270 $comparison_modified_user =& User::get($comparison_document->getModifiedUserId());
271 if (PEAR::isError($comparison_modified_user)) { 271 if (PEAR::isError($comparison_modified_user)) {
272 - $comparison_modified_user = "<span class='ktError'>" . _("Unable to find the document's creator") . "</span>"; 272 + $comparison_modified_user = "<span class='ktError'>" . _kt("Unable to find the document's creator") . "</span>";
273 } else { 273 } else {
274 $comparison_modified_user = $comparison_modified_user->getName(); 274 $comparison_modified_user = $comparison_modified_user->getName();
275 } 275 }
@@ -316,7 +316,7 @@ class GenericFieldsetDisplay extends KTFieldsetDisplay { @@ -316,7 +316,7 @@ class GenericFieldsetDisplay extends KTFieldsetDisplay {
316 function renderEdit($document_data) { 316 function renderEdit($document_data) {
317 global $main; // FIXME remove direct access to $main 317 global $main; // FIXME remove direct access to $main
318 $oField = new KTBaseWidget("Document Title", 318 $oField = new KTBaseWidget("Document Title",
319 - _("The document title is used as the main name of a document throughout KnowledgeTree&trade;."), 319 + _kt("The document title is used as the main name of a document throughout KnowledgeTree&trade;."),
320 "generic_title", $document_data["document"]->getName(), $main, true, null, array()); 320 "generic_title", $document_data["document"]->getName(), $main, true, null, array());
321 $aFields = array($oField); // its the only one editable from the basic set (currently). 321 $aFields = array($oField); // its the only one editable from the basic set (currently).
322 322
@@ -326,7 +326,7 @@ class GenericFieldsetDisplay extends KTFieldsetDisplay { @@ -326,7 +326,7 @@ class GenericFieldsetDisplay extends KTFieldsetDisplay {
326 "context" => $this, 326 "context" => $this,
327 "fields" => $aFields, 327 "fields" => $aFields,
328 "title" => "Generic Document Information", 328 "title" => "Generic Document Information",
329 - "description" => _("The information in this section is stored by KnowledgeTree&trade; for every document."), 329 + "description" => _kt("The information in this section is stored by KnowledgeTree&trade; for every document."),
330 ); 330 );
331 return $oTemplate->render($aTemplateData); 331 return $oTemplate->render($aTemplateData);
332 } 332 }
@@ -412,7 +412,7 @@ class SimpleFieldsetDisplay extends KTFieldsetDisplay { @@ -412,7 +412,7 @@ class SimpleFieldsetDisplay extends KTFieldsetDisplay {
412 $has_errors = KTUtil::arrayGet($document_data['errors'], $oField->getId(),false); 412 $has_errors = KTUtil::arrayGet($document_data['errors'], $oField->getId(),false);
413 if ($has_errors !== false) { 413 if ($has_errors !== false) {
414 // FIXME when the actual errors (meaningful) are passed out, fix this. 414 // FIXME when the actual errors (meaningful) are passed out, fix this.
415 - $errors = array(_('The system rejected your value for this field.')); 415 + $errors = array(_kt('The system rejected your value for this field.'));
416 } else { 416 } else {
417 $errors = null; 417 $errors = null;
418 } 418 }
@@ -472,8 +472,8 @@ class ConditionalFieldsetDisplay extends SimpleFieldsetDisplay { @@ -472,8 +472,8 @@ class ConditionalFieldsetDisplay extends SimpleFieldsetDisplay {
472 // how? 472 // how?
473 473
474 $fieldset_name = $this->fieldset->getName(); 474 $fieldset_name = $this->fieldset->getName();
475 - $fieldset_description = _($this->fieldset->getDescription()); // need a better approach. how do we handle database-resident translations?  
476 - $fieldset_description .= _("Note that the options which are available depends on previous choices within this fieldset."); 475 + $fieldset_description = _kt($this->fieldset->getDescription()); // need a better approach. how do we handle database-resident translations?
  476 + $fieldset_description .= _kt("Note that the options which are available depends on previous choices within this fieldset.");
477 477
478 // FIXME handle the editable case _with_ values. 478 // FIXME handle the editable case _with_ values.
479 479