Date and time translations patch

Discuss and coordinate development of mainline and user-made content translations.

Moderator: Forum Moderators

Post Reply
thunderstruck
Inactive Developer
Posts: 12
Joined: March 6th, 2013, 7:36 pm

Date and time translations patch

Post by thunderstruck »

I've created a patch (http://git.io/3zYLig) to fix issues with date and time translations (https://gna.org/bugs/?20268), but it was said that the patch would be introducing an unnecessary work for translators and confusing them. So, I've decided to move the discussion here, to see what the translators actually think about this.

First of all, let's talk about the problem. Wesnoth uses glibc to handle date/time formatting (including translations) and retrieves them from an installed locale on the user's machine. However, this becomes an issue, because 1) not every OS supports all the locales for all the languages Wesnoth is being translated, 2) some locales don't provide support for am/pm designations and if a user uses a "12-hour clock" option in Wesnoth, he/she might not be able to see those designations at all, 3) user might not have a locale installed, thus not being able to get any translations for date and time.

My patch is a simple "strftime's" (function used to handle date/time formatting in the code) wrapper. So, it checks if locale, which is currently in use, handles date and/or time correctly for current language and acts accordingly. I.e. takes care of date translations and uses translations provided with Wesnoth only if they could not be handled correctly by "strftime".

However, some of the Wesnoth contributors don't find this patch to be useful enough and they argue about extra work for translators, as I have mentioned above. So, please give an opinion if you think this patch is actually worth the hassle or not for translating month, weekdays names (including abbreviated ones) and am/pm designations. The translations would total to 40 words. Giving that they are just stand-alone words and not fancy sentences, I don't see how it could be a problem.
User avatar
GunChleoc
Translator
Posts: 506
Joined: September 28th, 2012, 7:35 am
Contact:

Re: Date and time translations patch

Post by GunChleoc »

The translation is not a problem. I have done this exact thing a hundred times before for other software and it's really easy to translate. It is actually common practice to handle things this way. I can do the strings in my sleep in about 2 minutes, since they are already in my translation memory anyway.

I actually tried to create a locale for Scottish Gaelic for glibc, but it's a bit complicated and very technical and I don't know how to test it. A friend tried and failed testing it for me, so translating this within Wesnoth sounds a LOT easier.

Also, Detect Locale Is Evil. I expect most of the people using the Gaelic version of Wesnoth will be normal users, not programming geeks. So, they will have never heard of locales, let alone know how to set their own system locale themselves. Therefore, users will be presented with the date/time strings in English, even if I could figure out how to create the thing for glibc.

So, to make a long story short, please accept this patch.
User avatar
Astoria
Inactive Developer
Posts: 1007
Joined: March 20th, 2008, 5:54 pm
Location: Netherlands

Re: Date and time translations patch

Post by Astoria »

I think this is a good idea. Although it won't make a huge difference in my native language, I can see why this would be very useful for others. About the added work, it's rather trivial and not a factor.
Formerly known as the creator of Era of Chaos and maintainer of The Aragwaithi and the Era of Myths.
Zerbugug
Translator
Posts: 21
Joined: November 5th, 2012, 9:45 pm
Location: Paris

Re: Date and time translations patch

Post by Zerbugug »

I second this. The current system assumes the player uses a locale installed on his system, and assuming thing about the player's behaviour is always a bad idea IMO.

(I personally use wesnoth sometimes in English and sometimes in French, and my windows is in French and my debian in German.)
I am the cat who walks by himself, and all places are alike to me. — R. Kipling
User avatar
trewe
Translator
Posts: 122
Joined: December 24th, 2012, 5:37 pm
Location: Portugal
Contact:

Re: Date and time translations patch

Post by trewe »

bumbadadabum wrote:I think this is a good idea. Although it won't make a huge difference in my native language, I can see why this would be very useful for others. About the added work, it's rather trivial and not a factor.
Same here.
fabi
Inactive Developer
Posts: 1260
Joined: March 21st, 2004, 2:42 pm
Location: Germany

Re: Date and time translations patch

Post by fabi »

40 more items should not make much difference compared to the rest of our prose.
Post Reply