consolidate two strings into one, for more context for translators

This commit is contained in:
Paul Franklin 2017-09-16 18:41:23 -07:00
parent 19bfb4160a
commit de02717139
2 changed files with 16 additions and 8 deletions

View File

@ -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)

View File

@ -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)