2017-12-18 02:31 PST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001505v3.4 Release (Cleanup)Core Infrastructurepublic2017-01-01 22:32
ReporterSoundVM 
Assigned Tocaseydk 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0001505: Translation issue in project user interface
DescriptionFrench user of w2p, i have a pb of translation in project interface ( ..index.php?m=projects ) : Each project status tabname is not translated correctly...

item : 'All active(1)' should be 'Projets actifs(1)' in French...

bug in 3.1, 3.2 (dev) versions, and verified in others languages...

thanks
Steps To ReproduceJust connect to index.php?m=projects with a language preference different from english...
Additional Informationbug due to the Research of a translation on a string 'All active(1)' instead of 'All active'

patch proposed
--------------

-- /classes/w2p/Core/CAppUI.class.php --
public function __($str, $flags = 0)
    {
    $pattern = '/^([^\(]*)(\([0-9]*\))?/';
    preg_match_all($pattern, $str, $matches);
    $str = trim($matches[1][0]);
    //$str = trim($str);
        ...
        switch ($flags & UI_OUTPUT_MASK) {
            ...
        }
        return $str.$matches[2][0];
    }

-- /style/web2project/overrides.php --
pb with the the "?:" (or ternary) operator
 - <tr><td>' . ($v[2] ? $v[1] : $this->_AppUI->_($v[1])) . '</td></tr>
 + <tr><td>' . $this->_AppUI->_($v[1]) . '</td></tr>
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0003870

caseydk (administrator)

Resolved differently than described.

Changed to do the translation before creating the tabs. Makes sense since we’re concatenating with the project count. Since the tab was already treating it as translated, no difference there.

Resolved:
https://github.com/web2project/web2project/commit/8e1148002231814b193251bda8a2ee328d9e8470
+Notes

-Issue History
Date Modified Username Field Change
2014-04-25 06:18 SoundVM New Issue
2014-04-25 06:18 SoundVM File Added: w2p-translation-pb-before.png
2014-05-09 00:25 caseydk Project v3.2 Release => v4.0 Release (Planning)
2014-06-10 22:49 caseydk Target Version => 4.0
2016-12-26 10:25 caseydk Project v4.0 Release (Planning) => Pending Requests
2016-12-29 10:13 caseydk Project Pending Requests => v3.4 Release (Cleanup)
2016-12-29 23:50 caseydk Assigned To => caseydk
2016-12-29 23:50 caseydk Status new => assigned
2017-01-01 22:32 caseydk Status assigned => resolved
2017-01-01 22:32 caseydk Resolution open => fixed
2017-01-01 22:32 caseydk Note Added: 0003870
+Issue History