Inappropriate translator functions are used for logging

Bug #1364813 reported by Vladyslav Drok
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Low
Vladyslav Drok

Bug Description

Some modules use _ translator, even when translated string is passed to LOG.error (LOG.warning, LOG.critical, LOG.info) function, instead of using _LE (_LW, _LC, _LI) translator.

Tags: i18n
Vladyslav Drok (vdrok)
Changed in ironic:
assignee: nobody → Vladyslav Drok (vdrok)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (master)

Fix proposed to branch: master
Review: https://review.openstack.org/118587

Changed in ironic:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/118588

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/118591

Dmitry Tantsur (divius)
Changed in ironic:
importance: Undecided → Low
tags: added: i18n
Dmitry Tantsur (divius)
Changed in ironic:
milestone: none → juno-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

Reviewed: https://review.openstack.org/116303
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=f80e85ef6d185ea743c6909d6d4d7f48cbf088f6
Submitter: Jenkins
Branch: master

commit f80e85ef6d185ea743c6909d6d4d7f48cbf088f6
Author: Vladyslav Drok <email address hidden>
Date: Wed Sep 3 12:46:51 2014 +0300

    Translator functions cleanup part 1

    This part fixes ironic/common folder and tox.ini file.

    Some modules use _ function for log translation, even when the
    translated string is passed to e.g. LOG.warn function. This patch
    fixes it, using translator functions appropriate for corresponding
    log levels. Translator functions, imported from
    ironic.openstack.common.gettextutils are now imported from
    ironic.common.i18n. Translator functions are imported the same way
    across all modules. All places that are changed conform to
    http://docs.openstack.org/developer/oslo.i18n/guidelines.html

    Partial-bug: #1364813

    Change-Id: I195d0e256c5412d6d75d2e6c35b19b44f2a0b09f

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/118587
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=4676a47697fb419aacd8248c662556e6952935d6
Submitter: Jenkins
Branch: master

commit 4676a47697fb419aacd8248c662556e6952935d6
Author: Vladyslav Drok <email address hidden>
Date: Wed Sep 3 11:42:53 2014 +0300

    Translator functions cleanup part 2

    This part fixes ironic/drivers folder.

    Some modules use _ function for log translation, even when the
    translated string is passed to e.g. LOG.warn function. This patch
    fixes it, using translator functions appropriate for corresponding
    log levels. Translator functions, imported from
    ironic.openstack.common.gettextutils are now imported from
    ironic.common.i18n. Translator functions are imported the same way
    across all modules. All places that are changed conform to
    http://docs.openstack.org/developer/oslo.i18n/guidelines.html

    Partial-bug: #1364813

    Change-Id: I77cf2582d2e9173d57da473cba118fd8b48a8735

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/118591
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=d8a237806dfed25738944ae108623e874a91746d
Submitter: Jenkins
Branch: master

commit d8a237806dfed25738944ae108623e874a91746d
Author: Vladyslav Drok <email address hidden>
Date: Wed Sep 3 12:31:15 2014 +0300

    Translator functions cleanup part 4

    This part fixes ironic/api, ironic/cmd, ironic/tests folders.

    Some modules use _ function for log translation, even when the
    translated string is passed to e.g. LOG.warn function. This patch
    fixes it, using translator functions appropriate for corresponding
    log levels. Translator functions, imported from
    ironic.openstack.common.gettextutils are now imported from
    ironic.common.i18n. Translator functions are imported the same way
    across all modules. All places that are changed conform to
    http://docs.openstack.org/developer/oslo.i18n/guidelines.html

    Partial-bug: #1364813

    Change-Id: I92e5f0d50c3b507080fb95e81274a241558ce526

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/118588
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=7a35462661177cc0231619bcde14c5c04a3873f2
Submitter: Jenkins
Branch: master

commit 7a35462661177cc0231619bcde14c5c04a3873f2
Author: Vladyslav Drok <email address hidden>
Date: Wed Sep 3 12:26:15 2014 +0300

    Translator functions cleanup part 3

    This part fixes ironic/conductor, ironic/dhcp and ironic/objects
    folders.

    Some modules use _ function for log translation, even when the
    translated string is passed to e.g. LOG.warn function. This patch
    fixes it, using translator functions appropriate for corresponding
    log levels. Translator functions, imported from
    ironic.openstack.common.gettextutils are now imported from
    ironic.common.i18n. Translator functions are imported the same way
    across all modules. All places that are changed conform to
    http://docs.openstack.org/developer/oslo.i18n/guidelines.html

    Partial-bug: #1364813

    Change-Id: Ib4b93cc49f16836a95c7cfb4c5f1705f5cbbb31f

Revision history for this message
Dmitry Tantsur (divius) wrote :

Hi Vladyslav,

thank you for hard work! Your 4 patches have landed, do you think anything else is required to make this bug as fixed?

Revision history for this message
Vladyslav Drok (vdrok) wrote :

Hi Dmitry,

as for inapproprate translators - yes, I think it's complete.

Changed in ironic:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in ironic:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ironic:
milestone: juno-rc1 → 2014.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.