On 2015-08-03 20:53, Okuma, Wayne wrote:
Hi Andreas,
I have a question in merging the glance-json.po file with the glance.po file. The metadef JSON data is viewable in Horizon. As such, it is subject to the User's ability to change the language they are using by simply selecting from a list of languages in the User's profile.
I think the '_' (i.e., gettext) that is used by Glance is governed by the LANGUAGE, LANG, etc. variables when Glance is started. How would I be able to control the locale used by Glance's gettext as quickly as the User's ability to select a new language?
Would it be possible to treat the glance-json.po file like the glance-log-xxx.po files?
I had envisioned that the DB layer would translate the JSON data for reads. It would need to open up all the translation catalogs (e.g., Spanish, Korean, Japanese, etc... ) and use the language passed in with the DB API "get JSON data" to translate. That is to say, I would use a "special" gettext-json that would include a language argument and it would pick up the data from the appropriate catalog.
Is there any spec or patch you can reference? Your explanation right now confuses me. Since you mention display in the dashboard, you might want to talk with the Horizon team and figure out how to do this properly. Discuss with them as well whether the metadef JSON cannot live in the horizon repo, this would make life easier. If we really need a glance-json file, follow the conventions used by horizon as much as possible, e.g. name it "glancejs". I can help with the uploading from the infra side but right now I'm not sure what exactly you're trying to achieve, Andreas
Thanks and Regards, Wayne Okuma
-----Original Message----- From: Andreas Jaeger [mailto:aj@suse.com] Sent: Monday, August 03, 2015 1:53 AM To: Okuma, Wayne; openstack-i18n@lists.openstack.org Subject: Re: [Openstack-i18n] Glance needs some fields in JSON files translated.
On 07/31/2015 02:32 AM, Okuma, Wayne wrote:
Hi i18n team,
My name is Wayne Okuma.
I work with the Glance team and am focused on Glance's Metadata Definition (metadef) Library support. We currently have ~20 metadef JSON files which are loaded into the Glance database. We would like to have some of the fields in the JSON files localized. I'm not clear what the process is for getting the glance.po file uploaded to Transifex.
We upload the resource automatically after each commit, see https://wiki.openstack.org/Translations/Infrastructure
I have a pybabel extractor that can generate a "glance-json.pot" with just the fields I'm interested in localizing and am wondering what the steps would be for me to get it uploaded to Transifex.
Please merge it into glance.po - that will make life much easier for our infrastructure. Otherwise we would need to special case glance in the scripts,
Also, although I can manually run the extraction routine, is there a way this can be done automatically?
Thanks for any information you can provide. Wayne Okuma
Andreas -- Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Dilip Upmanyu, Graham Norton, HRB 21284 (AG Nürnberg) GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
_______________________________________________ Openstack-i18n mailing list Openstack-i18n@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-i18n
-- Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Felix Imendörffer, Jane Smithard, Dilip Upmanyu, Graham Norton, HRB 21284 (AG Nürnberg) GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126