[openstack-dev] does exception need localize or not?

Joshua Harlow harlowja at yahoo-inc.com
Thu Mar 13 22:44:39 UTC 2014

From: Doug Hellmann <doug.hellmann at dreamhost.com<mailto:doug.hellmann at dreamhost.com>>
Reply-To: "OpenStack Development Mailing List (not for usage questions)" <openstack-dev at lists.openstack.org<mailto:openstack-dev at lists.openstack.org>>
Date: Thursday, March 13, 2014 at 12:44 PM
To: "OpenStack Development Mailing List (not for usage questions)" <openstack-dev at lists.openstack.org<mailto:openstack-dev at lists.openstack.org>>
Subject: Re: [openstack-dev] does exception need localize or not?

On Thu, Feb 27, 2014 at 3:45 AM, yongli he <yongli.he at intel.com<mailto:yongli.he at intel.com>> wrote:
refer to :

now some exception use _ and some not.  the wiki suggest do not to do that. but i'm not sure.

what's the correct way?


What To Translate

At present the convention is to translate all user-facing strings. This means API messages, CLI responses, documentation, help text, etc.

There has been a lack of consensus about the translation of log messages; the current ruling is that while it is not against policy to mark log messages for translation if your project feels strongly about it, translating log messages is not actively encouraged.

I've updated the wiki to replace that paragraph with a pointer to https://wiki.openstack.org/wiki/LoggingStandards#Log_Translation which explains the log translation rules. We will be adding the job needed to have different log translations during Juno.

Exception text should not be marked for translation, becuase if an exception occurs there is no guarantee that the translation machinery will be functional.

This makes no sense to me. Exceptions should be translated. By far the largest number of errors will be presented to users through the API or through Horizon (which gets them from the API). We will ensure that the translation code does its best to fall back to the original string if the translation fails.


Yongli He

OpenStack-dev mailing list
OpenStack-dev at lists.openstack.org<mailto:OpenStack-dev at lists.openstack.org>

I think this question comes up every 3 months, haha ;)

As we continue to expand all the libraries in https://github.com/openstack/requirements/blob/master/global-requirements.txt and knowing that those libraries likely don't translate there exceptions (probably in the majority of cases, especially in non-openstack/oslo 3rd party libraries) are we chasing a ideal that can not be caught?

Food for thought,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140313/c1fb16e6/attachment.html>

More information about the OpenStack-dev mailing list