[openstack-dev] [ironic] Translations removal
Kevin L. Mitchell
klmitch at mit.edu
Wed Mar 22 19:15:23 UTC 2017
On Wed, 2017-03-22 at 18:44 +0000, Taryma, Joanna wrote:
> Thanks for pointing out that 2 and 3 won’t actually work, I apologize
> for the confusion it could’ve created.
>
>
>
> I don’t like the option 6, because making user-messages friendlier was
> the whole purpose of translation. Mixing languages in exception would
> be even worse than doing it in logs, IMHO. What is more – if there’s a
> custom message passed to exception (e.g. MyException(“My message” %
> {k: v}), it overwrites the default one, so it would end up with
> English-only message.
>
>
>
> Option 5 looks nice (and easy), but I don’t think that it will be very
> good if all other components will allow showing translated messages
> and Ironic won’t.
>
> Seems like *if* we want to translate entire exception messages, we’re
> left with option 1 only, right?
It occurred to me that i18n may provide a means of handling this
directly; I don't know for sure, but one of the library developers could
probably comment. IIRC, i18n uses (or can use) "lazy translation",
where it keeps around the original message but only translates it on
output. If that's the case, that may help provide a solution to
translate user-visible messages while leaving logs untranslated.
--
Kevin L. Mitchell <klmitch at mit.edu>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20170322/18429588/attachment.pgp>
More information about the OpenStack-dev
mailing list