consolidate two strings into one, for more context for translators
This commit is contained in:
parent
19bfb4160a
commit
de02717139
@ -196,11 +196,15 @@ class EditPlace(EditPrimary):
|
||||
|
||||
def _validate_coordinate(self, widget, text, typedeg):
|
||||
if (typedeg == 'lat') and not conv_lat_lon(text, "0", "ISO-D"):
|
||||
return ValidationError(_("Invalid latitude (syntax: 18\u00b09'") +
|
||||
_('48.21"S, -18.2412 or -18:9:48.21)'))
|
||||
return ValidationError(
|
||||
# translators: translate the "S" too (and the "or" of course)
|
||||
_('Invalid latitude\n(syntax: '
|
||||
'18\u00b09\'48.21"S, -18.2412 or -18:9:48.21)'))
|
||||
elif (typedeg == 'lon') and not conv_lat_lon("0", text, "ISO-D"):
|
||||
return ValidationError(_("Invalid longitude (syntax: 18\u00b09'") +
|
||||
_('48.21"E, -18.2412 or -18:9:48.21)'))
|
||||
return ValidationError(
|
||||
# translators: translate the "E" too (and the "or" of course)
|
||||
_('Invalid longitude\n(syntax: '
|
||||
'18\u00b09\'48.21"E, -18.2412 or -18:9:48.21)'))
|
||||
|
||||
def update_title(self):
|
||||
new_title = place_displayer.display(self.db, self.obj)
|
||||
|
@ -189,11 +189,15 @@ class EditPlaceRef(EditReference):
|
||||
|
||||
def _validate_coordinate(self, widget, text, typedeg):
|
||||
if (typedeg == 'lat') and not conv_lat_lon(text, "0", "ISO-D"):
|
||||
return ValidationError(_("Invalid latitude (syntax: 18\u00b09'") +
|
||||
_('48.21"S, -18.2412 or -18:9:48.21)'))
|
||||
return ValidationError(
|
||||
# translators: translate the "S" too (and the "or" of course)
|
||||
_('Invalid latitude\n(syntax: '
|
||||
'18\u00b09\'48.21"S, -18.2412 or -18:9:48.21)'))
|
||||
elif (typedeg == 'lon') and not conv_lat_lon("0", text, "ISO-D"):
|
||||
return ValidationError(_("Invalid longitude (syntax: 18\u00b09'") +
|
||||
_('48.21"E, -18.2412 or -18:9:48.21)'))
|
||||
return ValidationError(
|
||||
# translators: translate the "E" too (and the "or" of course)
|
||||
_('Invalid longitude\n(syntax: '
|
||||
'18\u00b09\'48.21"E, -18.2412 or -18:9:48.21)'))
|
||||
|
||||
def update_title(self):
|
||||
new_title = place_displayer.display(self.db, self.source)
|
||||
|
Loading…
Reference in New Issue
Block a user