Strings in local_settings.py.example are not translated

Bug #1380666 reported by Akihiro Motoki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Confirmed
Low
Unassigned

Bug Description

Strings in local_settings.py.example are not translated because local_settings.py.example is not recognized as python file and the strings are not contained in PO file.

One idea in my mind is to rename local_settings.py.example to local_settings_example.py so that "run_test.sh --makemessages" can recognize it as Python file. This way brings another merit that local_settings.py example file will be checked by pep8.

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

There are more general issues and questions around having translatable strings in the settings in general too. If a deployer changes them, translations don't exist and it seems difficult for a deployer to fix that. It also causes problems (or could be considered "resolved by", I suppose :-)) for a blueprint like https://blueprints.launchpad.net/horizon/+spec/ini-based-configuration .

Revision history for this message
Akihiro Motoki (amotoki) wrote :

I agree that translatable strings in the settings have more problems in general.

IMHO if a deployer introduces new strings, they need to update message catalogs
if they want to use translated strings. It is a common thing when deployers need
to provide new strings/messages with multiple languages.

I was not aware of blueprint ini-based-configuration. I am a fun of the blueprint
but I am not confident whether we should customize menu through ini files.

Thierry Carrez (ttx)
Changed in horizon:
milestone: kilo-1 → kilo-2
David Lyle (david-lyle)
Changed in horizon:
milestone: kilo-2 → kilo-3
Thierry Carrez (ttx)
Changed in horizon:
milestone: kilo-3 → kilo-rc1
David Lyle (david-lyle)
Changed in horizon:
milestone: kilo-rc1 → liberty-1
tags: added: kilo-rc-potential
Changed in horizon:
status: New → Confirmed
David Lyle (david-lyle)
tags: removed: kilo-rc-potential
Changed in horizon:
milestone: liberty-1 → liberty-2
Changed in horizon:
milestone: liberty-2 → liberty-3
Thierry Carrez (ttx)
Changed in horizon:
milestone: liberty-3 → liberty-rc1
Revision history for this message
Rob Cresswell (robcresswell-deactivatedaccount) wrote :

Hey Akihiro,

If it is okay with you, I'll move this out of RC1. There doesn't seem to be a solid plan for how to solve this for now.

Changed in horizon:
milestone: liberty-rc1 → next
Revision history for this message
Akihiro Motoki (amotoki) wrote :

I am okay to move it to Mitaka. I remove my assignee too.

We don't have a concrete plan.
For the default value defined in our settings, the migration to support oslo.config in Horizon may help us.

Changed in horizon:
assignee: Akihiro Motoki (amotoki) → nobody
Revision history for this message
Akihiro Motoki (amotoki) wrote :

This bug can be addressed as part of https://blueprints.launchpad.net/horizon/+spec/ini-based-configuration
Once options are defined in the main horizon code, strings in default values can be extracted.

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.