MantisBT - v1.1 Release (Closed)
View Issue Details
0000112v1.1 Release (Closed)[All Projects] Generalpublic2009-03-14 02:012009-09-09 22:41
Reportereureka 
Assigned Tocaseydk 
PrioritylowSeverityfeatureReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version1.1 
Summary0000112: loading of locale strings for tabs and crumbs
DescriptionStrings for modules are not translated in tabs and crumbs when viewing a project
Additional Informationmy suggestion is to add the following lines in locales/core.php after 'ob_start();' :
if (isset($perms)) {
    foreach ($AppUI->getActiveModules() as $dir => $module) {
        if (!$perms->checkModule($dir, 'access')) {
            continue;
        }
        $modules_tabs = $AppUI->readFiles(W2P_BASE_DIR . '/modules/' . $dir . '/', '^' . $m . '_tab.*\.php');
        $modules_crumbs = $AppUI->readFiles(W2P_BASE_DIR . '/modules/' . $dir . '/', '^' . $m . '_crumb.*\.php');
        if ((count($modules_tabs) > 0 || count($modules_crumbs) > 0) && file_exists(W2P_BASE_DIR . '/modules/' . $dir . '/locales/' . $AppUI->user_locale . '.inc')) {
            @readfile(W2P_BASE_DIR . '/modules/' . $dir . '/locales/' . $AppUI->user_locale . '.inc');
        }
    }
}
TagsNo tags attached.
related to 0000207closed caseydk Make 3rd party modules menu titles translatable w/o altering core wp2 inc files 
Attached Files

Notes
(0000173)
eureka   
2009-03-14 02:30   
(Last edited: 2009-03-14 02:37)
this solution is better :

if (isset($perms)) {
    foreach ($AppUI->getActiveModules() as $dir => $module) {
        if (!$perms->checkModule($dir, 'access')) {
            continue;
        }
        $modules_tabs_crumbs = $AppUI->readFiles(W2P_BASE_DIR . '/modules/' . $dir . '/', '^' . $m . '_(tab|crumb).*\.php');
        if (count($modules_tabs_crumbs) > 0 && file_exists(W2P_BASE_DIR . '/modules/' . $dir . '/locales/' . $AppUI->user_locale . '.inc')) {
            @readfile(W2P_BASE_DIR . '/modules/' . $dir . '/locales/' . $AppUI->user_locale . '.inc');
        }
    }
}

(0000270)
caseydk   
2009-05-09 07:55   
Due to lack of another set of eyes to review this, I've moved it off the v1.0 release.

After v1.0 has been released, I'll work to make sure this gets into v1.1 along with a number of other system cleanups.
(0000379)
eureka   
2009-08-12 02:35   
Since revision 503 :

if (isset($perms)) {
    foreach ($AppUI->getActiveModules() as $dir => $module) {
        if (!$perms->checkModule($dir, 'access')) {
            continue;
        }
        $modules_tabs_crumbs = $AppUI->readFiles(W2P_BASE_DIR . '/modules/' . $dir . '/', '^' . $m . '_(tab|crumb).*\.php');
        if (count($modules_tabs_crumbs) > 0) {
            if (file_exists(W2P_BASE_DIR . '/modules/' . $dir . '/locales/' . $AppUI->user_locale . '/' . $module . '.inc')) {
                readfile(W2P_BASE_DIR . '/modules/' . $dir . '/locales/' . $AppUI->user_locale . '/' . $module . '.inc');
            } elseif (file_exists(W2P_BASE_DIR . '/locales/' . $AppUI->user_locale . '/' . $module . '.inc')) {
                readfile(W2P_BASE_DIR . '/locales/' . $AppUI->user_locale . '/' . $module . '.inc');
            }
        }
    }
}
(0000381)
caseydk   
2009-08-12 21:56   
Merged in r557 with some minor tweaks to use the directory name ($dir) instead of the module name ($module) due to case sensitivity;
(0000453)
caseydk   
2009-09-09 22:41   
Closed for release.

Issue History
2009-03-14 02:01eurekaNew Issue
2009-03-14 02:30eurekaNote Added: 0000173
2009-03-14 02:37eurekaNote Edited: 0000173
2009-04-27 22:35caseydkPrioritynormal => low
2009-05-09 07:51caseydkProjectv1.0 Release (Closed) => Pending Requests
2009-05-09 07:55caseydkNote Added: 0000270
2009-06-22 04:52caseydkRelationship addedrelated to 0000193
2009-06-22 04:53caseydkRelationship deletedrelated to 0000193
2009-06-22 04:53caseydkProjectPending Requests => v1.1 Release (Closed)
2009-08-05 20:52caseydkRelationship addedrelated to 0000207
2009-08-12 02:35eurekaNote Added: 0000379
2009-08-12 21:56caseydkStatusnew => resolved
2009-08-12 21:56caseydkResolutionopen => fixed
2009-08-12 21:56caseydkAssigned To => caseydk
2009-08-12 21:56caseydkNote Added: 0000381
2009-09-09 22:41caseydkStatusresolved => closed
2009-09-09 22:41caseydkNote Added: 0000453
2009-09-09 22:41caseydkFixed in Version => 1.1