maps: variables in translation strings (#40081)

This commit is contained in:
Lauréline Guérin 2020-02-21 14:43:45 +01:00
parent 40d8ef1d05
commit 8363b36208
No known key found for this signature in database
GPG Key ID: 1FAB9B9B4F93D473
1 changed files with 3 additions and 3 deletions

View File

@ -82,7 +82,7 @@ class MapCellAddLayer(CreateView):
PageSnapshot.take(
self.cell.page,
request=self.request,
comment=_('added layer "%s" to cell "%s"') % (form.instance.map_layer, self.cell))
comment=_('added layer "%(layer)s" to cell "%(cell)s"') % {'layer': form.instance.map_layer, 'cell': self.cell})
return super(MapCellAddLayer, self).form_valid(form)
def get_success_url(self):
@ -121,7 +121,7 @@ class MapCellEditLayer(UpdateView):
PageSnapshot.take(
self.cell.page,
request=self.request,
comment=_('changed options of layer "%s" in cell "%s"') % (form.instance.map_layer, self.cell))
comment=_('changed options of layer "%(layer)s" in cell "%(cell)s"') % {'layer': form.instance.map_layer, 'cell': self.cell})
return super(MapCellEditLayer, self).form_valid(form)
def get_success_url(self):
@ -155,7 +155,7 @@ class MapCellDeleteLayer(DeleteView):
PageSnapshot.take(
self.cell.page,
request=self.request,
comment=_('removed layer "%s" from cell "%s"') % (self.object.map_layer, self.cell))
comment=_('removed layer "%(layer)s" from cell "%(cell)s"') % {'layer': self.object.map_layer, 'cell': self.cell})
return response
def get_success_url(self):