[Openstack-i18n] Glance needs some fields in JSON files translated.
Okuma, Wayne
wayne.okuma at hp.com
Mon Aug 3 18:53:11 UTC 2015
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.
Thanks and Regards,
Wayne Okuma
-----Original Message-----
From: Andreas Jaeger [mailto:aj at suse.com]
Sent: Monday, August 03, 2015 1:53 AM
To: Okuma, Wayne; openstack-i18n at 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
More information about the Openstack-i18n
mailing list