diff options
author | Bananeweizen <bananeweizen@gmx.de> | 2012-06-29 19:37:05 +0200 |
---|---|---|
committer | Bananeweizen <bananeweizen@gmx.de> | 2012-06-29 19:37:05 +0200 |
commit | a02fe9aa44d97b6230a50678ab8d8536e03264e5 (patch) | |
tree | 9b1f83659f5501f0ded33d4d246880d1d8d2c76b /main/src/cgeo/geocaching | |
parent | cd6e3152799926baafc59b154d21d9a8f3dcb48b (diff) | |
download | cgeo-a02fe9aa44d97b6230a50678ab8d8536e03264e5.zip cgeo-a02fe9aa44d97b6230a50678ab8d8536e03264e5.tar.gz cgeo-a02fe9aa44d97b6230a50678ab8d8536e03264e5.tar.bz2 |
#1833: recognize localized waypoint type names
* we may want to fix the export of those nonetheless
Diffstat (limited to 'main/src/cgeo/geocaching')
-rw-r--r-- | main/src/cgeo/geocaching/files/GPXParser.java | 12 |
1 files changed, 10 insertions, 2 deletions
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) { |