Created attachment 1174883 [details] Log file download button tooltip Description of problem: String interpolations inside toolbar definitions pose a translation problem. Consider the following example string inside a toolbar definition: N_("Click on this awesome #{ui_lookup(:model => 'Vm')}") This construct is to make sure the above string is collected into a gettext catalog for translators to translate. At run-time, this string is again being evaluated inside a _() call (the actual translation). What happens here is: 1. ui_lookup() is evaluated first -> this returns a translated string (for example in Japanese) 2. The above string effectively becomes a new string: "Click on this awesome およびインスタンス" 3. The above string does not (by definition) exist in the gettext catalog, i.e. the subsequent invocation of _() returns the same string. Net result of the above is that the toolbar strings with string interpolations won't work with non-English locales. Version-Release number of selected component (if applicable): CFME-5.6 How reproducible: Always Steps to Reproduce: 1. Switch to Japanese locale 2. Navigate to Control -> Log 3. See the tooltip over the log download button Actual results: String is in english. See screenshot. Expected results: String is correctly translated. Additional info: N/A
https://github.com/ManageIQ/manageiq/pull/9501 https://github.com/ManageIQ/manageiq/pull/9508 https://github.com/ManageIQ/manageiq/pull/9510 https://github.com/ManageIQ/manageiq/pull/9512 https://github.com/ManageIQ/manageiq/pull/9572
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/ba1e67271df72008424fa34200efe8e22f32750f commit ba1e67271df72008424fa34200efe8e22f32750f Author: Milan Zazrivec <mzazrivec> AuthorDate: Fri Jul 1 16:11:24 2016 +0200 Commit: Milan Zazrivec <mzazrivec> CommitDate: Fri Jul 1 17:34:39 2016 +0200 Toolbars: remove string interpolations with instance variables This is to make sure the translations for toolbars works correctly. https://bugzilla.redhat.com/show_bug.cgi?id=1352007 https://bugzilla.redhat.com/show_bug.cgi?id=1348649 https://bugzilla.redhat.com/show_bug.cgi?id=1348649 https://bugzilla.redhat.com/show_bug.cgi?id=1288413 https://bugzilla.redhat.com/show_bug.cgi?id=1340139 https://bugzilla.redhat.com/show_bug.cgi?id=1340708 https://bugzilla.redhat.com/show_bug.cgi?id=1340870 https://bugzilla.redhat.com/show_bug.cgi?id=1288413 app/helpers/application_helper.rb | 2 + .../application_helper/toolbar/condition_center.rb | 13 +++-- .../toolbar/custom_button_set_center.rb | 8 ++- .../toolbar/diagnostics_region_center.rb | 53 +++++++++++++++--- .../toolbar/diagnostics_server_center.rb | 8 ++- .../toolbar/diagnostics_zone_center.rb | 62 +++++++++++++++++++--- .../application_helper/toolbar/dialog_center.rb | 8 ++- .../application_helper/toolbar/logs_center.rb | 8 ++- .../application_helper/toolbar/miq_group_center.rb | 4 +- .../toolbar/miq_groups_center.rb | 4 +- .../toolbar/miq_policy_center.rb | 12 ++++- .../application_helper/toolbar/summary_center.rb | 5 +- .../toolbar/summary_center_restful.rb | 5 +- .../application_helper/toolbar/tenant_center.rb | 4 +- .../application_helper/toolbar/tenants_center.rb | 4 +- .../application_helper/toolbar/user_center.rb | 4 +- .../application_helper/toolbar/users_center.rb | 4 +- 17 files changed, 171 insertions(+), 37 deletions(-)
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/0ca6339462c988f931c63aa3fb115a1c50f437e4 commit 0ca6339462c988f931c63aa3fb115a1c50f437e4 Author: Milan Zazrivec <mzazrivec> AuthorDate: Fri Jul 1 14:39:33 2016 +0200 Commit: Milan Zazrivec <mzazrivec> CommitDate: Fri Jul 1 16:23:10 2016 +0200 Toolbars: remove string interpolations with ui_lookup This is to make sure the translations for toolbars works correctly. https://bugzilla.redhat.com/show_bug.cgi?id=1352007 https://bugzilla.redhat.com/show_bug.cgi?id=1348649 https://bugzilla.redhat.com/show_bug.cgi?id=1348649 https://bugzilla.redhat.com/show_bug.cgi?id=1288413 https://bugzilla.redhat.com/show_bug.cgi?id=1340139 https://bugzilla.redhat.com/show_bug.cgi?id=1340708 https://bugzilla.redhat.com/show_bug.cgi?id=1340870 https://bugzilla.redhat.com/show_bug.cgi?id=1288413 app/helpers/application_helper/toolbar/condition_center.rb | 6 ++++-- app/helpers/application_helper/toolbar/conditions_center.rb | 8 +++++++- .../application_helper/toolbar/miq_alert_profiles_center.rb | 4 +++- app/helpers/application_helper/toolbar/miq_policy_center.rb | 10 +++++++--- 4 files changed, 21 insertions(+), 7 deletions(-)
New commit detected on ManageIQ/manageiq/darga: https://github.com/ManageIQ/manageiq/commit/7d5af5d26e0ec90be2749c4033d35b733b651ebb commit 7d5af5d26e0ec90be2749c4033d35b733b651ebb Author: Milan Zazrivec <mzazrivec> AuthorDate: Fri Jul 1 14:39:33 2016 +0200 Commit: Milan Zazrivec <mzazrivec> CommitDate: Tue Jul 12 13:50:20 2016 +0200 Toolbars: remove string interpolations with ui_lookup This is to make sure the translations for toolbars works correctly. https://bugzilla.redhat.com/show_bug.cgi?id=1352007 https://bugzilla.redhat.com/show_bug.cgi?id=1348649 https://bugzilla.redhat.com/show_bug.cgi?id=1348649 https://bugzilla.redhat.com/show_bug.cgi?id=1288413 https://bugzilla.redhat.com/show_bug.cgi?id=1340139 https://bugzilla.redhat.com/show_bug.cgi?id=1340708 https://bugzilla.redhat.com/show_bug.cgi?id=1340870 https://bugzilla.redhat.com/show_bug.cgi?id=1288413 (cherry picked from commit 0ca6339462c988f931c63aa3fb115a1c50f437e4) app/helpers/application_helper/toolbar/condition_center.rb | 6 ++++-- app/helpers/application_helper/toolbar/conditions_center.rb | 8 +++++++- .../application_helper/toolbar/miq_alert_profiles_center.rb | 4 +++- app/helpers/application_helper/toolbar/miq_policy_center.rb | 10 +++++++--- 4 files changed, 21 insertions(+), 7 deletions(-)
New commit detected on ManageIQ/manageiq/darga: https://github.com/ManageIQ/manageiq/commit/0935e92962f2e8c9796f0248d71281dd796b7a9d commit 0935e92962f2e8c9796f0248d71281dd796b7a9d Author: Milan Zazrivec <mzazrivec> AuthorDate: Fri Jul 1 16:11:24 2016 +0200 Commit: Milan Zazrivec <mzazrivec> CommitDate: Tue Jul 12 13:51:17 2016 +0200 Toolbars: remove string interpolations with instance variables This is to make sure the translations for toolbars works correctly. https://bugzilla.redhat.com/show_bug.cgi?id=1352007 https://bugzilla.redhat.com/show_bug.cgi?id=1348649 https://bugzilla.redhat.com/show_bug.cgi?id=1348649 https://bugzilla.redhat.com/show_bug.cgi?id=1288413 https://bugzilla.redhat.com/show_bug.cgi?id=1340139 https://bugzilla.redhat.com/show_bug.cgi?id=1340708 https://bugzilla.redhat.com/show_bug.cgi?id=1340870 https://bugzilla.redhat.com/show_bug.cgi?id=1288413 (cherry picked from commit ba1e67271df72008424fa34200efe8e22f32750f) app/helpers/application_helper.rb | 2 + .../application_helper/toolbar/condition_center.rb | 13 +++-- .../toolbar/custom_button_set_center.rb | 8 ++- .../toolbar/diagnostics_region_center.rb | 53 +++++++++++++++--- .../toolbar/diagnostics_server_center.rb | 8 ++- .../toolbar/diagnostics_zone_center.rb | 62 +++++++++++++++++++--- .../application_helper/toolbar/dialog_center.rb | 8 ++- .../application_helper/toolbar/logs_center.rb | 8 ++- .../application_helper/toolbar/miq_group_center.rb | 4 +- .../toolbar/miq_groups_center.rb | 4 +- .../toolbar/miq_policy_center.rb | 12 ++++- .../application_helper/toolbar/summary_center.rb | 5 +- .../toolbar/summary_center_restful.rb | 5 +- .../application_helper/toolbar/tenant_center.rb | 4 +- .../application_helper/toolbar/tenants_center.rb | 4 +- .../application_helper/toolbar/user_center.rb | 4 +- .../application_helper/toolbar/users_center.rb | 4 +- 17 files changed, 171 insertions(+), 37 deletions(-)
Verification failed in 5.7.0.3.20160927165516_075d0f3. Translations are still missing in the above build. Refer the screenshot "download" and "reload" for further information
Created attachment 1207462 [details] reload
Created attachment 1207463 [details] download
This is simply a matter of missing translations for 5.7
Moving to POST, since latest translations have been merged.
String on the tooltip is correctly translated on Control-> Log page.