calendar widget doesn't support localization

Bug #1274145 reported by Doug Fish
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Medium
Randy Bertram

Bug Description

On the Admin/Overview Panel it appears that the Calendar/Datepicker widget doesn't support localization.

I've verified this both by running the code, as well as inspecting bootstrap-datepicker.js.

Tags: i18n
Revision history for this message
Doug Fish (drfish) wrote :

I don't think this should be a duplicate. I perceive 2 different issues here.

1274144 is a problem that is more contained within horizon: I don't think there is any way to use a locale-specific date in the text field. It's always going to be the ISO format.

1274145 is about the calendar/datepicker that we have attached to the text field. It's always going to show the calendar for choosing dates in English.

Revision history for this message
Julie Pichon (jpichon) wrote :

Agreed these are different bugs. My understanding is that this one is about showing "January" etc in the correct locale while the other is about handling the date format.

Changed in horizon:
importance: Undecided → Medium
Revision history for this message
Victoria Martinez de la Cruz (vkmc) wrote :

Regarding 1274144, I remember that it was discussed the possibility of allowing the user to add the date format in the local settings configuration file [0]. The only problem with that approach is that bootstrap-datepicker and Python manage dates quite differently... so a mapping would be required.

And about 1274145, that is a tough one because bootstrap-datepicker doesn't support i18n. There is a fork though, that does support it [1]. The problem with it is that it requires jQuery.

[0] https://github.com/openstack/horizon/blob/master/openstack_dashboard/local/local_settings.py.example
[1] https://github.com/eternicode/bootstrap-datepicker

Changed in horizon:
status: New → Confirmed
tinytmy (tangmeiyan77)
Changed in horizon:
assignee: nobody → tinytmy (tangmeiyan77)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/75752

Changed in horizon:
status: Confirmed → In Progress
tinytmy (tangmeiyan77)
Changed in horizon:
assignee: tinytmy (tangmeiyan77) → nobody
status: In Progress → Confirmed
Revision history for this message
Doug Fish (drfish) wrote :

When planning a fix for this bug, there is a closely related issue: the first day of the week is not normally represented as Sunday in all locales. A robust calendar widget should support starting the day on Monday or other locally appropriate choice.

Randy Bertram (rbertram)
Changed in horizon:
assignee: nobody → Randy Bertram (rbertram)
Changed in horizon:
status: Confirmed → In Progress
Revision history for this message
Julie Pichon (jpichon) wrote :
Doug Fish (drfish)
Changed in horizon:
milestone: none → juno-rc1
Akihiro Motoki (amotoki)
tags: added: i18n
David Lyle (david-lyle)
Changed in horizon:
milestone: juno-rc1 → kilo-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/120242
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=78c917570e2182bfdd8f5cb7eb5cb2c71d8df6f0
Submitter: Jenkins
Branch: master

commit 78c917570e2182bfdd8f5cb7eb5cb2c71d8df6f0
Author: Randy Bertram <email address hidden>
Date: Tue Sep 9 17:28:17 2014 -0400

    Datepicker locale support

    Also adds general language info to the
    horizon JS object.

    Change-Id: I8fbf20635ac0a2ae1f3b8f618ce5a37eb53e9cc0
    Closes-Bug: 1274145

Changed in horizon:
status: In Progress → Fix Committed
Akihiro Motoki (amotoki)
Changed in horizon:
milestone: kilo-1 → juno-rc1
Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: juno-rc1 → 2014.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.