From de027171397f06f86a8bda03e9b018ff28c5f8d8 Mon Sep 17 00:00:00 2001 From: Paul Franklin Date: Sat, 16 Sep 2017 18:41:23 -0700 Subject: [PATCH] consolidate two strings into one, for more context for translators --- gramps/gui/editors/editplace.py | 12 ++++++++---- gramps/gui/editors/editplaceref.py | 12 ++++++++---- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/gramps/gui/editors/editplace.py b/gramps/gui/editors/editplace.py index c4ae13193..e960d8389 100644 --- a/gramps/gui/editors/editplace.py +++ b/gramps/gui/editors/editplace.py @@ -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) diff --git a/gramps/gui/editors/editplaceref.py b/gramps/gui/editors/editplaceref.py index f69e85c00..165995380 100644 --- a/gramps/gui/editors/editplaceref.py +++ b/gramps/gui/editors/editplaceref.py @@ -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)