Commit bcc0ba774315f27a348cfb3dd781f010079318c2

Authored by conradverm
1 parent 444cef15

KTS-673

"The search algorithm needs some work"
Updated. Internationalisation

Committed By: Conrad Vermeulen
Reviewed By: Kevin Fourie

git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@7289 c91229c3-7414-0410-bfa2-8a42b809f60b
search2/indexing/bin/diagnose.php
@@ -9,14 +9,14 @@ @@ -9,14 +9,14 @@
9 require_once(realpath('../../../config/dmsDefaults.php')); 9 require_once(realpath('../../../config/dmsDefaults.php'));
10 require_once('indexing/indexerCore.inc.php'); 10 require_once('indexing/indexerCore.inc.php');
11 11
12 -print "Diagnosing the text extractors...\n"; 12 +print _kt("Diagnosing the text extractors") . "...\n";
13 13
14 $indexer = Indexer::get(); 14 $indexer = Indexer::get();
15 -$diagnoses = $indexer->diagnose(); 15 +$diagnoses = $indexer->diagnoseExtractors();
16 16
17 if (count($diagnoses) == 0) 17 if (count($diagnoses) == 0)
18 { 18 {
19 - print "There don't appear to be any problems.\n"; 19 + print _kt("There don't appear to be any problems.") ." \n";
20 } 20 }
21 else 21 else
22 { 22 {
@@ -25,11 +25,11 @@ else @@ -25,11 +25,11 @@ else
25 $name = $value['name']; 25 $name = $value['name'];
26 $diagnosis = $value['diagnosis']; 26 $diagnosis = $value['diagnosis'];
27 27
28 - print "\nExtractor: $name ($key)\n"; 28 + print "\n" . _kt('Extractor:') ." $name ($key)\n";
29 print "* $diagnosis\n"; 29 print "* $diagnosis\n";
30 } 30 }
31 } 31 }
32 32
33 -print "\nDone.\n"; 33 +print "\n" . _kt("Done.") . "\n";
34 34
35 ?> 35 ?>
36 \ No newline at end of file 36 \ No newline at end of file
search2/indexing/bin/optimise.php
@@ -9,11 +9,11 @@ @@ -9,11 +9,11 @@
9 require_once(realpath('../../../config/dmsDefaults.php')); 9 require_once(realpath('../../../config/dmsDefaults.php'));
10 require_once('indexing/indexerCore.inc.php'); 10 require_once('indexing/indexerCore.inc.php');
11 11
12 -print "Optimising Lucene index...\n"; 12 +print _kt("Optimising Lucene index") . "...\n";
13 13
14 $indexer = Indexer::get(); 14 $indexer = Indexer::get();
15 $indexer->optimise(); 15 $indexer->optimise();
16 16
17 -print "Done.\n"; 17 +print _kt("Done.") . "\n";
18 18
19 ?> 19 ?>
20 \ No newline at end of file 20 \ No newline at end of file
search2/indexing/bin/recreateIndex.php
@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
10 */ 10 */
11 11
12 session_start(); 12 session_start();
13 -print "Recreate Lucene index...\n"; 13 +print _kt("Recreate Lucene index") . "...\n";
14 14
15 $sure=false; 15 $sure=false;
16 $indexall = false; 16 $indexall = false;
@@ -34,7 +34,7 @@ if ($argc > 0) @@ -34,7 +34,7 @@ if ($argc > 0)
34 } 34 }
35 if (!$sure) 35 if (!$sure)
36 { 36 {
37 - print "* Are you sure you want to do this? Add 'positive' as a parameter to continue.\n"; 37 + print "* " . _kt("Are you sure you want to do this? Add 'positive' as a parameter to continue.") . "\n";
38 exit; 38 exit;
39 } 39 }
40 40
@@ -46,7 +46,7 @@ $indexer = $config->get('indexer/coreClass'); @@ -46,7 +46,7 @@ $indexer = $config->get('indexer/coreClass');
46 46
47 if ($indexer != 'PHPLuceneIndexer') 47 if ($indexer != 'PHPLuceneIndexer')
48 { 48 {
49 - print "This script only works with the PHPLuceneIndexer.\n"; 49 + print _kt("This script only works with the PHPLuceneIndexer.") . "\n";
50 exit; 50 exit;
51 } 51 }
52 52
@@ -56,15 +56,15 @@ require_once('indexing/indexers/PHPLuceneIndexer.inc.php'); @@ -56,15 +56,15 @@ require_once('indexing/indexers/PHPLuceneIndexer.inc.php');
56 56
57 57
58 PHPLuceneIndexer::createIndex(); 58 PHPLuceneIndexer::createIndex();
59 -print "\n* The lucene index has been recreated.\n"; 59 +print "\n* " . _kt("The lucene index has been recreated.") . "\n";
60 60
61 if ($indexall) 61 if ($indexall)
62 { 62 {
63 PHPLuceneIndexer::indexAll(); 63 PHPLuceneIndexer::indexAll();
64 - print "\n* All documents are scheduled for indexing.\n"; 64 + print "\n* " . _kt("All documents are scheduled for indexing.") . "\n";
65 } 65 }
66 66
67 -print "Done.\n"; 67 +print _kt("Done.") . "\n";
68 68
69 69
70 ?> 70 ?>
71 \ No newline at end of file 71 \ No newline at end of file
search2/indexing/bin/registerTypes.php
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
12 */ 12 */
13 13
14 session_start(); 14 session_start();
15 -print "Registering Extractor mapping to Mime types...\n"; 15 +print _kt("Registering Extractor mapping to Mime types") . "...\n";
16 16
17 require_once(realpath('../../../config/dmsDefaults.php')); 17 require_once(realpath('../../../config/dmsDefaults.php'));
18 18
@@ -21,7 +21,7 @@ $indexer = $config->get('indexer/coreClass'); @@ -21,7 +21,7 @@ $indexer = $config->get('indexer/coreClass');
21 21
22 if ($indexer != 'PHPLuceneIndexer') 22 if ($indexer != 'PHPLuceneIndexer')
23 { 23 {
24 - print "This script only works with the PHPLuceneIndexer.\n"; 24 + print _kt("This script only works with the PHPLuceneIndexer.") . "\n";
25 exit; 25 exit;
26 } 26 }
27 27
@@ -36,7 +36,7 @@ if ($argc > 0) @@ -36,7 +36,7 @@ if ($argc > 0)
36 { 36 {
37 case 'clear': 37 case 'clear':
38 $clear=true; 38 $clear=true;
39 - print "* Clearing mime type associations\n"; 39 + print "* " . _kt("Clearing mime type associations.") . "\n";
40 break; 40 break;
41 case 'help': 41 case 'help':
42 print "Usage: registerTypes.php [clear]\n"; 42 print "Usage: registerTypes.php [clear]\n";
@@ -52,5 +52,5 @@ if ($argc > 0) @@ -52,5 +52,5 @@ if ($argc > 0)
52 $indexer = Indexer::get(); 52 $indexer = Indexer::get();
53 $indexer->registerTypes($clear); 53 $indexer->registerTypes($clear);
54 54
55 -print "Done.\n"; 55 +print _kt("Done.") . "\n";
56 ?> 56 ?>
57 \ No newline at end of file 57 \ No newline at end of file