diff --git a/OsmAnd-java/src/net/osmand/data/Amenity.java b/OsmAnd-java/src/net/osmand/data/Amenity.java index 5c12a151d6..a293632751 100644 --- a/OsmAnd-java/src/net/osmand/data/Amenity.java +++ b/OsmAnd-java/src/net/osmand/data/Amenity.java @@ -171,7 +171,7 @@ public class Amenity extends MapObject { setAdditionalInfo(PHONE, phone); } - public String getContentSelected(String tag, String lang, String defLang) { + public String getContentLanguage(String tag, String lang, String defLang) { if (lang != null) { String translateName = getAdditionalInfo(tag + ":" + lang); if (!Algorithms.isEmpty(translateName)) { @@ -213,7 +213,7 @@ public class Amenity extends MapObject { return l; } - public String getContentLang(String tag, String lang) { + public String getTagContent(String tag, String lang) { if (lang != null) { String translateName = getAdditionalInfo(tag + ":" + lang); if (!Algorithms.isEmpty(translateName)) { @@ -237,11 +237,11 @@ public class Amenity extends MapObject { } public String getDescription(String lang) { - String info = getContentLang(DESCRIPTION, lang); + String info = getTagContent(DESCRIPTION, lang); if (!Algorithms.isEmpty(info)) { return info; } - return getContentLang(CONTENT, lang); + return getTagContent(CONTENT, lang); } public void setDescription(String description) { diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/AmenityMenuBuilder.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/AmenityMenuBuilder.java index 9a4dd64429..6bc629a246 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/AmenityMenuBuilder.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/builders/AmenityMenuBuilder.java @@ -367,7 +367,7 @@ public class AmenityMenuBuilder extends MenuBuilder { if (amenity.getType().isWiki()) { if (!hasWiki) { iconId = R.drawable.ic_action_note_dark; - String lng = amenity.getContentSelected("content", preferredLang, "en"); + String lng = amenity.getContentLanguage("content", preferredLang, "en"); if (Algorithms.isEmpty(lng)) { lng = "en"; } diff --git a/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java b/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java index 4314d0d987..d7a7f96622 100644 --- a/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java @@ -331,7 +331,7 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon topBar.setBackgroundColor(ContextCompat.getColor(ctx, getResIdFromAttribute(ctx, R.attr.pstsTabBackground))); topBar.setTitleTextColor(ContextCompat.getColor(ctx, getResIdFromAttribute(ctx, R.attr.pstsTextColor))); - String lng = a.getContentSelected("content", preferredLang, "en"); + String lng = a.getContentLanguage("content", preferredLang, "en"); if (Algorithms.isEmpty(lng)) { lng = "en"; } diff --git a/OsmAndCore-sample/src/net/osmand/core/samples/android/sample1/mapcontextmenu/ContextMenuHelper.java b/OsmAndCore-sample/src/net/osmand/core/samples/android/sample1/mapcontextmenu/ContextMenuHelper.java index 3791f11b22..d2dc486fe4 100644 --- a/OsmAndCore-sample/src/net/osmand/core/samples/android/sample1/mapcontextmenu/ContextMenuHelper.java +++ b/OsmAndCore-sample/src/net/osmand/core/samples/android/sample1/mapcontextmenu/ContextMenuHelper.java @@ -67,7 +67,7 @@ public class ContextMenuHelper { topBar.setBackgroundColor(ContextCompat.getColor(ctx, R.color.osmand_orange)); topBar.setTitleTextColor(ContextCompat.getColor(ctx, R.color.color_white)); - String lng = a.getContentSelected("content", preferredLang, "en"); + String lng = a.getContentLanguage("content", preferredLang, "en"); if (Algorithms.isEmpty(lng)) { lng = "en"; } diff --git a/OsmAndCore-sample/src/net/osmand/core/samples/android/sample1/mapcontextmenu/builders/AmenityMenuBuilder.java b/OsmAndCore-sample/src/net/osmand/core/samples/android/sample1/mapcontextmenu/builders/AmenityMenuBuilder.java index 73544e38d2..15b95dbf06 100644 --- a/OsmAndCore-sample/src/net/osmand/core/samples/android/sample1/mapcontextmenu/builders/AmenityMenuBuilder.java +++ b/OsmAndCore-sample/src/net/osmand/core/samples/android/sample1/mapcontextmenu/builders/AmenityMenuBuilder.java @@ -363,7 +363,7 @@ public class AmenityMenuBuilder extends MenuBuilder { if (amenity.getType().isWiki()) { if (!hasWiki) { iconId = OsmandResources.getDrawableId("ic_action_note_dark"); - String lng = amenity.getContentSelected("content", preferredLang, "en"); + String lng = amenity.getContentLanguage("content", preferredLang, "en"); if (Algorithms.isEmpty(lng)) { lng = "en"; }