Commit 2d4c41eab9518b664fd41c6562a96fc57c8b8a4f
1 parent
f4e24e90
Change from gettext's _ to internal i18n infrastructure's _kt
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@5147 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
11 changed files
with
152 additions
and
152 deletions
admin.php
| @@ -65,7 +65,7 @@ class AdminSplashDispatcher extends KTAdminDispatcher { | @@ -65,7 +65,7 @@ class AdminSplashDispatcher extends KTAdminDispatcher { | ||
| 65 | } | 65 | } |
| 66 | } | 66 | } |
| 67 | 67 | ||
| 68 | - $this->oPage->title = _("DMS Administration") . ": "; | 68 | + $this->oPage->title = _kt("DMS Administration") . ": "; |
| 69 | $oTemplating =& KTTemplating::getSingleton(); | 69 | $oTemplating =& KTTemplating::getSingleton(); |
| 70 | 70 | ||
| 71 | if ($condensed_admin) { | 71 | if ($condensed_admin) { |
| @@ -95,7 +95,7 @@ class AdminSplashDispatcher extends KTAdminDispatcher { | @@ -95,7 +95,7 @@ class AdminSplashDispatcher extends KTAdminDispatcher { | ||
| 95 | $this->aBreadcrumbs[] = array("name" => $aCategory["title"], "url" => KTUtil::ktLink('admin.php',$category)); | 95 | $this->aBreadcrumbs[] = array("name" => $aCategory["title"], "url" => KTUtil::ktLink('admin.php',$category)); |
| 96 | 96 | ||
| 97 | 97 | ||
| 98 | - $this->oPage->title = _("DMS Administration") . ": " . $aCategory["title"]; | 98 | + $this->oPage->title = _kt("DMS Administration") . ": " . $aCategory["title"]; |
| 99 | $oTemplating =& KTTemplating::getSingleton(); | 99 | $oTemplating =& KTTemplating::getSingleton(); |
| 100 | $oTemplate = $oTemplating->loadTemplate("kt3/admin_items"); | 100 | $oTemplate = $oTemplating->loadTemplate("kt3/admin_items"); |
| 101 | $aTemplateData = array( | 101 | $aTemplateData = array( |
browse.php
| @@ -66,7 +66,7 @@ class KTMassMoveColumn extends TitleColumn { | @@ -66,7 +66,7 @@ class KTMassMoveColumn extends TitleColumn { | ||
| 66 | $outStr .= $aDataRow["folder"]->getName(); | 66 | $outStr .= $aDataRow["folder"]->getName(); |
| 67 | $outStr .= '</a>'; | 67 | $outStr .= '</a>'; |
| 68 | } else { | 68 | } else { |
| 69 | - $outStr = $aDataRow["folder"]->getName() . ' <span class="descriptiveText">(' . _('you cannot move folders to themselves') . ')'; | 69 | + $outStr = $aDataRow["folder"]->getName() . ' <span class="descriptiveText">(' . _kt('you cannot move folders to themselves') . ')'; |
| 70 | } | 70 | } |
| 71 | return $outStr; | 71 | return $outStr; |
| 72 | 72 | ||
| @@ -91,7 +91,7 @@ class BrowseDispatcher extends KTStandardDispatcher { | @@ -91,7 +91,7 @@ class BrowseDispatcher extends KTStandardDispatcher { | ||
| 91 | 91 | ||
| 92 | function BrowseDispatcher() { | 92 | function BrowseDispatcher() { |
| 93 | $this->aBreadcrumbs = array( | 93 | $this->aBreadcrumbs = array( |
| 94 | - array('action' => 'browse', 'name' => _('Browse')), | 94 | + array('action' => 'browse', 'name' => _kt('Browse')), |
| 95 | ); | 95 | ); |
| 96 | return parent::KTStandardDispatcher(); | 96 | return parent::KTStandardDispatcher(); |
| 97 | } | 97 | } |
| @@ -139,12 +139,12 @@ class BrowseDispatcher extends KTStandardDispatcher { | @@ -139,12 +139,12 @@ class BrowseDispatcher extends KTStandardDispatcher { | ||
| 139 | $this->editable = false; | 139 | $this->editable = false; |
| 140 | } | 140 | } |
| 141 | 141 | ||
| 142 | - $this->oPage->setTitle(_('Browse')); | 142 | + $this->oPage->setTitle(_kt('Browse')); |
| 143 | $this->oPage->setSecondaryTitle($oFolder->getName()); | 143 | $this->oPage->setSecondaryTitle($oFolder->getName()); |
| 144 | 144 | ||
| 145 | $this->oFolder =& $oFolder; | 145 | $this->oFolder =& $oFolder; |
| 146 | if (PEAR::isError($oFolder)) { | 146 | if (PEAR::isError($oFolder)) { |
| 147 | - $this->oPage->addError(_("invalid folder")); | 147 | + $this->oPage->addError(_kt("invalid folder")); |
| 148 | $folder_id = 1; | 148 | $folder_id = 1; |
| 149 | $oFolder =& Folder::get($folder_id); | 149 | $oFolder =& Folder::get($folder_id); |
| 150 | } | 150 | } |
| @@ -158,7 +158,7 @@ class BrowseDispatcher extends KTStandardDispatcher { | @@ -158,7 +158,7 @@ class BrowseDispatcher extends KTStandardDispatcher { | ||
| 158 | $this->aBreadcrumbs = array_merge($this->aBreadcrumbs, | 158 | $this->aBreadcrumbs = array_merge($this->aBreadcrumbs, |
| 159 | KTBrowseUtil::breadcrumbsForFolder($oFolder)); | 159 | KTBrowseUtil::breadcrumbsForFolder($oFolder)); |
| 160 | 160 | ||
| 161 | - $portlet = new KTActionPortlet(_("Folder Actions")); | 161 | + $portlet = new KTActionPortlet(_kt("Folder Actions")); |
| 162 | $aActions = KTFolderActionUtil::getFolderActionsForFolder($oFolder, $this->oUser); | 162 | $aActions = KTFolderActionUtil::getFolderActionsForFolder($oFolder, $this->oUser); |
| 163 | $portlet->setActions($aActions,null); | 163 | $portlet->setActions($aActions,null); |
| 164 | $this->oPage->addPortlet($portlet); | 164 | $this->oPage->addPortlet($portlet); |
| @@ -179,7 +179,7 @@ class BrowseDispatcher extends KTStandardDispatcher { | @@ -179,7 +179,7 @@ class BrowseDispatcher extends KTStandardDispatcher { | ||
| 179 | } | 179 | } |
| 180 | $this->oQuery = new ValueBrowseQuery($oField, $oValue); | 180 | $this->oQuery = new ValueBrowseQuery($oField, $oValue); |
| 181 | $this->resultURL = KTUtil::addQueryString($_SERVER['PHP_SELF'], sprintf("fBrowseMode=lookup_value&fField=%d&fValue=%d", $field, $value)); | 181 | $this->resultURL = KTUtil::addQueryString($_SERVER['PHP_SELF'], sprintf("fBrowseMode=lookup_value&fField=%d&fValue=%d", $field, $value)); |
| 182 | - $this->aBreadcrumbs[] = array('name' => _('Lookup Values'), 'url' => KTUtil::addQueryString($_SERVER['PHP_SELF'], 'action=selectField')); | 182 | + $this->aBreadcrumbs[] = array('name' => _kt('Lookup Values'), 'url' => KTUtil::addQueryString($_SERVER['PHP_SELF'], 'action=selectField')); |
| 183 | $this->aBreadcrumbs[] = array('name' => $oField->getName(), 'url' => KTUtil::addQueryString($_SERVER['PHP_SELF'], 'action=selectLookup&fField=' . $oField->getId())); | 183 | $this->aBreadcrumbs[] = array('name' => $oField->getName(), 'url' => KTUtil::addQueryString($_SERVER['PHP_SELF'], 'action=selectLookup&fField=' . $oField->getId())); |
| 184 | $this->aBreadcrumbs[] = array('name' => $oValue->getName(), 'url' => KTUtil::addQueryString($_SERVER['PHP_SELF'], sprintf("fBrowseMode=lookup_value&fField=%d&fValue=%d", $field, $value))); | 184 | $this->aBreadcrumbs[] = array('name' => $oValue->getName(), 'url' => KTUtil::addQueryString($_SERVER['PHP_SELF'], sprintf("fBrowseMode=lookup_value&fField=%d&fValue=%d", $field, $value))); |
| 185 | } else if ($this->browse_mode == 'document_type') { | 185 | } else if ($this->browse_mode == 'document_type') { |
| @@ -195,7 +195,7 @@ class BrowseDispatcher extends KTStandardDispatcher { | @@ -195,7 +195,7 @@ class BrowseDispatcher extends KTStandardDispatcher { | ||
| 195 | $this->oQuery = new TypeBrowseQuery($oDocType); | 195 | $this->oQuery = new TypeBrowseQuery($oDocType); |
| 196 | 196 | ||
| 197 | // FIXME probably want to redirect to self + action=selectType | 197 | // FIXME probably want to redirect to self + action=selectType |
| 198 | - $this->aBreadcrumbs[] = array('name' => _('Document Types'), 'url' => KTUtil::addQueryString($_SERVER['PHP_SELF'], 'action=selectType')); | 198 | + $this->aBreadcrumbs[] = array('name' => _kt('Document Types'), 'url' => KTUtil::addQueryString($_SERVER['PHP_SELF'], 'action=selectType')); |
| 199 | $this->aBreadcrumbs[] = array('name' => $oDocType->getName(), 'url' => KTUtil::addQueryString($_SERVER['PHP_SELF'], 'fBrowseMode=document_type&fType=' . $oDocType->getId())); | 199 | $this->aBreadcrumbs[] = array('name' => $oDocType->getName(), 'url' => KTUtil::addQueryString($_SERVER['PHP_SELF'], 'fBrowseMode=document_type&fType=' . $oDocType->getId())); |
| 200 | 200 | ||
| 201 | $this->resultURL = KTUtil::addQueryString($_SERVER['PHP_SELF'], sprintf("fType=%s&fBrowseMode=document_type", $doctype));; | 201 | $this->resultURL = KTUtil::addQueryString($_SERVER['PHP_SELF'], sprintf("fType=%s&fBrowseMode=document_type", $doctype));; |
| @@ -214,10 +214,10 @@ class BrowseDispatcher extends KTStandardDispatcher { | @@ -214,10 +214,10 @@ class BrowseDispatcher extends KTStandardDispatcher { | ||
| 214 | $collection->addColumn(new SelectionColumn("Browse Selection","selection")); | 214 | $collection->addColumn(new SelectionColumn("Browse Selection","selection")); |
| 215 | $collection->addColumn(new TitleColumn("Test 1 (title)","title")); | 215 | $collection->addColumn(new TitleColumn("Test 1 (title)","title")); |
| 216 | $collection->addColumn(new DownloadColumn('','download')); | 216 | $collection->addColumn(new DownloadColumn('','download')); |
| 217 | - $collection->addColumn(new DateColumn(_("Created"),"created", "getCreatedDateTime")); | ||
| 218 | - $collection->addColumn(new DateColumn(_("Last Modified"),"modified", "getLastModifiedDate")); | ||
| 219 | - $collection->addColumn(new UserColumn(_('Creator'),'creator_id','getCreatorID')); | ||
| 220 | - $collection->addColumn(new WorkflowColumn(_('Workflow State'),'workflow_state')); | 217 | + $collection->addColumn(new DateColumn(_kt("Created"),"created", "getCreatedDateTime")); |
| 218 | + $collection->addColumn(new DateColumn(_kt("Last Modified"),"modified", "getLastModifiedDate")); | ||
| 219 | + $collection->addColumn(new UserColumn(_kt('Creator'),'creator_id','getCreatorID')); | ||
| 220 | + $collection->addColumn(new WorkflowColumn(_kt('Workflow State'),'workflow_state')); | ||
| 221 | 221 | ||
| 222 | 222 | ||
| 223 | // setup the folderside add actions | 223 | // setup the folderside add actions |
| @@ -261,7 +261,7 @@ class BrowseDispatcher extends KTStandardDispatcher { | @@ -261,7 +261,7 @@ class BrowseDispatcher extends KTStandardDispatcher { | ||
| 261 | $aFields = DocumentField::getList('has_lookup = 1'); | 261 | $aFields = DocumentField::getList('has_lookup = 1'); |
| 262 | 262 | ||
| 263 | if (empty($aFields)) { | 263 | if (empty($aFields)) { |
| 264 | - $this->errorRedirectToMain(_('No lookup fields available.')); | 264 | + $this->errorRedirectToMain(_kt('No lookup fields available.')); |
| 265 | exit(0); | 265 | exit(0); |
| 266 | } | 266 | } |
| 267 | 267 | ||
| @@ -326,14 +326,14 @@ class BrowseDispatcher extends KTStandardDispatcher { | @@ -326,14 +326,14 @@ class BrowseDispatcher extends KTStandardDispatcher { | ||
| 326 | if (!empty($targets)) { | 326 | if (!empty($targets)) { |
| 327 | $target = $targets[0]; | 327 | $target = $targets[0]; |
| 328 | } else { | 328 | } else { |
| 329 | - $this->errorRedirectToMain(_('No action selected.')); | 329 | + $this->errorRedirectToMain(_kt('No action selected.')); |
| 330 | exit(0); | 330 | exit(0); |
| 331 | } | 331 | } |
| 332 | 332 | ||
| 333 | $aFolderSelection = KTUtil::arrayGet($_REQUEST, 'selection_f' , array()); | 333 | $aFolderSelection = KTUtil::arrayGet($_REQUEST, 'selection_f' , array()); |
| 334 | $aDocumentSelection = KTUtil::arrayGet($_REQUEST, 'selection_d' , array()); | 334 | $aDocumentSelection = KTUtil::arrayGet($_REQUEST, 'selection_d' , array()); |
| 335 | if (empty($aFolderSelection) && empty($aDocumentSelection)) { | 335 | if (empty($aFolderSelection) && empty($aDocumentSelection)) { |
| 336 | - $this->errorRedirectToMain(_('Please select documents or folders first.')); | 336 | + $this->errorRedirectToMain(_kt('Please select documents or folders first.')); |
| 337 | exit(0); | 337 | exit(0); |
| 338 | } | 338 | } |
| 339 | 339 | ||
| @@ -342,7 +342,7 @@ class BrowseDispatcher extends KTStandardDispatcher { | @@ -342,7 +342,7 @@ class BrowseDispatcher extends KTStandardDispatcher { | ||
| 342 | } else if ($target == 'move') { | 342 | } else if ($target == 'move') { |
| 343 | return $this->do_startMove(); | 343 | return $this->do_startMove(); |
| 344 | } else { | 344 | } else { |
| 345 | - $this->errorRedirectToMain(_('No such action.')); | 345 | + $this->errorRedirectToMain(_kt('No such action.')); |
| 346 | exit(0); | 346 | exit(0); |
| 347 | } | 347 | } |
| 348 | 348 | ||
| @@ -388,7 +388,7 @@ class BrowseDispatcher extends KTStandardDispatcher { | @@ -388,7 +388,7 @@ class BrowseDispatcher extends KTStandardDispatcher { | ||
| 388 | $documentStr = ''; | 388 | $documentStr = ''; |
| 389 | 389 | ||
| 390 | if (!empty($aCantMove['folders'])) { | 390 | if (!empty($aCantMove['folders'])) { |
| 391 | - $folderStr = '<strong>' . _('Folders: ') . '</strong>'; | 391 | + $folderStr = '<strong>' . _kt('Folders: ') . '</strong>'; |
| 392 | foreach ($aCantMove['folders'] as $iFolderId) { | 392 | foreach ($aCantMove['folders'] as $iFolderId) { |
| 393 | $oF = Folder::get($iFolderId); | 393 | $oF = Folder::get($iFolderId); |
| 394 | $cantMoveItems['folders'][] = $oF->getName(); | 394 | $cantMoveItems['folders'][] = $oF->getName(); |
| @@ -397,7 +397,7 @@ class BrowseDispatcher extends KTStandardDispatcher { | @@ -397,7 +397,7 @@ class BrowseDispatcher extends KTStandardDispatcher { | ||
| 397 | } | 397 | } |
| 398 | 398 | ||
| 399 | if (!empty($aCantMove['documents'])) { | 399 | if (!empty($aCantMove['documents'])) { |
| 400 | - $documentStr = '<strong>' . _('Documents: ') . '</strong>'; | 400 | + $documentStr = '<strong>' . _kt('Documents: ') . '</strong>'; |
| 401 | foreach ($aCantMove['documents'] as $iDocId) { | 401 | foreach ($aCantMove['documents'] as $iDocId) { |
| 402 | $oD = Document::get($iDocId); | 402 | $oD = Document::get($iDocId); |
| 403 | $cantMoveItems['documents'][] = $oD->getName(); | 403 | $cantMoveItems['documents'][] = $oD->getName(); |
| @@ -406,10 +406,10 @@ class BrowseDispatcher extends KTStandardDispatcher { | @@ -406,10 +406,10 @@ class BrowseDispatcher extends KTStandardDispatcher { | ||
| 406 | } | 406 | } |
| 407 | 407 | ||
| 408 | if (!empty($folderStr)) { | 408 | if (!empty($folderStr)) { |
| 409 | - $_SESSION["KTErrorMessage"][] = _("The following folders can not be moved") . ": " . $folderStr; | 409 | + $_SESSION["KTErrorMessage"][] = _kt("The following folders can not be moved") . ": " . $folderStr; |
| 410 | } | 410 | } |
| 411 | if (!empty($documentStr)) { | 411 | if (!empty($documentStr)) { |
| 412 | - $_SESSION["KTErrorMessage"][] = _("The following documents can not be moved") . ": " . $documentStr; | 412 | + $_SESSION["KTErrorMessage"][] = _kt("The following documents can not be moved") . ": " . $documentStr; |
| 413 | } | 413 | } |
| 414 | } | 414 | } |
| 415 | 415 | ||
| @@ -417,14 +417,14 @@ class BrowseDispatcher extends KTStandardDispatcher { | @@ -417,14 +417,14 @@ class BrowseDispatcher extends KTStandardDispatcher { | ||
| 417 | 417 | ||
| 418 | $oFolder = Folder::get(KTUtil::arrayGet($_REQUEST, 'fFolderId', 1)); | 418 | $oFolder = Folder::get(KTUtil::arrayGet($_REQUEST, 'fFolderId', 1)); |
| 419 | if (PEAR::isError($oFolder)) { | 419 | if (PEAR::isError($oFolder)) { |
| 420 | - $this->errorRedirectToMain(_('Invalid folder selected.')); | 420 | + $this->errorRedirectToMain(_kt('Invalid folder selected.')); |
| 421 | exit(0); | 421 | exit(0); |
| 422 | } | 422 | } |
| 423 | 423 | ||
| 424 | $moveSet = $_SESSION['moves'][$sMoveCode]; | 424 | $moveSet = $_SESSION['moves'][$sMoveCode]; |
| 425 | 425 | ||
| 426 | if (empty($moveSet['folders']) && empty($moveSet['documents'])) { | 426 | if (empty($moveSet['folders']) && empty($moveSet['documents'])) { |
| 427 | - $this->errorRedirectToMain(_('Please select documents or folders first.'), sprintf('fFolderId=%d', $oFolder->getId())); | 427 | + $this->errorRedirectToMain(_kt('Please select documents or folders first.'), sprintf('fFolderId=%d', $oFolder->getId())); |
| 428 | exit(0); | 428 | exit(0); |
| 429 | } | 429 | } |
| 430 | 430 | ||
| @@ -475,7 +475,7 @@ class BrowseDispatcher extends KTStandardDispatcher { | @@ -475,7 +475,7 @@ class BrowseDispatcher extends KTStandardDispatcher { | ||
| 475 | $documentStr = ''; | 475 | $documentStr = ''; |
| 476 | 476 | ||
| 477 | if (!empty($moveSet['folders'])) { | 477 | if (!empty($moveSet['folders'])) { |
| 478 | - $folderStr = '<strong>' . _('Folders: ') . '</strong>'; | 478 | + $folderStr = '<strong>' . _kt('Folders: ') . '</strong>'; |
| 479 | foreach ($moveSet['folders'] as $iFolderId) { | 479 | foreach ($moveSet['folders'] as $iFolderId) { |
| 480 | $oF = Folder::get($iFolderId); | 480 | $oF = Folder::get($iFolderId); |
| 481 | $moveItems['folders'][] = $oF->getName(); | 481 | $moveItems['folders'][] = $oF->getName(); |
| @@ -484,7 +484,7 @@ class BrowseDispatcher extends KTStandardDispatcher { | @@ -484,7 +484,7 @@ class BrowseDispatcher extends KTStandardDispatcher { | ||
| 484 | } | 484 | } |
| 485 | 485 | ||
| 486 | if (!empty($moveSet['documents'])) { | 486 | if (!empty($moveSet['documents'])) { |
| 487 | - $documentStr = '<strong>' . _('Documents: ') . '</strong>'; | 487 | + $documentStr = '<strong>' . _kt('Documents: ') . '</strong>'; |
| 488 | foreach ($moveSet['documents'] as $iDocId) { | 488 | foreach ($moveSet['documents'] as $iDocId) { |
| 489 | $oD = Document::get($iDocId); | 489 | $oD = Document::get($iDocId); |
| 490 | $moveItems['documents'][] = $oD->getName(); | 490 | $moveItems['documents'][] = $oD->getName(); |
| @@ -513,22 +513,22 @@ class BrowseDispatcher extends KTStandardDispatcher { | @@ -513,22 +513,22 @@ class BrowseDispatcher extends KTStandardDispatcher { | ||
| 513 | $action_a = (array) KTUtil::arrayGet($_REQUEST, 'submit', null); | 513 | $action_a = (array) KTUtil::arrayGet($_REQUEST, 'submit', null); |
| 514 | $actions = array_keys($action_a); | 514 | $actions = array_keys($action_a); |
| 515 | if (empty($actions)) { | 515 | if (empty($actions)) { |
| 516 | - $this->errorRedirectToMain(_('No action selected.')); | 516 | + $this->errorRedirectToMain(_kt('No action selected.')); |
| 517 | } else { | 517 | } else { |
| 518 | $action = $actions[0]; | 518 | $action = $actions[0]; |
| 519 | } | 519 | } |
| 520 | if ($action != 'move') { | 520 | if ($action != 'move') { |
| 521 | - $this->successRedirectToMain(_('Move cancelled.')); | 521 | + $this->successRedirectToMain(_kt('Move cancelled.')); |
| 522 | } | 522 | } |
| 523 | 523 | ||
| 524 | $target_folder = KTUtil::arrayGet($_REQUEST, 'fFolderId'); | 524 | $target_folder = KTUtil::arrayGet($_REQUEST, 'fFolderId'); |
| 525 | - if ($target_folder == null ) { $this->errorRedirectToMain(_('No folder selected.')); } | 525 | + if ($target_folder == null ) { $this->errorRedirectToMain(_kt('No folder selected.')); } |
| 526 | 526 | ||
| 527 | $move_code = KTUtil::arrayGet($_REQUEST, 'fMoveCode'); | 527 | $move_code = KTUtil::arrayGet($_REQUEST, 'fMoveCode'); |
| 528 | 528 | ||
| 529 | $aFields = array(); | 529 | $aFields = array(); |
| 530 | - $aFields[] = new KTStaticTextWidget(_('Destination folder'), _('The folder which will contain the previously selected files and folders.'), 'fDocumentId', Folder::getFolderDisplayPath($target_folder), $this->oPage, false); | ||
| 531 | - $aFields[] = new KTStringWidget(_('Reason'), _('The reason for moving these documents and folders, for historical purposes.'), 'sReason', "", $this->oPage, true); | 530 | + $aFields[] = new KTStaticTextWidget(_kt('Destination folder'), _kt('The folder which will contain the previously selected files and folders.'), 'fDocumentId', Folder::getFolderDisplayPath($target_folder), $this->oPage, false); |
| 531 | + $aFields[] = new KTStringWidget(_kt('Reason'), _kt('The reason for moving these documents and folders, for historical purposes.'), 'sReason', "", $this->oPage, true); | ||
| 532 | 532 | ||
| 533 | 533 | ||
| 534 | // now show the items... | 534 | // now show the items... |
| @@ -541,7 +541,7 @@ class BrowseDispatcher extends KTStandardDispatcher { | @@ -541,7 +541,7 @@ class BrowseDispatcher extends KTStandardDispatcher { | ||
| 541 | $documentStr = ''; | 541 | $documentStr = ''; |
| 542 | 542 | ||
| 543 | if (!empty($moveSet['folders'])) { | 543 | if (!empty($moveSet['folders'])) { |
| 544 | - $folderStr = '<strong>' . _('Folders: ') . '</strong>'; | 544 | + $folderStr = '<strong>' . _kt('Folders: ') . '</strong>'; |
| 545 | foreach ($moveSet['folders'] as $iFolderId) { | 545 | foreach ($moveSet['folders'] as $iFolderId) { |
| 546 | $oF = Folder::get($iFolderId); | 546 | $oF = Folder::get($iFolderId); |
| 547 | $moveItems['folders'][] = $oF->getName(); | 547 | $moveItems['folders'][] = $oF->getName(); |
| @@ -550,7 +550,7 @@ class BrowseDispatcher extends KTStandardDispatcher { | @@ -550,7 +550,7 @@ class BrowseDispatcher extends KTStandardDispatcher { | ||
| 550 | } | 550 | } |
| 551 | 551 | ||
| 552 | if (!empty($moveSet['documents'])) { | 552 | if (!empty($moveSet['documents'])) { |
| 553 | - $documentStr = '<strong>' . _('Documents: ') . '</strong>'; | 553 | + $documentStr = '<strong>' . _kt('Documents: ') . '</strong>'; |
| 554 | foreach ($moveSet['documents'] as $iDocId) { | 554 | foreach ($moveSet['documents'] as $iDocId) { |
| 555 | $oD = Document::get($iDocId); | 555 | $oD = Document::get($iDocId); |
| 556 | $moveItems['documents'][] = $oD->getName(); | 556 | $moveItems['documents'][] = $oD->getName(); |
| @@ -576,7 +576,7 @@ class BrowseDispatcher extends KTStandardDispatcher { | @@ -576,7 +576,7 @@ class BrowseDispatcher extends KTStandardDispatcher { | ||
| 576 | $target_folder = KTUtil::arrayGet($_REQUEST, 'fFolderId'); | 576 | $target_folder = KTUtil::arrayGet($_REQUEST, 'fFolderId'); |
| 577 | $reason = KTUtil::arrayGet($_REQUEST, 'sReason'); | 577 | $reason = KTUtil::arrayGet($_REQUEST, 'sReason'); |
| 578 | if (empty($reason)) { | 578 | if (empty($reason)) { |
| 579 | - $_SESSION['KTErrorMessage'][] = _('You must supply a reason.'); | 579 | + $_SESSION['KTErrorMessage'][] = _kt('You must supply a reason.'); |
| 580 | return $this->do_finaliseMove(); | 580 | return $this->do_finaliseMove(); |
| 581 | } | 581 | } |
| 582 | 582 | ||
| @@ -594,7 +594,7 @@ class BrowseDispatcher extends KTStandardDispatcher { | @@ -594,7 +594,7 @@ class BrowseDispatcher extends KTStandardDispatcher { | ||
| 594 | } | 594 | } |
| 595 | 595 | ||
| 596 | if (!Permission::userHasFolderWritePermission($oTargetFolder)) { | 596 | if (!Permission::userHasFolderWritePermission($oTargetFolder)) { |
| 597 | - $this->errorRedirectTo("main", _("You do not have permission to move items to this location"), sprintf("fFolderId=%d", $oTargetFolder->getId())); | 597 | + $this->errorRedirectTo("main", _kt("You do not have permission to move items to this location"), sprintf("fFolderId=%d", $oTargetFolder->getId())); |
| 598 | exit(0); | 598 | exit(0); |
| 599 | } | 599 | } |
| 600 | 600 | ||
| @@ -607,7 +607,7 @@ class BrowseDispatcher extends KTStandardDispatcher { | @@ -607,7 +607,7 @@ class BrowseDispatcher extends KTStandardDispatcher { | ||
| 607 | 607 | ||
| 608 | $oDoc = Document::get($iDocId); | 608 | $oDoc = Document::get($iDocId); |
| 609 | if (PEAR::isError($oDoc)) { | 609 | if (PEAR::isError($oDoc)) { |
| 610 | - $this->errorRedirectToMain(_('Invalid document.')); | 610 | + $this->errorRedirectToMain(_kt('Invalid document.')); |
| 611 | } | 611 | } |
| 612 | 612 | ||
| 613 | $oOriginalFolder = Folder::get($oDoc->getFolderId()); | 613 | $oOriginalFolder = Folder::get($oDoc->getFolderId()); |
| @@ -622,7 +622,7 @@ class BrowseDispatcher extends KTStandardDispatcher { | @@ -622,7 +622,7 @@ class BrowseDispatcher extends KTStandardDispatcher { | ||
| 622 | $oDoc->setFolderID($oTargetFolder->getId()); | 622 | $oDoc->setFolderID($oTargetFolder->getId()); |
| 623 | $res = $oDoc->update(true); | 623 | $res = $oDoc->update(true); |
| 624 | if (!$res) { | 624 | if (!$res) { |
| 625 | - $this->errorRedirectTo("move", _("There was a problem updating the document's location in the database"), sprintf("fDocumentId=%d&fFolderId=%d", $oDoc->getId(), $oTargetFolder->getId())); | 625 | + $this->errorRedirectTo("move", _kt("There was a problem updating the document's location in the database"), sprintf("fDocumentId=%d&fFolderId=%d", $oDoc->getId(), $oTargetFolder->getId())); |
| 626 | } | 626 | } |
| 627 | 627 | ||
| 628 | //move the document on the file system | 628 | //move the document on the file system |
| @@ -630,7 +630,7 @@ class BrowseDispatcher extends KTStandardDispatcher { | @@ -630,7 +630,7 @@ class BrowseDispatcher extends KTStandardDispatcher { | ||
| 630 | if (!$oStorage->moveDocument($oDoc, $oOriginalFolder, $oTargetFolder)) { | 630 | if (!$oStorage->moveDocument($oDoc, $oOriginalFolder, $oTargetFolder)) { |
| 631 | $oDoc->setFolderID($oOriginalFolder->getId()); | 631 | $oDoc->setFolderID($oOriginalFolder->getId()); |
| 632 | $oDoc->update(true); | 632 | $oDoc->update(true); |
| 633 | - $this->errorRedirectTo("move", _("There was a problem updating the document's location in the repository storage"), sprintf("fDocumentId=%d&fFolderId=%d", $oDoc->getId(), $oTargetFolder->getId())); | 633 | + $this->errorRedirectTo("move", _kt("There was a problem updating the document's location in the repository storage"), sprintf("fDocumentId=%d&fFolderId=%d", $oDoc->getId(), $oTargetFolder->getId())); |
| 634 | } | 634 | } |
| 635 | 635 | ||
| 636 | $sMoveMessage = sprintf("Moved from %s/%s to %s/%s: %s", | 636 | $sMoveMessage = sprintf("Moved from %s/%s to %s/%s: %s", |
| @@ -672,17 +672,17 @@ class BrowseDispatcher extends KTStandardDispatcher { | @@ -672,17 +672,17 @@ class BrowseDispatcher extends KTStandardDispatcher { | ||
| 672 | 672 | ||
| 673 | foreach ($aMoveStack['folders'] as $iFolderId) { | 673 | foreach ($aMoveStack['folders'] as $iFolderId) { |
| 674 | $oFolder = Folder::get($iFolderId); | 674 | $oFolder = Folder::get($iFolderId); |
| 675 | - if (PEAR::isError($oFolder)) { $this->errorRedirectToMain(_('Invalid folder.')); } | 675 | + if (PEAR::isError($oFolder)) { $this->errorRedirectToMain(_kt('Invalid folder.')); } |
| 676 | 676 | ||
| 677 | $res = KTFolderUtil::move($oFolder, $oTargetFolder, $this->oUser); | 677 | $res = KTFolderUtil::move($oFolder, $oTargetFolder, $this->oUser); |
| 678 | if (PEAR::isError($res)) { | 678 | if (PEAR::isError($res)) { |
| 679 | - $this->errorRedirectToMain(_('Failed to move the folder: ') . $res->getMessage()); | 679 | + $this->errorRedirectToMain(_kt('Failed to move the folder: ') . $res->getMessage()); |
| 680 | } | 680 | } |
| 681 | } | 681 | } |
| 682 | $this->commitTransaction(); | 682 | $this->commitTransaction(); |
| 683 | 683 | ||
| 684 | 684 | ||
| 685 | - $this->successRedirectToMain(_('Move completed.'), sprintf('fFolderId=%d', $target_folder)); | 685 | + $this->successRedirectToMain(_kt('Move completed.'), sprintf('fFolderId=%d', $target_folder)); |
| 686 | } | 686 | } |
| 687 | 687 | ||
| 688 | function do_startDelete() { | 688 | function do_startDelete() { |
| @@ -704,11 +704,11 @@ class BrowseDispatcher extends KTStandardDispatcher { | @@ -704,11 +704,11 @@ class BrowseDispatcher extends KTStandardDispatcher { | ||
| 704 | $documentStr = ''; | 704 | $documentStr = ''; |
| 705 | 705 | ||
| 706 | if (!empty($aFolderSelection)) { | 706 | if (!empty($aFolderSelection)) { |
| 707 | - $folderStr = '<strong>' . _('Folders: ') . '</strong>'; | 707 | + $folderStr = '<strong>' . _kt('Folders: ') . '</strong>'; |
| 708 | foreach ($aFolderSelection as $iFolderId) { | 708 | foreach ($aFolderSelection as $iFolderId) { |
| 709 | $oF = Folder::get($iFolderId); | 709 | $oF = Folder::get($iFolderId); |
| 710 | if (!KTPermissionUtil::userHasPermissionOnItem($this->oUser, $oPerm, $oF)) { | 710 | if (!KTPermissionUtil::userHasPermissionOnItem($this->oUser, $oPerm, $oF)) { |
| 711 | - $this->errorRedirectToMain(_('You do not have permission to delete the folder: ') . $oF->getName()); | 711 | + $this->errorRedirectToMain(_kt('You do not have permission to delete the folder: ') . $oF->getName()); |
| 712 | } | 712 | } |
| 713 | $delItems['folders'][] = $oF->getName(); | 713 | $delItems['folders'][] = $oF->getName(); |
| 714 | } | 714 | } |
| @@ -716,11 +716,11 @@ class BrowseDispatcher extends KTStandardDispatcher { | @@ -716,11 +716,11 @@ class BrowseDispatcher extends KTStandardDispatcher { | ||
| 716 | } | 716 | } |
| 717 | 717 | ||
| 718 | if (!empty($aDocumentSelection)) { | 718 | if (!empty($aDocumentSelection)) { |
| 719 | - $documentStr = '<strong>' . _('Documents: ') . '</strong>'; | 719 | + $documentStr = '<strong>' . _kt('Documents: ') . '</strong>'; |
| 720 | foreach ($aDocumentSelection as $iDocId) { | 720 | foreach ($aDocumentSelection as $iDocId) { |
| 721 | $oD = Document::get($iDocId); | 721 | $oD = Document::get($iDocId); |
| 722 | if (!KTPermissionUtil::userHasPermissionOnItem($this->oUser, $oPerm, $oD)) { | 722 | if (!KTPermissionUtil::userHasPermissionOnItem($this->oUser, $oPerm, $oD)) { |
| 723 | - $this->errorRedirectToMain(_('You do not have permission to delete the document: ') . $oD->getName()); | 723 | + $this->errorRedirectToMain(_kt('You do not have permission to delete the document: ') . $oD->getName()); |
| 724 | } | 724 | } |
| 725 | if (!PEAR::isError($oD)) { | 725 | if (!PEAR::isError($oD)) { |
| 726 | $delItems['documents'][] = $oD->getName(); | 726 | $delItems['documents'][] = $oD->getName(); |
| @@ -730,7 +730,7 @@ class BrowseDispatcher extends KTStandardDispatcher { | @@ -730,7 +730,7 @@ class BrowseDispatcher extends KTStandardDispatcher { | ||
| 730 | } | 730 | } |
| 731 | 731 | ||
| 732 | $aFields = array(); | 732 | $aFields = array(); |
| 733 | - $aFields[] = new KTStringWidget(_('Reason'), _('The reason for the deletion of these documents and folders for historical purposes.'), 'sReason', "", $this->oPage, true); | 733 | + $aFields[] = new KTStringWidget(_kt('Reason'), _kt('The reason for the deletion of these documents and folders for historical purposes.'), 'sReason', "", $this->oPage, true); |
| 734 | 734 | ||
| 735 | $oTemplating =& KTTemplating::getSingleton(); | 735 | $oTemplating =& KTTemplating::getSingleton(); |
| 736 | $oTemplate = $oTemplating->loadTemplate("ktcore/folder/mass_delete"); | 736 | $oTemplate = $oTemplating->loadTemplate("ktcore/folder/mass_delete"); |
| @@ -757,7 +757,7 @@ class BrowseDispatcher extends KTStandardDispatcher { | @@ -757,7 +757,7 @@ class BrowseDispatcher extends KTStandardDispatcher { | ||
| 757 | $res = KTUtil::arrayGet($_REQUEST,'sReason'); | 757 | $res = KTUtil::arrayGet($_REQUEST,'sReason'); |
| 758 | $sReason = $res; | 758 | $sReason = $res; |
| 759 | if (empty($res)) { | 759 | if (empty($res)) { |
| 760 | - $_SESSION['KTErrorMessage'][] = _('You must supply a reason.'); | 760 | + $_SESSION['KTErrorMessage'][] = _kt('You must supply a reason.'); |
| 761 | return $this->do_startDelete(); | 761 | return $this->do_startDelete(); |
| 762 | } | 762 | } |
| 763 | 763 | ||
| @@ -769,9 +769,9 @@ class BrowseDispatcher extends KTStandardDispatcher { | @@ -769,9 +769,9 @@ class BrowseDispatcher extends KTStandardDispatcher { | ||
| 769 | foreach ($aFolderSelection as $id) { | 769 | foreach ($aFolderSelection as $id) { |
| 770 | $oF = Folder::get($id); | 770 | $oF = Folder::get($id); |
| 771 | if (PEAR::isError($oF) || ($oF == false)) { | 771 | if (PEAR::isError($oF) || ($oF == false)) { |
| 772 | - return $this->errorRedirectToMain(_('Invalid Folder selected.')); | 772 | + return $this->errorRedirectToMain(_kt('Invalid Folder selected.')); |
| 773 | } else if (!KTPermissionUtil::userHasPermissionOnItem($this->oUser, $oPerm, $oF)) { | 773 | } else if (!KTPermissionUtil::userHasPermissionOnItem($this->oUser, $oPerm, $oF)) { |
| 774 | - return $this->errorRedirectToMain(sprintf(_('You do not have permissions to delete the folder: %s'), $oF->getName())); | 774 | + return $this->errorRedirectToMain(sprintf(_kt('You do not have permissions to delete the folder: %s'), $oF->getName())); |
| 775 | } else{ | 775 | } else{ |
| 776 | $aFolders[] = $oF; | 776 | $aFolders[] = $oF; |
| 777 | } | 777 | } |
| @@ -780,9 +780,9 @@ class BrowseDispatcher extends KTStandardDispatcher { | @@ -780,9 +780,9 @@ class BrowseDispatcher extends KTStandardDispatcher { | ||
| 780 | $oD = Document::get($id); | 780 | $oD = Document::get($id); |
| 781 | 781 | ||
| 782 | if (PEAR::isError($oD) || ($oD == false)) { | 782 | if (PEAR::isError($oD) || ($oD == false)) { |
| 783 | - return $this->errorRedirectToMain(_('Invalid Document selected.')); | 783 | + return $this->errorRedirectToMain(_kt('Invalid Document selected.')); |
| 784 | } else if (!KTPermissionUtil::userHasPermissionOnItem($this->oUser, $oPerm, $oD)) { | 784 | } else if (!KTPermissionUtil::userHasPermissionOnItem($this->oUser, $oPerm, $oD)) { |
| 785 | - return $this->errorRedirectToMain(sprintf(_('You do not have permissions to delete the document: %s'), $oD->getName())); | 785 | + return $this->errorRedirectToMain(sprintf(_kt('You do not have permissions to delete the document: %s'), $oD->getName())); |
| 786 | } else { | 786 | } else { |
| 787 | $aDocuments[] = $oD; | 787 | $aDocuments[] = $oD; |
| 788 | } | 788 | } |
| @@ -816,19 +816,19 @@ class BrowseDispatcher extends KTStandardDispatcher { | @@ -816,19 +816,19 @@ class BrowseDispatcher extends KTStandardDispatcher { | ||
| 816 | } | 816 | } |
| 817 | 817 | ||
| 818 | if (!Permission::userIsSystemAdministrator() && !Permission::isUnitAdministratorForFolder($this->oUser, $iFolderId)) { | 818 | if (!Permission::userIsSystemAdministrator() && !Permission::isUnitAdministratorForFolder($this->oUser, $iFolderId)) { |
| 819 | - $this->errorRedirectToMain(_('You are not an administrator')); | 819 | + $this->errorRedirectToMain(_kt('You are not an administrator')); |
| 820 | } | 820 | } |
| 821 | 821 | ||
| 822 | $_SESSION['adminmode'] = true; | 822 | $_SESSION['adminmode'] = true; |
| 823 | if ($_REQUEST['fDocumentId']) { | 823 | if ($_REQUEST['fDocumentId']) { |
| 824 | - $_SESSION['KTInfoMessage'][] = _('Administrator mode enabled'); | 824 | + $_SESSION['KTInfoMessage'][] = _kt('Administrator mode enabled'); |
| 825 | redirect(KTBrowseUtil::getUrlForDocument($iDocumentId)); | 825 | redirect(KTBrowseUtil::getUrlForDocument($iDocumentId)); |
| 826 | exit(0); | 826 | exit(0); |
| 827 | } | 827 | } |
| 828 | if ($_REQUEST['fFolderId']) { | 828 | if ($_REQUEST['fFolderId']) { |
| 829 | - $this->successRedirectToMain(_('Administrator mode enabled'), sprintf('fFolderId=%d', $_REQUEST['fFolderId'])); | 829 | + $this->successRedirectToMain(_kt('Administrator mode enabled'), sprintf('fFolderId=%d', $_REQUEST['fFolderId'])); |
| 830 | } | 830 | } |
| 831 | - $this->successRedirectToMain(_('Administrator mode enabled')); | 831 | + $this->successRedirectToMain(_kt('Administrator mode enabled')); |
| 832 | } | 832 | } |
| 833 | 833 | ||
| 834 | function do_disableAdminMode() { | 834 | function do_disableAdminMode() { |
| @@ -843,19 +843,19 @@ class BrowseDispatcher extends KTStandardDispatcher { | @@ -843,19 +843,19 @@ class BrowseDispatcher extends KTStandardDispatcher { | ||
| 843 | } | 843 | } |
| 844 | 844 | ||
| 845 | if (!Permission::userIsSystemAdministrator() && !Permission::isUnitAdministratorForFolder($this->oUser, $iFolderId)) { | 845 | if (!Permission::userIsSystemAdministrator() && !Permission::isUnitAdministratorForFolder($this->oUser, $iFolderId)) { |
| 846 | - $this->errorRedirectToMain(_('You are not an administrator')); | 846 | + $this->errorRedirectToMain(_kt('You are not an administrator')); |
| 847 | } | 847 | } |
| 848 | 848 | ||
| 849 | $_SESSION['adminmode'] = false; | 849 | $_SESSION['adminmode'] = false; |
| 850 | if ($_REQUEST['fDocumentId']) { | 850 | if ($_REQUEST['fDocumentId']) { |
| 851 | - $_SESSION['KTInfoMessage'][] = _('Administrator mode disabled'); | 851 | + $_SESSION['KTInfoMessage'][] = _kt('Administrator mode disabled'); |
| 852 | redirect(KTBrowseUtil::getUrlForDocument($iDocumentId)); | 852 | redirect(KTBrowseUtil::getUrlForDocument($iDocumentId)); |
| 853 | exit(0); | 853 | exit(0); |
| 854 | } | 854 | } |
| 855 | if ($_REQUEST['fFolderId']) { | 855 | if ($_REQUEST['fFolderId']) { |
| 856 | - $this->successRedirectToMain(_('Administrator mode disabled'), sprintf('fFolderId=%d', $_REQUEST['fFolderId'])); | 856 | + $this->successRedirectToMain(_kt('Administrator mode disabled'), sprintf('fFolderId=%d', $_REQUEST['fFolderId'])); |
| 857 | } | 857 | } |
| 858 | - $this->successRedirectToMain(_('Administrator mode disabled')); | 858 | + $this->successRedirectToMain(_kt('Administrator mode disabled')); |
| 859 | } | 859 | } |
| 860 | } | 860 | } |
| 861 | 861 |
dashboard.php
| @@ -48,7 +48,7 @@ class DashboardDispatcher extends KTStandardDispatcher { | @@ -48,7 +48,7 @@ class DashboardDispatcher extends KTStandardDispatcher { | ||
| 48 | 48 | ||
| 49 | function DashboardDispatcher() { | 49 | function DashboardDispatcher() { |
| 50 | $this->aBreadcrumbs = array( | 50 | $this->aBreadcrumbs = array( |
| 51 | - array('action' => 'dashboard', 'name' => _('Dashboard')), | 51 | + array('action' => 'dashboard', 'name' => _kt('Dashboard')), |
| 52 | ); | 52 | ); |
| 53 | return parent::KTStandardDispatcher(); | 53 | return parent::KTStandardDispatcher(); |
| 54 | } | 54 | } |
| @@ -62,8 +62,8 @@ class DashboardDispatcher extends KTStandardDispatcher { | @@ -62,8 +62,8 @@ class DashboardDispatcher extends KTStandardDispatcher { | ||
| 62 | $aDashlets = $oDashletRegistry->getDashlets($this->oUser); | 62 | $aDashlets = $oDashletRegistry->getDashlets($this->oUser); |
| 63 | 63 | ||
| 64 | $this->sSection = "dashboard"; | 64 | $this->sSection = "dashboard"; |
| 65 | - $this->oPage->setBreadcrumbDetails(_("Home")); | ||
| 66 | - $this->oPage->title = _("Dashboard"); | 65 | + $this->oPage->setBreadcrumbDetails(_kt("Home")); |
| 66 | + $this->oPage->title = _kt("Dashboard"); | ||
| 67 | 67 | ||
| 68 | // simplistic improvement over the standard rendering: float half left | 68 | // simplistic improvement over the standard rendering: float half left |
| 69 | // and half right. +Involves no JS -can leave lots of white-space at the bottom. | 69 | // and half right. +Involves no JS -can leave lots of white-space at the bottom. |
edit.php
| @@ -72,11 +72,11 @@ class KTEditDocumentDispatcher extends KTStandardDispatcher { | @@ -72,11 +72,11 @@ class KTEditDocumentDispatcher extends KTStandardDispatcher { | ||
| 72 | 72 | ||
| 73 | $document_id = KTUtil::arrayGet($_REQUEST, 'fDocumentId'); | 73 | $document_id = KTUtil::arrayGet($_REQUEST, 'fDocumentId'); |
| 74 | if (empty($document_id)) { | 74 | if (empty($document_id)) { |
| 75 | - $this->errorPage(_("No document specified for editing.")); | 75 | + $this->errorPage(_kt("No document specified for editing.")); |
| 76 | } | 76 | } |
| 77 | $oDocument = Document::get($document_id); | 77 | $oDocument = Document::get($document_id); |
| 78 | if (PEAR::isError($oDocument)) { | 78 | if (PEAR::isError($oDocument)) { |
| 79 | - $this->errorPage(_("Invalid Document.")); | 79 | + $this->errorPage(_kt("Invalid Document.")); |
| 80 | } | 80 | } |
| 81 | 81 | ||
| 82 | $this->oDocument = $oDocument; | 82 | $this->oDocument = $oDocument; |
| @@ -94,7 +94,7 @@ class KTEditDocumentDispatcher extends KTStandardDispatcher { | @@ -94,7 +94,7 @@ class KTEditDocumentDispatcher extends KTStandardDispatcher { | ||
| 94 | 94 | ||
| 95 | function KTEditDocumentDispatcher() { | 95 | function KTEditDocumentDispatcher() { |
| 96 | $this->aBreadcrumbs = array( | 96 | $this->aBreadcrumbs = array( |
| 97 | - array('action' => 'browse', 'name' => _('Browse')), | 97 | + array('action' => 'browse', 'name' => _kt('Browse')), |
| 98 | ); | 98 | ); |
| 99 | return parent::KTStandardDispatcher(); | 99 | return parent::KTStandardDispatcher(); |
| 100 | } | 100 | } |
| @@ -102,7 +102,7 @@ class KTEditDocumentDispatcher extends KTStandardDispatcher { | @@ -102,7 +102,7 @@ class KTEditDocumentDispatcher extends KTStandardDispatcher { | ||
| 102 | // FIXME identify the current location somehow. | 102 | // FIXME identify the current location somehow. |
| 103 | function addPortlets($currentaction = null) { | 103 | function addPortlets($currentaction = null) { |
| 104 | $actions = KTDocumentActionUtil::getDocumentActionsForDocument($this->oDocument, $this->oUser); | 104 | $actions = KTDocumentActionUtil::getDocumentActionsForDocument($this->oDocument, $this->oUser); |
| 105 | - $oPortlet = new KTActionPortlet(_("Document Actions")); | 105 | + $oPortlet = new KTActionPortlet(_kt("Document Actions")); |
| 106 | $oPortlet->setActions($actions, $currentaction); | 106 | $oPortlet->setActions($actions, $currentaction); |
| 107 | 107 | ||
| 108 | $this->oPage->addPortlet($oPortlet); | 108 | $this->oPage->addPortlet($oPortlet); |
| @@ -132,17 +132,17 @@ class KTEditDocumentDispatcher extends KTStandardDispatcher { | @@ -132,17 +132,17 @@ class KTEditDocumentDispatcher extends KTStandardDispatcher { | ||
| 132 | 132 | ||
| 133 | $document_id = KTUtil::arrayGet($_REQUEST, 'fDocumentId'); | 133 | $document_id = KTUtil::arrayGet($_REQUEST, 'fDocumentId'); |
| 134 | if (empty($document_id)) { | 134 | if (empty($document_id)) { |
| 135 | - $this->errorPage(_("No document specified for editing.")); | 135 | + $this->errorPage(_kt("No document specified for editing.")); |
| 136 | } | 136 | } |
| 137 | $oDocument = Document::get($document_id); | 137 | $oDocument = Document::get($document_id); |
| 138 | if (PEAR::isError($oDocument)) { | 138 | if (PEAR::isError($oDocument)) { |
| 139 | - $this->errorPage(_("Invalid Document.")); | 139 | + $this->errorPage(_kt("Invalid Document.")); |
| 140 | } | 140 | } |
| 141 | 141 | ||
| 142 | $this->oDocument = $oDocument; | 142 | $this->oDocument = $oDocument; |
| 143 | $this->addPortlets("Edit"); | 143 | $this->addPortlets("Edit"); |
| 144 | $this->addBreadcrumbs(); | 144 | $this->addBreadcrumbs(); |
| 145 | - $this->oPage->setBreadcrumbDetails(_('Change Document Type')); | 145 | + $this->oPage->setBreadcrumbDetails(_kt('Change Document Type')); |
| 146 | 146 | ||
| 147 | $aDocTypes = DocumentType::getList(); | 147 | $aDocTypes = DocumentType::getList(); |
| 148 | 148 | ||
| @@ -181,10 +181,10 @@ class KTEditDocumentDispatcher extends KTStandardDispatcher { | @@ -181,10 +181,10 @@ class KTEditDocumentDispatcher extends KTStandardDispatcher { | ||
| 181 | $newType = KTUtil::arrayGet($_REQUEST, 'fDocType'); | 181 | $newType = KTUtil::arrayGet($_REQUEST, 'fDocType'); |
| 182 | $oType = DocumentType::get($newType); | 182 | $oType = DocumentType::get($newType); |
| 183 | if (PEAR::isError($oType) || ($oType == false)) { | 183 | if (PEAR::isError($oType) || ($oType == false)) { |
| 184 | - $this->errorRedirectToMain(_("Invalid type selected.")); | 184 | + $this->errorRedirectToMain(_kt("Invalid type selected.")); |
| 185 | } | 185 | } |
| 186 | 186 | ||
| 187 | - $_SESSION['KTInfoMessage'][] = _('Document Type Changed. Please review the information below, and update as appropriate.'); | 187 | + $_SESSION['KTInfoMessage'][] = _kt('Document Type Changed. Please review the information below, and update as appropriate.'); |
| 188 | 188 | ||
| 189 | $_REQUEST['setType'] = $newType; | 189 | $_REQUEST['setType'] = $newType; |
| 190 | 190 | ||
| @@ -197,11 +197,11 @@ class KTEditDocumentDispatcher extends KTStandardDispatcher { | @@ -197,11 +197,11 @@ class KTEditDocumentDispatcher extends KTStandardDispatcher { | ||
| 197 | 197 | ||
| 198 | $document_id = KTUtil::arrayGet($_REQUEST, 'fDocumentId'); | 198 | $document_id = KTUtil::arrayGet($_REQUEST, 'fDocumentId'); |
| 199 | if (empty($document_id)) { | 199 | if (empty($document_id)) { |
| 200 | - $this->errorPage(_("No document specified for editing.")); | 200 | + $this->errorPage(_kt("No document specified for editing.")); |
| 201 | } | 201 | } |
| 202 | $oDocument = Document::get($document_id); | 202 | $oDocument = Document::get($document_id); |
| 203 | if (PEAR::isError($oDocument)) { | 203 | if (PEAR::isError($oDocument)) { |
| 204 | - $this->errorPage(_("Invalid Document.")); | 204 | + $this->errorPage(_kt("Invalid Document.")); |
| 205 | } | 205 | } |
| 206 | 206 | ||
| 207 | $this->oDocument = $oDocument; | 207 | $this->oDocument = $oDocument; |
| @@ -266,16 +266,16 @@ class KTEditDocumentDispatcher extends KTStandardDispatcher { | @@ -266,16 +266,16 @@ class KTEditDocumentDispatcher extends KTStandardDispatcher { | ||
| 266 | function do_update() { | 266 | function do_update() { |
| 267 | $document_id = KTUtil::arrayGet($_REQUEST, 'fDocumentId'); | 267 | $document_id = KTUtil::arrayGet($_REQUEST, 'fDocumentId'); |
| 268 | if (empty($document_id)) { | 268 | if (empty($document_id)) { |
| 269 | - $this->errorPage(_("No document specified for editing.")); | 269 | + $this->errorPage(_kt("No document specified for editing.")); |
| 270 | } | 270 | } |
| 271 | $oDocument = Document::get($document_id); | 271 | $oDocument = Document::get($document_id); |
| 272 | if (PEAR::isError($oDocument)) { | 272 | if (PEAR::isError($oDocument)) { |
| 273 | - $this->errorPage(_("Invalid Document.")); | 273 | + $this->errorPage(_kt("Invalid Document.")); |
| 274 | } | 274 | } |
| 275 | 275 | ||
| 276 | $aErrorOptions = array( | 276 | $aErrorOptions = array( |
| 277 | 'redirect_to' => array('main', sprintf('fDocumentId=%d', $oDocument->getId())), | 277 | 'redirect_to' => array('main', sprintf('fDocumentId=%d', $oDocument->getId())), |
| 278 | - 'message' => _('No name given'), | 278 | + 'message' => _kt('No name given'), |
| 279 | ); | 279 | ); |
| 280 | $title = KTUtil::arrayGet($_REQUEST, 'generic_title'); | 280 | $title = KTUtil::arrayGet($_REQUEST, 'generic_title'); |
| 281 | $title = $this->oValidator->validateString($title, | 281 | $title = $this->oValidator->validateString($title, |
| @@ -285,7 +285,7 @@ class KTEditDocumentDispatcher extends KTStandardDispatcher { | @@ -285,7 +285,7 @@ class KTEditDocumentDispatcher extends KTStandardDispatcher { | ||
| 285 | if ($newType !== null) { | 285 | if ($newType !== null) { |
| 286 | $oDT = DocumentType::get($newType); | 286 | $oDT = DocumentType::get($newType); |
| 287 | if (PEAR::isError($oDT) || ($oDT == false)) { | 287 | if (PEAR::isError($oDT) || ($oDT == false)) { |
| 288 | - $this->errorRedirectToMain(_('Invalid document type specified for change.')); | 288 | + $this->errorRedirectToMain(_kt('Invalid document type specified for change.')); |
| 289 | } | 289 | } |
| 290 | } else { | 290 | } else { |
| 291 | $oDT = null; | 291 | $oDT = null; |
| @@ -475,7 +475,7 @@ class KTEditDocumentDispatcher extends KTStandardDispatcher { | @@ -475,7 +475,7 @@ class KTEditDocumentDispatcher extends KTStandardDispatcher { | ||
| 475 | 475 | ||
| 476 | $document_data['errors'] = $res->aFailed['field']; | 476 | $document_data['errors'] = $res->aFailed['field']; |
| 477 | 477 | ||
| 478 | - $this->addErrorMessage(_('Validation failed. The values below correspond to your attempt to change the metadata on this item, and are not necessarily the values saved for the document. The validation errors are shown next to the metadata that failed validation. Select Cancel to return to the saved values.')); | 478 | + $this->addErrorMessage(_kt('Validation failed. The values below correspond to your attempt to change the metadata on this item, and are not necessarily the values saved for the document. The validation errors are shown next to the metadata that failed validation. Select Cancel to return to the saved values.')); |
| 479 | 479 | ||
| 480 | $oTemplating =& KTTemplating::getSingleton(); | 480 | $oTemplating =& KTTemplating::getSingleton(); |
| 481 | $oTemplate =& $oTemplating->loadTemplate("kt3/document/edit"); | 481 | $oTemplate =& $oTemplating->loadTemplate("kt3/document/edit"); |
help.php
| @@ -61,8 +61,8 @@ class HelpDispatcher extends KTStandardDispatcher { | @@ -61,8 +61,8 @@ class HelpDispatcher extends KTStandardDispatcher { | ||
| 61 | var $bIsReplacement = false; | 61 | var $bIsReplacement = false; |
| 62 | 62 | ||
| 63 | function HelpDispatcher() { | 63 | function HelpDispatcher() { |
| 64 | - $this->aBreadcrumbs[] = array('action' => 'dashboard', 'name' => _('Dashboard')); | ||
| 65 | - $this->aBreadcrumbs[] = array('name' => _('Help')); | 64 | + $this->aBreadcrumbs[] = array('action' => 'dashboard', 'name' => _kt('Dashboard')); |
| 65 | + $this->aBreadcrumbs[] = array('name' => _kt('Help')); | ||
| 66 | parent::KTStandardDispatcher(); | 66 | parent::KTStandardDispatcher(); |
| 67 | } | 67 | } |
| 68 | 68 | ||
| @@ -79,8 +79,8 @@ class HelpDispatcher extends KTStandardDispatcher { | @@ -79,8 +79,8 @@ class HelpDispatcher extends KTStandardDispatcher { | ||
| 79 | 79 | ||
| 80 | $pathinfo = KTUtil::arrayGet($_SERVER, 'PATH_INFO'); | 80 | $pathinfo = KTUtil::arrayGet($_SERVER, 'PATH_INFO'); |
| 81 | if (empty($pathinfo)) { | 81 | if (empty($pathinfo)) { |
| 82 | - $this->oPage->setTitle(_('No help page specified.')); | ||
| 83 | - $this->oPage->addError(_('No help page specified.')); | 82 | + $this->oPage->setTitle(_kt('No help page specified.')); |
| 83 | + $this->oPage->addError(_kt('No help page specified.')); | ||
| 84 | return ' '; | 84 | return ' '; |
| 85 | } | 85 | } |
| 86 | 86 | ||
| @@ -88,8 +88,8 @@ class HelpDispatcher extends KTStandardDispatcher { | @@ -88,8 +88,8 @@ class HelpDispatcher extends KTStandardDispatcher { | ||
| 88 | 88 | ||
| 89 | $help_path = KTHelp::getHelpSubPath($pathinfo); | 89 | $help_path = KTHelp::getHelpSubPath($pathinfo); |
| 90 | if ($help_path == false) { | 90 | if ($help_path == false) { |
| 91 | - $this->oPage->setTitle(_('Invalid help location specified.')); | ||
| 92 | - $this->oPage->addError(_('Invalid help location specified.')); | 91 | + $this->oPage->setTitle(_kt('Invalid help location specified.')); |
| 92 | + $this->oPage->addError(_kt('Invalid help location specified.')); | ||
| 93 | return ' '; | 93 | return ' '; |
| 94 | } | 94 | } |
| 95 | 95 | ||
| @@ -113,8 +113,8 @@ class HelpDispatcher extends KTStandardDispatcher { | @@ -113,8 +113,8 @@ class HelpDispatcher extends KTStandardDispatcher { | ||
| 113 | $this->oPage->setTitle($aHelpInfo['title']); | 113 | $this->oPage->setTitle($aHelpInfo['title']); |
| 114 | //return $aHelpInfo['body']; | 114 | //return $aHelpInfo['body']; |
| 115 | } else { | 115 | } else { |
| 116 | - $this->oPage->setTitle(_('Invalid help location specified.')); | ||
| 117 | - $this->oPage->addError(_('Invalid help location specified.')); | 116 | + $this->oPage->setTitle(_kt('Invalid help location specified.')); |
| 117 | + $this->oPage->addError(_kt('Invalid help location specified.')); | ||
| 118 | return ' '; | 118 | return ' '; |
| 119 | } | 119 | } |
| 120 | } | 120 | } |
| @@ -148,7 +148,7 @@ class HelpDispatcher extends KTStandardDispatcher { | @@ -148,7 +148,7 @@ class HelpDispatcher extends KTStandardDispatcher { | ||
| 148 | redirect($sReferer); | 148 | redirect($sReferer); |
| 149 | exit(0); | 149 | exit(0); |
| 150 | } else { | 150 | } else { |
| 151 | - $this->errorRedirectToMain(_("Invalid return key from help system.")); | 151 | + $this->errorRedirectToMain(_kt("Invalid return key from help system.")); |
| 152 | } | 152 | } |
| 153 | } | 153 | } |
| 154 | } | 154 | } |
login.php
| @@ -106,7 +106,7 @@ class LoginPageDispatcher extends KTDispatcher { | @@ -106,7 +106,7 @@ class LoginPageDispatcher extends KTDispatcher { | ||
| 106 | $cookieVerify = KTUtil::arrayGet($_REQUEST, 'cookieverify', null); | 106 | $cookieVerify = KTUtil::arrayGet($_REQUEST, 'cookieverify', null); |
| 107 | 107 | ||
| 108 | if (($cookieVerify === null) || ($cookieTest !== $cookieVerify)) { | 108 | if (($cookieVerify === null) || ($cookieTest !== $cookieVerify)) { |
| 109 | - $this->simpleRedirectToMain(_('You must have cookies enabled to use the document management system.'), $url, $params); | 109 | + $this->simpleRedirectToMain(_kt('You must have cookies enabled to use the document management system.'), $url, $params); |
| 110 | exit(0); | 110 | exit(0); |
| 111 | } | 111 | } |
| 112 | 112 | ||
| @@ -114,27 +114,27 @@ class LoginPageDispatcher extends KTDispatcher { | @@ -114,27 +114,27 @@ class LoginPageDispatcher extends KTDispatcher { | ||
| 114 | $password = KTUtil::arrayGet($_REQUEST,'password'); | 114 | $password = KTUtil::arrayGet($_REQUEST,'password'); |
| 115 | 115 | ||
| 116 | if (empty($username)) { | 116 | if (empty($username)) { |
| 117 | - $this->simpleRedirectToMain(_('Please enter your username.'), $url, $params); | 117 | + $this->simpleRedirectToMain(_kt('Please enter your username.'), $url, $params); |
| 118 | } | 118 | } |
| 119 | 119 | ||
| 120 | if (empty($password)) { | 120 | if (empty($password)) { |
| 121 | - $this->simpleRedirectToMain(_('Please enter your password.'), $url, $params); | 121 | + $this->simpleRedirectToMain(_kt('Please enter your password.'), $url, $params); |
| 122 | } | 122 | } |
| 123 | 123 | ||
| 124 | $oUser =& User::getByUsername($username); | 124 | $oUser =& User::getByUsername($username); |
| 125 | if (PEAR::isError($oUser) || ($oUser === false)) { | 125 | if (PEAR::isError($oUser) || ($oUser === false)) { |
| 126 | - $this->simpleRedirectToMain(_('Login failed. Please check your username and password, and try again.'), $url, $params); | 126 | + $this->simpleRedirectToMain(_kt('Login failed. Please check your username and password, and try again.'), $url, $params); |
| 127 | exit(0); | 127 | exit(0); |
| 128 | } | 128 | } |
| 129 | $authenticated = KTAuthenticationUtil::checkPassword($oUser, $password); | 129 | $authenticated = KTAuthenticationUtil::checkPassword($oUser, $password); |
| 130 | 130 | ||
| 131 | if (PEAR::isError($authenticated)) { | 131 | if (PEAR::isError($authenticated)) { |
| 132 | - $this->simpleRedirectToMain(_('Authentication failure. Please try again.'), $url, $params); | 132 | + $this->simpleRedirectToMain(_kt('Authentication failure. Please try again.'), $url, $params); |
| 133 | exit(0); | 133 | exit(0); |
| 134 | } | 134 | } |
| 135 | 135 | ||
| 136 | if ($authenticated !== true) { | 136 | if ($authenticated !== true) { |
| 137 | - $this->simpleRedirectToMain(_('Login failed. Please check your username and password, and try again.'), $url, $params); | 137 | + $this->simpleRedirectToMain(_kt('Login failed. Please check your username and password, and try again.'), $url, $params); |
| 138 | exit(0); | 138 | exit(0); |
| 139 | } | 139 | } |
| 140 | 140 |
notify.php
| @@ -56,7 +56,7 @@ class KTNotificationDispatcher extends KTStandardDispatcher { | @@ -56,7 +56,7 @@ class KTNotificationDispatcher extends KTStandardDispatcher { | ||
| 56 | $oKTNotification =& KTNotification::get($notification_id); | 56 | $oKTNotification =& KTNotification::get($notification_id); |
| 57 | 57 | ||
| 58 | if (PEAR::isError($oKTNotification)) { | 58 | if (PEAR::isError($oKTNotification)) { |
| 59 | - $this->addErrorMessage(_('Invalid notification.')); | 59 | + $this->addErrorMessage(_kt('Invalid notification.')); |
| 60 | exit(redirect(generateControllerLink('dashboard'))); | 60 | exit(redirect(generateControllerLink('dashboard'))); |
| 61 | } | 61 | } |
| 62 | 62 | ||
| @@ -83,15 +83,15 @@ class KTNotificationDispatcher extends KTStandardDispatcher { | @@ -83,15 +83,15 @@ class KTNotificationDispatcher extends KTStandardDispatcher { | ||
| 83 | $res = $oNotification->delete(); | 83 | $res = $oNotification->delete(); |
| 84 | if (PEAR::isError($res)) { | 84 | if (PEAR::isError($res)) { |
| 85 | $this->rollbackTransaction(); | 85 | $this->rollbackTransaction(); |
| 86 | - $this->addErrorMessage(_('Failed to clear notifications.')); | 86 | + $this->addErrorMessage(_kt('Failed to clear notifications.')); |
| 87 | exit(redirect(generateControllerLink('dashboard'))); | 87 | exit(redirect(generateControllerLink('dashboard'))); |
| 88 | } | 88 | } |
| 89 | } | 89 | } |
| 90 | $this->commitTransaction(); | 90 | $this->commitTransaction(); |
| 91 | - $this->addInfoMessage(_('Notifications cleared.')); | 91 | + $this->addInfoMessage(_kt('Notifications cleared.')); |
| 92 | exit(redirect(generateControllerLink('dashboard'))); | 92 | exit(redirect(generateControllerLink('dashboard'))); |
| 93 | } | 93 | } |
| 94 | } | 94 | } |
| 95 | 95 | ||
| 96 | $dispatcher =& new KTNotificationDispatcher(); | 96 | $dispatcher =& new KTNotificationDispatcher(); |
| 97 | -$dispatcher->dispatch(); | ||
| 98 | \ No newline at end of file | 97 | \ No newline at end of file |
| 98 | +$dispatcher->dispatch(); |
preferences.php
| @@ -41,14 +41,14 @@ class PreferencesDispatcher extends KTStandardDispatcher { | @@ -41,14 +41,14 @@ class PreferencesDispatcher extends KTStandardDispatcher { | ||
| 41 | 41 | ||
| 42 | function PreferencesDispatcher() { | 42 | function PreferencesDispatcher() { |
| 43 | $this->aBreadcrumbs = array( | 43 | $this->aBreadcrumbs = array( |
| 44 | - array('action' => 'preferences', 'name' => _('Preferences')), | 44 | + array('action' => 'preferences', 'name' => _kt('Preferences')), |
| 45 | ); | 45 | ); |
| 46 | return parent::KTStandardDispatcher(); | 46 | return parent::KTStandardDispatcher(); |
| 47 | } | 47 | } |
| 48 | 48 | ||
| 49 | function do_main() { | 49 | function do_main() { |
| 50 | - $this->oPage->setBreadcrumbDetails(_("Your Preferences")); | ||
| 51 | - $this->oPage->title = _("Dashboard"); | 50 | + $this->oPage->setBreadcrumbDetails(_kt("Your Preferences")); |
| 51 | + $this->oPage->title = _kt("Dashboard"); | ||
| 52 | 52 | ||
| 53 | 53 | ||
| 54 | $oUser =& $this->oUser; | 54 | $oUser =& $this->oUser; |
| @@ -56,10 +56,10 @@ class PreferencesDispatcher extends KTStandardDispatcher { | @@ -56,10 +56,10 @@ class PreferencesDispatcher extends KTStandardDispatcher { | ||
| 56 | $aOptions = array('autocomplete' => false); | 56 | $aOptions = array('autocomplete' => false); |
| 57 | 57 | ||
| 58 | $edit_fields = array(); | 58 | $edit_fields = array(); |
| 59 | - $edit_fields[] = new KTStringWidget(_('Name'),_('Your full name. This is shown in reports and listings. e.g. <strong>John Smith</strong>'), 'name', $oUser->getName(), $this->oPage, true, null, null, $aOptions); | ||
| 60 | - $edit_fields[] = new KTStringWidget(_('Email Address'),_('Your email address. Notifications and alerts are mailed to this address if <strong>email notifications</strong> is set below. e.g. <strong>jsmith@acme.com</strong>'), 'email_address', $oUser->getEmail(), $this->oPage, false, null, null, $aOptions); | ||
| 61 | - $edit_fields[] = new KTCheckboxWidget(_('Email Notifications'),_('If this is specified then the you will receive certain notifications. If it is not set, then you will only see notifications on the <strong>Dashboard</strong>'), 'email_notifications', $oUser->getEmailNotification(), $this->oPage, false, null, null, $aOptions); | ||
| 62 | - $edit_fields[] = new KTStringWidget(_('Mobile Number'), _('Your mobile phone number. If the system is configured to send notifications to cellphones, then this number will be sent an SMS with notifications. e.g. <strong>+27 99 999 9999</strong>'), 'mobile_number', $oUser->getMobile(), $this->oPage, false, null, null, $aOptions); | 59 | + $edit_fields[] = new KTStringWidget(_kt('Name'), _kt('Your full name. This is shown in reports and listings. e.g. <strong>John Smith</strong>'), 'name', $oUser->getName(), $this->oPage, true, null, null, $aOptions); |
| 60 | + $edit_fields[] = new KTStringWidget(_kt('Email Address'), _kt('Your email address. Notifications and alerts are mailed to this address if <strong>email notifications</strong> is set below. e.g. <strong>jsmith@acme.com</strong>'), 'email_address', $oUser->getEmail(), $this->oPage, false, null, null, $aOptions); | ||
| 61 | + $edit_fields[] = new KTCheckboxWidget(_kt('Email Notifications'), _kt('If this is specified then the you will receive certain notifications. If it is not set, then you will only see notifications on the <strong>Dashboard</strong>'), 'email_notifications', $oUser->getEmailNotification(), $this->oPage, false, null, null, $aOptions); | ||
| 62 | + $edit_fields[] = new KTStringWidget(_kt('Mobile Number'), _kt('Your mobile phone number. If the system is configured to send notifications to cellphones, then this number will be sent an SMS with notifications. e.g. <strong>+27 99 999 9999</strong>'), 'mobile_number', $oUser->getMobile(), $this->oPage, false, null, null, $aOptions); | ||
| 63 | 63 | ||
| 64 | $oTemplating =& KTTemplating::getSingleton(); | 64 | $oTemplating =& KTTemplating::getSingleton(); |
| 65 | $oTemplate = $oTemplating->loadTemplate("ktcore/principals/preferences"); | 65 | $oTemplate = $oTemplating->loadTemplate("ktcore/principals/preferences"); |
| @@ -77,8 +77,8 @@ class PreferencesDispatcher extends KTStandardDispatcher { | @@ -77,8 +77,8 @@ class PreferencesDispatcher extends KTStandardDispatcher { | ||
| 77 | } | 77 | } |
| 78 | 78 | ||
| 79 | function do_setPassword() { | 79 | function do_setPassword() { |
| 80 | - $this->oPage->setBreadcrumbDetails(_("Your Password")); | ||
| 81 | - $this->oPage->title = _("Dashboard"); | 80 | + $this->oPage->setBreadcrumbDetails(_kt("Your Password")); |
| 81 | + $this->oPage->title = _kt("Dashboard"); | ||
| 82 | 82 | ||
| 83 | 83 | ||
| 84 | $oUser =& $this->oUser; | 84 | $oUser =& $this->oUser; |
| @@ -86,8 +86,8 @@ class PreferencesDispatcher extends KTStandardDispatcher { | @@ -86,8 +86,8 @@ class PreferencesDispatcher extends KTStandardDispatcher { | ||
| 86 | $aOptions = array('autocomplete' => false); | 86 | $aOptions = array('autocomplete' => false); |
| 87 | 87 | ||
| 88 | $edit_fields = array(); | 88 | $edit_fields = array(); |
| 89 | - $edit_fields[] = new KTPasswordWidget(_('Password'), _('Specify your new password.'), 'password', null, $this->oPage, true, null, null, $aOptions); | ||
| 90 | - $edit_fields[] = new KTPasswordWidget(_('Confirm Password'), _('Confirm the password specified above.'), 'confirm_password', null, $this->oPage, true, null, null, $aOptions); | 89 | + $edit_fields[] = new KTPasswordWidget(_kt('Password'), _kt('Specify your new password.'), 'password', null, $this->oPage, true, null, null, $aOptions); |
| 90 | + $edit_fields[] = new KTPasswordWidget(_kt('Confirm Password'), _kt('Confirm the password specified above.'), 'confirm_password', null, $this->oPage, true, null, null, $aOptions); | ||
| 91 | 91 | ||
| 92 | 92 | ||
| 93 | $oTemplating =& KTTemplating::getSingleton(); | 93 | $oTemplating =& KTTemplating::getSingleton(); |
| @@ -107,16 +107,16 @@ class PreferencesDispatcher extends KTStandardDispatcher { | @@ -107,16 +107,16 @@ class PreferencesDispatcher extends KTStandardDispatcher { | ||
| 107 | $confirm_password = KTUtil::arrayGet($_REQUEST, 'confirm_password'); | 107 | $confirm_password = KTUtil::arrayGet($_REQUEST, 'confirm_password'); |
| 108 | 108 | ||
| 109 | if (empty($password)) { | 109 | if (empty($password)) { |
| 110 | - $this->errorRedirectTo("setPassword", _("You must specify a password.")); | 110 | + $this->errorRedirectTo("setPassword", _kt("You must specify a password.")); |
| 111 | } else if ($password !== $confirm_password) { | 111 | } else if ($password !== $confirm_password) { |
| 112 | - $this->errorRedirectTo("setPassword", _("The passwords you specified do not match.")); | 112 | + $this->errorRedirectTo("setPassword", _kt("The passwords you specified do not match.")); |
| 113 | } | 113 | } |
| 114 | 114 | ||
| 115 | $KTConfig =& KTConfig::getSingleton(); | 115 | $KTConfig =& KTConfig::getSingleton(); |
| 116 | $minLength = ((int) $KTConfig->get('user_prefs/passwordLength', 6)); | 116 | $minLength = ((int) $KTConfig->get('user_prefs/passwordLength', 6)); |
| 117 | 117 | ||
| 118 | if (strlen($password) < $minLength) { | 118 | if (strlen($password) < $minLength) { |
| 119 | - $this->errorRedirectTo("setPassword", sprintf(_("Your password is too short - passwords must be at least %d characters long."), $minLength)); | 119 | + $this->errorRedirectTo("setPassword", sprintf(_kt("Your password is too short - passwords must be at least %d characters long."), $minLength)); |
| 120 | } | 120 | } |
| 121 | 121 | ||
| 122 | // FIXME more validation would be useful. | 122 | // FIXME more validation would be useful. |
| @@ -134,11 +134,11 @@ class PreferencesDispatcher extends KTStandardDispatcher { | @@ -134,11 +134,11 @@ class PreferencesDispatcher extends KTStandardDispatcher { | ||
| 134 | 134 | ||
| 135 | 135 | ||
| 136 | if (PEAR::isError($res) || ($res == false)) { | 136 | if (PEAR::isError($res) || ($res == false)) { |
| 137 | - $this->errorRedirectoToMain(_('Failed to update user.')); | 137 | + $this->errorRedirectoToMain(_kt('Failed to update user.')); |
| 138 | } | 138 | } |
| 139 | 139 | ||
| 140 | $this->commitTransaction(); | 140 | $this->commitTransaction(); |
| 141 | - $this->successRedirectToMain(_('Your password has been changed.')); | 141 | + $this->successRedirectToMain(_kt('Your password has been changed.')); |
| 142 | 142 | ||
| 143 | } | 143 | } |
| 144 | 144 | ||
| @@ -151,7 +151,7 @@ class PreferencesDispatcher extends KTStandardDispatcher { | @@ -151,7 +151,7 @@ class PreferencesDispatcher extends KTStandardDispatcher { | ||
| 151 | $oUser =& $this->oUser; | 151 | $oUser =& $this->oUser; |
| 152 | 152 | ||
| 153 | $name = $this->oValidator->validateString(KTUtil::arrayGet($_REQUEST, 'name'), | 153 | $name = $this->oValidator->validateString(KTUtil::arrayGet($_REQUEST, 'name'), |
| 154 | - KTUtil::meldOptions($aErrorOptions, array('message' => _('You must specify your name.')))); | 154 | + KTUtil::meldOptions($aErrorOptions, array('message' => _kt('You must specify your name.')))); |
| 155 | 155 | ||
| 156 | $email_address = $this->oValidator->validateEmailAddress(KTUtil::arrayGet($_REQUEST, 'email_address'), | 156 | $email_address = $this->oValidator->validateEmailAddress(KTUtil::arrayGet($_REQUEST, 'email_address'), |
| 157 | $aErrorOptions); | 157 | $aErrorOptions); |
| @@ -176,11 +176,11 @@ class PreferencesDispatcher extends KTStandardDispatcher { | @@ -176,11 +176,11 @@ class PreferencesDispatcher extends KTStandardDispatcher { | ||
| 176 | $res = $oUser->doLimitedUpdate(); // ignores a fix blacklist of items. | 176 | $res = $oUser->doLimitedUpdate(); // ignores a fix blacklist of items. |
| 177 | 177 | ||
| 178 | if (PEAR::isError($res) || ($res == false)) { | 178 | if (PEAR::isError($res) || ($res == false)) { |
| 179 | - $this->errorRedirectoToMain(_('Failed to update your details.')); | 179 | + $this->errorRedirectoToMain(_kt('Failed to update your details.')); |
| 180 | } | 180 | } |
| 181 | 181 | ||
| 182 | $this->commitTransaction(); | 182 | $this->commitTransaction(); |
| 183 | - $this->successRedirectToMain(_('Your details have been updated.')); | 183 | + $this->successRedirectToMain(_kt('Your details have been updated.')); |
| 184 | 184 | ||
| 185 | } | 185 | } |
| 186 | 186 |
search/booleanSearch.php
| @@ -45,14 +45,14 @@ class BooleanSearchDispatcher extends KTStandardDispatcher { | @@ -45,14 +45,14 @@ class BooleanSearchDispatcher extends KTStandardDispatcher { | ||
| 45 | 45 | ||
| 46 | function BooleanSearchDispatcher() { | 46 | function BooleanSearchDispatcher() { |
| 47 | $this->aBreadcrumbs = array( | 47 | $this->aBreadcrumbs = array( |
| 48 | - array('action' => 'browse', 'name' => _('Browse')), | 48 | + array('action' => 'browse', 'name' => _kt('Browse')), |
| 49 | ); | 49 | ); |
| 50 | return parent::KTStandardDispatcher(); | 50 | return parent::KTStandardDispatcher(); |
| 51 | } | 51 | } |
| 52 | 52 | ||
| 53 | function do_main() { | 53 | function do_main() { |
| 54 | - $this->aBreadcrumbs[] = array('url' => $_SERVER['PHP_SELF'], 'name' => _("Advanced Search")); | ||
| 55 | - $this->oPage->setBreadcrumbDetails(_('defining search')); | 54 | + $this->aBreadcrumbs[] = array('url' => $_SERVER['PHP_SELF'], 'name' => _kt("Advanced Search")); |
| 55 | + $this->oPage->setBreadcrumbDetails(_kt('defining search')); | ||
| 56 | $oTemplating =& KTTemplating::getSingleton(); | 56 | $oTemplating =& KTTemplating::getSingleton(); |
| 57 | $oTemplate = $oTemplating->loadTemplate("ktcore/boolean_search"); | 57 | $oTemplate = $oTemplating->loadTemplate("ktcore/boolean_search"); |
| 58 | 58 | ||
| @@ -88,7 +88,7 @@ class BooleanSearchDispatcher extends KTStandardDispatcher { | @@ -88,7 +88,7 @@ class BooleanSearchDispatcher extends KTStandardDispatcher { | ||
| 88 | } | 88 | } |
| 89 | 89 | ||
| 90 | if (empty($datavars)) { | 90 | if (empty($datavars)) { |
| 91 | - $this->errorRedirectToMain(_('You need to have at least 1 condition.')); | 91 | + $this->errorRedirectToMain(_kt('You need to have at least 1 condition.')); |
| 92 | } | 92 | } |
| 93 | 93 | ||
| 94 | $res = $this->handleCriteriaSet($datavars, KTUtil::arrayGet($_REQUEST, 'fStartIndex', 1), $title); | 94 | $res = $this->handleCriteriaSet($datavars, KTUtil::arrayGet($_REQUEST, 'fStartIndex', 1), $title); |
| @@ -99,11 +99,11 @@ class BooleanSearchDispatcher extends KTStandardDispatcher { | @@ -99,11 +99,11 @@ class BooleanSearchDispatcher extends KTStandardDispatcher { | ||
| 99 | function handleCriteriaSet($aCriteriaSet, $iStartIndex, $sTitle=null) { | 99 | function handleCriteriaSet($aCriteriaSet, $iStartIndex, $sTitle=null) { |
| 100 | 100 | ||
| 101 | if ($sTitle == null) { | 101 | if ($sTitle == null) { |
| 102 | - $this->aBreadcrumbs[] = array('url' => $_SERVER['PHP_SELF'], 'name' => _('Advanced Search')); | ||
| 103 | - $sTitle = _('Search Results'); | 102 | + $this->aBreadcrumbs[] = array('url' => $_SERVER['PHP_SELF'], 'name' => _kt('Advanced Search')); |
| 103 | + $sTitle = _kt('Search Results'); | ||
| 104 | } else { | 104 | } else { |
| 105 | - $this->aBreadcrumbs[] = array('url' => $_SERVER['PHP_SELF'], 'name' => _('Saved Search')); | ||
| 106 | - $this->oPage->setTitle(_('Saved Search: ') . $sTitle); | 105 | + $this->aBreadcrumbs[] = array('url' => $_SERVER['PHP_SELF'], 'name' => _kt('Saved Search')); |
| 106 | + $this->oPage->setTitle(_kt('Saved Search: ') . $sTitle); | ||
| 107 | } | 107 | } |
| 108 | $this->oPage->setBreadcrumbDetails($sTitle); | 108 | $this->oPage->setBreadcrumbDetails($sTitle); |
| 109 | 109 | ||
| @@ -115,10 +115,10 @@ class BooleanSearchDispatcher extends KTStandardDispatcher { | @@ -115,10 +115,10 @@ class BooleanSearchDispatcher extends KTStandardDispatcher { | ||
| 115 | $t->setOptions(array('documenturl' => $GLOBALS['KTRootUrl'] . '/view.php')); | 115 | $t->setOptions(array('documenturl' => $GLOBALS['KTRootUrl'] . '/view.php')); |
| 116 | $collection->addColumn($t); | 116 | $collection->addColumn($t); |
| 117 | $collection->addColumn(new DownloadColumn('','download')); | 117 | $collection->addColumn(new DownloadColumn('','download')); |
| 118 | - $collection->addColumn(new DateColumn(_("Created"),"created", "getCreatedDateTime")); | ||
| 119 | - $collection->addColumn(new DateColumn(_("Last Modified"),"modified", "getLastModifiedDate")); | ||
| 120 | - $collection->addColumn(new UserColumn(_('Creator'),'creator_id','getCreatorID')); | ||
| 121 | - $collection->addColumn(new WorkflowColumn(_('Workflow State'),'workflow_state')); | 118 | + $collection->addColumn(new DateColumn(_kt("Created"),"created", "getCreatedDateTime")); |
| 119 | + $collection->addColumn(new DateColumn(_kt("Last Modified"),"modified", "getLastModifiedDate")); | ||
| 120 | + $collection->addColumn(new UserColumn(_kt('Creator'),'creator_id','getCreatorID')); | ||
| 121 | + $collection->addColumn(new WorkflowColumn(_kt('Workflow State'),'workflow_state')); | ||
| 122 | 122 | ||
| 123 | $searchable_text = KTUtil::arrayGet($_REQUEST, "fSearchableText"); | 123 | $searchable_text = KTUtil::arrayGet($_REQUEST, "fSearchableText"); |
| 124 | 124 |
search/simpleSearch.php
| @@ -126,8 +126,8 @@ class SimpleSearchDispatcher extends KTStandardDispatcher { | @@ -126,8 +126,8 @@ class SimpleSearchDispatcher extends KTStandardDispatcher { | ||
| 126 | 126 | ||
| 127 | function SimpleSearchDispatcher() { | 127 | function SimpleSearchDispatcher() { |
| 128 | $this->aBreadcrumbs = array( | 128 | $this->aBreadcrumbs = array( |
| 129 | - array('action' => 'browse', 'name' => _('Browse')), | ||
| 130 | - array('name' => _('Simple Search')) | 129 | + array('action' => 'browse', 'name' => _kt('Browse')), |
| 130 | + array('name' => _kt('Simple Search')) | ||
| 131 | ); | 131 | ); |
| 132 | return parent::KTStandardDispatcher(); | 132 | return parent::KTStandardDispatcher(); |
| 133 | } | 133 | } |
| @@ -135,7 +135,7 @@ class SimpleSearchDispatcher extends KTStandardDispatcher { | @@ -135,7 +135,7 @@ class SimpleSearchDispatcher extends KTStandardDispatcher { | ||
| 135 | 135 | ||
| 136 | function do_main() { | 136 | function do_main() { |
| 137 | $aErrorOptions = array( | 137 | $aErrorOptions = array( |
| 138 | - "message" => _("Please provide a search term"), | 138 | + "message" => _kt("Please provide a search term"), |
| 139 | ); | 139 | ); |
| 140 | $searchable_text = KTUtil::arrayGet($_REQUEST, "fSearchableText"); | 140 | $searchable_text = KTUtil::arrayGet($_REQUEST, "fSearchableText"); |
| 141 | $this->oValidator->notEmpty($searchable_text, $aErrorOptions); | 141 | $this->oValidator->notEmpty($searchable_text, $aErrorOptions); |
| @@ -153,10 +153,10 @@ class SimpleSearchDispatcher extends KTStandardDispatcher { | @@ -153,10 +153,10 @@ class SimpleSearchDispatcher extends KTStandardDispatcher { | ||
| 153 | $t->setOptions(array('documenturl' => $GLOBALS['KTRootUrl'] . '/view.php')); | 153 | $t->setOptions(array('documenturl' => $GLOBALS['KTRootUrl'] . '/view.php')); |
| 154 | $collection->addColumn($t); | 154 | $collection->addColumn($t); |
| 155 | $collection->addColumn(new DownloadColumn('','download')); | 155 | $collection->addColumn(new DownloadColumn('','download')); |
| 156 | - $collection->addColumn(new DateColumn(_("Created"),"created", "getCreatedDateTime")); | ||
| 157 | - $collection->addColumn(new DateColumn(_("Last Modified"),"modified", "getLastModifiedDate")); | ||
| 158 | - $collection->addColumn(new UserColumn(_('Creator'),'creator_id','getCreatorID')); | ||
| 159 | - $collection->addColumn(new WorkflowColumn(_('Workflow State'),'workflow_state')); | 156 | + $collection->addColumn(new DateColumn(_kt("Created"),"created", "getCreatedDateTime")); |
| 157 | + $collection->addColumn(new DateColumn(_kt("Last Modified"),"modified", "getLastModifiedDate")); | ||
| 158 | + $collection->addColumn(new UserColumn(_kt('Creator'),'creator_id','getCreatorID')); | ||
| 159 | + $collection->addColumn(new WorkflowColumn(_kt('Workflow State'),'workflow_state')); | ||
| 160 | 160 | ||
| 161 | $batchPage = (int) KTUtil::arrayGet($_REQUEST, "page", 0); | 161 | $batchPage = (int) KTUtil::arrayGet($_REQUEST, "page", 0); |
| 162 | $batchSize = 20; | 162 | $batchSize = 20; |
view.php
| @@ -58,7 +58,7 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { | @@ -58,7 +58,7 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { | ||
| 58 | 58 | ||
| 59 | function ViewDocumentDispatcher() { | 59 | function ViewDocumentDispatcher() { |
| 60 | $this->aBreadcrumbs = array( | 60 | $this->aBreadcrumbs = array( |
| 61 | - array('action' => 'browse', 'name' => _('Browse')), | 61 | + array('action' => 'browse', 'name' => _kt('Browse')), |
| 62 | ); | 62 | ); |
| 63 | 63 | ||
| 64 | parent::KTStandardDispatcher(); | 64 | parent::KTStandardDispatcher(); |
| @@ -75,7 +75,7 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { | @@ -75,7 +75,7 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { | ||
| 75 | // FIXME identify the current location somehow. | 75 | // FIXME identify the current location somehow. |
| 76 | function addPortlets($currentaction = null) { | 76 | function addPortlets($currentaction = null) { |
| 77 | $actions = KTDocumentActionUtil::getDocumentActionsForDocument($this->oDocument, $this->oUser); | 77 | $actions = KTDocumentActionUtil::getDocumentActionsForDocument($this->oDocument, $this->oUser); |
| 78 | - $oPortlet = new KTActionPortlet(_("Document Actions")); | 78 | + $oPortlet = new KTActionPortlet(_kt("Document Actions")); |
| 79 | $oPortlet->setActions($actions, $currentaction); | 79 | $oPortlet->setActions($actions, $currentaction); |
| 80 | $this->oPage->addPortlet($oPortlet); | 80 | $this->oPage->addPortlet($oPortlet); |
| 81 | } | 81 | } |
| @@ -104,21 +104,21 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { | @@ -104,21 +104,21 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { | ||
| 104 | 104 | ||
| 105 | if (!KTBrowseUtil::inAdminMode($this->oUser, $oDocument->getFolderId())) { | 105 | if (!KTBrowseUtil::inAdminMode($this->oUser, $oDocument->getFolderId())) { |
| 106 | if ($oDocument->getStatusID() == ARCHIVED) { | 106 | if ($oDocument->getStatusID() == ARCHIVED) { |
| 107 | - $this->oPage->addError(_('This document has been archived. Please contact the system administrator to have it restored if it is still needed.')); | 107 | + $this->oPage->addError(_kt('This document has been archived. Please contact the system administrator to have it restored if it is still needed.')); |
| 108 | return $this->do_error(); | 108 | return $this->do_error(); |
| 109 | } else if ($oDocument->getStatusID() == DELETED) { | 109 | } else if ($oDocument->getStatusID() == DELETED) { |
| 110 | - $this->oPage->addError(_('This document has been deleted. Please contact the system administrator to have it restored if it is still needed.')); | 110 | + $this->oPage->addError(_kt('This document has been deleted. Please contact the system administrator to have it restored if it is still needed.')); |
| 111 | return $this->do_error(); | 111 | return $this->do_error(); |
| 112 | } else if (!Permission::userHasDocumentReadPermission($oDocument)) { | 112 | } else if (!Permission::userHasDocumentReadPermission($oDocument)) { |
| 113 | - $this->oPage->addError(_('You are not allowed to view this document')); | 113 | + $this->oPage->addError(_kt('You are not allowed to view this document')); |
| 114 | return $this->do_error(); | 114 | return $this->do_error(); |
| 115 | } | 115 | } |
| 116 | } | 116 | } |
| 117 | 117 | ||
| 118 | if ($oDocument->getStatusID() == ARCHIVED) { | 118 | if ($oDocument->getStatusID() == ARCHIVED) { |
| 119 | - $this->oPage->addError(_('This document has been archived.')); | 119 | + $this->oPage->addError(_kt('This document has been archived.')); |
| 120 | } else if ($oDocument->getStatusID() == DELETED) { | 120 | } else if ($oDocument->getStatusID() == DELETED) { |
| 121 | - $this->oPage->addError(_('This document has been deleted.')); | 121 | + $this->oPage->addError(_kt('This document has been deleted.')); |
| 122 | } | 122 | } |
| 123 | 123 | ||
| 124 | $this->oPage->setSecondaryTitle($oDocument->getName()); | 124 | $this->oPage->setSecondaryTitle($oDocument->getName()); |
| @@ -130,7 +130,7 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { | @@ -130,7 +130,7 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { | ||
| 130 | 130 | ||
| 131 | $this->oDocument =& $oDocument; | 131 | $this->oDocument =& $oDocument; |
| 132 | $this->aBreadcrumbs = array_merge($this->aBreadcrumbs, KTBrowseUtil::breadcrumbsForDocument($oDocument, $aOptions)); | 132 | $this->aBreadcrumbs = array_merge($this->aBreadcrumbs, KTBrowseUtil::breadcrumbsForDocument($oDocument, $aOptions)); |
| 133 | - $this->oPage->setBreadcrumbDetails(_("document details")); | 133 | + $this->oPage->setBreadcrumbDetails(_kt("document details")); |
| 134 | $this->addPortlets("Document Details"); | 134 | $this->addPortlets("Document Details"); |
| 135 | 135 | ||
| 136 | $document_data["document"] = $oDocument; | 136 | $document_data["document"] = $oDocument; |
| @@ -222,7 +222,7 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { | @@ -222,7 +222,7 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { | ||
| 222 | "folderaction" => "browse", | 222 | "folderaction" => "browse", |
| 223 | ); | 223 | ); |
| 224 | $this->aBreadcrumbs = array_merge($this->aBreadcrumbs, KTBrowseUtil::breadcrumbsForDocument($oDocument, $aOptions)); | 224 | $this->aBreadcrumbs = array_merge($this->aBreadcrumbs, KTBrowseUtil::breadcrumbsForDocument($oDocument, $aOptions)); |
| 225 | - $this->oPage->setBreadcrumbDetails(_("history")); | 225 | + $this->oPage->setBreadcrumbDetails(_kt("history")); |
| 226 | $this->addPortlets("History"); | 226 | $this->addPortlets("History"); |
| 227 | 227 | ||
| 228 | $aTransactions = array(); | 228 | $aTransactions = array(); |
| @@ -244,7 +244,7 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { | @@ -244,7 +244,7 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { | ||
| 244 | 244 | ||
| 245 | 245 | ||
| 246 | // render pass. | 246 | // render pass. |
| 247 | - $this->oPage->title = _("Document History"); | 247 | + $this->oPage->title = _kt("Document History"); |
| 248 | $oTemplating =& KTTemplating::getSingleton(); | 248 | $oTemplating =& KTTemplating::getSingleton(); |
| 249 | $oTemplate = $oTemplating->loadTemplate("kt3/view_document_history"); | 249 | $oTemplate = $oTemplating->loadTemplate("kt3/view_document_history"); |
| 250 | $aTemplateData = array( | 250 | $aTemplateData = array( |
| @@ -281,7 +281,7 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { | @@ -281,7 +281,7 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { | ||
| 281 | "folderaction" => "browse", | 281 | "folderaction" => "browse", |
| 282 | ); | 282 | ); |
| 283 | $this->aBreadcrumbs = array_merge($this->aBreadcrumbs, KTBrowseUtil::breadcrumbsForDocument($oDocument, $aOptions)); | 283 | $this->aBreadcrumbs = array_merge($this->aBreadcrumbs, KTBrowseUtil::breadcrumbsForDocument($oDocument, $aOptions)); |
| 284 | - $this->oPage->setBreadcrumbDetails(_("history")); | 284 | + $this->oPage->setBreadcrumbDetails(_kt("history")); |
| 285 | $this->addPortlets("History"); | 285 | $this->addPortlets("History"); |
| 286 | 286 | ||
| 287 | $aMetadataVersions = KTDocumentMetadataVersion::getByDocument($oDocument); | 287 | $aMetadataVersions = KTDocumentMetadataVersion::getByDocument($oDocument); |
| @@ -291,7 +291,7 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { | @@ -291,7 +291,7 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { | ||
| 291 | } | 291 | } |
| 292 | 292 | ||
| 293 | // render pass. | 293 | // render pass. |
| 294 | - $this->oPage->title = _("Document History"); | 294 | + $this->oPage->title = _kt("Document History"); |
| 295 | $oTemplating =& KTTemplating::getSingleton(); | 295 | $oTemplating =& KTTemplating::getSingleton(); |
| 296 | $oTemplate = $oTemplating->loadTemplate("kt3/document/metadata_history"); | 296 | $oTemplate = $oTemplating->loadTemplate("kt3/document/metadata_history"); |
| 297 | 297 | ||
| @@ -334,7 +334,7 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { | @@ -334,7 +334,7 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { | ||
| 334 | } | 334 | } |
| 335 | if (!Permission::userHasDocumentReadPermission($oDocument)) { | 335 | if (!Permission::userHasDocumentReadPermission($oDocument)) { |
| 336 | // FIXME inconsistent. | 336 | // FIXME inconsistent. |
| 337 | - $this->oPage->addError(_('You are not allowed to view this document')); | 337 | + $this->oPage->addError(_kt('You are not allowed to view this document')); |
| 338 | return $this->do_error(); | 338 | return $this->do_error(); |
| 339 | } | 339 | } |
| 340 | $this->oDocument =& $oDocument; | 340 | $this->oDocument =& $oDocument; |
| @@ -344,7 +344,7 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { | @@ -344,7 +344,7 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { | ||
| 344 | "folderaction" => "browse", | 344 | "folderaction" => "browse", |
| 345 | ); | 345 | ); |
| 346 | $this->aBreadcrumbs = array_merge($this->aBreadcrumbs, KTBrowseUtil::breadcrumbsForDocument($oDocument, $aOptions)); | 346 | $this->aBreadcrumbs = array_merge($this->aBreadcrumbs, KTBrowseUtil::breadcrumbsForDocument($oDocument, $aOptions)); |
| 347 | - $this->oPage->setBreadcrumbDetails(_("compare versions")); | 347 | + $this->oPage->setBreadcrumbDetails(_kt("compare versions")); |
| 348 | 348 | ||
| 349 | $comparison_version = KTUtil::arrayGet($_REQUEST, 'fComparisonVersion'); | 349 | $comparison_version = KTUtil::arrayGet($_REQUEST, 'fComparisonVersion'); |
| 350 | if ($comparison_version=== null) { | 350 | if ($comparison_version=== null) { |
| @@ -354,7 +354,7 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { | @@ -354,7 +354,7 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { | ||
| 354 | 354 | ||
| 355 | $oComparison =& Document::get($oDocument->getId(), $comparison_version); | 355 | $oComparison =& Document::get($oDocument->getId(), $comparison_version); |
| 356 | if (PEAR::isError($oComparison)) { | 356 | if (PEAR::isError($oComparison)) { |
| 357 | - $this->errorRedirectToMain(_('Invalid document to compare against.')); | 357 | + $this->errorRedirectToMain(_kt('Invalid document to compare against.')); |
| 358 | } | 358 | } |
| 359 | $comparison_data = array(); | 359 | $comparison_data = array(); |
| 360 | $comparison_data['document_id'] = $oComparison->getId(); | 360 | $comparison_data['document_id'] = $oComparison->getId(); |
| @@ -471,7 +471,7 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { | @@ -471,7 +471,7 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { | ||
| 471 | } | 471 | } |
| 472 | if (!Permission::userHasDocumentReadPermission($oDocument)) { | 472 | if (!Permission::userHasDocumentReadPermission($oDocument)) { |
| 473 | // FIXME inconsistent. | 473 | // FIXME inconsistent. |
| 474 | - $this->oPage->addError(_('You are not allowed to view this document')); | 474 | + $this->oPage->addError(_kt('You are not allowed to view this document')); |
| 475 | return $this->do_error(); | 475 | return $this->do_error(); |
| 476 | } | 476 | } |
| 477 | $this->oDocument =& $oDocument; | 477 | $this->oDocument =& $oDocument; |
| @@ -481,7 +481,7 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { | @@ -481,7 +481,7 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { | ||
| 481 | "folderaction" => "browse", | 481 | "folderaction" => "browse", |
| 482 | ); | 482 | ); |
| 483 | $this->aBreadcrumbs = array_merge($this->aBreadcrumbs, KTBrowseUtil::breadcrumbsForDocument($oDocument, $aOptions)); | 483 | $this->aBreadcrumbs = array_merge($this->aBreadcrumbs, KTBrowseUtil::breadcrumbsForDocument($oDocument, $aOptions)); |
| 484 | - $this->oPage->setBreadcrumbDetails(_("Select Document Version to compare against")); | 484 | + $this->oPage->setBreadcrumbDetails(_kt("Select Document Version to compare against")); |
| 485 | 485 | ||
| 486 | $aMetadataVersions = KTDocumentMetadataVersion::getByDocument($oDocument); | 486 | $aMetadataVersions = KTDocumentMetadataVersion::getByDocument($oDocument); |
| 487 | $aVersions = array(); | 487 | $aVersions = array(); |
| @@ -503,7 +503,7 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { | @@ -503,7 +503,7 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { | ||
| 503 | 503 | ||
| 504 | function getUserForId($iUserId) { | 504 | function getUserForId($iUserId) { |
| 505 | $u = User::get($iUserId); | 505 | $u = User::get($iUserId); |
| 506 | - if (PEAR::isError($u) || ($u == false)) { return _('User no longer exists'); } | 506 | + if (PEAR::isError($u) || ($u == false)) { return _kt('User no longer exists'); } |
| 507 | return $u->getName(); | 507 | return $u->getName(); |
| 508 | } | 508 | } |
| 509 | } | 509 | } |