From 4733919c3cc3b4e6a1cc108ce1c4abd811223402 Mon Sep 17 00:00:00 2001 From: ivanPyrohivskyi Date: Tue, 16 Feb 2021 13:24:12 +0200 Subject: [PATCH 1/2] Allow to disable en transliteration --- OsmAnd-java/src/main/java/net/osmand/data/MapObject.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd-java/src/main/java/net/osmand/data/MapObject.java b/OsmAnd-java/src/main/java/net/osmand/data/MapObject.java index c3205431cd..7cd6e1227c 100644 --- a/OsmAnd-java/src/main/java/net/osmand/data/MapObject.java +++ b/OsmAnd-java/src/main/java/net/osmand/data/MapObject.java @@ -182,7 +182,7 @@ public abstract class MapObject implements Comparable { public String getName(String lang, boolean transliterate) { if (lang != null && lang.length() > 0) { - if (lang.equals("en")) { + if (lang.equals("en") && !getEnName(transliterate).isEmpty()) { // ignore transliterate option here for backward compatibility return getEnName(true); } else { From 6f0e0ae21c357543783b8c926bfecfc6a1e2e9c4 Mon Sep 17 00:00:00 2001 From: vshcherb Date: Tue, 16 Feb 2021 14:13:48 +0100 Subject: [PATCH 2/2] Update MapObject.java --- OsmAnd-java/src/main/java/net/osmand/data/MapObject.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/OsmAnd-java/src/main/java/net/osmand/data/MapObject.java b/OsmAnd-java/src/main/java/net/osmand/data/MapObject.java index 7cd6e1227c..79b3b8a349 100644 --- a/OsmAnd-java/src/main/java/net/osmand/data/MapObject.java +++ b/OsmAnd-java/src/main/java/net/osmand/data/MapObject.java @@ -182,9 +182,8 @@ public abstract class MapObject implements Comparable { public String getName(String lang, boolean transliterate) { if (lang != null && lang.length() > 0) { - if (lang.equals("en") && !getEnName(transliterate).isEmpty()) { - // ignore transliterate option here for backward compatibility - return getEnName(true); + if (lang.equals("en")) { + return getEnName(transliterate); } else { // get name if (names != null) {