[interface] Localization of dates in PO files

Brainstorm ideas of possible additions to the game. Read this before posting!

Moderator: Forum Moderators

Forum rules
Before posting a new idea, you must read the following:
Post Reply
User avatar
GunChleoc
Translator
Posts: 506
Joined: September 28th, 2012, 7:35 am
Contact:

[interface] Localization of dates in PO files

Post by GunChleoc »

The localization of dates does not work as it should, at least not for minority languages. For example, Windows 7 actually comes with a locale for Scottish Gaelic, so I'm more lucky than speakers of some other minority languages, but it is still ignored in the "Load game" dialog.

My suggestion: Add names of months and days of the week + rtl support to the PO files. It's not that much work for the translators (I don't know about the coding effort though).
Spixi
Posts: 91
Joined: August 23rd, 2010, 7:22 pm

Re: [interface] Localization of dates in PO files

Post by Spixi »

The problem is, that the date format varies from location to location. It would be very difficult to translate. For example:

7. Januar 2003
7 janvier 2003
7 de enero de 2003
2003ko urtarrila 7 a
January 7, 2003
User avatar
lipk
Posts: 637
Joined: July 18th, 2011, 1:42 pm

Re: [interface] Localization of dates in PO files

Post by lipk »

The format can be localized via some strange-looking strings in the wesnoth domain, e.g. "%H:%M". The characters preceded with a % are substituted with certain values, in this case the current hour and minutes respectively. If your language preferred to write the minutes first and use a comma as a separator, you'd have to translate that string as "%M, %H".

Unfortunately though, the values themselves are not translatable through Wesnoth's po files, since they're provided by an external library. That certain library (and thus the dates) are translated into so many languages that apparently you're the first one to notice this issue.
User avatar
GunChleoc
Translator
Posts: 506
Joined: September 28th, 2012, 7:35 am
Contact:

Re: [interface] Localization of dates in PO files

Post by GunChleoc »

Is it possible to add a translation to that certain library? What's it called and who is making it? Then a whole bunch of software projects might benefit from it.

It still won't solve the issue of locales not being available on your operating system though. E.g. on a Mac there is no Scottish Gaelic Locale. And what about our Latin anf Old English translations, are there locales available for those on all operating systems?

As we have the %M and %H in the PO files anway, the only thing we'd need is a list of months and weekdays in the translation file. phpBB do it that way.
User avatar
lipk
Posts: 637
Joined: July 18th, 2011, 1:42 pm

Re: [interface] Localization of dates in PO files

Post by lipk »

Is it possible to add a translation to that certain library? What's it called and who is making it? Then a whole bunch of software projects might benefit from it.
The thing is called libc, and it's part of the POSIX standard, therefore it has multiple implementations. I have no clue if the Windows builds use a GNU libc variation or a Microsoft one, you had better ask loonycyborg about that.
It still won't solve the issue of locales not being available on your operating system though. E.g. on a Mac there is no Scottish Gaelic Locale.
I can't see how is that relevant for us...

By the way, I believe that this thing is worth a bug report.
User avatar
GunChleoc
Translator
Posts: 506
Joined: September 28th, 2012, 7:35 am
Contact:

Re: [interface] Localization of dates in PO files

Post by GunChleoc »

I have created a bug report, thanks. :)
lipk wrote:
It still won't solve the issue of locales not being available on your operating system though. E.g. on a Mac there is no Scottish Gaelic Locale.
I can't see how is that relevant for us...
There are speakers of minority languages who own a Mac, but I cant tell you how many of them are potential Wesnoth players. There is a Mac version of the game available, so it would be nice to make the dates localizable for everybody.
User avatar
lipk
Posts: 637
Joined: July 18th, 2011, 1:42 pm

Re: [interface] Localization of dates in PO files

Post by lipk »

There are speakers of minority languages who own a Mac, but I cant tell you how many of them are potential Wesnoth players. There is a Mac version of the game available, so it would be nice to make the dates localizable for everybody.
Oh, I see now. I don't suggest that the right solution would be to translate libc to Scottish Gaelic instead of moving the translatables to Wesnoth, even though my previous post implied that. Since Wesnoth is meant to be multiplatform, it's clearly wrong that the GUI's consistency relies on random features of the underlying OS.

Summa summarum: Wesnoth's localization system should be independent from the OS. That's broken. Thus the bug report.
User avatar
GunChleoc
Translator
Posts: 506
Joined: September 28th, 2012, 7:35 am
Contact:

Re: [interface] Localization of dates in PO files

Post by GunChleoc »

I get you now, thanks. We're in agreement then :)
Post Reply