Anonymous Login
2019-12-05 12:13 PST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000112v1.1 Release (Closed)[All Projects] Generalpublic2009-09-09 22:41
Reportereureka 
Assigned Tocaseydk 
PrioritylowSeverityfeatureReproducibilityalways
StatusclosedResolutionfixed 
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.
Attached Files

-Relationships
related to 0000207closedcaseydk Make 3rd party modules menu titles translatable w/o altering core wp2 inc files 
+Relationships

-Notes

~0000173

eureka (reporter)

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 (administrator)

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 (reporter)

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 (administrator)

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 (administrator)

Closed for release.
+Notes

-Issue History
Date Modified Username Field Change
2009-03-14 02:01 eureka New Issue
2009-03-14 02:30 eureka Note Added: 0000173
2009-03-14 02:37 eureka Note Edited: 0000173
2009-04-27 22:35 caseydk Priority normal => low
2009-05-09 07:51 caseydk Project v1.0 Release (Closed) => Pending Requests
2009-05-09 07:55 caseydk Note Added: 0000270
2009-06-22 04:52 caseydk Relationship added related to 0000193
2009-06-22 04:53 caseydk Relationship deleted related to 0000193
2009-06-22 04:53 caseydk Project Pending Requests => v1.1 Release (Closed)
2009-08-05 20:52 caseydk Relationship added related to 0000207
2009-08-12 02:35 eureka Note Added: 0000379
2009-08-12 21:56 caseydk Status new => resolved
2009-08-12 21:56 caseydk Resolution open => fixed
2009-08-12 21:56 caseydk Assigned To => caseydk
2009-08-12 21:56 caseydk Note Added: 0000381
2009-09-09 22:41 caseydk Status resolved => closed
2009-09-09 22:41 caseydk Note Added: 0000453
2009-09-09 22:41 caseydk Fixed in Version => 1.1
+Issue History