Bug 1356254

Summary: [RFE] SSUI should be able to set locales separately from Operations UI
Product: Red Hat CloudForms Management Engine Reporter: Chris Pelland <cpelland>
Component: InternationalizationAssignee: Milan Zázrivec <mzazrivec>
Status: CLOSED CURRENTRELEASE QA Contact: Bhushan Barve <bbarve>
Severity: high Docs Contact:
Priority: high    
Version: 5.6.0CC: dajohnso, jhardy, kkrothap, mhradil, obarenbo, simaishi
Target Milestone: GAKeywords: FutureFeature, i18n, RFE, TestOnly, ZStream
Target Release: 5.7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.7.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1356256 (view as bug list) Environment:
Last Closed: 2017-01-11 20:06:09 UTC Type: Bug
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:    
Bug Blocks: 1356256    
Attachments:
Description Flags
Rererence screen shot of language switcher component none

Description Chris Pelland 2016-07-13 20:16:39 UTC
If you look into ManageIQ sources under config/locales, you will find Chinese and Japanese locale catalogs only. 

This is OK, since those are the only two languages for the OPS UI 100% translated. 

If we're talking about self-service, then you need to look into sources of the Self-Service UI, where you'll find much more catalogs merged (Spanish being one of them) -- all of these are 100% translated. 

Since SSUI is an angular application built on top of OPS rest-api, whenever SSUI asks the API -- what's the locale I need to use for this particular user? Then the OPS API can only respond with: English, Chinese or Japanese (you're not able to set anything else for the user).

Comment 1 Milan Zázrivec 2016-07-14 12:28:20 UTC
First PR on the topic:

https://github.com/ManageIQ/manageiq-ui-self_service/pull/77

Comment 2 CFME Bot 2016-07-14 13:16:36 UTC
New commit detected on ManageIQ/manageiq-ui-self_service/master:
https://github.com/ManageIQ/manageiq-ui-self_service/commit/4c1e1802a5fbb3e3c72daef162a7cb828fcfaae6

commit 4c1e1802a5fbb3e3c72daef162a7cb828fcfaae6
Author:     Milan Zazrivec <mzazrivec>
AuthorDate: Wed Jul 13 17:27:15 2016 +0200
Commit:     Milan Zazrivec <mzazrivec>
CommitDate: Thu Jul 14 14:54:33 2016 +0200

    Gulp task 'available-languages' to create list of available languages
    
    By invoking
    
        gulp available-languages
    
    a json file
    
        client/gettext/json/available_languages.json
    
    will be created containing list of available UI languages with
    corresponding locale names. This list will then be presented to
    the user in the self-service UI.
    
    The task was also added as a dependency of gulp build (for production
    deployments) as well as gulp serve-dev (for development setup).
    
    Optionally, it is possible to specify a json file
    
        client/gettext/json/supported_languages.json
    
    containing an array of supported languages which will restrict the list
    of UI languages to the specified list.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1356254

 client/app/config/gettext.config.js          |  7 +++++
 client/gettext/json/available_languages.json |  1 +
 gulp/config.js                               |  8 ++++-
 gulp/tasks/available-languages.js            | 47 ++++++++++++++++++++++++++++
 gulpfile.js                                  |  7 +++--
 5 files changed, 66 insertions(+), 4 deletions(-)
 create mode 100644 client/gettext/json/available_languages.json
 create mode 100644 gulp/tasks/available-languages.js

Comment 3 Milan Zázrivec 2016-07-21 10:37:29 UTC
Second PR on the topic:


    https://github.com/ManageIQ/manageiq-ui-self_service/pull/80

Comment 4 Krishna Babu K 2016-12-15 10:32:36 UTC
Created attachment 1232074 [details]
Rererence screen shot of language switcher component

Tested on 5.7.0.16.20161213213754_1ad3545

SSUI has the language switcher component and switching between following languages is working fine, with login page and UI.
english
german
spanish
french
japanese
slovak
simplified chinese

Verified.