fix method names
This commit is contained in:
parent
dae40d8354
commit
5eaea4046c
5 changed files with 8 additions and 8 deletions
|
@ -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) {
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue