Description of problem: It does not appear to me that when candlepin throws a new GoneException, the exception string remains untranslated. Version-Release number of selected component (if applicable): [root@jsefler-f14-candlepin candlepin]# git log | head -1 commit 0680c7840e5afc146ef38a9f5da4a0a53768523d How reproducible: Steps to Reproduce: From a client system: [root@jsefler-6 ~]# LANG=ja_JP.UTF-8 subscription-manager remove --serial 5530561923293555342 Consumer e98c8e54-3ac7-4d86-b584-d224565fb422 has been deleted ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ EXPECTED THAT TO BE TRANSLATED. Looking at the candlepin source code: [root@jsefler-f14-candlepin candlepin]# pwd /root/candlepin/src/main/java/org/candlepin [root@jsefler-f14-candlepin candlepin]# grep -r "new GoneException" * > auth/interceptor/SecurityInterceptor.java: throw new GoneException("Consumer " + key + " has been deleted", key); > resource/UserResource.java: throw new GoneException("user " + username + " not found"); > resource/HypervisorResource.java: throw new GoneException("Hypervisor " + hostEntry.getKey() + > resteasy/interceptor/ConsumerAuth.java: throw new GoneException("Consumer " + consumerUuid + [root@jsefler-f14-candlepin candlepin]# I think the GoneException msg arguments should be passed to i18n.tr(...) Additional info (for mreid): Referencing bug 874816, there appears to be a lot of "Consumer" references in the candlepin message strings that should be changed to "Unit"/"System" based on the context of the message. For example: > auth/interceptor/SecurityInterceptor.java: throw new GoneException("Consumer " + key + " has been deleted", key); > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > i18n.tr("Unit " + key + " has been deleted", key)
Absolutely correct, I've tried to detail the necessary updates over several string bzs against CP, such as https://bugzilla.redhat.com/show_bug.cgi?id=876764
https://github.com/candlepin/candlepin/pull/120
commit 89549da37fcc7888fc1c1c91b2a45efdde15d8a9 Author: Bryan Kearney <bkearney> Date: Mon Nov 26 21:32:29 2012 -0500 877697: Localize the GoneException.
Verifying Version... [root@jsefler-f14-candlepin candlepin]# git show-ref | grep master 10bc5f9576fc9168c357db9e7877343a01a48155 refs/heads/master [root@jsefler-f14-candlepin candlepin]# pwd /root/candlepin [root@jsefler-f14-candlepin candlepin]# grep -r "new GoneException" * -A1 src/main/java/org/candlepin/auth/interceptor/SecurityInterceptor.java: throw new GoneException(i18n.tr("Consumer {0} has been deleted", key), key); src/main/java/org/candlepin/auth/interceptor/SecurityInterceptor.java- } -- src/main/java/org/candlepin/resteasy/interceptor/ConsumerAuth.java: throw new GoneException( src/main/java/org/candlepin/resteasy/interceptor/ConsumerAuth.java- i18n.tr("Consumer {0} has been deleted", consumerUuid), consumerUuid); -- src/main/java/org/candlepin/resource/UserResource.java: throw new GoneException(i18n.tr("User {0} not found", username), username); src/main/java/org/candlepin/resource/UserResource.java- } -- src/main/java/org/candlepin/resource/HypervisorResource.java: throw new GoneException( src/main/java/org/candlepin/resource/HypervisorResource.java- i18n.tr("Hypervisor {0} has been deleted previously", [root@jsefler-f14-candlepin candlepin]# VERIFIED: All of the instatiated GoneException now wrap their message in i18n.tr(...) [root@jsefler-f14-candlepin candlepin]# grep "Consumer {0} has been deleted" po/keys.pot msgid "Consumer {0} has been deleted" [root@jsefler-f14-candlepin candlepin]# grep "User {0} not found" po/keys.pot msgid "User {0} not found" [root@jsefler-f14-candlepin candlepin]# grep "Hypervisor {0} has been deleted previously" po/keys.pot msgid "Hypervisor {0} has been deleted previously" VERIFIED that these GoneException messages have been extracted for translation.
These bugs were fixed during 7.0 but not moved to CLOSED. They have been delivered