From a02fe9aa44d97b6230a50678ab8d8536e03264e5 Mon Sep 17 00:00:00 2001 From: Bananeweizen Date: Fri, 29 Jun 2012 19:37:05 +0200 Subject: #1833: recognize localized waypoint type names * we may want to fix the export of those nonetheless --- main/src/cgeo/geocaching/files/GPXParser.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'main/src/cgeo/geocaching/files/GPXParser.java') diff --git a/main/src/cgeo/geocaching/files/GPXParser.java b/main/src/cgeo/geocaching/files/GPXParser.java index fbe1b65..f8ec61c 100644 --- a/main/src/cgeo/geocaching/files/GPXParser.java +++ b/main/src/cgeo/geocaching/files/GPXParser.java @@ -790,9 +790,17 @@ public abstract class GPXParser extends FileParser { return WaypointType.TRAILHEAD; } else if ("final location".equalsIgnoreCase(sym)) { return WaypointType.FINAL; - } else { - return WaypointType.WAYPOINT; } + // this is not fully correct, but lets also look for localized waypoint types + for (WaypointType waypointType : WaypointType.ALL_TYPES_EXCEPT_OWN) { + final String localized = waypointType.getL10n(); + if (StringUtils.isNotEmpty(localized)) { + if (localized.equalsIgnoreCase(sym)) { + return waypointType; + } + } + } + return WaypointType.WAYPOINT; } private void findGeoCode(final String input) { -- cgit v1.1