Commit 1d47468052e7df91d1d719f145eb8c839b77ed86
1 parent
01ea9f77
Exists in
master
and in
29 other branches
API::Helpers: resolve translation calls at runtime
It is _very_ frustrating to be finding those all the time.
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
lib/noosfero/api/helpers.rb
... | ... | @@ -225,12 +225,12 @@ module Noosfero |
225 | 225 | end |
226 | 226 | |
227 | 227 | def cant_be_saved_request!(attribute) |
228 | - message = _("(Invalid request) #{attribute} can't be saved") | |
228 | + message = _("(Invalid request) %s can't be saved") % attribute | |
229 | 229 | render_api_error!(message, 400) |
230 | 230 | end |
231 | 231 | |
232 | 232 | def bad_request!(attribute) |
233 | - message = _("(Bad request) #{attribute} not given") | |
233 | + message = _("(Invalid request) %s not given") % attribute | |
234 | 234 | render_api_error!(message, 400) |
235 | 235 | end |
236 | 236 | ... | ... |