added poi synonyms to ui
This commit is contained in:
parent
22ccbc9ff6
commit
d84610a77a
3 changed files with 13 additions and 0 deletions
|
@ -1594,6 +1594,7 @@
|
|||
<string name="poi_vending_water">Продажа воды</string>
|
||||
<string name="poi_vending_telephone_vouchers">Телефонные карты</string>
|
||||
<string name="poi_vending_animal_food">Еда для животных</string>
|
||||
<string name="synonyms_poi_vending_animal_food">Корм</string>
|
||||
<string name="poi_vending_public_transport_plans">Карты общественного транспорта</string>
|
||||
<string name="poi_vending_drinks_sweets">Напитки и сладости</string>
|
||||
<string name="poi_vending_vouchers">Ваучеры</string>
|
||||
|
|
|
@ -917,6 +917,7 @@
|
|||
<string name="poi_gallery">Art gallery</string>
|
||||
<string name="poi_dance_floor">Dance floor</string>
|
||||
<string name="poi_nightclub">Nightclub</string>
|
||||
<string name="synonyms_poi_nightclub">Disco;Disko</string>
|
||||
<string name="poi_stripclub">Stripclub</string>
|
||||
<string name="poi_ski_resort">Ski resort</string>
|
||||
<string name="poi_beach_resort">Beach resort</string>
|
||||
|
@ -1863,6 +1864,7 @@
|
|||
<string name="poi_vending_water">Water vending</string>
|
||||
<string name="poi_vending_telephone_vouchers">Telephone vouchers</string>
|
||||
<string name="poi_vending_animal_food">Animal food</string>
|
||||
<string name="synonyms_poi_vending_animal_food">Feed</string>
|
||||
<string name="poi_vending_public_transport_plans">Public transport plans</string>
|
||||
<string name="poi_vending_drinks_sweets">Drinks and sweets</string>
|
||||
<string name="poi_vending_vouchers">Vouchers</string>
|
||||
|
|
|
@ -19,6 +19,7 @@ import net.osmand.Location;
|
|||
import net.osmand.access.AccessibilityAssistant;
|
||||
import net.osmand.data.Amenity;
|
||||
import net.osmand.data.LatLon;
|
||||
import net.osmand.osm.AbstractPoiType;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.dashboard.DashLocationFragment;
|
||||
|
@ -360,6 +361,15 @@ public class QuickSearchListAdapter extends ArrayAdapter<QuickSearchListItem> {
|
|||
}
|
||||
|
||||
String desc = listItem.getTypeName();
|
||||
String synonyms[];
|
||||
if (listItem.getSearchResult().object instanceof AbstractPoiType) {
|
||||
AbstractPoiType abstractPoiType = (AbstractPoiType) listItem.getSearchResult().object;
|
||||
synonyms = abstractPoiType.getSynonyms().split(";");
|
||||
String preferredLanguage = app.getLanguage();
|
||||
if(!(synonyms[0].isEmpty())){
|
||||
desc += " (" + synonyms[0] + ")";
|
||||
}}
|
||||
|
||||
boolean hasDesc = false;
|
||||
if (!Algorithms.isEmpty(desc) && !desc.equals(name)) {
|
||||
subtitle.setText(desc);
|
||||
|
|
Loading…
Reference in a new issue