Some Languages start with capital letter but not all.

Bug #1325688 reported by Juan Manuel Ollé
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Low
Verónica Musso

Bug Description

Not All Languages in settings start with Capital Letters

Revision history for this message
Juan Manuel Ollé (juan-m-olle) wrote :
Revision history for this message
Julie Pichon (jpichon) wrote :

What version is this?

In the codebase the languages are correctly capitalised: https://github.com/openstack/horizon/blob/90474517de/openstack_dashboard/settings.py#L179 . Previously they used to be available for translation, so I think this is either a translation problem for the Spanish version, or perhaps specific to your deployment as the language list can be overriden in the local settings?

Btw I think the way this is done in the screenshot, with every language written in its own language, might be a better way to go than having everything in English like we're doing.

tags: added: i18n
Changed in horizon:
status: New → Incomplete
Revision history for this message
Juan Manuel Ollé (juan-m-olle) wrote :

I'm on master,

What I see is that when options are loaded

https://github.com/openstack/horizon/blob/master/openstack_dashboard/dashboards/settings/user/forms.py#L57

It tried to get from django utils the string to show

https://github.com/openstack/horizon/blob/master/openstack_dashboard/dashboards/settings/user/forms.py#L51

And only shows what you mention if django doesn't have it. But django has some names without capital because it could be used in a middle of a sentence

https://github.com/django/django/blob/1.5/django/conf/locale/__init__.py#L3

I think this logic should be removed and we should use the list you mention

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

Right, thanks for the reply! It looks like we can fix it simply enough by calling .capitalize() on the strings.

tags: added: low-hanging-fruit
Changed in horizon:
status: Incomplete → Triaged
Revision history for this message
Juan Manuel Ollé (juan-m-olle) wrote :

Ok, I will check it

Why are we using django method instead of just the list you mention before?

Revision history for this message
Juan Manuel Ollé (juan-m-olle) wrote :

Never minded, I have already the response, is due to jp ch, etc special characters

Changed in horizon:
assignee: nobody → Juan Manuel Ollé (juan-m-olle)
Changed in horizon:
assignee: Juan Manuel Ollé (juan-m-olle) → nobody
Revision history for this message
Julie Pichon (jpichon) wrote :

It's to show the language as written in its own language where possible, which is more friendly to users who might not know English. If we can't find the language name based on the language code, we use the name from the settings instead. (I forgot we did this so thanks for pointing me to the code that does it.)

Changed in horizon:
assignee: nobody → Verónica Musso (veronica-a-musso)
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/98514

Changed in horizon:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

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

commit aa7cccad940725599dfbf4c3ba9a67248d421a28
Author: Veronica Musso <email address hidden>
Date: Fri Jun 6 01:52:44 2014 -0300

    Country names in capital letters

    Use of capwords function to format country names in user setting screen.

    Change-Id: Ic96c1e0ccfda4101f34c014b9ff5d2f0231c6709
    Closes-Bug: #1325688

Changed in horizon:
status: In Progress → Fix Committed
David Lyle (david-lyle)
Changed in horizon:
importance: Undecided → Low
milestone: none → juno-2
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: juno-2 → 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.