##// END OF EJS Templates
gists: fixed translation for age component which uses pyramid translate component.
marcink -
r1346:b11e64ec default
parent child Browse files
Show More
@@ -202,7 +202,7 b' class GistsController(BaseController):'
202 202
203 203 @LoginRequired()
204 204 @NotAnonymous()
205 def new(self, format='html'):
205 def new(self):
206 206 """GET /admin/gists/new: Form to create a new item"""
207 207 # url('new_gist')
208 208 self.__load_defaults()
@@ -322,7 +322,9 b' class GistsController(BaseController):'
322 322
323 323 @LoginRequired()
324 324 @NotAnonymous()
325 def edit_form(self, gist_id, format='html'):
325 def edit_form(self, gist_id):
326 translate = _ = c.pyramid_request.translate
327
326 328 """GET /admin/gists/gist_id/edit: Form to edit an existing item"""
327 329 # url('edit_gist', gist_id=ID)
328 330 self._add_gist_to_context(gist_id)
@@ -342,6 +344,8 b' class GistsController(BaseController):'
342 344 else:
343 345 # this cannot use timeago, since it's used in select2 as a value
344 346 expiry = h.age(h.time_to_datetime(c.gist.gist_expires))
347
348 expiry = translate(expiry)
345 349 self.__load_defaults(
346 350 extra_values=(0, _('%(expiry)s - current value') % {'expiry': expiry}))
347 351 return render('admin/gists/edit.mako')
General Comments 0
You need to be logged in to leave comments. Login now