Anonymous Login
2019-07-19 18:27 PDT

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000988v3.0 Release[All Projects] Generalpublic2013-08-28 11:24
Reportergregor_b 
Assigned Torobertbasic 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
Product Version 
Target VersionFixed in Version3.0.0 
Summary0000988: Not translated month names in Gantt charts
DescriptionIt is imposible to display translated month names in the Gantt charts.
In non english translation of W2P (for examle PO) we would like see month namees on Ghantt in that language.
I was trying a lot of changes but all the time I've got names in english.
Additional InformationIn dotProject I was able to do this by adding do all gantt.php line: $graph->scale->SetDateLocale( $AppUI->user_locale );

There was similar code in web2project/classes/w2p/Output/GanttRenderer.class.php
but any changes with code (bellow) doesn’t take any effect
$pLocale = setlocale(LC_TIME, 0); // get current locale for LC_TIME
$res = setlocale(LC_TIME, $AppUI->user_lang[2]);
if ($res) { // Setting locale doesn't fail
$this->graph->scale->SetDateLocale($AppUI->user_lang[2]);
}
setlocale(LC_TIME, $pLocale);
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0002224

caseydk (administrator)


I've been researching this one and can't find anything useful or definitive on our end. I *thought* we were missing locales files but that doesn't appear to be the case.

~0002232

gregor_b (reporter)

I spend a lot of time for testing with locale and I found a problem (solution for me):
Problem is located in wrong locale (code) for some languages in:
/web2project/locales/xx/lang.php in:
       $LANGUAGES['xx] =
Corrected is for ex.:
$LANGUAGES['en'] =
$LANGUAGES['de_DE'] =
Not corrected (when user preferences is set for one of them, month names in Gantt is in english), example:
$LANGUAGES['po'] = array($dir, 'Polish (Pol)', 'Polski (PL)', 'po', 'utf-8');
$LANGUAGES['cs'] = array($dir, 'Czech (CS)', '?eština (CS)', 'csy', 'utf-8');
In my opinion 'po' is not correct lang. code for Polish (should be: pl, pl_PL or plk (Microsoft))
So I suggest to change that for:
$LANGUAGES['pl_PL'] = array($dir, 'Polish (Pol)', 'Polski (PL)', 'pl', 'utf-8');
Or:
$LANGUAGES['pl_PL'] = array($dir, 'Polish (Pol)', 'Polski (PL)', 'plk', 'utf-8');
and month names in Gantt will be correct (with some problem witch utf-8 encoding)
I suggest also global change (from v.3) for polish locale (change ‘po’ to ‘pl’ in all files and links):
- Change folder name from …/locales/po/ > …/locales/pl/ or …/locales/pl_PL/
- Change …/lib/jscalendar/lang/calendar-po.js > …/lib/jscalendar/lang/calendar-pl.js
- Change .../lib/PHPMailer/language/phpmailer.lang-po.php > .../lib/PHPMailer/language/phpmailer.lang-pl.php
Best regards.

~0002484

robertbasic (developer)

Pull request sent https://github.com/caseysoftware/web2project/pull/83

~0002512

caseydk (administrator)

Resolved in r2445;
https://github.com/caseysoftware/web2project/pull/83
+Notes

-Issue History
Date Modified Username Field Change
2011-09-29 21:50 gregor_b New Issue
2011-09-29 21:50 gregor_b File Added: gantt_locale.jpg
2011-10-01 21:03 caseydk Project v2.4 Release (Closed) => Pending Requests
2011-10-01 21:06 caseydk Note Added: 0002224
2011-10-01 21:06 caseydk Status new => acknowledged
2011-10-03 05:20 gregor_b Note Added: 0002232
2011-10-03 05:21 gregor_b File Added: gantt_locale_ok.JPG
2012-04-20 03:38 robertbasic Status acknowledged => assigned
2012-04-20 03:38 robertbasic Assigned To => robertbasic
2012-04-20 04:44 robertbasic Note Added: 0002484
2012-05-04 22:02 caseydk Project Pending Requests => v3.0 Release
2012-05-04 22:07 caseydk Note Added: 0002512
2012-05-04 22:07 caseydk Status assigned => resolved
2012-05-04 22:07 caseydk Resolution open => fixed
2013-08-28 11:14 caseydk Fixed in Version => 3.0.0
2013-08-28 11:24 caseydk Status resolved => closed
+Issue History