Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1046784

Summary: [RFE][neutron]: i18n Message improvements
Product: Red Hat OpenStack Reporter: RHOS Integration <rhos-integ>
Component: openstack-neutronAssignee: Ihar Hrachyshka <ihrachys>
Status: CLOSED DEFERRED QA Contact: Lijun Li <lijli>
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: chrisw, ihrachys, lijli, lpeer, markmc, nyechiel, oblaut, yeylon
Target Milestone: Upstream M3Keywords: FutureFeature, i18n, Rebase, Triaged, ZStream
Target Release: 5.0 (RHEL 7)   
Hardware: Unspecified   
OS: Unspecified   
URL: https://blueprints.launchpad.net/neutron/+spec/i18n-messages
Whiteboard: upstream_milestone_icehouse-3 upstream_status_implemented upstream_definition_approved
Fixed In Version: Doc Type: Rebase: Bug Fixes and Enhancements
Doc Text:
Story Points: ---
Clone Of:
: 1060998 (view as bug list) Environment:
Last Closed: 2014-07-07 14:54:57 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1042121, 1113599    
Bug Blocks: 1003878, 1060998    

Description RHOS Integration 2013-12-26 23:09:35 UTC
Cloned from launchpad blueprint https://blueprints.launchpad.net/neutron/+spec/i18n-messages.

Description:

During the Oslo meeting on 2013-10-11 (http://eavesdrop.openstack.org/meetings/oslo/2013/) we discussed the integration of Messages into OpenStack vs other approaches, and also came up with some ideas for improving the current implementation and on how to implement the translated logs feature.

After the corresponding blueprint is implemented in oslo (https://blueprints.launchpad.net/oslo/+spec/i18n-messages) we will have the ability to translate REST API responses, and to create additional logs in languages other than the default system locale.

This blueprint is for synchronizing the oslo code into neutron, re-enabling the lazy translation, and making necessary adjustments in existing messages so they are translatable (e.g. Messages should not be created with +, but with % instead).

Specification URL (additional information):

None

Comment 2 Ihar Hrachyshka 2014-05-15 14:45:11 UTC
We've already shipped some packages with the RFE implemented via rebase.

Comment 10 Ihar Hrachyshka 2014-06-26 08:48:12 UTC
Note: I refer my comment based on the code at: https://review.openstack.org/#/c/62508/5/openstack/common/log.py

To set logging in additional language, you should:
- set log_file and log_dir in neutron.conf;
- set log_additional_locale, f.e. log_additional_locale = zh_TW (make sure locale is available in your system by issuing 'locale -a' and checking it's there).
- run neutron, and check that both log_dir/log_file and log_dir/zh_TW/log_file are created. The last one should contain Chinese logs.

Comment 11 Lijun Li 2014-06-26 09:58:42 UTC
(In reply to Ihar Hrachyshka from comment #10)
> Note: I refer my comment based on the code at:
> https://review.openstack.org/#/c/62508/5/openstack/common/log.py
> 
> To set logging in additional language, you should:
> - set log_file and log_dir in neutron.conf;
> - set log_additional_locale, f.e. log_additional_locale = zh_TW (make sure
> locale is available in your system by issuing 'locale -a' and checking it's
> there).
> - run neutron, and check that both log_dir/log_file and
> log_dir/zh_TW/log_file are created. The last one should contain Chinese logs.

Hi Ihar,

I modified neutron.conf like this: 
# use_stderr = False
# log_file =
# log_dir =
log_file=test.log
log_dir =/var/log/neutron
log_additional_locale = zh_CN

and run neutron-server, but the ./zh_CN/log_file not created:
# ls /var/log/neutron/
dhcp-agent.log  metadata-agent.log     server.log
l3-agent.log    openvswitch-agent.log  test.log

Could you please see if any problem for the setting?

Thanks,
Robert

Comment 12 Ihar Hrachyshka 2014-06-26 12:39:03 UTC
It turned out that new option didn't make to any code tree, it was abandoned on purpose, though we shoold still be able to set logging in multiple languages via logging.conf. I'm currently trying to understand how we may achieve this. Stay tuned.

Comment 13 Ihar Hrachyshka 2014-06-26 13:44:59 UTC
Well, a bit more investigation revealed disturbing thing. It turned out we don't package any translation files. I've created a bug for that: https://bugzilla.redhat.com/show_bug.cgi?id=1113599

So at the moment, we can't really verify that this functionality works. The most you can do is checking that the code is there. :|

Comment 17 Lon Hohberger 2014-07-07 14:54:57 UTC
Deferring pending bug 1113599; will clone when ready.