-
Notifications
You must be signed in to change notification settings - Fork 898
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mark Strings in Request Details for Translation #22506
Mark Strings in Request Details for Translation #22506
Conversation
app/models/vm_reconfigure_task.rb
Outdated
@@ -25,7 +25,7 @@ def self.get_description(req) | |||
msg << build_message(options, :network_adapter_edit, "Edit Network Adapters: %d", :length) | |||
msg << build_message(options, :cdrom_connect, "Attach CD/DVDs: %d", :length) | |||
msg << build_message(options, :cdrom_disconnect, "Detach CD/DVDs: %d", :length) | |||
"#{request_class::TASK_DESCRIPTION} for: #{resource_name(req)} - #{msg.compact.join(", ")}" | |||
N_("#{request_class::TASK_DESCRIPTION} for: #{resource_name(req)} - #{msg.compact.join(", ")}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is a bit more complicated, but it's a similar pattern - you can build up the list of messages and each one should be translated before interpolating it in.
fa494df
to
b7b77dd
Compare
N_("Provisioning Service [#{rsc_name}] for Service [#{svc_target_name}]") | ||
when MiqProvisionRequestTemplate | ||
"Provisioning VM [#{rsc_name}] for Service [#{svc_target_name}]" | ||
N_("Provisioning VM [#{rsc_name}] for Service [#{svc_target_name}]") | ||
else | ||
"Provisioning [#{rsc_name}] for Service [#{svc_target_name}]" | ||
N_("Provisioning [#{rsc_name}] for Service [#{svc_target_name}]") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These all need to be changed similar to how it was done on line 43.
Can you verify that the definition of each |
b7b77dd
to
54349bf
Compare
This pull request has been automatically marked as stale because it has not been updated for at least 3 months. If these changes are still valid, please remove the Thank you for all your contributions! More information about the ManageIQ triage process can be found in the triage process documentation. |
@DavidResende0 I think I was waiting on a response to this:
I did a quick grep and it doesn't look like any of them are defined as N_, which is what i'm concerned about, but I'm not sure these are all of the request types:
|
I'll look into it and see if I can find them all |
54349bf
to
7ace1d5
Compare
Checked commit DavidResende0@7ace1d5 with ruby 2.6.10, rubocop 1.28.2, haml-lint 0.35.0, and yamllint |
Backported to
|
…ion-fix Mark Strings in Request Details for Translation (cherry picked from commit 7b5ac62)
Related to: ManageIQ/manageiq-ui-classic#8788
Marks strings for translation in the Request Details page. Most of these strings used to be marked prior to the recent form conversion.