Refactor osmand messages remove Messages from MapCreator related to OsmAnd

This commit is contained in:
Victor Shcherb 2011-04-25 14:20:50 +02:00
parent 211bc38c21
commit 895ea22607
43 changed files with 578 additions and 833 deletions

View file

@ -1,80 +0,0 @@
amenity_type_administrative = Administrative
amenity_type_barrier = Barrier
amenity_type_education = Education
amenity_type_emergency = Emergency
amenity_type_entertainment = Entertainment
amenity_type_finance = Finance
amenity_type_geocache = Geocache
amenity_type_healthcare = Healthcare
amenity_type_historic = Historic
amenity_type_landuse = Landuse
amenity_type_leisure = Leisure
amenity_type_manmade = Man made
amenity_type_military = Military
amenity_type_natural = Natural
amenity_type_office = Office
amenity_type_other = Other
amenity_type_shop = Shop
amenity_type_sport = Sport
amenity_type_sustenance = Sustenance
amenity_type_tourism = Tourism
amenity_type_transportation = Transportation
indexing_address = Indexing address
indexing_map = Indexing map
indexing_poi = Indexing POI
indexing_transport = Indexing transport
input_output_error = Input output error occurred
km = km
km_h = km/h
m = m
old_map_index_is_not_supported = Deprecated format map data ''{0}'' is not supported
poi_filter_car_aid = Car aid
poi_filter_closest_poi = Closest poi
poi_filter_custom_filter = Custom filter
poi_filter_food_shop = Food shop
poi_filter_for_tourists = For tourists
poi_filter_fuel = Fuel
poi_filter_namefinder = Online NameFinder
reading_cached_tiles = Reading cached tiles...
version_index_is_not_supported = The version of index ''{0}'' is not supported
version_index_is_big_for_memory = The index ''{0}'' did not fit into memory

View file

@ -1,76 +0,0 @@
amenity_type_administrative = Administrativa
amenity_type_barrier = P\u0159ek\u00E1\u017Eky
amenity_type_education = \u0160kolstv\u00ED
amenity_type_emergency = Pomoc v nouzi
amenity_type_entertainment = Z\u00E1bava
amenity_type_finance = Finance
amenity_type_healthcare = Zdravotnictv\u00ED
amenity_type_historic = Historie
amenity_type_landuse = Vyu\u017Eit\u00E9 \u00FAzem\u00ED
amenity_type_leisure = Voln\u00FD \u010Das
amenity_type_manmade = Lidsk\u00E1 d\u00EDla
amenity_type_military = Arm\u00E1da
amenity_type_natural = P\u0159\u00EDroda
amenity_type_office = Kancel\u00E1\u0159e
amenity_type_other = Jin\u00E9
amenity_type_shop = Obchod
amenity_type_sport = Sport
amenity_type_sustenance = Stravov\u00E1n\u00ED
amenity_type_tourism = Turistika
amenity_type_transportation = Doprava
indexing_address = Indexuji adresy
indexing_map = Indexuji mapu
indexing_poi = Indexuji POI
indexing_transport = Indexuji dopravu
input_output_error = Do\u0161lo k chyb\u011B vstupu/v\u00FDstupu
km = km
km_h = km/h
m = m
old_map_index_is_not_supported = Zastaral\u00FD form\u00E1t mapov\u00FDch dat ''{0}'' nen\u00ED podporov\u00E1n
poi_filter_car_aid = Autoservis
poi_filter_closest_poi = Nejbli\u017E\u0161\u00ED POI
poi_filter_custom_filter = Vlastn\u00ED filtr
poi_filter_food_shop = Potraviny
poi_filter_for_tourists = Pro turisty
poi_filter_fuel = \u010Cerpac\u00ED stanice
poi_filter_namefinder = Online NameFinder
reading_cached_tiles = Na\u010D\u00EDt\u00E1m ulo\u017Een\u00E9 dla\u017Edice...
version_index_is_not_supported = Verze indexu ''{0}'' nen\u00ED podporov\u00E1na

View file

@ -1,62 +0,0 @@
amenity_type_education = Bildung
amenity_type_entertainment = Unterhaltung
amenity_type_finance = Finanzen
amenity_type_healthcare = Gesundheit
amenity_type_historic = Denkmal
amenity_type_leisure = Leisure
amenity_type_natural = Natur
amenity_type_other = Sonstiges
amenity_type_shop = Einkaufen
amenity_type_sport = Sport
amenity_type_sustenance = Ern\u00E4hrung
amenity_type_tourism = Tourismus
amenity_type_transportation = Nahverkehr
indexing_address = Indexing address
indexing_map = Indexing map
indexing_poi = Indexing POI
indexing_transport = Indexing transport
input_output_error = Input output error occurred
km = km
km_h = km/h
m = m
old_map_index_is_not_supported = Deprecated format map data ''{0}'' is not supported
poi_filter_car_aid = Auto
poi_filter_closest_poi = Closest poi
poi_filter_custom_filter = Benutzerdefinierter Filter
poi_filter_food_shop = Lebensmittel
poi_filter_for_tourists = Touristen
poi_filter_fuel = Benzin
poi_filter_namefinder = Onlinesuche
reading_cached_tiles = Reading cached tiles...
version_index_is_not_supported = The version of index ''{0}'' is not supported

View file

@ -1,76 +0,0 @@
amenity_type_administrative = Administrativo
amenity_type_barrier = Barrera
amenity_type_education = Educaci\u00F3n
amenity_type_emergency = Emergencia
amenity_type_entertainment = Entretenimiento
amenity_type_finance = Financiero
amenity_type_healthcare = Salud
amenity_type_historic = Hist\u00F3rico
amenity_type_landuse = Uso de Suelo
amenity_type_leisure = Placer
amenity_type_manmade = Artificial
amenity_type_military = Militar
amenity_type_natural = Natural
amenity_type_office = Oficinas
amenity_type_other = Otro
amenity_type_shop = Tienda
amenity_type_sport = Deporte
amenity_type_sustenance = Sostenimiento
amenity_type_tourism = Turismo
amenity_typoe_transportation = Transporte
indexing_address = \u00CDndice de direcciones
indexing_map = \u00CDndice de mapa
indexing_poi = \u00CDndice de POI
indexing_transport = \u00CDndice de transporte
input_output_error = Ocurri\u00F3 un error de entrada salida
km = km
km_h = km/h
m = m
old_map_index_is_not_supported = No se soporta la versi\u00F3n ''{0}'' de \u00EDndices
poi_filter_car_aid = Asistencia de auto
poi_filter_closest_poi = \ Poi m\u00E1s cercano
poi_filter_custom_filter = Filtro propio
poi_filter_food_shop = Tienda de comida
poi_filter_for_tourists = Para turistas
poi_filter_fuel = Gasolinera
poi_filter_namefinder = Namefinder en l\u00EDnea
reading_cached_tiles = Leyendo im\u00E1genes en cach\u00E9...
version_index_is_not_supported = No se soporta la versi\u00F3n ''{0}'' de \u00EDndices

View file

@ -1,78 +0,0 @@
amenity_type_administrative = Administrative
amenity_type_barrier = Barri\u00e8re
amenity_type_education = \u00c9ducation
amenity_type_emergency = Urgence
amenity_type_entertainment = Divertissement
amenity_type_finance = Finance
amenity_type_geocache = Cache g\u00e9ographique
amenity_type_healthcare = Sant\u00e9
amenity_type_historic = Historique
amenity_type_landuse = Agriculture
amenity_type_leisure = Plaisance
amenity_type_manmade = Artisanat
amenity_type_military = Militaire
amenity_type_natural = Nature
amenity_type_office = Bureau
amenity_type_other = Autre
amenity_type_shop = Magasin
amenity_type_sport = Sport
amenity_type_sustenance = Restauration
amenity_type_tourism = Tourisme
amenity_type_transportation = Transport
indexing_address = Indexation de l'adresse
indexing_map = Indexation de la carte
indexing_poi = Indexation du PI
indexing_transport = Indexation du transport
input_output_error = Erreur d'entr\u00e9e/sortie
km = km
km_h = km/h
m = m
old_map_index_is_not_supported = Le format d\u00e9conseill\u00e9 de la carte ''{0}'' n'est pas support\u00e9
poi_filter_car_aid = Aide voiture
poi_filter_closest_poi = PI le plus pr\u00e8s
poi_filter_custom_filter = Filtre Personnalis\u00e9
poi_filter_food_shop = \u00c9picerie
poi_filter_for_tourists = Pour touristes
poi_filter_fuel = Essence
poi_filter_namefinder = Recherche PI en-ligne
reading_cached_tiles = Lecture carreaux en cache...
version_index_is_not_supported = La version ''{0}'' de l'index n'est pas support\u00e9

View file

@ -1,76 +0,0 @@
amenity_type_administrative = Adminisztr\u00E1ci\u00F3
amenity_type_barrier = Hat\u00E1r
amenity_type_education = Oktat\u00E1s
amenity_type_emergency = V\u00E9szhelyzet
amenity_type_entertainment = Sz\u00F3rakoztat\u00E1s
amenity_type_finance = P\u00E9nz\u00FCgy
amenity_type_healthcare = Eg\u00E9szs\u00E9g\u00FCgy
amenity_type_historic = T\u00F6rt\u00E9nelem
amenity_type_landuse = Ter\u00FClet
amenity_type_leisure = Szabadid\u0151
amenity_type_manmade = Ember alkotta
amenity_type_military = Katonai
amenity_type_natural = Term\u00E9szet
amenity_type_office = Iroda
amenity_type_other = Egy\u00E9b
amenity_type_shop = \u00DCzlet
amenity_type_sport = Sport
amenity_type_sustenance = Ell\u00E1t\u00E1s
amenity_type_tourism = Turizmus
amenity_type_transportation = K\u00F6zleked\u00E9si eszk\u00F6z
indexing_address = C\u00EDmek indexel\u00E9se
indexing_map = T\u00E9rk\u00E9p indexel\u00E9se
indexing_poi = POI indexel\u00E9se
indexing_transport = K\u00F6zleked\u00E9si eszk\u00F6z indexel\u00E9se
input_output_error = Be-kimeneti hiba t\u00F6rt\u00E9nt
km = km
km_h = km/\u00F3
m = m
old_map_index_is_not_supported = Az elavult t\u00E9rk\u00E9p form\u00E1tum ''{0}'' nem t\u00E1mogatott
poi_filter_car_aid = Aut\u00F3 seg\u00EDts\u00E9g
poi_filter_closest_poi = K\u00F6zeli POI
poi_filter_custom_filter = Egy\u00E9ni sz\u0171r\u0151
poi_filter_food_shop = \u00C9lelmiszer \u00FCzlet
poi_filter_for_tourists = Turist\u00E1knak
poi_filter_fuel = \u00DCzemanyag
poi_filter_namefinder = Online n\u00E9vkeres\u0151
reading_cached_tiles = Elmentett t\u00E9rk\u00E9pszeletek olvas\u00E1sa...
version_index_is_not_supported = ''{0}'' index verzi\u00F3ja nem t\u00E1mogatott

View file

@ -1,78 +0,0 @@
amenity_type_administrative = Administrativo
amenity_type_barrier = Barri\u00e8re
amenity_type_education = Educa\u00e7\u00e3o
amenity_type_emergency = Emerg\u00eAncia
amenity_type_entertainment = Entretenimento
amenity_type_finance = Finan\u00e7as
amenity_type_geocache = Cache geogr\u00e1fico
amenity_type_healthcare = Sa\u00fade
amenity_type_historic = Historico
amenity_type_landuse = Agricultura
amenity_type_leisure = Plaisance
amenity_type_manmade = Artisanato
amenity_type_military = Militar
amenity_type_natural = Natureza
amenity_type_office = (office) escrit\u00f3rio
amenity_type_other = Outro
amenity_type_shop = Loja
amenity_type_sport = Desporto
amenity_type_sustenance = Restauração
amenity_type_tourism = Turismo
amenity_type_transportation = Transporte
indexing_address = Indexa\u00e7\u00e3o do endere\u00e7o
indexing_map = Indexa\u00e7\u00e3o do mapa
indexing_poi = Indexa\u00e7\u00e3o do PI
indexing_transport = Indexa\u00e7\u00e3o do transporte
input_output_error = Erro de entrada/saida
km = km
km_h = km/h
m = m
old_map_index_is_not_supported = O formato do mapa ''{0}'' n\u00e3o \u00e9 suportado
poi_filter_car_aid = Ajuda carro
poi_filter_closest_poi = PI mais perto
poi_filter_custom_filter = Filtro Personalisado
poi_filter_food_shop = Supermercado
poi_filter_for_tourists = Para touristas
poi_filter_fuel = Gasolina
poi_filter_namefinder = Pesquisa PI on-line
reading_cached_tiles = Leitura do cache telha...
version_index_is_not_supported = A ver\u00e7\u00e3o ''{0}'' do índice não é suportado

View file

@ -1,78 +0,0 @@
amenity_type_administrative = \u0410\u0434\u043C\u0438\u043D\u0438\u0441\u0442\u0440\u0430\u0442\u0438\u0432\u043D\u043E\u0435
amenity_type_barrier = \u041F\u0440\u0435\u043F\u044F\u0442\u0441\u0442\u0432\u0438\u0435
amenity_type_education = \u041E\u0431\u0440\u0430\u0437\u043E\u0432\u0430\u043D\u0438\u0435
amenity_type_emergency = \u042D\u043A\u0441\u0442\u0440\u0435\u043D\u043D\u044B\u0435 \u0441\u043B\u0443\u0436\u0431\u044B
amenity_type_entertainment = \u0420\u0430\u0437\u0432\u043B\u0435\u0447\u0435\u043D\u0438\u044F
amenity_type_finance = \u0424\u0438\u043D\u0430\u043D\u0441\u044B
amenity_type_geocache = \u0413\u0435\u043E\u0442\u0430\u0439\u043D\u0438\u043A
amenity_type_healthcare = \u0417\u0434\u043E\u0440\u043E\u0432\u044C\u0435
amenity_type_historic = \u0418\u0441\u0442\u043E\u0440\u0438\u0447\u0435\u0441\u043A\u043E\u0435
amenity_type_landuse = \u0417\u0435\u043C\u043B\u0435\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u0435
amenity_type_leisure = \u0414\u043E\u0441\u0443\u0433
amenity_type_manmade = \u0421\u043E\u043E\u0440\u0443\u0436\u0435\u043D\u0438\u044F
amenity_type_military = \u0412\u043E\u0435\u043D\u043D\u043E\u0435
amenity_type_natural = \u041F\u0440\u0438\u0440\u043E\u0434\u0430
amenity_type_office = \u041E\u0444\u0438\u0441
amenity_type_other = \u0414\u0440\u0443\u0433\u043E\u0435
amenity_type_shop = \u041C\u0430\u0433\u0430\u0437\u0438\u043D\u044B
amenity_type_sport = \u0421\u043F\u043E\u0440\u0442
amenity_type_sustenance = \u0415\u0434\u0430
amenity_type_tourism = \u0422\u0443\u0440\u0438\u0437\u043C
amenity_type_transportation = \u0422\u0440\u0430\u043D\u0441\u043F\u043E\u0440\u0442
indexing_address = \u0418\u043D\u0434\u0435\u043A\u0441\u0438\u0440\u0443\u0435\u0442\u0441\u044F \u0430\u0434\u0440\u0435\u0441
indexing_map = \u0418\u043D\u0434\u0435\u043A\u0441\u0438\u0440\u0443\u044E\u0442\u0441\u044F \u043A\u0430\u0440\u0442\u044B
indexing_poi = \u0418\u043D\u0434\u0435\u043A\u0441\u0438\u0440\u0443\u044E\u0442\u0441\u044F POI
indexing_transport = \u0418\u043D\u0434\u0435\u043A\u0441\u0438\u0440\u0443\u0435\u0442\u0441\u044F \u0442\u0440\u0430\u043D\u0441\u043F\u043E\u0440\u0442
input_output_error = \u041F\u0440\u043E\u0438\u0437\u043E\u0448\u043B\u0430 \u043E\u0448\u0438\u0431\u043A\u0430 \u0432\u0432\u043E\u0434\u0430/\u0432\u044B\u0432\u043E\u0434\u0430
km = \u043A\u043C
km_h = \u043A\u043C/\u0447
m = \u043C
old_map_index_is_not_supported = \u041A\u0430\u0440\u0442\u0430 \u0441\u0442\u0430\u0440\u043E\u0433\u043E \u0444\u043E\u0440\u043C\u0430\u0442\u0430 ''{0}'' \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F
poi_filter_car_aid = \u0410\u0432\u0442\u043E\u043F\u043E\u043C\u043E\u0449\u044C
poi_filter_closest_poi = \u0411\u043B\u0438\u0436\u0430\u0439\u0448\u0438\u0435 poi
poi_filter_custom_filter = \u041D\u043E\u0432\u044B\u0439 \u0444\u0438\u043B\u044C\u0442\u0440
poi_filter_food_shop = \u041F\u0440\u043E\u0434\u0443\u043A\u0442\u043E\u0432\u044B\u0435 \u043C\u0430\u0433\u0430\u0437\u0438\u043D\u044B
poi_filter_for_tourists = \u0414\u043B\u044F \u0442\u0443\u0440\u0438\u0441\u0442\u043E\u0432
poi_filter_fuel = \u0417\u0430\u043F\u0440\u0430\u0432\u043A\u0438
poi_filter_namefinder = Online NameFinder
reading_cached_tiles = \u0427\u0442\u0435\u043D\u0438\u0435 \u043A\u044D\u0448\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0442\u0430\u0439\u043B\u043E\u0432...
version_index_is_not_supported = \u0412\u0435\u0440\u0441\u0438\u044F \u0438\u043D\u0434\u0435\u043A\u0441\u0430 ''{0}'' \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F

View file

@ -1,76 +0,0 @@
amenity_type_administrative = Administrat\u00EDva
amenity_type_barrier = Prek\u00E1\u017Eky
amenity_type_education = V\u00FDuka
amenity_type_emergency = Pomoc v n\u00FAdzi
amenity_type_entertainment = Z\u00E1bava
amenity_type_finance = Peniaze
amenity_type_healthcare = Zdravie
amenity_type_historic = Hist\u00F3ria
amenity_type_landuse = Vyu\u017Eitie \u00FAzemia
amenity_type_leisure = Vo\u013En\u00FD \u010Das
amenity_type_manmade = \u010Clovekom vytvoren\u00E9
amenity_type_military = Arm\u00E1da
amenity_type_natural = Pr\u00EDroda
amenity_type_office = Kancel\u00E1ria
amenity_type_other = In\u00E9
amenity_type_shop = Nakupovanie
amenity_type_sport = \u0160port
amenity_type_sustenance = Jedlo
amenity_type_tourism = Turistika
amenity_type_transportation = Doprava
indexing_address = Indexovanie adries
indexing_map = Indexovanie m\u00E1p
indexing_poi = Indexovanie POI
indexing_transport = Indexovanie dopravy
input_output_error = Vyskytla sa vstupno/v\u00FDstupn\u00E1 chyba
km = km
km_h = km/h
m = m
old_map_index_is_not_supported = Verzia indexu ''{0}'' nie je podporovan\u00E1
poi_filter_car_aid = Pomoc s automobilom
poi_filter_closest_poi = Najbli\u017Es\u00ED bod z\u00E1ujmu
poi_filter_custom_filter = Vlastn\u00FD filter
poi_filter_food_shop = Obchody s jedlom
poi_filter_for_tourists = Pre turistov
poi_filter_fuel = Palivo
poi_filter_namefinder = Online h\u013Eada\u010D mien
reading_cached_tiles = \u010C\u00EDtaj\u00FA sa dla\u017Edice zo z\u00E1sobn\u00EDka...
version_index_is_not_supported = Verzia indexu ''{0}'' nie je podporovan\u00E1

View file

@ -1,16 +0,0 @@
package net.osmand;
import java.util.ResourceBundle;
public class Messages {
private static ResourceBundle bundle = ResourceBundle.getBundle("messages"); //$NON-NLS-1$
public static final String KEY_M = "m"; //$NON-NLS-1$
public static final String KEY_KM = "km"; //$NON-NLS-1$
public static final String KEY_KM_H = "km_h"; //$NON-NLS-1$
public static String getMessage(String key){
return bundle.getString(key);
}
}

View file

@ -8,10 +8,11 @@ package net.osmand;
public class ToDoConstants {
// == Osmand application (TODO 124) ==
// == Osmand application (TODO 126) ==
// === Refactoring issues ===
// || 116 || Move all messages.properties related Android application inside strings.xml to have better access with their translation ||
// || 125 || Introduce service layer rather than singletons and put all related into new package (services). Review architecture. Split some big classes. ||
// === Common issues ===

View file

@ -130,21 +130,9 @@ public class Amenity extends MapObject {
}
public String getSimpleFormat(boolean en){
return AmenityType.toPublicString(type) + " : " + getStringWithoutType(en); //$NON-NLS-1$
}
public String getStringWithoutType(boolean en){
String n = getName(en);
if(n.length() == 0){
return getSubType();
}
return getSubType() + " " + n; //$NON-NLS-1$
}
@Override
public String toString() {
return getSimpleFormat(false);
return type.toString() + " : " + subType + " "+ getName();
}
public String getSite() {

View file

@ -4,7 +4,6 @@ import java.util.Collection;
import java.util.Collections;
import java.util.Map;
import net.osmand.Messages;
import net.osmand.osm.MapRenderingTypes;
@ -12,34 +11,32 @@ import net.osmand.osm.MapRenderingTypes;
// POI tags : amenity, leisure, shop, sport, tourism, historic; accessories (internet-access), natural ?
public enum AmenityType {
// Some of those types are subtypes of Amenity tag
SUSTENANCE("amenity_type_sustenance", "amenity"), // restaurant, cafe ... //$NON-NLS-1$ //$NON-NLS-2$
EDUCATION("amenity_type_education", "amenity"), // school, ... //$NON-NLS-1$ //$NON-NLS-2$
TRANSPORTATION("amenity_type_transportation", "amenity"), // car_wash, parking, ... //$NON-NLS-1$ //$NON-NLS-2$
FINANCE("amenity_type_finance", "amenity"), // bank, atm, ... //$NON-NLS-1$ //$NON-NLS-2$
HEALTHCARE("amenity_type_healthcare", "amenity"), // hospital ... //$NON-NLS-1$ //$NON-NLS-2$
ENTERTAINMENT("amenity_type_entertainment", "amenity"), // cinema, ... (+! sauna, brothel) //$NON-NLS-1$ //$NON-NLS-2$
TOURISM("amenity_type_tourism", "tourism"), // [TAG] tourism hotel, sights, museum .. //$NON-NLS-1$ //$NON-NLS-2$
HISTORIC("amenity_type_historic", "historic"), // [TAG] historic places, monuments (should we unify tourism/historic) //$NON-NLS-1$ //$NON-NLS-2$
NATURAL("amenity_type_natural", "natural"), // [TAG] natural places, monuments (should we unify tourism/historic) //$NON-NLS-1$ //$NON-NLS-2$
SHOP("amenity_type_shop", "shop"), // [TAG] amenity convenience (product), clothes... //$NON-NLS-1$ //$NON-NLS-2$
LEISURE("amenity_type_leisure", "leisure"), // [TAG] leisure //$NON-NLS-1$ //$NON-NLS-2$
SPORT("amenity_type_sport", "sport"), // [TAG] sport //$NON-NLS-1$ //$NON-NLS-2$
BARRIER("amenity_type_barrier", "barrier"), // [TAG] barrier + traffic_calming //$NON-NLS-1$ //$NON-NLS-2$
LANDUSE("amenity_type_landuse", "landuse"), // [TAG] landuse //$NON-NLS-1$ //$NON-NLS-2$
MAN_MADE("amenity_type_manmade", "man_made"), // [TAG] man_made and others //$NON-NLS-1$ //$NON-NLS-2$
OFFICE("amenity_type_office", "office"), // [TAG] office //$NON-NLS-1$ //$NON-NLS-2$
EMERGENCY("amenity_type_emergency", "emergency"), // [TAG] emergency //$NON-NLS-1$ //$NON-NLS-2$
MILITARY("amenity_type_military", "military"), // [TAG] military //$NON-NLS-1$ //$NON-NLS-2$
ADMINISTRATIVE("amenity_type_administrative", "administrative"), // [TAG] administrative //$NON-NLS-1$ //$NON-NLS-2$
GEOCACHE("amenity_type_geocache", "geocache"), //$NON-NLS-1$//$NON-NLS-2$
OTHER("amenity_type_other", "amenity"), // grave-yard, police, post-office [+Internet_access] //$NON-NLS-1$ //$NON-NLS-2$
SUSTENANCE("amenity"), // restaurant, cafe ... //$NON-NLS-1$ //$NON-NLS-2$
EDUCATION("amenity"), // school, ... //$NON-NLS-1$ //$NON-NLS-2$
TRANSPORTATION("amenity"), // car_wash, parking, ... //$NON-NLS-1$ //$NON-NLS-2$
FINANCE("amenity"), // bank, atm, ... //$NON-NLS-1$ //$NON-NLS-2$
HEALTHCARE("amenity"), // hospital ... //$NON-NLS-1$ //$NON-NLS-2$
ENTERTAINMENT("amenity"), // cinema, ... (+! sauna, brothel) //$NON-NLS-1$ //$NON-NLS-2$
TOURISM("tourism"), // [TAG] tourism hotel, sights, museum .. //$NON-NLS-1$ //$NON-NLS-2$
HISTORIC("historic"), // [TAG] historic places, monuments (should we unify tourism/historic) //$NON-NLS-1$ //$NON-NLS-2$
NATURAL("natural"), // [TAG] natural places, monuments (should we unify tourism/historic) //$NON-NLS-1$ //$NON-NLS-2$
SHOP("shop"), // [TAG] amenity convenience (product), clothes... //$NON-NLS-1$ //$NON-NLS-2$
LEISURE("leisure"), // [TAG] leisure //$NON-NLS-1$ //$NON-NLS-2$
SPORT("sport"), // [TAG] sport //$NON-NLS-1$ //$NON-NLS-2$
BARRIER("barrier"), // [TAG] barrier + traffic_calming //$NON-NLS-1$ //$NON-NLS-2$
LANDUSE("landuse"), // [TAG] landuse //$NON-NLS-1$ //$NON-NLS-2$
MAN_MADE("man_made"), // [TAG] man_made and others //$NON-NLS-1$ //$NON-NLS-2$
OFFICE("office"), // [TAG] office //$NON-NLS-1$ //$NON-NLS-2$
EMERGENCY("emergency"), // [TAG] emergency //$NON-NLS-1$ //$NON-NLS-2$
MILITARY("military"), // [TAG] military //$NON-NLS-1$ //$NON-NLS-2$
ADMINISTRATIVE("administrative"), // [TAG] administrative //$NON-NLS-1$ //$NON-NLS-2$
GEOCACHE("geocache"), //$NON-NLS-1$//$NON-NLS-2$
OTHER("amenity"), // grave-yard, police, post-office [+Internet_access] //$NON-NLS-1$ //$NON-NLS-2$
;
private final String name;
private final String defaultTag;
private AmenityType(String name, String defaultTag) {
this.name = name;
private AmenityType(String defaultTag) {
this.defaultTag = defaultTag;
}
@ -72,11 +69,4 @@ public enum AmenityType {
}
public static String toPublicString(AmenityType t){
// return Algoritms.capitalizeFirstLetterAndLowercase(t.toString().replace('_', ' '));
return Messages.getMessage(t.name);
}
}

View file

@ -1,13 +1,11 @@
package net.osmand.osm;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import net.osmand.Messages;
import net.osmand.data.MapObject;
@ -297,17 +295,4 @@ public class MapUtils {
}
public static String getFormattedDistance(int meters){
if(meters >= 100000){
return meters / 1000 + " " + Messages.getMessage(Messages.KEY_KM); //$NON-NLS-1$
} else if(meters >= 10000){
return MessageFormat.format("{0,number,#.#} "+Messages.getMessage(Messages.KEY_KM), ((float) meters) / 1000); //$NON-NLS-1$
} else if(meters > 1500){
return MessageFormat.format("{0,number,#.#} "+Messages.getMessage(Messages.KEY_KM), ((float) meters) / 1000); //$NON-NLS-1$
} else if(meters > 900){
return MessageFormat.format("{0,number,#.##} "+Messages.getMessage(Messages.KEY_KM), ((float) meters) / 1000); //$NON-NLS-1$
} else {
return meters + " "+Messages.getMessage(Messages.KEY_M); //$NON-NLS-1$
}
}
}

View file

@ -1,5 +1,46 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<resources>
<string name="amenity_type_administrative">Administrativa</string>
<string name="amenity_type_barrier">Překážky</string>
<string name="amenity_type_education">Školství</string>
<string name="amenity_type_emergency">Pomoc v nouzi</string>
<string name="amenity_type_entertainment">Zábava</string>
<string name="amenity_type_finance">Finance</string>
<string name="amenity_type_geocache">Geocache</string>
<string name="amenity_type_healthcare">Zdravotnictví</string>
<string name="amenity_type_historic">Historie</string>
<string name="amenity_type_landuse">Využité území</string>
<string name="amenity_type_leisure">Volný čas</string>
<string name="amenity_type_manmade">Lidská díla</string>
<string name="amenity_type_military">Armáda</string>
<string name="amenity_type_natural">Příroda</string>
<string name="amenity_type_office">Kanceláře</string>
<string name="amenity_type_other">Jiné</string>
<string name="amenity_type_shop">Obchod</string>
<string name="amenity_type_sport">Sport</string>
<string name="amenity_type_sustenance">Stravování</string>
<string name="amenity_type_tourism">Turistika</string>
<string name="amenity_type_transportation">Doprava</string>
<string name="indexing_address">Indexuji adresy</string>
<string name="indexing_map">Indexuji mapu</string>
<string name="indexing_poi">Indexuji POI</string>
<string name="indexing_transport">Indexuji dopravu</string>
<string name="input_output_error">Došlo k chybě vstupu/výstupu</string>
<string name="km">km</string>
<string name="km_h">km/h</string>
<string name="m">m</string>
<string name="old_map_index_is_not_supported">Zastaralý formát mapových dat \'\'{0}\'\' není podporován</string>
<string name="poi_filter_car_aid">Autoservis</string>
<string name="poi_filter_closest_poi">Nejbližší POI</string>
<string name="poi_filter_custom_filter">Vlastní filtr</string>
<string name="poi_filter_food_shop">Potraviny</string>
<string name="poi_filter_for_tourists">Pro turisty</string>
<string name="poi_filter_fuel">Čerpací stanice</string>
<string name="poi_filter_namefinder">Online NameFinder</string>
<string name="reading_cached_tiles">Načítám uložené dlaždice...</string>
<string name="version_index_is_big_for_memory">The index \'\'{0}\'\' did not fit into memory</string>
<string name="version_index_is_not_supported">Verze indexu \'\'{0}\'\' není podporována</string>
<string name="loading_builds_failed">Stahování seznamu balíčků selhalo.</string>
<string name="loading_builds">Načítám balíčky...</string>
<string name="select_build_to_install">Vyberte balíček OsmAnd k nainstalování</string>

View file

@ -1,5 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="amenity_type_administrative">Administrative</string>
<string name="amenity_type_barrier">Barrier</string>
<string name="amenity_type_education">Bildung</string>
<string name="amenity_type_emergency">Emergency</string>
<string name="amenity_type_entertainment">Unterhaltung</string>
<string name="amenity_type_finance">Finanzen</string>
<string name="amenity_type_geocache">Geocache</string>
<string name="amenity_type_healthcare">Gesundheit</string>
<string name="amenity_type_historic">Denkmal</string>
<string name="amenity_type_landuse">Landuse</string>
<string name="amenity_type_leisure">Leisure</string>
<string name="amenity_type_manmade">Man made</string>
<string name="amenity_type_military">Military</string>
<string name="amenity_type_natural">Natur</string>
<string name="amenity_type_office">Office</string>
<string name="amenity_type_other">Sonstiges</string>
<string name="amenity_type_shop">Einkaufen</string>
<string name="amenity_type_sport">Sport</string>
<string name="amenity_type_sustenance">Ernährung</string>
<string name="amenity_type_tourism">Tourismus</string>
<string name="amenity_type_transportation">Nahverkehr</string>
<string name="indexing_address">Indexing address </string>
<string name="indexing_map">Indexing map </string>
<string name="indexing_poi">Indexing POI </string>
<string name="indexing_transport">Indexing transport </string>
<string name="input_output_error">Input output error occurred</string>
<string name="km">km</string>
<string name="km_h">km/h</string>
<string name="m">m</string>
<string name="old_map_index_is_not_supported">Deprecated format map data \'\'{0}\'\' is not supported</string>
<string name="poi_filter_car_aid">Auto</string>
<string name="poi_filter_closest_poi">Closest poi</string>
<string name="poi_filter_custom_filter">Benutzerdefinierter Filter</string>
<string name="poi_filter_food_shop">Lebensmittel</string>
<string name="poi_filter_for_tourists">Touristen</string>
<string name="poi_filter_fuel">Benzin</string>
<string name="poi_filter_namefinder">Onlinesuche</string>
<string name="reading_cached_tiles">Reading cached tiles...</string>
<string name="version_index_is_big_for_memory">The index \'\'{0}\'\' did not fit into memory</string>
<string name="version_index_is_not_supported">The version of index \'\'{0}\'\' is not supported</string>
<string name="osb_bug_name">OSM Fehler</string>
<string name="poi_context_menu_modify">Ändern POI</string>
<string name="poi_context_menu_delete">Löschen POI</string>

View file

@ -1,5 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="amenity_type_administrative">Administrativo</string>
<string name="amenity_type_barrier">Barrera</string>
<string name="amenity_type_education">Educación</string>
<string name="amenity_type_emergency">Emergencia</string>
<string name="amenity_type_entertainment">Entretenimiento</string>
<string name="amenity_type_finance">Financiero</string>
<string name="amenity_type_geocache">Geocache</string>
<string name="amenity_type_healthcare">Salud</string>
<string name="amenity_type_historic">Histórico</string>
<string name="amenity_type_landuse">Uso de Suelo</string>
<string name="amenity_type_leisure">Placer</string>
<string name="amenity_type_manmade">Artificial</string>
<string name="amenity_type_military">Militar</string>
<string name="amenity_type_natural">Natural</string>
<string name="amenity_type_office">Oficinas</string>
<string name="amenity_type_other">Otro</string>
<string name="amenity_type_shop">Tienda</string>
<string name="amenity_type_sport">Deporte</string>
<string name="amenity_type_sustenance">Sostenimiento</string>
<string name="amenity_type_tourism">Turismo</string>
<string name="amenity_type_transportation">Transportation</string>
<string name="indexing_address">Índice de direcciones </string>
<string name="indexing_map">Índice de mapa </string>
<string name="indexing_poi">Índice de POI </string>
<string name="indexing_transport">Índice de transporte </string>
<string name="input_output_error">Ocurrió un error de entrada salida</string>
<string name="km">km</string>
<string name="km_h">km/h</string>
<string name="m">m</string>
<string name="old_map_index_is_not_supported">No se soporta la versión \'\'{0}\'\' de índices</string>
<string name="poi_filter_car_aid">Asistencia de auto</string>
<string name="poi_filter_closest_poi"> Poi más cercano</string>
<string name="poi_filter_custom_filter">Filtro propio</string>
<string name="poi_filter_food_shop">Tienda de comida</string>
<string name="poi_filter_for_tourists">Para turistas</string>
<string name="poi_filter_fuel">Gasolinera</string>
<string name="poi_filter_namefinder">Namefinder en línea</string>
<string name="reading_cached_tiles">Leyendo imágenes en caché...</string>
<string name="version_index_is_big_for_memory">The index \'\'{0}\'\' did not fit into memory</string>
<string name="version_index_is_not_supported">No se soporta la versión \'\'{0}\'\' de índices</string>
<color name="color_red">#FF0000</color>
<color name="color_white">#FFFFFF</color>
<color name="menu_background">#FF9030</color>

View file

@ -1,5 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="amenity_type_administrative">Administrative</string>
<string name="amenity_type_barrier">Barrière</string>
<string name="amenity_type_education">Éducation</string>
<string name="amenity_type_emergency">Urgence</string>
<string name="amenity_type_entertainment">Divertissement</string>
<string name="amenity_type_finance">Finance</string>
<string name="amenity_type_geocache">Cache géographique</string>
<string name="amenity_type_healthcare">Santé</string>
<string name="amenity_type_historic">Historique</string>
<string name="amenity_type_landuse">Agriculture</string>
<string name="amenity_type_leisure">Plaisance</string>
<string name="amenity_type_manmade">Artisanat</string>
<string name="amenity_type_military">Militaire</string>
<string name="amenity_type_natural">Nature</string>
<string name="amenity_type_office">Bureau</string>
<string name="amenity_type_other">Autre</string>
<string name="amenity_type_shop">Magasin</string>
<string name="amenity_type_sport">Sport</string>
<string name="amenity_type_sustenance">Restauration</string>
<string name="amenity_type_tourism">Tourisme</string>
<string name="amenity_type_transportation">Transport</string>
<string name="indexing_address">Indexation de l\'adresse </string>
<string name="indexing_map">Indexation de la carte </string>
<string name="indexing_poi">Indexation du PI </string>
<string name="indexing_transport">Indexation du transport </string>
<string name="input_output_error">Erreur d\'entrée/sortie</string>
<string name="km">km</string>
<string name="km_h">km/h</string>
<string name="m">m</string>
<string name="old_map_index_is_not_supported">Le format déconseillé de la carte \'\'{0}\'\' n\'est pas supporté</string>
<string name="poi_filter_car_aid">Aide voiture</string>
<string name="poi_filter_closest_poi">PI le plus près</string>
<string name="poi_filter_custom_filter">Filtre Personnalisé</string>
<string name="poi_filter_food_shop">Épicerie</string>
<string name="poi_filter_for_tourists">Pour touristes</string>
<string name="poi_filter_fuel">Essence</string>
<string name="poi_filter_namefinder">Recherche PI en-ligne</string>
<string name="reading_cached_tiles">Lecture carreaux en cache...</string>
<string name="version_index_is_big_for_memory">The index \'\'{0}\'\' did not fit into memory</string>
<string name="version_index_is_not_supported">La version \'\'{0}\'\' de l\'index n\'est pas supporté</string>
<string name="use_osmand_routing_service">Navigation hors-ligne OsmAnd</string>
<string name="use_osmand_routing_service_descr">Utiliser la navigation hors-ligne pour les longues distances (expérimental)</string>
<string name="osmand_routing_experimental">La navigation hors-ligne OsmAnd est une fonction expérimentale ne fonctionnant pas pour une distance de plus de 20 km.\n Le service utilise alors automatiquement le service en-ligne Cloudmade.</string>

View file

@ -1,5 +1,45 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<resources>
<string name="amenity_type_administrative">Adminisztráció</string>
<string name="amenity_type_barrier">Határ</string>
<string name="amenity_type_education">Oktatás</string>
<string name="amenity_type_emergency">Vészhelyzet</string>
<string name="amenity_type_entertainment">Szórakoztatás</string>
<string name="amenity_type_finance">Pénzügy</string>
<string name="amenity_type_geocache">Geocache</string>
<string name="amenity_type_healthcare">Egészségügy</string>
<string name="amenity_type_historic">Történelem</string>
<string name="amenity_type_landuse">Terület</string>
<string name="amenity_type_leisure">Szabadidő</string>
<string name="amenity_type_manmade">Ember alkotta</string>
<string name="amenity_type_military">Katonai</string>
<string name="amenity_type_natural">Természet</string>
<string name="amenity_type_office">Iroda</string>
<string name="amenity_type_other">Egyéb</string>
<string name="amenity_type_shop">Üzlet</string>
<string name="amenity_type_sport">Sport</string>
<string name="amenity_type_sustenance">Ellátás</string>
<string name="amenity_type_tourism">Turizmus</string>
<string name="amenity_type_transportation">Közlekedési eszköz</string>
<string name="indexing_address">Címek indexelése </string>
<string name="indexing_map">Térkép indexelése </string>
<string name="indexing_poi">POI indexelése </string>
<string name="indexing_transport">Közlekedési eszköz indexelése </string>
<string name="input_output_error">Be-kimeneti hiba történt</string>
<string name="km">km</string>
<string name="km_h">km/ó</string>
<string name="m">m</string>
<string name="old_map_index_is_not_supported">Az elavult térkép formátum \'\'{0}\'\' nem támogatott</string>
<string name="poi_filter_car_aid">Autó segítség</string>
<string name="poi_filter_closest_poi">Közeli POI</string>
<string name="poi_filter_custom_filter">Egyéni szűrő</string>
<string name="poi_filter_food_shop">Élelmiszer üzlet</string>
<string name="poi_filter_for_tourists">Turistáknak</string>
<string name="poi_filter_fuel">Üzemanyag</string>
<string name="poi_filter_namefinder">Online névkereső</string>
<string name="reading_cached_tiles">Elmentett térképszeletek olvasása...</string>
<string name="version_index_is_big_for_memory">The index \'\'{0}\'\' did not fit into memory</string>
<string name="version_index_is_not_supported">\'\'{0}\'\' index verziója nem támogatott</string>
<string name="osmand_net_previously_installed">Ön már telepített egy korbábbi OsmAnd verziót. Minden Internettől független adat használható az új alkalmazással. A Kedvenc pontokat a régi alkalmazásból érdemes kimenteni és az újba betölteni</string>
<string name="build_installed">OsmAnd verzió {0} sikeresen telepítve ({1}).</string>
<string name="downloading_build">OsmAnd verzió letöltése...</string>

View file

@ -1,5 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="amenity_type_administrative">Administrativo</string>
<string name="amenity_type_barrier">Barrière</string>
<string name="amenity_type_education">Educação</string>
<string name="amenity_type_emergency">Emergência</string>
<string name="amenity_type_entertainment">Entretenimento</string>
<string name="amenity_type_finance">Finanças</string>
<string name="amenity_type_geocache">Cache geográfico</string>
<string name="amenity_type_healthcare">Saúde </string>
<string name="amenity_type_historic">Historico</string>
<string name="amenity_type_landuse">Agricultura</string>
<string name="amenity_type_leisure">Plaisance</string>
<string name="amenity_type_manmade">Artisanato</string>
<string name="amenity_type_military">Militar</string>
<string name="amenity_type_natural">Natureza</string>
<string name="amenity_type_office">(office) escritório</string>
<string name="amenity_type_other">Outro</string>
<string name="amenity_type_shop">Loja</string>
<string name="amenity_type_sport">Desporto</string>
<string name="amenity_type_sustenance">Restauração</string>
<string name="amenity_type_tourism">Turismo</string>
<string name="amenity_type_transportation">Transporte</string>
<string name="indexing_address">Indexação do endereço</string>
<string name="indexing_map">Indexação do mapa </string>
<string name="indexing_poi">Indexação do PI </string>
<string name="indexing_transport">Indexação do transporte</string>
<string name="input_output_error">Erro de entrada/saida</string>
<string name="km">km</string>
<string name="km_h">km/h</string>
<string name="m">m</string>
<string name="old_map_index_is_not_supported">O formato do mapa \'\'{0}\'\' não é suportado</string>
<string name="poi_filter_car_aid">Ajuda carro</string>
<string name="poi_filter_closest_poi">PI mais perto</string>
<string name="poi_filter_custom_filter">Filtro Personalisado</string>
<string name="poi_filter_food_shop">Supermercado</string>
<string name="poi_filter_for_tourists">Para touristas</string>
<string name="poi_filter_fuel">Gasolina</string>
<string name="poi_filter_namefinder">Pesquisa PI on-line</string>
<string name="reading_cached_tiles">Leitura do cache telha...</string>
<string name="version_index_is_big_for_memory">The index \'\'{0}\'\' did not fit into memory</string>
<string name="version_index_is_not_supported">A verção \'\'{0}\'\' do índice não é suportado</string>
<string name="voice_is_not_available_msg">Nenhuma voz instalada. Por favor, vá até configurações e escolher os dados de voz para download.</string>
<string name="voice_is_not_available_title">Nenhum dado voz especificado</string>
<string name="trace_rendering_descr">Utilize este guia para verificar o desempenho de renderização</string>

View file

@ -1,5 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="amenity_type_administrative">Административное</string>
<string name="amenity_type_barrier">Препятствие</string>
<string name="amenity_type_education">Образование</string>
<string name="amenity_type_emergency">Экстренные службы</string>
<string name="amenity_type_entertainment">Развлечения</string>
<string name="amenity_type_finance">Финансы</string>
<string name="amenity_type_geocache">Геотайник</string>
<string name="amenity_type_healthcare">Здоровье</string>
<string name="amenity_type_historic">Историческое</string>
<string name="amenity_type_landuse">Землепользование</string>
<string name="amenity_type_leisure">Досуг</string>
<string name="amenity_type_manmade">Сооружения</string>
<string name="amenity_type_military">Военное</string>
<string name="amenity_type_natural">Природа</string>
<string name="amenity_type_office">Офис</string>
<string name="amenity_type_other">Другое</string>
<string name="amenity_type_shop">Магазины</string>
<string name="amenity_type_sport">Спорт</string>
<string name="amenity_type_sustenance">Еда</string>
<string name="amenity_type_tourism">Туризм</string>
<string name="amenity_type_transportation">Транспорт</string>
<string name="indexing_address">Индексируется адрес</string>
<string name="indexing_map">Индексируются карты</string>
<string name="indexing_poi">Индексируются POI</string>
<string name="indexing_transport">Индексируется транспорт</string>
<string name="input_output_error">Произошла ошибка ввода/вывода</string>
<string name="km">км</string>
<string name="km_h">км/ч</string>
<string name="m">м</string>
<string name="old_map_index_is_not_supported">Карта старого формата \'\'{0}\'\' не поддерживается</string>
<string name="poi_filter_car_aid">Автопомощь</string>
<string name="poi_filter_closest_poi">Ближайшие poi</string>
<string name="poi_filter_custom_filter">Новый фильтр</string>
<string name="poi_filter_food_shop">Продуктовые магазины</string>
<string name="poi_filter_for_tourists">Для туристов</string>
<string name="poi_filter_fuel">Заправки</string>
<string name="poi_filter_namefinder">NameFinder (интернет)</string>
<string name="reading_cached_tiles">Чтение кэшированных тайлов...</string>
<string name="version_index_is_big_for_memory">Индекс \'\'{0}\'\' не помещается в памяти</string>
<string name="version_index_is_not_supported">Версия индекса \'\'{0}\'\' не поддерживается</string>
<string name="use_osmand_routing_service">OsmAnd offline навигация</string>
<string name="use_osmand_routing_service_descr">Использовать offline навигацию на длинные расстояние (экспериментально)</string>
<string name="osmand_routing_experimental">OsmAnd offline навигация является экспериментальной и не работает на расстояния более 20 километров.\n В этом случае автоматически переключается на Cloudmade.</string>
<string name="specified_dir_doesnt_exist">Невозможно найти указанную директорию.</string>
<string name="application_dir">Директория приложения</string>
<string name="application_dir_change_warning">Изменение директории не переносит файлы автоматически. Вы должны это сделать самостоятельно. Продолжить?</string>
<string name="osmand_net_previously_installed">У вас имеется предыдущая версия OsmAnd. Все офлайн данные поддерживаются новым приложением. Избранные точки можно экспортировать в старом и импортировать в новом.</string>
<string name="build_installed">Сборка {0} успешно установлена ({1}).</string>
<string name="downloading_build">Загружается сборка...</string>

View file

@ -1,5 +1,47 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<resources>
<string name="amenity_type_administrative">Administratíva</string>
<string name="amenity_type_barrier">Prekážky</string>
<string name="amenity_type_education">Výuka</string>
<string name="amenity_type_emergency">Pomoc v núdzi</string>
<string name="amenity_type_entertainment">Zábava</string>
<string name="amenity_type_finance">Peniaze</string>
<string name="amenity_type_geocache">Geocache</string>
<string name="amenity_type_healthcare">Zdravie</string>
<string name="amenity_type_historic">História</string>
<string name="amenity_type_landuse">Využitie územia</string>
<string name="amenity_type_leisure">Voľný čas</string>
<string name="amenity_type_manmade">Človekom vytvorené</string>
<string name="amenity_type_military">Armáda</string>
<string name="amenity_type_natural">Príroda</string>
<string name="amenity_type_office">Kancelária</string>
<string name="amenity_type_other">Iné</string>
<string name="amenity_type_shop">Nakupovanie</string>
<string name="amenity_type_sport">Šport</string>
<string name="amenity_type_sustenance">Jedlo</string>
<string name="amenity_type_tourism">Turistika</string>
<string name="amenity_type_transportation">Doprava</string>
<string name="indexing_address">Indexovanie adries </string>
<string name="indexing_map">Indexovanie máp </string>
<string name="indexing_poi">Indexovanie POI </string>
<string name="indexing_transport">Indexovanie dopravy </string>
<string name="input_output_error">Vyskytla sa vstupno/výstupná chyba</string>
<string name="km">km</string>
<string name="km_h">km/h</string>
<string name="m">m</string>
<string name="old_map_index_is_not_supported">Verzia indexu \'\'{0}\'\' nie je podporovaná</string>
<string name="poi_filter_car_aid">Pomoc s automobilom</string>
<string name="poi_filter_closest_poi">Najbližsí bod záujmu</string>
<string name="poi_filter_custom_filter">Vlastný filter</string>
<string name="poi_filter_food_shop">Obchody s jedlom</string>
<string name="poi_filter_for_tourists">Pre turistov</string>
<string name="poi_filter_fuel">Palivo</string>
<string name="poi_filter_namefinder">Online hľadač mien</string>
<string name="reading_cached_tiles">Čítajú sa dlaždice zo zásobníka...</string>
<string name="version_index_is_big_for_memory">The index \'\'{0}\'\' did not fit into memory</string>
<string name="version_index_is_not_supported">Verzia indexu \'\'{0}\'\' nie je podporovaná</string>
<string name="use_osmand_routing_service">OsmAnd offline rutovanie</string>
<string name="use_osmand_routing_service_descr">Použitie offline rutovania na dlhé vzdialenosti (experimentálne)</string>
<string name="osmand_routing_experimental">OsmAnd offline rutovanie je experimentálna funkcia a nefunguje na vzdialenosť väčšiu ako 20 km.\n Rutovacia služba je automaticky prpenutá na online Cloudmade.</string>

View file

@ -1,5 +1,47 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<resources>
<string name="amenity_type_administrative">Administrative</string>
<string name="amenity_type_barrier">Barrier</string>
<string name="amenity_type_education">Education</string>
<string name="amenity_type_emergency">Emergency</string>
<string name="amenity_type_entertainment">Entertainment</string>
<string name="amenity_type_finance">Finance</string>
<string name="amenity_type_geocache">Geocache</string>
<string name="amenity_type_healthcare">Healthcare</string>
<string name="amenity_type_historic">Historic</string>
<string name="amenity_type_landuse">Landuse</string>
<string name="amenity_type_leisure">Leisure</string>
<string name="amenity_type_manmade">Man made</string>
<string name="amenity_type_military">Military</string>
<string name="amenity_type_natural">Natural</string>
<string name="amenity_type_office">Office</string>
<string name="amenity_type_other">Other</string>
<string name="amenity_type_shop">Shop</string>
<string name="amenity_type_sport">Sport</string>
<string name="amenity_type_sustenance">Sustenance</string>
<string name="amenity_type_tourism">Tourism</string>
<string name="amenity_type_transportation">Transportation</string>
<string name="indexing_address">Indexing address</string>
<string name="indexing_map">Indexing map</string>
<string name="indexing_poi">Indexing POI</string>
<string name="indexing_transport">Indexing transport</string>
<string name="input_output_error">Input output error occurred</string>
<string name="km">km</string>
<string name="km_h">km/h</string>
<string name="m">m</string>
<string name="old_map_index_is_not_supported">Deprecated format map data \'\'{0}\'\' is not supported</string>
<string name="poi_filter_car_aid">Car aid</string>
<string name="poi_filter_closest_poi">Closest poi</string>
<string name="poi_filter_custom_filter">Custom filter</string>
<string name="poi_filter_food_shop">Food shop</string>
<string name="poi_filter_for_tourists">For tourists</string>
<string name="poi_filter_fuel">Fuel</string>
<string name="poi_filter_namefinder">Online NameFinder</string>
<string name="reading_cached_tiles">Reading cached tiles...</string>
<string name="version_index_is_big_for_memory">The index \'\'{0}\'\' did not fit into memory</string>
<string name="version_index_is_not_supported">The version of index \'\'{0}\'\' is not supported</string>
<string name="use_osmand_routing_service">OsmAnd offline routing</string>
<string name="use_osmand_routing_service_descr">Use offline routing for long distances (experimental)</string>
<string name="osmand_routing_experimental">OsmAnd offline routing is experimental feature and it doesn\'t work for distance more than 20 km.\n Routing service is automatically switched to online Cloudmade.</string>

View file

@ -0,0 +1,87 @@
package net.osmand;
import java.text.MessageFormat;
import net.osmand.data.Amenity;
import net.osmand.data.AmenityType;
import net.osmand.plus.R;
import android.content.Context;
public class OsmAndFormatter {
public static String getFormattedDistance(int meters, Context ctx) {
if (meters >= 100000) {
return meters / 1000 + " " + ctx.getString(R.string.km); //$NON-NLS-1$
} else if (meters >= 10000) {
return MessageFormat.format("{0,number,#.#} " + ctx.getString(R.string.km), ((float) meters) / 1000); //$NON-NLS-1$
} else if (meters > 1500) {
return MessageFormat.format("{0,number,#.#} " + ctx.getString(R.string.km), ((float) meters) / 1000); //$NON-NLS-1$
} else if (meters > 900) {
return MessageFormat.format("{0,number,#.##} " + ctx.getString(R.string.km), ((float) meters) / 1000); //$NON-NLS-1$
} else {
return meters + " " + ctx.getString(R.string.m); //$NON-NLS-1$
}
}
public static String toPublicString(AmenityType t, Context ctx) {
switch (t) {
case SUSTENANCE:
return ctx.getString(R.string.amenity_type_sustenance);
case EDUCATION:
return ctx.getString(R.string.amenity_type_education);
case TRANSPORTATION:
return ctx.getString(R.string.amenity_type_transportation);
case FINANCE:
return ctx.getString(R.string.amenity_type_finance);
case HEALTHCARE:
return ctx.getString(R.string.amenity_type_healthcare);
case ENTERTAINMENT:
return ctx.getString(R.string.amenity_type_entertainment);
case TOURISM:
return ctx.getString(R.string.amenity_type_tourism);
case HISTORIC:
return ctx.getString(R.string.amenity_type_historic);
case NATURAL:
return ctx.getString(R.string.amenity_type_natural);
case SHOP:
return ctx.getString(R.string.amenity_type_shop);
case LEISURE:
return ctx.getString(R.string.amenity_type_leisure);
case SPORT:
return ctx.getString(R.string.amenity_type_sport);
case BARRIER:
return ctx.getString(R.string.amenity_type_barrier);
case LANDUSE:
return ctx.getString(R.string.amenity_type_landuse);
case MAN_MADE:
return ctx.getString(R.string.amenity_type_manmade);
case OFFICE:
return ctx.getString(R.string.amenity_type_office);
case EMERGENCY:
return ctx.getString(R.string.amenity_type_emergency);
case MILITARY:
return ctx.getString(R.string.amenity_type_military);
case ADMINISTRATIVE:
return ctx.getString(R.string.amenity_type_administrative);
case GEOCACHE:
return ctx.getString(R.string.amenity_type_geocache);
case OTHER:
return ctx.getString(R.string.amenity_type_other);
}
return "";
}
public static String getPoiSimpleFormat(Amenity amenity, Context ctx, boolean en){
return toPublicString(amenity.getType(), ctx) + " : " + getPoiStringWithoutType(amenity, en); //$NON-NLS-1$
}
public static String getPoiStringWithoutType(Amenity amenity, boolean en){
String n = amenity.getName(en);
if(n.length() == 0){
return amenity.getSubType();
}
return amenity.getSubType() + " " + n; //$NON-NLS-1$
}
}

View file

@ -8,7 +8,6 @@ import java.util.ArrayList;
import java.util.List;
import net.osmand.LogUtil;
import net.osmand.Messages;
import net.osmand.data.Amenity;
import net.osmand.data.AmenityType;
import net.osmand.osm.MapUtils;
@ -33,7 +32,7 @@ public class NameFinderPoiFilter extends PoiFilter {
public NameFinderPoiFilter(OsmandApplication application) {
super(null, application);
this.name = Messages.getMessage("poi_filter_namefinder"); //$NON-NLS-1$
this.name = application.getString(R.string.poi_filter_namefinder); //$NON-NLS-1$
this.filterId = FILTER_ID;
}
@ -114,10 +113,10 @@ public class NameFinderPoiFilter extends PoiFilter {
stream.close();
} catch (IOException e) {
log.error("Error loading name finder poi", e); //$NON-NLS-1$
return Messages.getMessage("input_output_error"); //$NON-NLS-1$
return getApplication().getString(R.string.input_output_error); //$NON-NLS-1$
} catch (XmlPullParserException e) {
log.error("Error parsing name finder poi", e); //$NON-NLS-1$
return Messages.getMessage("input_output_error"); //$NON-NLS-1$
return getApplication().getString(R.string.input_output_error); //$NON-NLS-1$
}
MapUtils.sortListOfMapObject(searchedAmenities, latitude, longitude);
return null;

View file

@ -7,7 +7,7 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import net.osmand.Messages;
import net.osmand.OsmAndFormatter;
import net.osmand.data.Amenity;
import net.osmand.data.AmenityType;
import net.osmand.data.index.IndexConstants;
@ -39,7 +39,7 @@ public class PoiFilter {
this.application = application;
isStandardFilter = true;
filterId = STD_PREFIX + type;
name = type == null ? Messages.getMessage("poi_filter_closest_poi") : AmenityType.toPublicString(type); //$NON-NLS-1$
name = type == null ? application.getString(R.string.poi_filter_closest_poi) : OsmAndFormatter.toPublicString(type, application); //$NON-NLS-1$
if(type == null){
initSearchAll();
} else {
@ -85,9 +85,9 @@ public class PoiFilter {
public String getSearchArea(){
if(zoom <= 14){
int d = (int) (1 * (1 << (14 - zoom)));
return " < " + d + " " + Messages.getMessage(Messages.KEY_KM); //$NON-NLS-1$//$NON-NLS-2$
return " < " + d + " " + application.getString(R.string.km); //$NON-NLS-1$//$NON-NLS-2$
} else {
return " < 500 " + Messages.getMessage(Messages.KEY_M); //$NON-NLS-1$
return " < 500 " + application.getString(R.string.m); //$NON-NLS-1$
}
}
@ -238,4 +238,8 @@ public class PoiFilter {
return isStandardFilter;
}
public OsmandApplication getApplication() {
return application;
}
}

View file

@ -1,5 +1,6 @@
package net.osmand.plus;
import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedHashMap;
@ -7,7 +8,6 @@ import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import net.osmand.Messages;
import net.osmand.data.AmenityType;
import net.osmand.plus.activities.OsmandApplication;
import android.content.Context;
@ -72,7 +72,7 @@ public class PoiFiltersHelper {
list.add("car"); //$NON-NLS-1$
list.add("car_repair"); //$NON-NLS-1$
types.put(AmenityType.SHOP, list);
filters.add(new PoiFilter(Messages.getMessage("poi_filter_car_aid"), null, types, application)); //$NON-NLS-1$
filters.add(new PoiFilter(application.getString(R.string.poi_filter_car_aid), null, types, application)); //$NON-NLS-1$
types.clear();
@ -92,13 +92,13 @@ public class PoiFiltersHelper {
list.add("waste_basket"); //$NON-NLS-1$
list.add("waste_disposal"); //$NON-NLS-1$
types.put(AmenityType.OTHER, list);
filters.add(new PoiFilter(Messages.getMessage("poi_filter_for_tourists"), null, types, application)); //$NON-NLS-1$
filters.add(new PoiFilter(application.getString(R.string.poi_filter_for_tourists), null, types, application)); //$NON-NLS-1$
types.clear();
list = new LinkedHashSet<String>();
list.add("fuel"); //$NON-NLS-1$
types.put(AmenityType.TRANSPORTATION, list);
filters.add(new PoiFilter(Messages.getMessage("poi_filter_fuel"), null, types, application)); //$NON-NLS-1$
filters.add(new PoiFilter(application.getString(R.string.poi_filter_fuel), null, types, application)); //$NON-NLS-1$
types.clear();
list = new LinkedHashSet<String>();
@ -116,7 +116,7 @@ public class PoiFiltersHelper {
list.add("supermarket"); //$NON-NLS-1$
list.add("variety_store"); //$NON-NLS-1$
types.put(AmenityType.SHOP, list);
filters.add(new PoiFilter(Messages.getMessage("poi_filter_food_shop"), null, types, application)); //$NON-NLS-1$
filters.add(new PoiFilter(application.getString(R.string.poi_filter_food_shop), null, types, application)); //$NON-NLS-1$
types.clear();
return filters;
@ -127,7 +127,7 @@ public class PoiFiltersHelper {
////ctx.deleteDatabase(PoiFilterDbHelper.DATABASE_NAME);
cacheUserDefinedFilters = new ArrayList<PoiFilter>();
PoiFilter filter = new PoiFilter(Messages.getMessage("poi_filter_custom_filter"), PoiFilter.CUSTOM_FILTER_ID, new LinkedHashMap<AmenityType, LinkedHashSet<String>>(), application); //$NON-NLS-1$
PoiFilter filter = new PoiFilter(application.getString(R.string.poi_filter_custom_filter), PoiFilter.CUSTOM_FILTER_ID, new LinkedHashMap<AmenityType, LinkedHashSet<String>>(), application); //$NON-NLS-1$
cacheUserDefinedFilters.add(filter);
PoiFilterDbHelper helper = openDbHelper();
cacheUserDefinedFilters.addAll(helper.getFilters());

View file

@ -16,7 +16,6 @@ import java.util.TreeMap;
import net.osmand.IProgress;
import net.osmand.LogUtil;
import net.osmand.Messages;
import net.osmand.binary.BinaryMapIndexReader;
import net.osmand.data.Amenity;
import net.osmand.data.TransportStop;
@ -35,8 +34,6 @@ import net.osmand.plus.views.POIMapLayer;
import org.apache.commons.logging.Log;
import android.content.SharedPreferences;
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
import android.database.sqlite.SQLiteException;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
@ -116,7 +113,7 @@ public class ResourceManager {
////////////////////////////////////////////// Working with tiles ////////////////////////////////////////////////
public void indexingImageTiles(IProgress progress){
progress.startTask(Messages.getMessage("reading_cached_tiles"), -1); //$NON-NLS-1$
progress.startTask(context.getString(R.string.reading_cached_tiles), -1); //$NON-NLS-1$
imagesOnFS.clear();
for(File c : dirWithTiles.listFiles()){
indexImageTilesFS("", c); //$NON-NLS-1$
@ -387,11 +384,11 @@ public class ResourceManager {
if (file.exists() && file.canRead()) {
for (File f : file.listFiles()) {
if (f.getName().endsWith(IndexConstants.BINARY_MAP_INDEX_EXT)) {
progress.startTask(Messages.getMessage("indexing_map") + f.getName(), -1); //$NON-NLS-1$
progress.startTask(context.getString(R.string.indexing_map) + " " + f.getName(), -1); //$NON-NLS-1$
try {
BinaryMapIndexReader index = renderer.initializeNewResource(progress, f);
if (index == null) {
warnings.add(MessageFormat.format(Messages.getMessage("version_index_is_not_supported"), f.getName())); //$NON-NLS-1$
warnings.add(MessageFormat.format(context.getString(R.string.version_index_is_not_supported), f.getName())); //$NON-NLS-1$
} else {
indexFileNames.put(f.getName(), MessageFormat.format("{0,date,dd.MM.yyyy}", new Date(f.lastModified()))); //$NON-NLS-1$
for(String rName : index.getRegionNames()) {
@ -405,7 +402,7 @@ public class ResourceManager {
transportRepositories.add(new TransportIndexRepositoryBinary(new BinaryMapIndexReader(raf)));
} catch (IOException e) {
log.error("Exception reading " + f.getAbsolutePath(), e); //$NON-NLS-1$
warnings.add(MessageFormat.format(Messages.getMessage("version_index_is_not_supported"), f.getName())); //$NON-NLS-1$
warnings.add(MessageFormat.format(context.getString(R.string.version_index_is_not_supported), f.getName())); //$NON-NLS-1$
}
}
if(index.containsMapData()){
@ -422,13 +419,13 @@ public class ResourceManager {
}
} catch (SQLiteException e) {
log.error("Exception reading " + f.getAbsolutePath(), e); //$NON-NLS-1$
warnings.add(MessageFormat.format(Messages.getMessage("version_index_is_not_supported"), f.getName())); //$NON-NLS-1$
warnings.add(MessageFormat.format(context.getString(R.string.version_index_is_not_supported), f.getName())); //$NON-NLS-1$
} catch (OutOfMemoryError oome) {
log.error("Exception reading " + f.getAbsolutePath(), oome); //$NON-NLS-1$
warnings.add(MessageFormat.format(Messages.getMessage("version_index_is_big_for_memory"), f.getName()));
warnings.add(MessageFormat.format(context.getString(R.string.version_index_is_big_for_memory), f.getName()));
}
} else if(f.getName().endsWith(".map.odb")){ //$NON-NLS-1$
warnings.add(MessageFormat.format(Messages.getMessage("old_map_index_is_not_supported"), f.getName())); //$NON-NLS-1$
warnings.add(MessageFormat.format(context.getString(R.string.old_map_index_is_not_supported), f.getName())); //$NON-NLS-1$
}
}
}
@ -453,18 +450,18 @@ public class ResourceManager {
if (f.getName().endsWith(IndexConstants.POI_INDEX_EXT)) {
AmenityIndexRepositoryOdb repository = new AmenityIndexRepositoryOdb();
progress.startTask(Messages.getMessage("indexing_poi") + f.getName(), -1); //$NON-NLS-1$
progress.startTask(context.getString(R.string.indexing_poi) + " " + f.getName(), -1); //$NON-NLS-1$
try {
boolean initialized = repository.initialize(progress, f);
if (initialized) {
amenityRepositories.add(repository);
indexFileNames.put(f.getName(), MessageFormat.format("{0,date,dd.MM.yyyy}", new Date(f.lastModified()))); //$NON-NLS-1$
} else {
warnings.add(MessageFormat.format(Messages.getMessage("version_index_is_not_supported"), f.getName())); //$NON-NLS-1$
warnings.add(MessageFormat.format(context.getString(R.string.version_index_is_not_supported), f.getName())); //$NON-NLS-1$
}
} catch (SQLiteException e) {
log.error("Exception reading " + f.getAbsolutePath(), e); //$NON-NLS-1$
warnings.add(MessageFormat.format(Messages.getMessage("version_index_is_not_supported"), f.getName())); //$NON-NLS-1$
warnings.add(MessageFormat.format(context.getString(R.string.version_index_is_not_supported), f.getName())); //$NON-NLS-1$
}
}
}
@ -491,18 +488,18 @@ public class ResourceManager {
public void indexingAddress(final IProgress progress, List<String> warnings, File f) {
if (f.getName().endsWith(IndexConstants.ADDRESS_INDEX_EXT)) {
RegionAddressRepositoryOdb repository = new RegionAddressRepositoryOdb();
progress.startTask(Messages.getMessage("indexing_address") + f.getName(), -1); //$NON-NLS-1$
progress.startTask(context.getString(R.string.indexing_address) + " " + f.getName(), -1); //$NON-NLS-1$
try {
boolean initialized = repository.initialize(progress, f);
if (initialized) {
addressMap.put(repository.getName(), repository);
indexFileNames.put(f.getName(), MessageFormat.format("{0,date,dd.MM.yyyy}", new Date(f.lastModified()))); //$NON-NLS-1$
} else {
warnings.add(MessageFormat.format(Messages.getMessage("version_index_is_not_supported"), f.getName())); //$NON-NLS-1$
warnings.add(MessageFormat.format(context.getString(R.string.version_index_is_not_supported), f.getName())); //$NON-NLS-1$
}
} catch (SQLiteException e) {
log.error("Exception reading " + f.getAbsolutePath(), e); //$NON-NLS-1$
warnings.add(MessageFormat.format(Messages.getMessage("version_index_is_not_supported"), f.getName())); //$NON-NLS-1$
warnings.add(MessageFormat.format(context.getString(R.string.version_index_is_not_supported), f.getName())); //$NON-NLS-1$
}
}
}
@ -523,18 +520,18 @@ public class ResourceManager {
public void indexingTransport(final IProgress progress, List<String> warnings, File f) {
if (f.getName().endsWith(IndexConstants.TRANSPORT_INDEX_EXT)) {
TransportIndexRepositoryOdb repository = new TransportIndexRepositoryOdb();
progress.startTask(Messages.getMessage("indexing_transport") + f.getName(), -1); //$NON-NLS-1$
progress.startTask(context.getString(R.string.indexing_transport) + " " + f.getName(), -1); //$NON-NLS-1$
try {
boolean initialized = repository.initialize(progress, f);
if (initialized) {
transportRepositories.add(repository);
indexFileNames.put(f.getName(), MessageFormat.format("{0,date,dd.MM.yyyy}", new Date(f.lastModified()))); //$NON-NLS-1$
} else {
warnings.add(MessageFormat.format(Messages.getMessage("version_index_is_not_supported"), f.getName())); //$NON-NLS-1$
warnings.add(MessageFormat.format(context.getString(R.string.version_index_is_not_supported), f.getName())); //$NON-NLS-1$
}
} catch (SQLiteException e) {
log.error("Exception reading " + f.getAbsolutePath(), e); //$NON-NLS-1$
warnings.add(MessageFormat.format(Messages.getMessage("version_index_is_not_supported"), f.getName())); //$NON-NLS-1$
warnings.add(MessageFormat.format(context.getString(R.string.version_index_is_not_supported), f.getName())); //$NON-NLS-1$
}
}
}

View file

@ -39,7 +39,6 @@ import java.util.zip.ZipInputStream;
import net.osmand.IProgress;
import net.osmand.LogUtil;
import net.osmand.data.index.DownloaderIndexFromGoogleCode;
import net.osmand.data.index.IndexConstants;
import net.osmand.plus.DownloadOsmandIndexesHelper;
import net.osmand.plus.OsmandSettings;

View file

@ -7,6 +7,7 @@ import java.text.MessageFormat;
import java.util.LinkedHashSet;
import java.util.Set;
import net.osmand.OsmAndFormatter;
import net.osmand.data.AmenityType;
import net.osmand.osm.LatLon;
import net.osmand.osm.MapRenderingTypes;
@ -255,7 +256,7 @@ public class EditPOIFilterActivity extends ListActivity {
check.setChecked(filter.isTypeAccepted(model));
TextView text = (TextView) row.findViewById(R.id.filter_poi_label);
text.setText(AmenityType.toPublicString(model));
text.setText(OsmAndFormatter.toPublicString(model, EditPOIFilterActivity.this));
addRowListener(model, text, check);
return (row);
}

View file

@ -21,6 +21,7 @@ import java.util.Set;
import net.osmand.Base64;
import net.osmand.LogUtil;
import net.osmand.OsmAndFormatter;
import net.osmand.Version;
import net.osmand.data.Amenity;
import net.osmand.data.AmenityType;
@ -134,7 +135,8 @@ public class EditingPOIActivity {
}
Builder builder = new AlertDialog.Builder(ctx);
builder.setTitle(MessageFormat.format(this.view.getResources().getString(R.string.poi_remove_confirm_template), a.getStringWithoutType(OsmandSettings.usingEnglishNames(OsmandSettings.getPrefs(ctx)))));
builder.setTitle(MessageFormat.format(this.view.getResources().getString(R.string.poi_remove_confirm_template),
OsmAndFormatter.getPoiStringWithoutType(a, OsmandSettings.usingEnglishNames(OsmandSettings.getPrefs(ctx)))));
final EditText comment = new EditText(ctx);
comment.setText(R.string.poi_remove_title);
builder.setView(comment);
@ -189,7 +191,7 @@ public class EditingPOIActivity {
AmenityType t = MapRenderingTypes.getDefault().getAmenityNameToType().get(str);
if(t != null && a.getType() != t){
a.setType(t);
typeButton.setText(AmenityType.toPublicString(t));
typeButton.setText(OsmAndFormatter.toPublicString(t, ctx));
updateSubTypesAdapter(t);
}
@ -212,7 +214,7 @@ public class EditingPOIActivity {
Builder builder = new AlertDialog.Builder(ctx);
String[] vals = new String[AmenityType.values().length];
for(int i=0; i<vals.length; i++){
vals[i] = AmenityType.toPublicString(AmenityType.values()[i]);
vals[i] = OsmAndFormatter.toPublicString(AmenityType.values()[i], ctx);
}
builder.setItems(vals, new Dialog.OnClickListener(){
@Override
@ -302,7 +304,7 @@ public class EditingPOIActivity {
private void updateType(Amenity a){
typeText.setText(a.getSubType());
typeButton.setText(AmenityType.toPublicString(a.getType()));
typeButton.setText(OsmAndFormatter.toPublicString(a.getType(), ctx));
updateSubTypesAdapter(a.getType());
}

View file

@ -13,6 +13,7 @@ import java.util.Set;
import net.osmand.FavouritePoint;
import net.osmand.GPXUtilities;
import net.osmand.OsmAndFormatter;
import net.osmand.GPXUtilities.GPXFileResult;
import net.osmand.GPXUtilities.WptPt;
import net.osmand.osm.LatLon;
@ -277,7 +278,7 @@ public class FavouritesActivity extends ListActivity {
LatLon lastKnownMapLocation = OsmandSettings.getLastKnownMapLocation(OsmandSettings.getPrefs(FavouritesActivity.this));
int dist = (int) (MapUtils.getDistance(model.getLatitude(), model.getLongitude(),
lastKnownMapLocation.getLatitude(), lastKnownMapLocation.getLongitude()));
distanceLabel.setText(MapUtils.getFormattedDistance(dist));
distanceLabel.setText(OsmAndFormatter.getFormattedDistance(dist, FavouritesActivity.this));
label.setText(model.getName());
return row;
}

View file

@ -15,6 +15,7 @@ import net.osmand.Algoritms;
import net.osmand.FavouritePoint;
import net.osmand.GPXUtilities;
import net.osmand.LogUtil;
import net.osmand.OsmAndFormatter;
import net.osmand.Version;
import net.osmand.GPXUtilities.GPXFileResult;
import net.osmand.GPXUtilities.WptPt;
@ -1510,7 +1511,7 @@ public class MapActivity extends Activity implements IMapLocationListener, Senso
list.add(f.getName());
}
for(AmenityType t : AmenityType.values()){
list.add(AmenityType.toPublicString(t));
list.add(OsmAndFormatter.toPublicString(t, this));
}
Builder builder = new AlertDialog.Builder(this);
builder.setItems(list.toArray(new String[list.size()]), new DialogInterface.OnClickListener(){

View file

@ -16,6 +16,7 @@ import javax.xml.parsers.FactoryConfigurationError;
import javax.xml.parsers.ParserConfigurationException;
import net.osmand.LogUtil;
import net.osmand.OsmAndFormatter;
import net.osmand.binary.BinaryMapIndexReader;
import net.osmand.binary.BinaryRouteDataReader;
import net.osmand.binary.BinaryRouteDataReader.RouteSegment;
@ -341,7 +342,7 @@ public class RouteProvider {
// calculate for previousRoute
previousInfo.distance = listDistance[previousLocation]- listDistance[i];
previousInfo.expectedTime = (int) (previousInfo.distance / speed);
previousInfo.descriptionRoute += " " + MapUtils.getFormattedDistance(previousInfo.distance); //$NON-NLS-1$
previousInfo.descriptionRoute += " " + OsmAndFormatter.getFormattedDistance(previousInfo.distance, ctx); //$NON-NLS-1$
previousInfo = new RouteDirectionInfo();
previousInfo.turnType = type;
@ -358,7 +359,7 @@ public class RouteProvider {
previousInfo.distance = listDistance[previousLocation];
previousInfo.expectedTime = (int) (previousInfo.distance / speed);
previousInfo.descriptionRoute += " " + MapUtils.getFormattedDistance(previousInfo.distance); //$NON-NLS-1$
previousInfo.descriptionRoute += " " + OsmAndFormatter.getFormattedDistance(previousInfo.distance, ctx); //$NON-NLS-1$
// add last direction go straight (to show arrow in screen after all turns)
if(previousInfo.distance > 80){

View file

@ -5,6 +5,7 @@ import java.util.Collections;
import java.util.List;
import net.osmand.LogUtil;
import net.osmand.OsmAndFormatter;
import net.osmand.osm.LatLon;
import net.osmand.osm.MapUtils;
import net.osmand.plus.OsmandSettings;
@ -462,7 +463,7 @@ public class RoutingHelper {
int[] dist = res.getListDistance();
int l = dist != null && dist.length > 0 ? dist[0] : 0;
showMessage(context.getString(R.string.new_route_calculated_dist)
+ " : " + MapUtils.getFormattedDistance(l)); //$NON-NLS-1$
+ " : " + OsmAndFormatter.getFormattedDistance(l, context)); //$NON-NLS-1$
if (uiActivity instanceof MapActivity) {
// be aware that is non ui thread
((MapActivity) uiActivity).getMapView().refreshMap();

View file

@ -6,6 +6,7 @@ package net.osmand.plus.activities;
import java.text.MessageFormat;
import java.util.List;
import net.osmand.OsmAndFormatter;
import net.osmand.osm.MapUtils;
import net.osmand.plus.OsmandSettings;
import net.osmand.plus.R;
@ -64,7 +65,7 @@ public class ShowRouteInfoActivity extends ListActivity {
int dist = helper.getLeftDistance();
int hours = helper.getLeftTime() / (60 * 60);
int minutes = (helper.getLeftTime() / 60) % 60;
header.setText(MessageFormat.format(getString(R.string.route_general_information), MapUtils.getFormattedDistance(dist),
header.setText(MessageFormat.format(getString(R.string.route_general_information), OsmAndFormatter.getFormattedDistance(dist, this),
hours, minutes));
float f = Math.min(dm.widthPixels/(dm.density*160),dm.heightPixels/(dm.density*160));
if (f >= 3) {
@ -158,7 +159,7 @@ public class ShowRouteInfoActivity extends ListActivity {
icon.setImageDrawable(new RouteDrawable());
}
((RouteDrawable) icon.getDrawable()).setRouteType(model.turnType);
distanceLabel.setText(MapUtils.getFormattedDistance(model.distance));
distanceLabel.setText(OsmAndFormatter.getFormattedDistance(model.distance, ShowRouteInfoActivity.this));
label.setText(model.descriptionRoute);
int seconds = model.expectedTime % 60;
int min = (model.expectedTime / 60) % 60;

View file

@ -10,6 +10,7 @@ import java.util.Locale;
import net.osmand.Algoritms;
import net.osmand.LogUtil;
import net.osmand.OsmAndFormatter;
import net.osmand.Version;
import net.osmand.osm.LatLon;
import net.osmand.osm.MapUtils;
@ -184,7 +185,7 @@ public class SearchAddressOnlineActivity extends ListActivity {
TextView distanceLabel = (TextView) row.findViewById(R.id.distance_label);
if(location != null){
int dist = (int) (MapUtils.getDistance(location, model.lat, model.lon));
distanceLabel.setText(MapUtils.getFormattedDistance(dist));
distanceLabel.setText(OsmAndFormatter.getFormattedDistance(dist, SearchAddressOnlineActivity.this));
} else {
distanceLabel.setText(""); //$NON-NLS-1$
}

View file

@ -3,6 +3,7 @@ package net.osmand.plus.activities.search;
import java.util.ArrayList;
import java.util.List;
import net.osmand.OsmAndFormatter;
import net.osmand.data.City;
import net.osmand.data.MapObject;
import net.osmand.data.PostCode;
@ -41,7 +42,7 @@ public class SearchCityByNameActivity extends SearchByNameAbstractActivity<MapOb
LatLon l = obj.getLocation();
if (getFilter().length() > 2 && location != null && l != null) {
txt.setText(obj.getName(region.useEnglishNames()) + " - " + //$NON-NLS-1$
MapUtils.getFormattedDistance((int) MapUtils.getDistance(l, location)));
OsmAndFormatter.getFormattedDistance((int) MapUtils.getDistance(l, location), this));
} else {
txt.setText(obj.getName(region.useEnglishNames()));
}

View file

@ -2,6 +2,7 @@ package net.osmand.plus.activities.search;
import java.util.List;
import net.osmand.OsmAndFormatter;
import net.osmand.osm.LatLon;
import net.osmand.osm.MapUtils;
import net.osmand.plus.OsmandSettings;
@ -126,7 +127,7 @@ public class SearchHistoryActivity extends ListActivity {
final HistoryEntry model = getItem(position);
if(location != null){
int dist = (int) (MapUtils.getDistance(location, model.lat, model.lon));
distanceLabel.setText(MapUtils.getFormattedDistance(dist));
distanceLabel.setText(OsmAndFormatter.getFormattedDistance(dist, SearchHistoryActivity.this));
} else {
distanceLabel.setText(""); //$NON-NLS-1$
}

View file

@ -10,9 +10,9 @@ import java.util.List;
import net.osmand.Algoritms;
import net.osmand.LogUtil;
import net.osmand.OsmAndFormatter;
import net.osmand.data.Amenity;
import net.osmand.osm.LatLon;
import net.osmand.osm.MapUtils;
import net.osmand.osm.OpeningHoursParser;
import net.osmand.osm.OpeningHoursParser.OpeningHoursRule;
import net.osmand.plus.NameFinderPoiFilter;
@ -216,7 +216,7 @@ public class SearchPOIActivity extends ListActivity implements SensorEventListen
@Override
public boolean onItemLongClick(AdapterView<?> av, View v, int pos, long id) {
final Amenity amenity = ((AmenityAdapter) getListAdapter()).getItem(pos);
String format = amenity.getSimpleFormat(OsmandSettings.usingEnglishNames(settings));
String format = OsmAndFormatter.getPoiSimpleFormat(amenity, SearchPOIActivity.this, OsmandSettings.usingEnglishNames(settings));
if (amenity.getOpeningHours() != null) {
format += " "+getString(R.string.opening_hours) + " : " + amenity.getOpeningHours(); //$NON-NLS-1$ //$NON-NLS-2$
}
@ -229,9 +229,10 @@ public class SearchPOIActivity extends ListActivity implements SensorEventListen
public void onClick(DialogInterface dialog, int which) {
if(which == 0){
int z = OsmandSettings.getLastKnownMapZoom(settings);
String poiSimpleFormat = OsmAndFormatter.getPoiSimpleFormat(amenity, SearchPOIActivity.this, OsmandSettings.usingEnglishNames(settings));
OsmandSettings.setMapLocationToShow(SearchPOIActivity.this,
amenity.getLocation().getLatitude(), amenity.getLocation().getLongitude(),
Math.max(16, z), getString(R.string.poi)+" : " + amenity.getSimpleFormat(OsmandSettings.usingEnglishNames(settings))); //$NON-NLS-1$
Math.max(16, z), getString(R.string.poi)+" : " + poiSimpleFormat); //$NON-NLS-1$
} else if(which == 1){
LatLon l = amenity.getLocation();
OsmandSettings.setPointToNavigate(SearchPOIActivity.this, l.getLatitude(), l.getLongitude());
@ -484,8 +485,9 @@ public class SearchPOIActivity extends ListActivity implements SensorEventListen
}
int z = OsmandSettings.getLastKnownMapZoom(settings);
Amenity amenity = ((AmenityAdapter) getListAdapter()).getItem(position);
String poiSimpleFormat = OsmAndFormatter.getPoiSimpleFormat(amenity, this, OsmandSettings.usingEnglishNames(settings));
OsmandSettings.setMapLocationToShow(this, amenity.getLocation().getLatitude(), amenity.getLocation().getLongitude(),
Math.max(16, z), getString(R.string.poi)+" : " + amenity.getSimpleFormat(OsmandSettings.usingEnglishNames(settings))); //$NON-NLS-1$
Math.max(16, z), getString(R.string.poi)+" : " + poiSimpleFormat); //$NON-NLS-1$
Intent newIntent = new Intent(SearchPOIActivity.this, MapActivity.class);
startActivity(newIntent);
}
@ -596,8 +598,7 @@ public class SearchPOIActivity extends ListActivity implements SensorEventListen
LatLon l = amenity.getLocation();
Location.distanceBetween(l.getLatitude(), l.getLongitude(), location.getLatitude(), location.getLongitude(), mes);
}
String str = amenity.getStringWithoutType(OsmandSettings.usingEnglishNames(settings));
String str = OsmAndFormatter.getPoiStringWithoutType(amenity, OsmandSettings.usingEnglishNames(settings));
label.setText(str);
int opened = -1;
if (amenity.getOpeningHours() != null) {
@ -638,7 +639,7 @@ public class SearchPOIActivity extends ListActivity implements SensorEventListen
if(mes == null){
distanceLabel.setText(""); //$NON-NLS-1$
} else {
distanceLabel.setText(" " + MapUtils.getFormattedDistance((int) mes[0])); //$NON-NLS-1$
distanceLabel.setText(" " + OsmAndFormatter.getFormattedDistance((int) mes[0], SearchPOIActivity.this)); //$NON-NLS-1$
}
return (row);
}
@ -663,7 +664,7 @@ public class SearchPOIActivity extends ListActivity implements SensorEventListen
.toLowerCase();
List<Amenity> filter = new ArrayList<Amenity>();
for (Amenity item : originalAmenityList) {
String lower = item.getStringWithoutType(OsmandSettings.usingEnglishNames(settings)).toLowerCase();
String lower = OsmAndFormatter.getPoiStringWithoutType(item, OsmandSettings.usingEnglishNames(settings)).toLowerCase();
if(lower.indexOf(lowerCase) != -1){
filter.add(item);
}

View file

@ -8,7 +8,7 @@ import java.util.ArrayList;
import java.util.List;
import net.osmand.Algoritms;
import net.osmand.Messages;
import net.osmand.OsmAndFormatter;
import net.osmand.data.TransportRoute;
import net.osmand.data.TransportStop;
import net.osmand.osm.LatLon;
@ -142,7 +142,7 @@ public class SearchTransportActivity extends ListActivity {
}
public String getSearchArea(){
return " < " + 125 * (1 << (17 - zoom)) + " " + Messages.getMessage(Messages.KEY_M); //$NON-NLS-1$//$NON-NLS-2$
return " < " + 125 * (1 << (17 - zoom)) + " " + getString(R.string.m); //$NON-NLS-1$//$NON-NLS-2$
}
public boolean isSearchFurtherAvailable() {
return zoom >= finalZoom;
@ -228,18 +228,18 @@ public class SearchTransportActivity extends ListActivity {
}
ind++;
}
text.append(getString(R.string.transport_route_distance)).append(" ").append(MapUtils.getFormattedDistance((int) dist)); //$NON-NLS-1$/
text.append(getString(R.string.transport_route_distance)).append(" ").append(OsmAndFormatter.getFormattedDistance((int) dist, this)); //$NON-NLS-1$/
if(!part){
text.append(", ").append(getString(R.string.transport_stops_to_pass)).append(" ").append(eInd - stInd); //$NON-NLS-1$ //$NON-NLS-2$
LatLon endStop = getEndStop(position - 1);
if (endStop != null) {
String before = MapUtils.getFormattedDistance((int) MapUtils.getDistance(endStop, route.getStart().getLocation()));
String before = OsmAndFormatter.getFormattedDistance((int) MapUtils.getDistance(endStop, route.getStart().getLocation()), SearchTransportActivity.this);
text.append(", ").append(getString(R.string.transport_to_go_before)).append(" ").append(before); //$NON-NLS-2$//$NON-NLS-1$
}
LatLon stStop = getStartStop(position + 1);
if (stStop != null) {
String after = MapUtils.getFormattedDistance((int) MapUtils.getDistance(stStop, route.getStop().getLocation()));
String after = OsmAndFormatter.getFormattedDistance((int) MapUtils.getDistance(stStop, route.getStop().getLocation()), SearchTransportActivity.this);
text.append(", ").append(getString(R.string.transport_to_go_after)).append(" ").append(after); //$NON-NLS-1$ //$NON-NLS-2$
}
}
@ -268,9 +268,9 @@ public class SearchTransportActivity extends ListActivity {
String name = st.getName(OsmandSettings.usingEnglishNames(settings));
if(locationToGo != null){
n.append(name).append(" - ["); //$NON-NLS-1$
n.append(MapUtils.getFormattedDistance((int) MapUtils.getDistance(locationToGo, st.getLocation()))).append("]"); //$NON-NLS-1$
n.append(OsmAndFormatter.getFormattedDistance((int) MapUtils.getDistance(locationToGo, st.getLocation()), SearchTransportActivity.this)).append("]"); //$NON-NLS-1$
} else if(locationToStart != null){
n.append("[").append(MapUtils.getFormattedDistance((int) MapUtils.getDistance(locationToStart, st.getLocation()))).append("] - "); //$NON-NLS-1$ //$NON-NLS-2$
n.append("[").append(OsmAndFormatter.getFormattedDistance((int) MapUtils.getDistance(locationToStart, st.getLocation()), SearchTransportActivity.this)).append("] - "); //$NON-NLS-1$ //$NON-NLS-2$
n.append(name);
} else {
n.append(name);
@ -455,7 +455,7 @@ public class SearchTransportActivity extends ListActivity {
labelW.append(" - ["); //$NON-NLS-1$
if (locationToGo != null) {
labelW.append(MapUtils.getFormattedDistance(stop.getDistToLocation()));
labelW.append(OsmAndFormatter.getFormattedDistance(stop.getDistToLocation(), SearchTransportActivity.this));
} else {
labelW.append(getString(R.string.transport_search_none));
}
@ -469,7 +469,7 @@ public class SearchTransportActivity extends ListActivity {
}
int dist = locationToStart == null ? 0 : (int) (MapUtils.getDistance(stop.getStart().getLocation(), locationToStart));
distanceLabel.setText(" " + MapUtils.getFormattedDistance(dist)); //$NON-NLS-1$
distanceLabel.setText(" " + OsmAndFormatter.getFormattedDistance(dist, SearchTransportActivity.this)); //$NON-NLS-1$
return (row);
}
@ -491,7 +491,7 @@ public class SearchTransportActivity extends ListActivity {
if(st != null && end != null){
int dist = (int) MapUtils.getDistance(st, end);
text.setText(MessageFormat.format(getString(R.string.transport_searching_route), MapUtils.getFormattedDistance(dist)));
text.setText(MessageFormat.format(getString(R.string.transport_searching_route), OsmAndFormatter.getFormattedDistance(dist, SearchTransportActivity.this)));
} else {
text.setText(getString(R.string.transport_searching_transport));
}
@ -538,12 +538,12 @@ public class SearchTransportActivity extends ListActivity {
labelW.append(" ("); //$NON-NLS-1$
labelW.append(info.getStopNumbers()).append(" ").append(getString(R.string.transport_stops)).append(", "); //$NON-NLS-1$ //$NON-NLS-2$
int startDist = (int) MapUtils.getDistance(getEndStop(position - 1), info.getStart().getLocation());
labelW.append(getString(R.string.transport_to_go_before)).append(" ").append(MapUtils.getFormattedDistance(startDist)); //$NON-NLS-1$
labelW.append(getString(R.string.transport_to_go_before)).append(" ").append(OsmAndFormatter.getFormattedDistance(startDist, SearchTransportActivity.this)); //$NON-NLS-1$
if (position == getCount() - 1) {
LatLon stop = getStartStop(position + 1);
if(stop != null) {
int endDist = (int) MapUtils.getDistance(stop, info.getStop().getLocation());
labelW.append(", ").append(getString(R.string.transport_to_go_after)).append(" ").append(MapUtils.getFormattedDistance(endDist)); //$NON-NLS-1$ //$NON-NLS-2$
labelW.append(", ").append(getString(R.string.transport_to_go_after)).append(" ").append(OsmAndFormatter.getFormattedDistance(endDist, SearchTransportActivity.this)); //$NON-NLS-1$ //$NON-NLS-2$
}
}

View file

@ -1,7 +1,7 @@
package net.osmand.plus.views;
import net.osmand.Algoritms;
import net.osmand.Messages;
import net.osmand.OsmAndFormatter;
import net.osmand.osm.LatLon;
import net.osmand.osm.MapUtils;
import net.osmand.plus.OsmandSettings;
@ -208,7 +208,7 @@ public class MapInfoLayer implements OsmandMapLayer {
cachedMeters = 0;
cachedDistString = null;
} else {
cachedDistString = MapUtils.getFormattedDistance(cachedMeters);
cachedDistString = OsmAndFormatter.getFormattedDistance(cachedMeters, map);
float right = paintBlack.measureText(cachedDistString) + 25 * scaleCoefficient + boundsForDist.left;
if(cachedSpeedString != null){
boundsForSpeed.right = boundsForDist.right = Math.max(right, boundsForDist.right);
@ -235,7 +235,7 @@ public class MapInfoLayer implements OsmandMapLayer {
if(map.getLastKnownLocation() != null && map.getLastKnownLocation().hasSpeed()){
if(Math.abs(map.getLastKnownLocation().getSpeed() - cachedSpeed) > .3f){
cachedSpeed = map.getLastKnownLocation().getSpeed();
cachedSpeedString = ((int) (cachedSpeed * 3.6f)) + Messages.getMessage(Messages.KEY_KM_H);
cachedSpeedString = ((int) (cachedSpeed * 3.6f)) + map.getString(R.string.km_h);
float right = paintBlack.measureText(cachedSpeedString) + 8 * scaleCoefficient + boundsForSpeed.left;
boundsForSpeed.right = boundsForDist.right = Math.max(right, boundsForDist.right);
}
@ -312,7 +312,7 @@ public class MapInfoLayer implements OsmandMapLayer {
}
rulerDistPix = (int) (view.getWidth() * screenPercent / dist * baseDist);
rulerDistName = MapUtils.getFormattedDistance(baseDist);
rulerDistName = OsmAndFormatter.getFormattedDistance(baseDist, map);
rulerBaseLine = (int) (view.getHeight() - 70 * dm.density);
if(view.getParent() instanceof View){
View zoomControls = ((View) view.getParent()).findViewById(R.id.ZoomControls);
@ -368,7 +368,7 @@ public class MapInfoLayer implements OsmandMapLayer {
canvas.drawText(cachedExitOut, boundsForMiniRoute.centerX() - 6 * scaleCoefficient,
boundsForMiniRoute.centerY() - 9 * scaleCoefficient, paintBlack);
}
canvas.drawText(MapUtils.getFormattedDistance(d), boundsForMiniRoute.left + 10 * scaleCoefficient,
canvas.drawText(OsmAndFormatter.getFormattedDistance(d, map), boundsForMiniRoute.left + 10 * scaleCoefficient,
boundsForMiniRoute.bottom - 9 * scaleCoefficient, paintBlack);
}
}

View file

@ -4,6 +4,7 @@ import java.util.ArrayList;
import java.util.List;
import net.osmand.LogUtil;
import net.osmand.OsmAndFormatter;
import net.osmand.data.Amenity;
import net.osmand.osm.LatLon;
import net.osmand.plus.OsmandSettings;
@ -82,7 +83,7 @@ public class POIMapLayer implements OsmandMapLayer, ContextMenuLayer.IContextMen
public boolean onTouchEvent(PointF point) {
Amenity n = getAmenityFromPoint(point);
if(n != null){
String format = n.getSimpleFormat(OsmandSettings.usingEnglishNames(view.getSettings()));
String format = OsmAndFormatter.getPoiSimpleFormat(n, view.getContext(), OsmandSettings.usingEnglishNames(view.getSettings()));
if(n.getOpeningHours() != null){
format += "\n" + view.getContext().getString(R.string.opening_hours) +" : "+ n.getOpeningHours(); //$NON-NLS-1$ //$NON-NLS-2$
}
@ -212,7 +213,7 @@ public class POIMapLayer implements OsmandMapLayer, ContextMenuLayer.IContextMen
@Override
public String getObjectDescription(Object o) {
if(o instanceof Amenity){
return ((Amenity)o).getSimpleFormat(OsmandSettings.usingEnglishNames(view.getSettings()));
return OsmAndFormatter.getPoiSimpleFormat((Amenity) o, view.getContext(), OsmandSettings.usingEnglishNames(view.getSettings()));
}
return null;
}