From cc152a64f94a13a75a804c1a1e4d591f8fffbd23 Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Sun, 18 Apr 2021 17:40:01 +0300 Subject: [PATCH] Fix transliterate --- 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 79b3b8a349..b38a884906 100644 --- a/OsmAnd-java/src/main/java/net/osmand/data/MapObject.java +++ b/OsmAnd-java/src/main/java/net/osmand/data/MapObject.java @@ -16,13 +16,11 @@ import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.HashMap; -import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Map.Entry; -import java.util.Set; import java.util.zip.GZIPInputStream; @@ -183,7 +181,8 @@ public abstract class MapObject implements Comparable { public String getName(String lang, boolean transliterate) { if (lang != null && lang.length() > 0) { if (lang.equals("en")) { - return getEnName(transliterate); + String enName = getEnName(transliterate); + return !Algorithms.isEmpty(enName) ? enName : getEnName(true); } else { // get name if (names != null) {