Bug 788992

Summary: calls to backend services must include locale in request
Product: Red Hat Satellite Reporter: Tom McKay <tomckay>
Component: APIAssignee: Tomas Strachota <tstrachota>
Status: CLOSED CURRENTRELEASE QA Contact: Jitendra Yejare <jyejare>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.0.0CC: cwelton, gkhachik, mmccune, tstrachota
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-22 18:25:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Tom McKay 2012-02-09 14:23:54 UTC
Description of problem:

Calls that katello make to backend services, such as candlepin, need to send the user's locale setting. This is to insure that any resulting messages are translated.

Easiest testcase:
1. upload a manifest from distributor X
2. switch user locale to Japanese 'ja'
3. upload a manifest from distributor Y
4. Note that if the error message displayed is fully translated

Comment 1 Tom McKay 2012-02-09 14:45:29 UTC
With candlepin DEBUG set in candlepin.conf


log4j.logger.org.candlepin=DEBUG

Checking /var/log/tomcat6/catalina.out you should see accept-language

====Headers====
  authorization: Basic YWRtaW46YWRtaW4=
  user-agent: curl/7.21.7 (x86_64-redhat-linux-gnu) libcurl/7.21.7 NSS/3.13.1.0 zlib/1.2.5 libidn/1.22 libssh2/1.2.7
  host: localhost:8443
  accept: */*
  accept-language: ja_JP
====Headers====

Comment 4 Corey Welton 2012-03-12 19:28:32 UTC
QA Verified - setting various language options and loading pages indicates that the accept-language directive is getting properly sent in headers.

[root@deploy12 ~]# tail -f /var/log/tomcat6/catalina.out|grep "language"
  accept-language: en
  accept-language: en
  accept-language: zh_CN
  accept-language: zh_CN