[openstack-dev] [oslo] oslo.i18n adapter should be created or copied from _i18n.py?
Akihiro Motoki
amotoki at gmail.com
Fri Oct 17 11:50:06 UTC 2014
During migrating to oslo.i18n, I have a question whether I should
create oslo.i18n adapater or copy it from openstack.common._i18n?
What is the recommended way as oslo.i18n team?
oslo.i18n document [1] suggests to create oslo.i18n adapter
in the project directory out side of openstack/common directory.
It works when a project no longer uses any oslo-incubator modules.
On the other hand, oslo-incubator has openstack/common/_i18n.py
and several oslo-incubator modules like policy.py uses it.
update.sh script updates the line to <project>.openstack.common._i18n and
this means we still need openstack.common._i18n.
IMHO when considering all oslo modules are graduated,
it looks reasonable to create <project>.i18n module suggested
in oslo.i18n doc [1] and use it in a project code.
We can reduce addtional code changes when all modules are graduated.
And, if a project use any oslo-incubator module, it looks good to
copy to use openstack.common._i18n from oslo-incubator
for other oslo-incubator modules.
Thanks,
Akihiro
[1] http://docs.openstack.org/developer/oslo.i18n/usage.html
More information about the OpenStack-dev
mailing list