MantisBT - v3.4 Release (Current)
View Issue Details
0001505v3.4 Release (Current)Core Infrastructurepublic2014-04-25 06:182019-01-03 12:53
ReporterSoundVM 
Assigned Tocaseydk 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
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 Filespng w2p-translation-pb-before.png (20,562) 1969-12-31 16:00
https://bugs.web2project.net/file_download.php?file_id=427&type=bug
png

Notes
(0003870)
caseydk   
2017-01-01 22:32   
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
(0003915)
caseydk   
2019-01-03 12:53   
In the 31 Dec 2018 release: http://docs.web2project.net/release-notes/3.4.html

Issue History
2014-04-25 06:18SoundVMNew Issue
2014-04-25 06:18SoundVMFile Added: w2p-translation-pb-before.png
2014-05-09 00:25caseydkProjectv3.2 Release => v4.0 Release (Planning)
2014-06-10 22:49caseydkTarget Version => 4.0
2016-12-26 10:25caseydkProjectv4.0 Release (Planning) => Pending Requests
2016-12-29 10:13caseydkProjectPending Requests => v3.4 Release (Current)
2016-12-29 23:50caseydkAssigned To => caseydk
2016-12-29 23:50caseydkStatusnew => assigned
2017-01-01 22:32caseydkStatusassigned => resolved
2017-01-01 22:32caseydkResolutionopen => fixed
2017-01-01 22:32caseydkNote Added: 0003870
2019-01-03 12:53caseydkNote Added: 0003915
2019-01-03 12:53caseydkStatusresolved => closed