Bug 887095 - [de_DE][zh_TW][pt_BR][ru_RU][SAM CLI] user module "translation missing: de.activerecord.errors.messages.record_invalid" errors
[de_DE][zh_TW][pt_BR][ru_RU][SAM CLI] user module "translation missing: de.ac...
Status: CLOSED NEXTRELEASE
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Content Management (Show other bugs)
Nightly
Unspecified Linux
unspecified Severity high (vote)
: Unspecified
: 6.0
Assigned To: Lukas Zapletal
SAM QE List
: Translation, Triaged, ZStream
Depends On:
Blocks: 891411 896251
  Show dependency treegraph
 
Reported: 2012-12-13 21:41 EST by Hedda Peters
Modified: 2014-09-18 12:47 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 891411 896251 (view as bug list)
Environment:
Last Closed: 2013-06-07 14:28:43 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Hedda Peters 2012-12-13 21:41:12 EST
Filed from caserun https://tcms.engineering.redhat.com/run/53065/#caserun_1907284

Version-Release number of selected component (if applicable):
SAM-20121130.n.0

Steps to Reproduce: 
set --default_locale=xx for your test language locale.

Many commands (examples see below) from the above referenced test case produce the error message "translation missing: de.activerecord.errors.messages.record_invalid". [de_DE][zh_TW][pt_BR] locales, maybe more.



Actual results: 
[root@i18nsamtest ~]# headpin -u admin -p admin user create --username=te --password=red --email=
translation missing: de.activerecord.errors.messages.record_invalid

[root@i18nsamtest ~]# headpin -u admin -p admin user create --username=test --password=redhat --email=test@localhost --disabled=true  --default_locale=en
translation missing: de.activerecord.errors.messages.record_invalid

[root@i18nsamtest ~]# headpin -u admin -p admin user create --username=test --password=redhat --email=test@localhost --disabled=true --default_organization=test --default_environment=test --default_locale=en
translation missing: de.activerecord.errors.messages.record_invalid

[root@i18nsamtest ~]# headpin -u admin -p admin user assign_role --username=test --role=Administrator
translation missing: de.activerecord.errors.messages.record_invalid

[root@i18nsamtest ~]# headpin -u admin -p admin user update --username=test --password=redhat --email=test@localhost --disabled=false --default_organization=test --default_environment=test --default_locale=t
translation missing: de.activerecord.errors.messages.record_invalid


Expected results:
Valid, localized output.
Comment 1 Lijun Li 2012-12-13 21:58:13 EST
Build: SAM-1.2-RHEL-6-20121211.n.0

katello-headpin-all.noarch 0:1.2.6-6h.el6_3
Comment 2 Hedda Peters 2012-12-13 22:42:31 EST
Same issue found in user role module: https://tcms.engineering.redhat.com/run/53065/#caserun_1907284 

examples:
 
[root@i18nsamtest ~]# headpin -u admin -p admin user_role create --name=
translation missing: de.activerecord.errors.messages.record_invalid

[root@i18nsamtest ~]# headpin -u admin -p admin user_role add_ldap_group --name=test --group_name=test
translation missing: de.activerecord.errors.messages.record_invalid
Comment 3 Hedda Peters 2012-12-13 22:58:17 EST
Same issue in permission module, examples:

[root@i18nsamtest ~]# headpin -u admin -p admin permission create --user_role=test --name=test --scope=all
translation missing: de.activerecord.errors.messages.record_invalid

[root@i18nsamtest ~]# headpin -u admin -p admin permission create --user_role=test --name=testqe --scope=environments --verbs=test
translation missing: de.activerecord.errors.messages.record_invalid
Comment 4 Hedda Peters 2012-12-13 23:58:37 EST
Same issue in org module, example:

[root@i18nsamtest ~]# headpin -u admin -p admin org create --name=
translation missing: de.activerecord.errors.messages.record_invalid


Same issue in environment module, example:

[root@i18nsamtest ~]# headpin -u admin -p admin environment create --org=test --name=test --prior=Library --label=
translation missing: de.activerecord.errors.messages.record_invalid 

[root@i18nsamtest ~]# headpin -u admin -p admin environment update --name=test --org=test --prior=test
translation missing: de.activerecord.errors.messages.record_invalid
Comment 5 Hedda Peters 2012-12-14 02:10:34 EST
Last one: 

Same issue in activation_key module, example:

[root@i18nsamtest ~]# headpin -u admin -p admin activation_key create --name=test --environment=test --org=test
translation missing: de.activerecord.errors.messages.record_invalid

[root@i18nsamtest ~]# headpin -u admin -p admin activation_key update --name=test --org=test --new_name=
translation missing: de.activerecord.errors.messages.record_invalid
Comment 6 Tom McKay 2012-12-18 09:12:17 EST
Mass moving i18n BZs to CFSE where they are also present
Comment 8 Lukas Zapletal 2013-01-09 10:12:25 EST
Taking, acking and will improve our i18n code according to the:

http://lslezak.blogspot.cz/2012/01/switching-from-gettext-to-fastgettext.html

This bug was cloned into SAM as https://bugzilla.redhat.com/show_bug.cgi?id=891411
Comment 10 Lukas Zapletal 2013-01-22 09:32:32 EST
The issue is in set_locale. In CLI we throw away anything after two characters. We should do something similar as in UI.

Maybe we want to pick this - 4f131bd43453dab89d5d424b8adef5c2151e70e2 - and re-use the UI set_locale code.
Comment 11 Lukas Zapletal 2013-01-23 09:39:14 EST
I am taking comment 10 back, this is the fix:

https://github.com/Katello/katello/pull/1446

There will be a conflict during merging!
Comment 12 Lukas Zapletal 2013-01-25 04:07:44 EST
Ok pull request 1446 was NOT merged and this one instead: https://github.com/Katello/katello/pull/1461
Comment 13 Lukas Zapletal 2013-01-29 10:57:55 EST
I have been told by cswii that this FAILS QA:

# LC_ALL=de_DE katello  -u admin -p admin user create --username=de_DE --password=red --email=
translation missing: de.activerecord.errors.messages.record_invalid

Ok the patch that has been cherrypicked fixed issue when CLI ignored LC_ALL setting. But since the namespace was changed in Rails 3.x

https://github.com/rails/rails/pull/5274/files

we have old and outdated locale files in SE 1.1.z now.

We need to cherry pick this rails locale update:

https://github.com/Katello/katello/commit/54db6b1b4e49808450856a4427bc8b180ab8a1fc

To get this working.
Comment 15 Bryan Kearney 2013-06-06 16:50:43 EDT
Moving all POST / MODIFIED bugs to ON_QA due to the new builds.
Comment 16 Bryan Kearney 2013-06-07 14:28:43 EDT
We will be doing a new round of translations for the 1.3 drop. Closing out these bugs so that the beta starts with a clean slate.

Note You need to log in before you can comment on or make changes to this bug.