Added cuisine translation to context menu
This commit is contained in:
parent
f6c89282ff
commit
f8eb5fc07e
2 changed files with 14 additions and 1 deletions
|
@ -25,6 +25,7 @@ public class Amenity extends MapObject {
|
||||||
public static final String DESCRIPTION = "description";
|
public static final String DESCRIPTION = "description";
|
||||||
public static final String OPENING_HOURS = "opening_hours";
|
public static final String OPENING_HOURS = "opening_hours";
|
||||||
public static final String CONTENT = "content";
|
public static final String CONTENT = "content";
|
||||||
|
public static final String CUISINE = "cuisine";
|
||||||
|
|
||||||
private String subType;
|
private String subType;
|
||||||
private PoiCategory type;
|
private PoiCategory type;
|
||||||
|
|
|
@ -269,6 +269,18 @@ public class AmenityMenuBuilder extends MenuBuilder {
|
||||||
} else if (Amenity.WEBSITE.equals(key)) {
|
} else if (Amenity.WEBSITE.equals(key)) {
|
||||||
iconId = R.drawable.ic_world_globe_dark;
|
iconId = R.drawable.ic_world_globe_dark;
|
||||||
isUrl = true;
|
isUrl = true;
|
||||||
|
} else if (Amenity.CUISINE.equals(key)) {
|
||||||
|
iconId = R.drawable.ic_action_cuisine;
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
for (String c : e.getValue().split(";")) {
|
||||||
|
if (sb.length() > 0) {
|
||||||
|
sb.append(", ");
|
||||||
|
} else {
|
||||||
|
sb.append(app.getString(R.string.poi_cuisine)).append(": ");
|
||||||
|
}
|
||||||
|
sb.append(poiTypes.getPoiTranslation("cuisine_" + c).toLowerCase());
|
||||||
|
}
|
||||||
|
vl = sb.toString();
|
||||||
} else {
|
} else {
|
||||||
if (key.contains(Amenity.DESCRIPTION)) {
|
if (key.contains(Amenity.DESCRIPTION)) {
|
||||||
iconId = R.drawable.ic_action_note_dark;
|
iconId = R.drawable.ic_action_note_dark;
|
||||||
|
@ -283,7 +295,7 @@ public class AmenityMenuBuilder extends MenuBuilder {
|
||||||
}
|
}
|
||||||
if (!pType.isText()) {
|
if (!pType.isText()) {
|
||||||
if (!Algorithms.isEmpty(pType.getPoiAdditionalCategory())) {
|
if (!Algorithms.isEmpty(pType.getPoiAdditionalCategory())) {
|
||||||
vl = pType.getPoiAdditionalCategoryTranslation() + ": " + pType.getTranslation();
|
vl = pType.getPoiAdditionalCategoryTranslation() + ": " + pType.getTranslation().toLowerCase();
|
||||||
} else {
|
} else {
|
||||||
vl = pType.getTranslation();
|
vl = pType.getTranslation();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue