Commit ac46000f05e0c1f9077f72ebe40c5ed6c519d6ea
1 parent
9d4fcadf
Merged in from STABLE trunk...
KTS-3506 "CLONE -Problems with localization (SUP-933)" Fixed. The i18nDetails array is now being populated. KTS-3367 "A certain part of translations does not appear correctly." Fixed. The text from the plugin_helper table is now translated at load time. Committed by: Megan Watson Reviewed by: Conrad Vermeulen git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/STABLE/branches/3.5.3-Release-Branch@8840 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
21 additions
and
8 deletions
lib/plugins/pluginutil.inc.php
| ... | ... | @@ -329,10 +329,13 @@ class KTPluginUtil { |
| 329 | 329 | if(isset($aParams[3])){ |
| 330 | 330 | $aParams[3] = KTPluginUtil::getFullPath($aParams[3]); |
| 331 | 331 | } |
| 332 | + $aParams[0] = _kt($aParams[0]); | |
| 332 | 333 | call_user_func_array(array(&$oAPRegistry, 'registerAuthenticationProvider'), $aParams); |
| 333 | 334 | break; |
| 334 | 335 | |
| 335 | 336 | case 'admin_category': |
| 337 | + $aParams[1] = _kt($aParams[1]); | |
| 338 | + $aParams[2] = _kt($aParams[2]); | |
| 336 | 339 | call_user_func_array(array(&$oAdminRegistry, 'registerCategory'), $aParams); |
| 337 | 340 | break; |
| 338 | 341 | |
| ... | ... | @@ -340,6 +343,8 @@ class KTPluginUtil { |
| 340 | 343 | if(isset($aParams[5])){ |
| 341 | 344 | $aParams[5] = KTPluginUtil::getFullPath($aParams[5]); |
| 342 | 345 | } |
| 346 | + $aParams[3] = _kt($aParams[3]); | |
| 347 | + $aParams[4] = _kt($aParams[4]); | |
| 343 | 348 | call_user_func_array(array(&$oAdminRegistry, 'registerLocation'), $aParams); |
| 344 | 349 | break; |
| 345 | 350 | |
| ... | ... | @@ -350,18 +355,21 @@ class KTPluginUtil { |
| 350 | 355 | call_user_func_array(array(&$oDashletRegistry, 'registerDashlet'), $aParams); |
| 351 | 356 | break; |
| 352 | 357 | |
| 353 | - case 'i18n': | |
| 354 | - if(isset($aParams[1])){ | |
| 355 | - $aParams[1] = KTPluginUtil::getFullPath($aParams[1]); | |
| 356 | - } | |
| 357 | - call_user_func_array(array(&$oi18nRegistry, 'registeri18n'), $aParams); | |
| 358 | - break; | |
| 359 | - | |
| 360 | 358 | case 'i18nlang': |
| 361 | 359 | if(isset($aParams[2]) && $aParams[2] != 'default'){ |
| 362 | 360 | $aParams[2] = KTPluginUtil::getFullPath($aParams[2]); |
| 363 | 361 | } |
| 364 | 362 | call_user_func_array(array(&$oi18nRegistry, 'registeri18nLang'), $aParams); |
| 363 | + | |
| 364 | + | |
| 365 | + case 'i18n': | |
| 366 | + if(isset($aParams[2])){ | |
| 367 | + $aParams[1] = $aParams[2]; | |
| 368 | + unset($aParams[2]); | |
| 369 | + } else { | |
| 370 | + $aParams[1] = KTPluginUtil::getFullPath($aParams[1]); | |
| 371 | + } | |
| 372 | + call_user_func_array(array(&$oi18nRegistry, 'registeri18n'), $aParams); | |
| 365 | 373 | break; |
| 366 | 374 | |
| 367 | 375 | case 'language': |
| ... | ... | @@ -386,10 +394,12 @@ class KTPluginUtil { |
| 386 | 394 | if(isset($aParams[3])){ |
| 387 | 395 | $aParams[3] = KTPluginUtil::getFullPath($aParams[3]); |
| 388 | 396 | } |
| 397 | + $aParams[0] = _kt($aParams[0]); | |
| 389 | 398 | call_user_func_array(array(&$oColumnRegistry, 'registerColumn'), $aParams); |
| 390 | 399 | break; |
| 391 | 400 | |
| 392 | 401 | case 'view': |
| 402 | + $aParams[0] = _kt($aParams[0]); | |
| 393 | 403 | call_user_func_array(array(&$oColumnRegistry, 'registerView'), $aParams); |
| 394 | 404 | break; |
| 395 | 405 | |
| ... | ... | @@ -482,12 +492,15 @@ class KTPluginUtil { |
| 482 | 492 | require_once($sFile); |
| 483 | 493 | } |
| 484 | 494 | } |
| 495 | + | |
| 496 | + global $default; | |
| 485 | 497 | $oRegistry =& KTPluginRegistry::getSingleton(); |
| 486 | 498 | $aRegistryList = $oRegistry->getPlugins(); |
| 487 | 499 | foreach ($aRegistryList as $oPlugin) { |
| 488 | 500 | $res = $oPlugin->register(); |
| 489 | 501 | if (PEAR::isError($res)) { |
| 490 | - var_dump($res); | |
| 502 | + //var_dump($res); | |
| 503 | + $default->log->debug('Register of plugin failed: ' . $res->getMessage()); | |
| 491 | 504 | } |
| 492 | 505 | } |
| 493 | 506 | ... | ... |