Observability: date format localization

Bug #1171182 reported by misibacsi on 2013-04-21
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Stellarium
Fix Released
Low
Alexander Wolf

Bug Description

I use Stellarium in Hungarian, not English.
I have set "Date display format" to "yyyy-mm-dd (ISO 8601)"

However, the date is shown as "dd-mm" , for example after the text: "Largest Sun separation:" 10 Dec.
The proper form would be "Dec 10." (with a point after the number)

I just installed today 0.12.1 over the previous version.

Regards,
misibacsi

Related branches

Bogdan Marinov (daggerstab) wrote :

You mean the dates displayed by the Observability Analysis plug-in? It doesn't follow the global settings. As far as I know, the date format setting in the main configuration file/the Time Zone plug-in is only for the time/date display in the bottom toolbar.

(Please confirm if this is what the issue is about, so we can know how to classify the bug report.)

I did notice that the dates in the Observability plug-in are implemented in a rather... unthinking manner when I was doing some translation. The day/month order can be fixed in the translation string, if you change the order of two parameters.

A smarter way to do it would be to have a single parameter in the string for the date, and the date string itself to be generated by the appropriate date formatting function (day/month) in the locale manager.

Alexander Wolf (alexwolf) wrote :

Yes, this is about Observability plug-in.

summary: - incorrect "Date display format"
+ Observability: date format localization
tags: added: observability
misibacsi (listas123) wrote :

Thanks the classification, I did not realize it was this "Observability plug-in".

Another issue with the date format with the same plug-in:

I changed the "Language" setting to "English", the date order remained (dd-mm) , but the name of the months are in Hungarian.

"The day/month order can be fixed in the translation string, if you change the order of two parameters." - However, the text is translated, but there are no parameters after it. They maybe are glued together somewhere else.

Regards,
misibacsi

Bogdan Marinov (daggerstab) wrote :

So in addition to the date format issue, the plug-in's can't deal with runtime language change? Nice.

I think I need to make a checklist of things to test before third party code is merged in the trunk.

Ivan Marti-Vidal (i-martividal) wrote :

Hi all!

I'm very sorry about these bugs!

Notice that one of the reasons why the dates are formatted within the code of the plugin is that sometimes it has to report long lists of date intervals. For instance, "1-10 Dec, 5-7 March, ..." and so on. This format is more compact and easier to read than "1 Dec 2012 to 10 Dec 2012, 5 March 2012 to 7 March 2012". I don't know how to deal with this issue otherwise.

Regarding the runtime language change, I have no idea what can be happening. Maybe that's due to some parameter that has to be checked at each frame, instead of only at startup. Should be easy to find. Let me try it as soon as I have time.

   Best Wishes,

            Ivan

Hello,

The first problem is the order of the "month" and the "day" (or days).
So, instead of "1-10 Dec" we need "Dec 1-10." with Hungarian setting.
There is no need to put the "year", because it already says "this year", and after that the month and the day information. The problem is it is always dd-mm, and not mm-dd as I need it.

Regards,
misibacsi

Ivan Marti-Vidal <email address hidden> írta:
>Hi all!>
>
I'm very sorry about these bugs!>
>
Notice that one of the reasons why the dates are formatted within the>
code of the plugin is that sometimes it has to report long lists of date>
intervals. For instance, "1-10 Dec, 5-7 March, ..." and so on. This>
format is more compact and easier to read than "1 Dec 2012 to 10 Dec>
2012, 5 March 2012 to 7 March 2012". I don't know how to deal with this>
issue otherwise.>
>
Regarding the runtime language change, I have no idea what can be>
happening. Maybe that's due to some parameter that has to be checked at>
each frame, instead of only at startup. Should be easy to find. Let me>
try it as soon as I have time.>
>
   Best Wishes,>
>
            Ivan>
>
-- >
You received this bug notification because you are subscribed to the bug>
report.>
https://bugs.launchpad.net/bugs/1171182>
>
Title:>
  Observability: date format localization>
>
To manage notifications about this bug go to:>
https://bugs.launchpad.net/stellarium/+bug/1171182/+subscriptions>

Changed in stellarium:
status: New → Confirmed
Alexander Wolf (alexwolf) wrote :

I'm fixed this issue and added partial fixation of the issue for localization of screen's strings also. Fully fixation for second issue can be only via refactoring of the plugin.

Diff: http://bazaar.launchpad.net/~stellarium/stellarium/trunk/revision/6142

Changed in stellarium:
milestone: none → 0.12.2
status: Confirmed → Fix Committed
assignee: nobody → Alexander Wolf (alexwolf)
importance: Undecided → Low
Changed in stellarium:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related questions