[openstack-dev] [ironic] Translations removal
Kevin L. Mitchell
klmitch at mit.edu
Wed Mar 22 13:42:42 UTC 2017
On Tue, 2017-03-21 at 22:10 +0000, Taryma, Joanna wrote:
> However, pep8 does not accept passing variable to translation
> functions, so this results in ‘H701 Empty localization string’ error.
>
> Possible options to handle that:
>
> 1) Duplicate messages:
>
> LOG.error(“<error message>”, {<key>: <val>})
>
> raise Exception(_(“<error message>”) % {<key>: <val>})
>
> 2) Ignore this error
>
> 3) Talk to hacking people about possible upgrade of this check
>
> 4) Pass translated text to LOG in such cases
>
>
>
> I’d personally vote for 2. What are your thoughts?
When the translators go to translate, they generally only get to see
what's inside _(), so #2 is a no-go for translations, and #3 also is a
no-go.
--
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/e3bbd08e/attachment.pgp>
More information about the OpenStack-dev
mailing list