Localization bug with dates in load game screen
Moderator: Forum Moderators
Forum rules
Before reporting issues in this section, you must read the following topic:
Before reporting issues in this section, you must read the following topic:
Localization bug with dates in load game screen
Wesnoth can't handle my operating system's locale (gd) in the load game screen and displays English instead.
OS: Windows 7
Game version: 1.10.4
Game Language: Scottish Gaelic (gd)
Walkthrough: Choose "Gàidhlig" in the Languages menu, then go on "Luchdaich" (Load). You might need to get the language files first.
My proposed solution: Add translation of month and weekdays names to the PO files.
I'll add a screenshot.
There is also a discussion in the ideas forum here where someone suggested I create a bug report.
OS: Windows 7
Game version: 1.10.4
Game Language: Scottish Gaelic (gd)
Walkthrough: Choose "Gàidhlig" in the Languages menu, then go on "Luchdaich" (Load). You might need to get the language files first.
My proposed solution: Add translation of month and weekdays names to the PO files.
I'll add a screenshot.
There is also a discussion in the ideas forum here where someone suggested I create a bug report.
Re: Localization bug with dates in load game screen
Sorry to tell you, but on my Linux box I get this stuff translated automatically. No idea why this is not working for Windows. Yes, the strings for the date and stuff like this depend only on the OS. Yes, the days and month there are not part of the changeable strings at all. The dates are there as some system function.
Re: Localization bug with dates in load game screen
The location in your forum profile is Germany, so I guess you have German as your locale. It works fine in Windows if I select German as the game language. The issue here isn't Linux vs. Windows, it's majority languages vs. minority languages.
It doesn't take a lot of code to localise month names. E.g. in PHP it looks something like this:
Plus you could use the same method for short month names, days of the week etc. This works fine for the Roman calendar at least.
I haven't managed to compile Wesnoth so far, so I can't implement this myself. I also don't speak C++ yet.
It doesn't take a lot of code to localise month names. E.g. in PHP it looks something like this:
Code: Select all
function formatdatetime($date,$short=false)
{
$result ="";
if(!$short)
{
$format=getproperty("Date Time Format");
$result= @date($format,strtotime($date));
$result= str_replace("January",getlangarray("date_month",1),$result);
$result= str_replace("February",getlangarray("date_month",2),$result);
$result= str_replace("March",getlangarray("date_month",3),$result);
$result= str_replace("April",getlangarray("date_month",4),$result);
$result= str_replace("May",getlangarray("date_month",5),$result);
$result= str_replace("June",getlangarray("date_month",6),$result);
$result= str_replace("July",getlangarray("date_month",7),$result);
$result= str_replace("August",getlangarray("date_month",8),$result);
$result= str_replace("September",getlangarray("date_month",9),$result);
$result= str_replace("October",getlangarray("date_month",10),$result);
$result= str_replace("November",getlangarray("date_month",11),$result);
$result= str_replace("December",getlangarray("date_month",12),$result);
}
else
{
$format=SHORTDATETIMEFORMAT;
$result= @date($format,strtotime($date));
}
return str_replace(" "," ",$result);;
}
I haven't managed to compile Wesnoth so far, so I can't implement this myself. I also don't speak C++ yet.