Skip to content

Commit

Permalink
Merge pull request #14758 from mzazrivec/dont_user_interpolation_insi…
Browse files Browse the repository at this point in the history
…de_a_gettext_string

Don't use interpolation inside a gettext string
  • Loading branch information
chessbyte authored Apr 17, 2017
2 parents 08c3090 + 884d6e2 commit 2983b46
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/vm_or_template/operations/relocation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def raw_migrate(host, pool = nil, priority = "defaultPriority", state = nil)
end

if host_id == host.id
raise _("The VM '#{name}' can not be migrated to the same host it is already running on.")
raise _("The VM '%{name}' can not be migrated to the same host it is already running on.") % {:name => name}
end

host_mor = host.ems_ref_obj
Expand Down
2 changes: 1 addition & 1 deletion lib/api/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def self.resource_search_by_href_slug(href_slug, user = User.current_user)
collection, id = href_slug.split('/')
collection_config = Api::CollectionConfig.new if collection

raise _("Invalid href_slug #{href_slug} specified") unless collection && id && collection_config.collection?(collection)
raise _("Invalid href_slug %{href_slug} specified") % {:href_slug => href_slug} unless collection && id && collection_config.collection?(collection)
raise _("User must be defined") unless user

klass = collection_config.klass(collection)
Expand Down

0 comments on commit 2983b46

Please sign in to comment.