Skip to content
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

Fix broken string interpolation with translations #925

Merged
merged 1 commit into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def self.fetch_repo_id(cv_id, env_id, repo_name)
repos = repo_resource.call(:index, index_options)['results']
if repos.empty?
raise _("No such repository with name %{name}, in lifecycle environment"\
" %{environment_id} and content view %{content_view_id}" % index_options)
" %{environment_id} and content view %{content_view_id}") % index_options
end
repos.first['id']
end
Expand Down
4 changes: 2 additions & 2 deletions lib/hammer_cli_katello/repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -571,15 +571,15 @@ def print_results(name, results, async)
upload_results = results.dig('output', 'upload_results') || []

if upload_results.empty?
print_message _("Successfully uploaded file %s" % name)
print_message _("Successfully uploaded file %s") % name
else
upload_results.each do |result|
if result['type'] == 'docker_manifest'
print_message(
_("Successfully uploaded manifest file '%{name}' with digest '%{digest}'") % {
:name => name, :digest => result['digest'] })
else
print_message _("Successfully uploaded file %s" % name)
print_message _("Successfully uploaded file %s") % name
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions lib/hammer_cli_katello/subscription.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ def get_subscription_type(data)
if !data["virt_only"]
_("Physical")
elsif data["host"]
_("Guests of %s" % data['host']['name'])
_("Guests of %s") % data['host']['name']
elsif data["hypervisor"]
_("Guests of %s" % data['hypervisor']['name'])
_("Guests of %s") % data['hypervisor']['name']
elsif data["unmapper_guest"]
_("Temporary")
else
Expand Down
Loading