From 48b9efc4a591c0554b9a9ecdb772957ba242aa82 Mon Sep 17 00:00:00 2001 From: Leif Larsson Date: Mon, 30 Jun 2014 18:17:51 +0200 Subject: [PATCH 01/49] Translated using Weblate (Swedish) Currently translated at 99.3% (1420 of 1430 strings) --- OsmAnd/res/values-sv/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/res/values-sv/strings.xml b/OsmAnd/res/values-sv/strings.xml index b08413d5bc..1d22b951e6 100644 --- a/OsmAnd/res/values-sv/strings.xml +++ b/OsmAnd/res/values-sv/strings.xml @@ -1234,7 +1234,7 @@ Meddela vid trafikvarningar - precision + noggrannhet Förändringar i 1.5: \n\t* Röstvarningar vid hastighetsbegränsningar och fartkameror \n\t* Fler röstprompter (uppläsning av gatunamn) From 7563b43a482ef052b1550f7324402fe1dc909d94 Mon Sep 17 00:00:00 2001 From: Marco Antonio Date: Tue, 1 Jul 2014 05:16:07 +0200 Subject: [PATCH 02/49] Translated using Weblate (Spanish) Currently translated at 100.0% (1431 of 1431 strings) --- OsmAnd/res/values-es/strings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/OsmAnd/res/values-es/strings.xml b/OsmAnd/res/values-es/strings.xml index 39ce1d2067..3594f637bf 100644 --- a/OsmAnd/res/values-es/strings.xml +++ b/OsmAnd/res/values-es/strings.xml @@ -1794,4 +1794,5 @@ Afganistán, Albania, Alemania, Andorra, Angola, Anguila, Antigua y Barbuda, Ant No hay archivos GPX seleccionado. Para seleccionar presione y mantenga presionado en la traza disponible. No seleccionado Seleccionar para mostrar + No hay nada que descargar, compruebe la conexión a Internet. From 77649c4b2b8aacc7443130c245880a8bcb00f7b5 Mon Sep 17 00:00:00 2001 From: Andrius Date: Tue, 1 Jul 2014 07:25:35 +0200 Subject: [PATCH 03/49] Translated using Weblate (Lithuanian) Currently translated at 100.0% (1431 of 1431 strings) --- OsmAnd/res/values-lt/strings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/OsmAnd/res/values-lt/strings.xml b/OsmAnd/res/values-lt/strings.xml index 6395ff3bba..502c8cf72b 100644 --- a/OsmAnd/res/values-lt/strings.xml +++ b/OsmAnd/res/values-lt/strings.xml @@ -1886,4 +1886,5 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A Panaikinti žymėjimą Pasirinkite ką atvaizduoti \t + Nėra ką parsisiųsti. Pasitikrinkite interneto ryšį. From 808516f206d0fbde6f95e0230661c9a5e1a44f65 Mon Sep 17 00:00:00 2001 From: jan madsen Date: Tue, 1 Jul 2014 07:38:35 +0200 Subject: [PATCH 04/49] Translated using Weblate (Danish) Currently translated at 100.0% (1431 of 1431 strings) --- OsmAnd/res/values-da/strings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/OsmAnd/res/values-da/strings.xml b/OsmAnd/res/values-da/strings.xml index 7def1d810f..07ca4bc0cc 100644 --- a/OsmAnd/res/values-da/strings.xml +++ b/OsmAnd/res/values-da/strings.xml @@ -1900,4 +1900,5 @@ Afghanistan, Albanien, Algeriet, Andorra, Angola, Anguilla, Antigua og Barbuda, Ingen GPX filer valgt. Langt tryk for at vælge et tilgængeligt spor. Vælg at få vist Fravælg + Ingenting at hente, kontroller internetforbindelse. From 74dbac2f01e60d7c9fb722fbb57113a5383bfc5b Mon Sep 17 00:00:00 2001 From: ezjerry liao Date: Tue, 1 Jul 2014 07:41:28 +0200 Subject: [PATCH 05/49] Translated using Weblate (Traditional Chinese) Currently translated at 100.0% (1431 of 1431 strings) --- OsmAnd/res/values-zh-rTW/strings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/OsmAnd/res/values-zh-rTW/strings.xml b/OsmAnd/res/values-zh-rTW/strings.xml index 4c3924a8a5..67be73a2fd 100644 --- a/OsmAnd/res/values-zh-rTW/strings.xml +++ b/OsmAnd/res/values-zh-rTW/strings.xml @@ -1888,4 +1888,5 @@ OsmAnd 是開放原始碼,而且正在積極的開發。應用程式從報告 取消選擇 選取要顯示的 \t + 無法下載,請檢查網路連線。 From 94f16aa47100f1b8b5df36a9bc6b1eef0b261884 Mon Sep 17 00:00:00 2001 From: Viktar Palstsiuk Date: Tue, 1 Jul 2014 13:33:33 +0200 Subject: [PATCH 06/49] Translated using Weblate (Belarusian) Currently translated at 100.0% (1431 of 1431 strings) --- OsmAnd/res/values-be/strings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/OsmAnd/res/values-be/strings.xml b/OsmAnd/res/values-be/strings.xml index a18b12ae42..c5ae449ac9 100644 --- a/OsmAnd/res/values-be/strings.xml +++ b/OsmAnd/res/values-be/strings.xml @@ -1864,4 +1864,5 @@ OsmAnd мае адкрыты зыходны код і актыўна разві GPX файлы ня выбраныя. Каб выбраць націсьніце і ўтрымлівайце наяўны сьлед. Ачысьціць Выбраць для паказу + Няма чаго сьцягваць, калі-ласка, праверце Інтэрнэт злучэньне. From 6382c891ab4ec37c368ce0587df94914673fd4fd Mon Sep 17 00:00:00 2001 From: josep constanti Date: Tue, 1 Jul 2014 13:49:15 +0200 Subject: [PATCH 07/49] Translated using Weblate (Catalan) Currently translated at 100.0% (1431 of 1431 strings) --- OsmAnd/res/values-ca/strings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/OsmAnd/res/values-ca/strings.xml b/OsmAnd/res/values-ca/strings.xml index 880ac05652..ac14dc6cdf 100644 --- a/OsmAnd/res/values-ca/strings.xml +++ b/OsmAnd/res/values-ca/strings.xml @@ -1867,4 +1867,5 @@ La llista de països inclosos (bàsicament tot el món!): Afganistan, Albània, Cap arxiu GPX seleccionat. Per seleccionar-ne premi i mantingui sobre una traça disponible. No seleccionat Selecciona per veure + Res per descarregar, verifiqui la connexió a internet. From 49387436054143a587ec14a6904fa40e02b70f62 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 1 Jul 2014 12:56:40 +0300 Subject: [PATCH 08/49] Fixed bug 104 in jira --- .../views/controls/MapRoutePreferencesControl.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/views/controls/MapRoutePreferencesControl.java b/OsmAnd/src/net/osmand/plus/views/controls/MapRoutePreferencesControl.java index 4f21687ef9..1003032cf5 100644 --- a/OsmAnd/src/net/osmand/plus/views/controls/MapRoutePreferencesControl.java +++ b/OsmAnd/src/net/osmand/plus/views/controls/MapRoutePreferencesControl.java @@ -283,12 +283,22 @@ public class MapRoutePreferencesControl extends MapControls { final LocalRoutingParameter rp = getItem(position); tv.setText(rp.getText(mapActivity)); tv.setPadding((int) (5 * scaleCoefficient), 0, 0, 0); - ch.setChecked(rp.isSelected(settings)); + if (rp.routingParameter.getId().equals("short_way")){ + //if short route settings - it should be inverse of fast_route_mode + ch.setChecked(!settings.FAST_ROUTE_MODE.get()); + } else { + ch.setChecked(rp.isSelected(settings)); + } ch.setVisibility(View.VISIBLE); ch.setOnCheckedChangeListener(new OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { - rp.setSelected(settings, isChecked); + //if short way that it should set valut to fast mode opposite of current + if (rp.routingParameter.getId().equals("short_way")){ + settings.FAST_ROUTE_MODE.set(!isChecked); + } else { + rp.setSelected(settings, isChecked); + } if(rp instanceof OtherLocalRoutingParameter) { updateGpxRoutingParameter((OtherLocalRoutingParameter) rp); } From c5865a2db6e11264e05e33db413147774c88e8eb Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 1 Jul 2014 18:12:49 +0300 Subject: [PATCH 09/49] fixed issue 87 in Jira: Map names are now translated in local maps. --- .../plus/activities/LocalIndexesActivity.java | 82 +++++++++++++++++-- 1 file changed, 76 insertions(+), 6 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/LocalIndexesActivity.java b/OsmAnd/src/net/osmand/plus/activities/LocalIndexesActivity.java index 66dc51b7db..9571850ac4 100644 --- a/OsmAnd/src/net/osmand/plus/activities/LocalIndexesActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/LocalIndexesActivity.java @@ -13,11 +13,11 @@ import java.util.Set; import net.osmand.IProgress; import net.osmand.IndexConstants; import net.osmand.access.AccessibleToast; -import net.osmand.plus.ContextMenuAdapter; +import net.osmand.map.OsmandRegions; +import net.osmand.plus.*; import net.osmand.plus.ContextMenuAdapter.OnContextMenuClick; -import net.osmand.plus.OsmandPlugin; -import net.osmand.plus.R; import net.osmand.plus.activities.LocalIndexHelper.LocalIndexType; +import net.osmand.plus.download.IndexItem; import net.osmand.util.Algorithms; import android.app.Activity; import android.app.AlertDialog; @@ -72,6 +72,7 @@ public class LocalIndexesActivity extends OsmandExpandableListActivity { MessageFormat formatGb = new MessageFormat("{0, number,#.##} GB", Locale.US); private ContextMenuAdapter optionsMenuAdapter; private ActionMode actionMode; + private OsmandRegions osmandRegions; @SuppressWarnings("unchecked") @Override @@ -86,6 +87,7 @@ public class LocalIndexesActivity extends OsmandExpandableListActivity { descriptionLoader = new LoadLocalIndexDescriptionTask(); listAdapter = new LocalIndexesAdapter(this); + osmandRegions = ((OsmandApplication) getApplication()).getResourceManager().getOsmandRegions(); getExpandableListView().setOnCreateContextMenuListener(new View.OnCreateContextMenuListener() { @@ -749,9 +751,10 @@ public class LocalIndexesActivity extends OsmandExpandableListActivity { int okColor; int defaultColor; int corruptedColor; - + Context ctx; public LocalIndexesAdapter(Context ctx) { + this.ctx = ctx; warningColor = ctx.getResources().getColor(R.color.color_warning); okColor = ctx.getResources().getColor(R.color.color_ok); TypedArray ta = ctx.getTheme().obtainStyledAttributes(new int[]{android.R.attr.textColorPrimary}); @@ -877,7 +880,13 @@ public class LocalIndexesActivity extends OsmandExpandableListActivity { v = inflater.inflate(net.osmand.plus.R.layout.local_index_list_item, parent, false); } TextView viewName = ((TextView) v.findViewById(R.id.local_index_name)); - viewName.setText(child.getName()); + String mapDescr = getMapDescription(child.getFileName()); + String mapName = getMapName(child.getFileName()); + if (mapDescr.length() > 0){ + viewName.setText(mapDescr + " - " + mapName); + } else { + viewName.setText(mapName); + } if (child.isNotSupported()) { viewName.setTextColor(warningColor); viewName.setTypeface(Typeface.DEFAULT, Typeface.NORMAL); @@ -1007,6 +1016,67 @@ public class LocalIndexesActivity extends OsmandExpandableListActivity { public boolean isChildSelectable(int groupPosition, int childPosition) { return true; } + + private String getMapName(String fileName){ + String mapname = getBasename(fileName); + String lc = mapname.toLowerCase(); + + String std = getStandardMapName(ctx,lc); + if (std != null){ + return std; + } + + return osmandRegions.getLocaleName(mapname); + } + + private String getBasename(String fileName) { + if (fileName.endsWith(IndexConstants.EXTRA_ZIP_EXT)) { + return fileName.substring(0, fileName.length() - IndexConstants.EXTRA_ZIP_EXT.length()); + } + if (fileName.endsWith(IndexConstants.SQLITE_EXT)) { + return fileName.substring(0, fileName.length() - IndexConstants.SQLITE_EXT.length()).replace('_', ' '); + } + + int ls = fileName.lastIndexOf('-'); + if (ls >= 0) { + return fileName.substring(0, ls); + } else { + ls = fileName.lastIndexOf("."); + if (ls >= 0){ + return fileName.substring(0,ls); + } + } + return fileName; + } + + private String getMapDescription(String fileName){ + int ls = fileName.lastIndexOf("."); + String name = fileName; + if (ls >= 0) { + name = fileName.substring(0, ls); + } + + if (name.endsWith("-roads")){ + return ctx.getString(R.string.download_roads_only_item); + } + + return ""; + } + + private String getStandardMapName(Context ctx, String basename) { + if(basename.equals("world-ski")) { + return ctx.getString(R.string.index_item_world_ski); + } else if(basename.equals("world_altitude_correction_ww15mgh")) { + return ctx.getString(R.string.index_item_world_altitude_correction); + } else if(basename.equals("world_basemap")) { + return ctx.getString(R.string.index_item_world_basemap); + } else if(basename.equals("world_bitcoin_payments")) { + return ctx.getString(R.string.index_item_world_bitcoin_payments); + } else if(basename.equals("world_seamarks")) { + return ctx.getString(R.string.index_item_world_seamarks); + } + return null; + } + } - } From 2e6d72357a9bb020f672a2d20d37c21b9e30e67a Mon Sep 17 00:00:00 2001 From: josep constanti Date: Tue, 1 Jul 2014 13:51:00 +0200 Subject: [PATCH 10/49] Translated using Weblate (Catalan) Currently translated at 100.0% (1431 of 1431 strings) --- OsmAnd/res/values-ca/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/res/values-ca/strings.xml b/OsmAnd/res/values-ca/strings.xml index ac14dc6cdf..24ef1e1aeb 100644 --- a/OsmAnd/res/values-ca/strings.xml +++ b/OsmAnd/res/values-ca/strings.xml @@ -1841,7 +1841,7 @@ La llista de països inclosos (bàsicament tot el món!): Afganistan, Albània, Hora actual Punt de pas \n\nPrémer i mantenir per veure al mapa - Iniciar la navegació amb retard + Iniciar automàticament la navegació turn-by-turn seleccionat Interval de registre Interval d\'altitud: %1$s From ac1a2ecd34e303729c32a50e6d4282d41e8528ce Mon Sep 17 00:00:00 2001 From: jan madsen Date: Tue, 1 Jul 2014 09:59:17 +0200 Subject: [PATCH 11/49] Translated using Weblate (Danish) Currently translated at 100.0% (1431 of 1431 strings) --- OsmAnd/res/values-da/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/res/values-da/strings.xml b/OsmAnd/res/values-da/strings.xml index 07ca4bc0cc..82d310c192 100644 --- a/OsmAnd/res/values-da/strings.xml +++ b/OsmAnd/res/values-da/strings.xml @@ -1900,5 +1900,5 @@ Afghanistan, Albanien, Algeriet, Andorra, Angola, Anguilla, Antigua og Barbuda, Ingen GPX filer valgt. Langt tryk for at vælge et tilgængeligt spor. Vælg at få vist Fravælg - Ingenting at hente, kontroller internetforbindelse. + Ingenting at hente, kontroller internetforbindelsen. From 0d95518af7769524f41bb79ba5e7ef0ed0487c6f Mon Sep 17 00:00:00 2001 From: Michel GERDAY Date: Tue, 1 Jul 2014 14:00:52 +0200 Subject: [PATCH 12/49] Translated using Weblate (French) Currently translated at 99.9% (1430 of 1431 strings) --- OsmAnd/res/values-fr/strings.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/OsmAnd/res/values-fr/strings.xml b/OsmAnd/res/values-fr/strings.xml index 0b2ed46bd4..dc9457f3ae 100644 --- a/OsmAnd/res/values-fr/strings.xml +++ b/OsmAnd/res/values-fr/strings.xml @@ -1731,4 +1731,8 @@ Afghanistan, Albanie, Algérie, Allemagne, Andorre, Angola, Anguilla, Antigua-et Visible Trier par distance Trier par nom + Rien à télécharger, veuillez vérifier votre connexion Internet. + Aucun fichier GPX sélectionné. Pour sélectionner, presser longuement sur la trace disponible. + Désélectionner + Sélectionner pour afficher From 970290099841fa5711742328f98bae1681772c86 Mon Sep 17 00:00:00 2001 From: Marco Antonio Date: Tue, 1 Jul 2014 06:47:45 +0200 Subject: [PATCH 13/49] Translated using Weblate (Spanish) Currently translated at 100.0% (1431 of 1431 strings) --- OsmAnd/res/values-es/strings.xml | 100 +++++++++++++------------------ 1 file changed, 43 insertions(+), 57 deletions(-) diff --git a/OsmAnd/res/values-es/strings.xml b/OsmAnd/res/values-es/strings.xml index 3594f637bf..3305bd10ea 100644 --- a/OsmAnd/res/values-es/strings.xml +++ b/OsmAnd/res/values-es/strings.xml @@ -20,14 +20,14 @@ Usa colores fluorescentes para mostrar trazas y rutas Edición sin conexión Usa siempre edición sin conexión - "Cambios en 0.7.1 : + "Cambios en 0.7.1: \n\t- Edición de PDI sin conexión -\n\t- Seguimiento en directo opcional - envía las coordenadas a un servicio web periódicamente (lea cómo configurar su propio servicio web en los artículos HowTo) -\n\t- Muestra la traza actual en el mapa -\n\t- Detección de la dirección : \'Da la vuelta\' se indica y se anuncia cuando se orienta en la dirección opuesta o después de saltarse un giro +\n\t- Opción seguimiento con conexión - envía las coordenadas a un servicio web periódicamente (lea cómo configurar su propio servicio web en los artículos HowTo) +\n\t- Muestra el registro de la traza actual en el mapa +\n\t- Detección de la dirección: \'Hacer vuelta en U\' se indica y anuncia cuando se orienta en la dirección opuesta o después de saltarse un giro \n\t- Nuevo anuncio de voz \'Ruta recalculada\' \n\t- Indicación óptica de un giro inminente en menos de 100m por el cambio de color en la flecha de dirección -\n\t- Disponibilidad de versión actual también para ficheros de índice desactivados - se muestra en la pantalla de Descarga en verde oscuro y azul oscuro +\n\t- Actualmente también los archivos índice desactivados se muestran en la pantalla de Descarga en verde oscuro y azul oscuro \n\t- Otros cambios " Los cambios a PDIs dentro de la aplicación no afectan a los archivos de mapa descargados; los cambios se guardan en un archivo local. Enviando-… @@ -222,7 +222,7 @@ El idioma seleccionado no está soportado por el sintetizador de voz (TTS) de Android. ¿Quiere ir a G. Play a buscar otro motor TTS? Si no, se utilizará el idioma TTS preseleccionado. Faltan datos No hay datos instalados para el idioma seleccionado. ¿Quiere ir a G. Play para instalarlos? - Invertir la dirección del GPX + Invertir la dirección GPX Usar destino actual Pasar a lo largo de la traza completa Mapa vectorial presente para esta localización. \n\t\n\tPara usarlo activa \'Menú\'→\'Capas de mapa\'→\'Fuente del mapa…\'→\'Mapas vectoriales descargados\'. @@ -275,7 +275,7 @@ Buscar dirección usando mapas sin conexión Sistema Selecciona el idioma de visualización - Idioma de visualización + Idioma de la pantalla Elige una Fuente de mapa Perfil de uso @@ -523,7 +523,7 @@ Para poder usar muchas características de la aplicación necesitas algunos dato Rutas Parada paradas - Ruta siguiente + Ruta subsiguiente Ruta previa Finalizar búsqueda Elige parada a la que ir @@ -579,9 +579,9 @@ Para poder usar muchas características de la aplicación necesitas algunos dato Se editó el punto favorito No hay puntos favoritos Reemplazar - Sólo mostrar + Mostrar ruta Seguir - Seleccione el modo de transporte (opcional): + Modo transporte: Seleccione primero el destino Indicaciones Mostrar estado del GPS @@ -782,7 +782,7 @@ Para poder usar muchas características de la aplicación necesitas algunos dato Configuraciones avanzadas Este agregado facilita el registro de sus excursiones a un fichero GPX o en directo usando un servicio web. Muestra opciones para configuraciones avanzadas de mapa (como aumentar detalles del mapa) y algunas especificas de dispositivos. - Muestra opciones de características de desarrollo y depuración como navegación animada o mostrar el rendimiento de la visualización. + Mostrar opciones de características de desarrollo y depuración como la simulación de rutas o la pantalla de rendimiento de la visualización. Gestor de Extras Toque un extra para activarlo o desactivarlo. (Puede ser necesario reiniciar OsmAnd.) Los extras activan opciones avanzadas y proporcionan funcionalidades adicionales @@ -887,16 +887,16 @@ Para poder usar muchas características de la aplicación necesitas algunos dato Rotonda: coja la %1$d salida y continúe Manténgase a la izquierda y continúe Manténgase a la derecha y continúe - Guardar ruta como fichero GPX + Guardar la ruta como archivo GPX Si puedes - "Cambios en 0.8.1 : + "Cambios en 0.8.1: \n\t* Rutas más precisas (algo más lento) \n\t* Recálculo inteligente y rápido de la ruta \n\t* Direcciones por carriles -\n\t* Información sobre radares, limites de velocidad y puntos negros -\n\t* Mejoras en la guía por voz en autopistas -\n\t* Extra de parking (¿Dónde está aparcado mi coche?) -\n\t* Activar/Desactivar mecanismo de monitorización " +\n\t* Información sobre límites de velocidad, radares y reductores de velocidad +\n\t* Mejoras en la guía por voz en carreteras +\n\t* Agregado de aparcamiento (¿Dónde está aparcado mi autoóvil?) +\n\t* Habilitar/Deshabilitar el widget de registro " Público Identificable Trazable @@ -930,14 +930,14 @@ Para poder usar muchas características de la aplicación necesitas algunos dato Memoria nativa total usada por la app %1$s MB (Dalvik %2$s MB, otros %3$s MB). Memoria proporcional %4$s MB (Límite Android %5$s MB, Dalvik %6$s MB). Memoria nativa total - Seleccionar aceleración de ruta animada + Seleccionar la velocidad del simulador de ruta Horas Minutos El automóvil fue aparcado en: Usa la brújula cuando no se detecta la dirección Usar brújula - La ruta será recalculada cuando se encuentre la localización - La navegación anterior no ha finalizado. ¿Continuar siguiéndola? (%1$s segundos) + La ruta será calculada cuando se encuentre la ubicación + La navegación anterior no finalizó. ¿Continuar siguiéndola? (%1$s segundos) @@ -957,7 +957,7 @@ Para poder usar muchas características de la aplicación necesitas algunos dato Lado derecho: Lado izquierdo: Aparcamiento - Seguimiento + Grabando GPX Velocidad Destino Altitud @@ -1049,9 +1049,11 @@ Para poder usar muchas características de la aplicación necesitas algunos dato - Indicación de carriles, mostrar límites de velocidad, voces grabadas y generadas opcionales Evitar autopistas -"Cambios en 0.8.3 : -\n\t* Puntos intermedios\n\t* Mejoras en indicaciones de ruta -\n\t* Añadida una opción de evitar autopistas cuando se contruye una ruta\n\t* Añadido un tipo adicional de vía ciclista (Cycleway=track) +"Cambios en 0.8.3: +\n\t* Puntos de interés +\n\t* Mejoras en indicaciones de ruta +\n\t* Añadida una opción de evitar autopistas cuando se construye una ruta +\n\t* Añadido un tipo más de carretera para bicicletas al mapa (Cycleway=track) \n\t* Corrección de errores " Ajusta la posición a las carreteras durante la navegación Ajustar a carreteras @@ -1066,7 +1068,7 @@ Para poder usar muchas características de la aplicación necesitas algunos dato Punto de interés %1$s Puntos de ruta Punto de ruta %1$s demasiado lejos de la carretera más cercana. - Usted llegó a su punto de interés + Llegaste a tu punto de interés Añadir como punto de interés Punto de interés Punto final demasiado lejos de la carretera más cercana. @@ -1080,13 +1082,13 @@ Para poder usar muchas características de la aplicación necesitas algunos dato Restaurantes Turismo Servicios de registro - No hay ruta + Sin ruta Eliminar el punto de interés Punto de interés %1$s Por favor, habilite el GPS en ajustes Mostrar dirección de destino Permite que los extras de monitorización (registro, seguimiento en directo) usen los servicios de monitorización - Calcula una ruta posiblemente no óptima en largas distancias + Calcular una ruta posiblemente no óptima en largas distancias Selecciona un esquema de color de carreteras: Esquema de color de carreteras La aplicación ZXing Barcode Scanner no está instalada. ¿Buscarla en el Market? @@ -1114,7 +1116,7 @@ Para poder usar muchas características de la aplicación necesitas algunos dato \n\nOsmAnd mostrará la altitud de tu posición en el sistema EGM96 cuando descargues el archivo \'World Altitide Correction WW15MGH\' mediante \'Opciones\'→\'Gestionar mapas\' (el original está en http://earth-info.nga.mil/GandG/wgs84/gravitymod/egm96/binary/WW15MGH.DAC). " Límite de velocidad - Inicio + GPX Corrección de Altitud Ocultar fronteras Evita mostrar las fronteras regionales (niveles administrativos 5-9) @@ -1182,7 +1184,7 @@ Para poder usar muchas características de la aplicación necesitas algunos dato Hacer una foto ¿Seguro que quieres parar la navegación? ¿Seguro que quieres borrar tu punto de destino? - Activa el enrutamiento preciso para calcular rutas precisas sin fallos. Aún está limitado por la distancia y es lento. + Habilitar para calcular rutas precisas sin interferencias. Aún está limitado por la distancia y es lento. Enrutado preciso (alfa) Datos de Audio/Vídeo Inicio @@ -1332,7 +1334,7 @@ La lista de países incluídos (¡básicamente todo el mundo!): Afganistán, Alb Punto Nombre del archivo GPX Archivo GPX guardado correctamente en {0} - Crea caminos (o usa / modifica archivos GPX existentes) para medir la distancia entre los puntos. Guardado como GPX, se puede utilizar para planificar rutas GPX. + Crear caminos (o usar / modificar archivos GPX existentes) para medir la distancia entre los puntos. Guardado como GPX, se puede utilizar para planificar rutas GPX. Cálculador de distancia y Herramienta de planificación * Toca para marcar un punto.\n * Mantenga pulsado el mapa para suprimir el punto anterior.\n * Mantenga pulsado el punto para ver e incluir descripción.\n * Pulse en el control de medición para ver más acciones. No mostrar de nuevo @@ -1412,7 +1414,7 @@ La lista de países incluídos (¡básicamente todo el mundo!): Afganistán, Alb \n\nAdemás del estilo de mapa equilibrado «predeterminado», en \'Menú\' → \'Configurar pantalla\' → \'Estilo de mapa\' puedes seleccionar por ejemplo \n\t* El estilo \'Vista de tour\', que contiene información detallada y adecuada para viajes y giras, incluyendo optimización para profesionales de la conducción (mayor contraste, carreteras distinguibles), opciones para ir de senderismo Alpino (escala SAC), rutas ciclistas, soporte para símbolos de senderismo, etc. \n\t* \'Carreteras de alto contraste\' muestra las carreteras en colores muy acentuados para situaciones con brillante iluminación ambiental -\n\t* \'Invierno y esquí\' crea una vista del paisaje del invierno (nevado), y muestra pistas y remontes (en relación con la descarga del mapa \"Mundo de esquí\" " +\n\t* \'Invierno y esquí\' crea una vista del paisaje del invierno (nevado), y muestra pistas y remontes (en relación con la descarga del mapa \'Mundo de esquí\') " Cambios en 1.6: \n\t* Soporte de dispositivos Full HD \n\t* Soporte de fondo transparente @@ -1504,7 +1506,7 @@ La lista de países incluídos (¡prácticamente todo el mundo!): Afganistán, Albania, Alemania, Andorra, Angola, Anguila, Antigua y Barbuda, Antillas Holandesas, Arabia Saudita, Argelia, Argentina, Armenia, Aruba, Australia, Austria, Azerbaiyán, Bahamas, Bahrein, Bangladesh, Barbados, Bélgica, Belice, Benín, Bermuda, Bielorrusia, Bolivia, Bonaire, Bosnia y Herzegovina, Botswana, Brasil, Brunei, Bulgaria, Burkina Faso, Burundi, Bután, Cabo Verde, Camboya, Camerún, Canadá, Chad, Chile, China, Chipre, Colombia, Comoras, Congo, Corea del Norte, Corea del Sur, Costa de Marfil, Costa Rica, Croacia, Cuba, Curazao, Dinamarca, Djibouti, Dominica, Ecuador, Egipto, El Salvador, El Vaticano, Emiratos Árabes Unidos, Eritrea, Eslovaquia, Eslovenia, España, Estados Unidos de América, Estonia, Etiopía, Fiji, Filipinas, Finlandia, Francia, Gabón, Gambia, Georgia, Georgia del Sur, Ghana, Gibraltar, Granada, Grecia, Groenlandia, Guadalupe, Guam, Guatemala, Guayana Francesa, Guernsey, Guinea, Guinea-Bissau, Guinea Ecuatorial, Guyana, Haití, Honduras, Hong Kong, Hungría, India, Indonesia, Irán, Iraq, Irlanda, Isla de Man, Islandia, Islas Vírgenes Británicas, Israel, Italia, Jamaica, Japón, Jersey, Jordania, Kazajstán, Kenya, Kirguistán, Kiribati, Kuwait, Laos, Lesotho, Letonia, Líbano, Liberia, Libia, Liechtenstein, Lituania, Luxemburgo, Macao, Macedonia, Madagascar, Malasia, Malawi, Maldivas, Malí, Malta, Marruecos, Martinica, Mauricio, Mauritania, Mayotte, México, Micronesia, Moldavia, Mónaco, Mongolia, Montenegro, Montserrat, Mozambique, Myanmar, Namibia, Nauru, Nepal, Nicaragua, Níger, Nigeria, Noruega, Nueva Caledonia, Nueva Zelanda, Omán, Países Bajos, Pakistán, Palau, Panamá, Papua Nueva Guinea, Paraguay, Perú, Polinesia Francesa, Polonia, Portugal, Puerto Rico, Qatar, Reino Unido, República Centroafricana, República Checa, República Dominicana, Ruanda, Rumanía, Rusia, Sahara Occidental, Saint-Barthelemy, Saint Helena, Saint Kitts y Nevis, Samoa, San Marino, San Martin, San Pedro y Miquelón, Santa Lucía, San Vicente y las Granadinas, Senegal, Serbia, Seychelles, Sierra Leona, Singapur, Siria, Somalia, Sri Lanka, Sudáfrica, Sudán, Sudán del Sur, Suecia, Suiza, Suriname, Swazilandia, Tailandia, Taiwán, Tanzania, Tayikistán, Territorio Palestino, Timor Oriental, Togo, Tokelau, Tonga, Trinidad y Tobago, Túnez, Turkmenistán, Turquía, Tuvalu, Ucrania, Uganda, Uruguay, Uzbekistán, Vanuatu, Venezuela, Vietnam, Wallis y Futuna, Yemen, Zambia, Zimbabue. Lupa - El cálculo de ruta por OsmAnd puede tardar mucho (o a veces no funcionar) para puntos separados más de 200 km. Tal vez quieras añadir puntos de ruta intermedios para un mejor rendimiento. + El cálculo de la ruta de OsmAnd sin conexión puede tardar mucho tiempo (o a veces no funcionar) para puntos separados a más de 200km. Tal vez quieras añadir puntos de interés intermedios para un mejor rendimiento. Sin zoom automático Recordar mi elección Estado del GPS @@ -1513,8 +1515,8 @@ Afganistán, Albania, Alemania, Andorra, Angola, Anguila, Antigua y Barbuda, Ant Cercano Medio Alejado - Por favor, primero calcula la ruta - Simula usando la ruta calculada + Calcule la primera ruta + "Simulae usando la ruta calculada " Simula usando traza GPX Senderismo Moto @@ -1569,18 +1571,9 @@ Afganistán, Albania, Alemania, Andorra, Angola, Anguila, Antigua y Barbuda, Ant Favorito … Preferencias de la ruta Información de la ruta - Cambios en 1.7:↵ - \n\t* IMPORTANTE los mapas deben ser más nuevos que Febrero de 2014.↵ -→\n\t* Enrutado completamente actualizado (rápido y preciso) - ↵ - \n\t* Nueva pantalla con Planificación de Ruta (más intuitiva y más potente)↵ - \n\t** NOTA La ruta GPX está disponible en el botón Opciones de Ruta↵ - \n\t* Auto ocultar botones en modo navegación↵ - \n\t* Calcula la ruta offline al primer punto de la ruta GPX (opción \'pasar toda la ruta\')↵ -→\n\t* Simulación activa en túneles↵ -→\n\t* Muchas pequeñas mejoras en la experiencia de usuario y arreglos de usabilidad↵ -→\n\t* Opción de accesibilidad a la velocidad de voz↵ - - Calcular el segmento de la ruta OsmAnd sin internet + "Cambios en 1.7:↵ +\n\t* IMPORTANTE los mapas deben ser más nuevos que Febrero de 2014. ↵\n\t* Navegación completamente actualizado (rápido y preciso) - ↵\n\t* Nueva pantalla con planificación de ruta (más intuitiva y más potente) ↵\n\t** NOTA La traza GPX está disponible en el botón Opciones de ruta ↵\n\t* Auto ocultar botones en modo navegación ↵\n\t* Calcular sin conexión la ruta al primer punto de la ruta GPX (opción \'pasar toda la ruta\') ↵\n\t* Simulación activa en túneles ↵\n\t* Muchas pequeñas mejoras en la experiencia de usuario y arreglos de usabilidad ↵\n\t* Opción de accesibilidad a la velocidad de voz " + Calcular el segmento de la ruta OsmAnd sin Internet Calcular la ruta OsmAnd para el primer y último segmento de ruta Objetos no buscados Inglés @@ -1649,7 +1642,7 @@ Afganistán, Albania, Alemania, Andorra, Angola, Anguila, Antigua y Barbuda, Ant Por favor, lea más en http://osmo.mobi. OsMo (Monitoreo avanzado en directo) OsMo OpenStreetMap Monitoring (beta) - Compartir ruta como fichero GPX + Compartir la ruta como archivo GPX Ruta compartida vía OsmAnd Formato inválido: %s Nunca @@ -1664,14 +1657,7 @@ Afganistán, Albania, Alemania, Andorra, Angola, Anguila, Antigua y Barbuda, Ant Compartir Favoritos compartidos a través de OsmAnd Calcular ruta entre puntos - Cambios en 1.8: - * Calcular ruta entre puntos de ruta de una pista GPX - * Cambiada disposición de países para descargas (soporta búsquedas de nombres locales) - * Soporta importación de GPX/KML (conversión de KML a GPX) - * Las pistas GPX se han movido a \'Mis Sitios\' - * Puede dividir las pistas GPX por distancia y comprobar la diferencia de altitud / velocidad - * Auto iniciar la navegación tras un retraso - + "Cambios en 1.8: * Calcular ruta entre puntos de ruta de una traza GPX * Cambiado el diseño de los países para descargar (soporta búsquedas de nombres locales) * Soporta importación GPX/KML (conversión de KML a GPX) * Las trazas GPX se han movido a \'Mis datos\' * Puedes dividir las trazas GPX por distancia y comprobar la diferencia de altitud / velocidad * Auto iniciar la navegación tras un retraso " Nombre de usuario Dispositivos conectados @@ -1762,7 +1748,7 @@ Afganistán, Albania, Alemania, Andorra, Angola, Anguila, Antigua y Barbuda, Ant Segmento %1$s \nPista %2$s Pista actual en grabación - La pista Gps está vacía + La traza GPX está vacía Pista seleccionada Todas las pistas Cargando %1$s … @@ -1791,7 +1777,7 @@ Afganistán, Albania, Alemania, Andorra, Angola, Anguila, Antigua y Barbuda, Ant Ordenar por distancia Ordenar por nombre Mostrar en el mapa - No hay archivos GPX seleccionado. Para seleccionar presione y mantenga presionado en la traza disponible. + No hay archivos GPX seleccionados. Para seleccionar presione y mantenga presionado en la traza disponible. No seleccionado Seleccionar para mostrar No hay nada que descargar, compruebe la conexión a Internet. From 0c697fff785782dc8b91b205573c8f4ce8a62b7c Mon Sep 17 00:00:00 2001 From: Leif Larsson Date: Tue, 1 Jul 2014 09:00:19 +0200 Subject: [PATCH 14/49] Translated using Weblate (Swedish) Currently translated at 99.3% (1421 of 1431 strings) --- OsmAnd/res/values-sv/strings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/OsmAnd/res/values-sv/strings.xml b/OsmAnd/res/values-sv/strings.xml index 1d22b951e6..4223cb31e0 100644 --- a/OsmAnd/res/values-sv/strings.xml +++ b/OsmAnd/res/values-sv/strings.xml @@ -1599,4 +1599,5 @@ Inga GPX-filer markerade. För att markera tryck och håll ned på tillgängligt spår. Avmarkera Markera för att visa + Inget att ladda ner; kolla din Internetanslutning. From b6dc6c1ba511f445c074bfd417a253f873da290b Mon Sep 17 00:00:00 2001 From: Marco Antonio Date: Tue, 1 Jul 2014 05:14:35 +0200 Subject: [PATCH 15/49] Translated using Weblate (Spanish) Currently translated at 100.0% (3 of 3 strings) --- OsmAnd/res/values-es/bidforfix.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/OsmAnd/res/values-es/bidforfix.xml b/OsmAnd/res/values-es/bidforfix.xml index 57745959b7..8c69ecc459 100644 --- a/OsmAnd/res/values-es/bidforfix.xml +++ b/OsmAnd/res/values-es/bidforfix.xml @@ -1,6 +1,6 @@ - + Cargando - %1$d Colaboradores + %1$d colaboradores financiado: %d%% - \ No newline at end of file + From e3d9627218bfa966fdfca01de32495b7df62c10c Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 1 Jul 2014 21:39:23 +0300 Subject: [PATCH 16/49] fixed issue 115 in Jira --- OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java b/OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java index c1b01d7891..e49b96c139 100644 --- a/OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java +++ b/OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java @@ -793,7 +793,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { // search from end for (int i = category.size() - 1; i >= 0; i--) { String cat = category.get(i); - if (Algorithms.objectEquals(g.subfolder, cat)) { + if (Algorithms.objectEquals(getActivity().getString(R.string.local_indexes_cat_gpx) + " " + g.subfolder, cat)) { found = i; break; } From 3cc949f16e0c5292f95b5c3814fa9f58de32007e Mon Sep 17 00:00:00 2001 From: sonora Date: Tue, 1 Jul 2014 23:01:23 +0200 Subject: [PATCH 17/49] indicate if selected tracks tab is empty --- OsmAnd/src/net/osmand/plus/activities/FavouritesActivity.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OsmAnd/src/net/osmand/plus/activities/FavouritesActivity.java b/OsmAnd/src/net/osmand/plus/activities/FavouritesActivity.java index 792cf41556..6f24115a79 100644 --- a/OsmAnd/src/net/osmand/plus/activities/FavouritesActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/FavouritesActivity.java @@ -115,6 +115,8 @@ public class FavouritesActivity extends SherlockFragmentActivity { if (gpx.isShowingAnyGpxFiles()) { vl += " (" + gpx.getSelectedGPXFiles().size() + ")"; + } else { + vl += " (0)"; } try { ((TextView)tabHost.getTabWidget().getChildAt(2).findViewById(android.R.id.title)).setText(vl); From 2a6c1189de60ed199b6bff762504df0f2da71f60 Mon Sep 17 00:00:00 2001 From: Ernst te Brake Date: Tue, 1 Jul 2014 23:43:56 +0200 Subject: [PATCH 18/49] Translated using Weblate (Dutch) Currently translated at 100.0% (1431 of 1431 strings) --- OsmAnd/res/values-nl/strings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/OsmAnd/res/values-nl/strings.xml b/OsmAnd/res/values-nl/strings.xml index 70186fc497..93f56ae2d8 100644 --- a/OsmAnd/res/values-nl/strings.xml +++ b/OsmAnd/res/values-nl/strings.xml @@ -1870,4 +1870,5 @@ Afghanistan, Albanie, Algerije, Andorra, Angola, Anguilla, Antigua en Barbuda, A Deselecteer Selecteer om te bekijken Route beschrijving + Geen bestand gevonden, controleer je internet verbinding. From d363d5e2b493c7811fe1589f1bf5bb272928408f Mon Sep 17 00:00:00 2001 From: Damjan Gerl Date: Wed, 2 Jul 2014 00:07:38 +0200 Subject: [PATCH 19/49] Translated using Weblate (Slovenian) Currently translated at 100.0% (1431 of 1431 strings) --- OsmAnd/res/values-sl/strings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/OsmAnd/res/values-sl/strings.xml b/OsmAnd/res/values-sl/strings.xml index 41662c04df..c4f33a544b 100644 --- a/OsmAnd/res/values-sl/strings.xml +++ b/OsmAnd/res/values-sl/strings.xml @@ -1842,4 +1842,5 @@ Seznam držav (praktično ves svet!): Afganistan, Albanija, Alžirija, Andora, A ID sledilnika Samodejno začni sejo sledilnika in pošiljanje lokacije po zagonu aplikacije "Spremembe v 1.8:\n\t* Računanje poti med točkami poti v sledi GPX\n\t* Spremenjena razporeditev držav za prenose (podpira iskanje krajevnih imen)\n\t* Podpira GPX/KML uvoz (pretvorba iz KML v GPX)\n\t* Sledi GPX premeščene v \'Moji podatki\'\n\t* Sedaj lahko razdelite sled GPX po razdalji in preverite višinsko razliko/hitrost\n\t* Samodejni začetek navigacije po zakasnitvi " + Nič za prenesti, prosim preverite internetno povezavo. From 2bcca500c57a30f0e1079202205ff7202dff9b0a Mon Sep 17 00:00:00 2001 From: Damjan Gerl Date: Wed, 2 Jul 2014 00:10:45 +0200 Subject: [PATCH 20/49] Translated using Weblate (Italian) Currently translated at 99.9% (1430 of 1431 strings) --- OsmAnd/res/values-it/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/res/values-it/strings.xml b/OsmAnd/res/values-it/strings.xml index 34830b4f03..460ad10841 100644 --- a/OsmAnd/res/values-it/strings.xml +++ b/OsmAnd/res/values-it/strings.xml @@ -1858,7 +1858,7 @@ Si consiglia di aggiungere uno o più punti intermedi per migliorarne le prestaz Tappe del percorso: $1%s Distanza: %1$s (%2$s punti) Orario di arrivo: %1$tF, %1$tT - Estermi gamma alititudini: %1$s + Gamma altitudini: %1$s Discesa/salita: %1$s Intervallo di tempo: %1$s Tempo in movimento: %1$s From 4f497c56689f97eda1d779308b47af97902f6551 Mon Sep 17 00:00:00 2001 From: Mirco Zorzo Date: Wed, 2 Jul 2014 00:48:32 +0200 Subject: [PATCH 21/49] Translated using Weblate (Italian) Currently translated at 99.9% (1431 of 1431 strings) --- OsmAnd/res/values-it/strings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/OsmAnd/res/values-it/strings.xml b/OsmAnd/res/values-it/strings.xml index 460ad10841..024f23f367 100644 --- a/OsmAnd/res/values-it/strings.xml +++ b/OsmAnd/res/values-it/strings.xml @@ -1889,4 +1889,5 @@ Si consiglia di aggiungere uno o più punti intermedi per migliorarne le prestaz Deseleziona Seleziona per visualizzarlo \t + Nulla da scaricare, per favore controllare la connessione internet. From 062c9130ad7aaf6219ee29f6087b5ccf9a519f44 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 1 Jul 2014 21:39:23 +0300 Subject: [PATCH 22/49] fixed issue 115 in Jira --- OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java b/OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java index c1b01d7891..e49b96c139 100644 --- a/OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java +++ b/OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java @@ -793,7 +793,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { // search from end for (int i = category.size() - 1; i >= 0; i--) { String cat = category.get(i); - if (Algorithms.objectEquals(g.subfolder, cat)) { + if (Algorithms.objectEquals(getActivity().getString(R.string.local_indexes_cat_gpx) + " " + g.subfolder, cat)) { found = i; break; } From f14a85d1ed9424696fa81b20ba346afb7cd448ba Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 2 Jul 2014 11:44:18 +0300 Subject: [PATCH 23/49] fixed jira bug 100 --- .../src/net/osmand/plus/activities/MapActivityActions.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java index 32ad27f6b0..afaa01a474 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java @@ -615,9 +615,11 @@ public class MapActivityActions implements DialogProvider { private void enterRoutePlanningModeImpl(GPXFile gpxFile, LatLon from, String fromName) { ApplicationMode mode = settings.DEFAULT_APPLICATION_MODE.get(); - if(mode == ApplicationMode.DEFAULT) { - mode = ApplicationMode.CAR; + if (mode == ApplicationMode.DEFAULT) { + ApplicationMode selected = settings.APPLICATION_MODE.get(); + mode = selected == ApplicationMode.DEFAULT ? ApplicationMode.CAR : selected; } + OsmandApplication app = mapActivity.getMyApplication(); TargetPointsHelper targets = app.getTargetPointsHelper(); app.getSettings().APPLICATION_MODE.set(mode); From 295a6c9babf9a9f6e7bb382a533ced8889fcad6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20B=C3=A1thory?= Date: Wed, 2 Jul 2014 00:59:24 +0200 Subject: [PATCH 24/49] Translated using Weblate (Hungarian) Currently translated at 99.0% (1417 of 1431 strings) --- OsmAnd/res/values-hu/strings.xml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/OsmAnd/res/values-hu/strings.xml b/OsmAnd/res/values-hu/strings.xml index 22ca47bebf..dd91a34c2a 100644 --- a/OsmAnd/res/values-hu/strings.xml +++ b/OsmAnd/res/values-hu/strings.xml @@ -1058,7 +1058,7 @@ Beállítás utolsó köztes célpontnak Beállítás első köztes célpontnak Célpont lecserélése - Már be van állítva egy célpontod. + Már be van állítva a célpontod. Célpont %1$s Célpontok %1$s. köztes célpont közelében nincsen út. @@ -1561,9 +1561,9 @@ Pontos idő Útpont \n\nTérképen megtekintéshez nyomd meg hosszan - Navigáció indítása késleltetéssel + Navigáció indítása automatikusan kiválasztott - Felosztási intervallum kiválasztása + Felosztási intervallum Résznyomvonalak: %1$s Útpontok: %1$s Távolság: %1$s (%2$s pont) @@ -1649,4 +1649,12 @@ Mentés Megosztás OsmAndból megosztott kedvencek - + Nem lehet mit letölteni. Ellenőrizd az internetkapcsolatot. + Nincs GPX fájl kiválasztva. A kiválasztáshoz nyomj hosszan egy nyomvonalra. + Kijelölés megszűntetése + Kiválasztás megjelenítésre + Rendezés távolság szerint + Rendezés név szerint + Megjelenítés térképen + Betöltés %1$s … + From 647dbb975636f53d32931f0fba1e35815a3caa36 Mon Sep 17 00:00:00 2001 From: ezjerry liao Date: Wed, 2 Jul 2014 09:05:45 +0200 Subject: [PATCH 25/49] Translated using Weblate (Traditional Chinese) Currently translated at 100.0% (1431 of 1431 strings) --- OsmAnd/res/values-zh-rTW/strings.xml | 29 ++++++++++------------------ 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/OsmAnd/res/values-zh-rTW/strings.xml b/OsmAnd/res/values-zh-rTW/strings.xml index 67be73a2fd..ce25bf5bc7 100644 --- a/OsmAnd/res/values-zh-rTW/strings.xml +++ b/OsmAnd/res/values-zh-rTW/strings.xml @@ -1664,17 +1664,15 @@ OsmAnd 是開放原始碼,而且正在積極的開發。應用程式從報告 您是否要將顯示軌跡使用於導航? OsmAnd 預估的路段沒有網際網路 OsmAnd 預估最初和最後路段的路線 - 在1.7的變更: - \n\t* 重要,地圖應該會比 2014 年 2 月更新。 - \n\t* 完全修改的路線(快速和精確)-↵ - \n\t* 新的螢幕畫面與路線規劃(更直觀和更強大) - \n\t** 注意,在路線設定按鈕之下可用 GPX 路線 - \n\t* 在導航模式下自動隱藏按鈕 - \n\t* 預估離線路線到 GPX 路線的第一標點(\'經過全程軌跡\'選項) - \n\t* 在隧道主動的模擬 - \n\t* 有很多小的 UX (使用者體驗)改進和適用性修復 - \n\t* 語音速率協助工具設定 - + "在1.7的變更: +\n\t* 重要,地圖應該會比 2014 年 2 月更新。 +\n\t* 完全修改的路線(快速和精確)-\n\t* 新的螢幕畫面與路線規劃(更直觀和更強大) +\n\t** 注意,在路線設定按鈕之下可用 GPX 路線 +\n\t* 在導航模式下自動隱藏按鈕 +\n\t* 預估離線路線到 GPX 路線的第一標點(\'經過全程軌跡\'選項) +\n\t* 在隧道主動的模擬 +\n\t* 有很多小的 UX (使用者體驗)改進和適用性修復 +\n\t* 語音速率協助工具設定 " 英文 南非荷蘭語 亞美尼亞 @@ -1756,14 +1754,7 @@ OsmAnd 是開放原始碼,而且正在積極的開發。應用程式從報告 分享 經由 OsmAnd 分享我的最愛 預估兩點之間的路線 - 在1.8的變更: - * 預估 GPX 軌跡路線標點之間的路線 - * 為下載變更了各國的配置(支援本地名稱搜索) - * 支援 GPX/KML 匯入(由 KML 轉換為 GPX ) - * GPX軌跡已經移到\'我的資料\' - * 您可以按距離分割 GPX 軌跡和查對海拔高度差異/速度 - * 自動開始導航後延遲 - + "在1.8的變更: * 預估 GPX 軌跡路線標點之間的路線 * 為下載變更了各國的配置(支援當地名稱搜索) * 支援 GPX/KML 匯入(由 KML 轉換為 GPX ) * GPX軌跡已經移到\'我的資料\' * 您可以按路程分割 GPX 軌跡和查對海拔高度差異/速度 * 自動開始導航後延遲 " 自動開始追蹤區段和發送位置之後啟動應用程式 自動開始追蹤區段 個人追蹤 ID From 18e88f9e1ff04ce503c4c898864e037adb4b06e3 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 2 Jul 2014 12:22:15 +0300 Subject: [PATCH 26/49] Fixed bug 119 in Jira. --- OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java b/OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java index e49b96c139..4a9e3d7175 100644 --- a/OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java +++ b/OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java @@ -437,7 +437,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { } } }; - if(info.gpx != null){ + if(info.gpx != null && info.file != null){ if(getMyApplication().getSelectedGpxHelper().getSelectedFileByPath(info.file.getAbsolutePath()) == null) { adapter.item(R.string.local_index_select_gpx_file).listen(listener).reg(); } else { From fc508f4ce5b84f0722295d2ef1bbfe60ea826cef Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 2 Jul 2014 13:20:26 +0300 Subject: [PATCH 27/49] Updated to fix of 119 bug in Jira --- .../plus/activities/AvailableGPXFragment.java | 276 +++++++++--------- 1 file changed, 141 insertions(+), 135 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java b/OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java index 4a9e3d7175..e48768a880 100644 --- a/OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java +++ b/OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java @@ -80,7 +80,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { private GpxSelectionHelper selectedGpxHelper; private SavingTrackHelper savingTrackHelper; private OsmandApplication app; - + @Override public void onAttach(Activity activity) { @@ -94,11 +94,11 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { listAdapter = new GpxIndexesAdapter(getActivity()); setAdapter(listAdapter); } - + public List getSelectedItems() { return selectedItems; } - + @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View vs = super.onCreateView(inflater, container, savedInstanceState); @@ -115,6 +115,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { }); return vs; } + @Override public void onResume() { super.onResume(); @@ -123,11 +124,11 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { asyncLoader.execute(getActivity()); } } - + @Override public void onPause() { super.onPause(); - if(operationTask != null){ + if (operationTask != null) { operationTask.cancel(true); } } @@ -177,7 +178,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { } }; optionsMenuAdapter.item(R.string.show_gpx_route) - .icons(R.drawable.ic_action_map_marker_dark, R.drawable.ic_action_map_marker_light).listen(listener).reg(); + .icons(R.drawable.ic_action_map_marker_dark, R.drawable.ic_action_map_marker_light).listen(listener).reg(); optionsMenuAdapter.item(R.string.local_index_mi_delete) .icons(R.drawable.ic_action_delete_dark, R.drawable.ic_action_delete_light).listen(listener).reg(); optionsMenuAdapter.item(R.string.local_index_mi_reload) @@ -185,28 +186,28 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { OsmandPlugin.onOptionsMenuActivity(getSherlockActivity(), this, optionsMenuAdapter); for (int j = 0; j < optionsMenuAdapter.length(); j++) { MenuItem item; - item = menu.add(0, optionsMenuAdapter.getItemId(j), j + 1, optionsMenuAdapter.getItemName(j)); - item.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM - ); + item = menu.add(0, optionsMenuAdapter.getItemId(j), j + 1, optionsMenuAdapter.getItemName(j)); + item.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM + ); if (optionsMenuAdapter.getImageId(j, isLightActionBar()) != 0) { item.setIcon(optionsMenuAdapter.getImageId(j, isLightActionBar())); } - + } } - - public void doAction(int actionResId){ - if(actionResId == R.string.local_index_mi_delete){ + + public void doAction(int actionResId) { + if (actionResId == R.string.local_index_mi_delete) { operationTask = new DeleteGpxTask(); operationTask.execute(selectedItems.toArray(new GpxInfo[selectedItems.size()])); } else { operationTask = null; } - if(actionMode != null) { + if (actionMode != null) { actionMode.finish(); } } - + @Override public boolean onOptionsItemSelected(MenuItem item) { int itemId = item.getItemId(); @@ -226,16 +227,16 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { public void hideProgressBar() { getSherlockActivity().setSupportProgressBarIndeterminateVisibility(false); } - + private void updateSelectionMode(ActionMode m) { - if(selectedItems.size() > 0) { + if (selectedItems.size() > 0) { m.setTitle(selectedItems.size() + " " + app.getString(R.string.selected)); - } else{ + } else { m.setTitle(""); } } - - private void openShowOnMapMode(){ + + private void openShowOnMapMode() { selectionMode = true; selectedItems.clear(); final Set originalSelectedItems = listAdapter.getSelectedGpx(); @@ -247,13 +248,12 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { selectionMode = true; updateSelectionMode(mode); MenuItem it = menu.add(R.string.show_gpx_route); - it.setIcon(!isLightActionBar() ? R.drawable.ic_action_map_marker_dark : R.drawable.ic_action_map_marker_light); - it.setShowAsActionFlags(MenuItem.SHOW_AS_ACTION_IF_ROOM | + it.setIcon(!isLightActionBar() ? R.drawable.ic_action_map_marker_dark : R.drawable.ic_action_map_marker_light); + it.setShowAsActionFlags(MenuItem.SHOW_AS_ACTION_IF_ROOM | MenuItem.SHOW_AS_ACTION_WITH_TEXT); return true; } - @Override public boolean onPrepareActionMode(ActionMode mode, Menu menu) { @@ -283,25 +283,25 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { runSelection(false); listAdapter.notifyDataSetChanged(); } - + }); listAdapter.notifyDataSetChanged(); } - - public void openSelectionMode(final int actionResId, int darkIcon, int lightIcon, - final DialogInterface.OnClickListener listener){ + + public void openSelectionMode(final int actionResId, int darkIcon, int lightIcon, + final DialogInterface.OnClickListener listener) { final int actionIconId = !isLightActionBar() ? darkIcon : lightIcon; String value = app.getString(actionResId); if (value.endsWith("...")) { value = value.substring(0, value.length() - 3); } final String actionButton = value; - if(listAdapter.getGroupCount() == 0){ + if (listAdapter.getGroupCount() == 0) { AccessibleToast.makeText(getActivity(), app.getString(R.string.local_index_no_items_to_do, actionButton.toLowerCase()), Toast.LENGTH_SHORT).show(); return; } - + selectionMode = true; selectedItems.clear(); actionMode = getSherlockActivity().startActionMode(new Callback() { @@ -310,10 +310,10 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { public boolean onCreateActionMode(ActionMode mode, Menu menu) { selectionMode = true; MenuItem it = menu.add(actionResId); - if(actionIconId != 0) { + if (actionIconId != 0) { it.setIcon(actionIconId); } - it.setShowAsActionFlags(MenuItem.SHOW_AS_ACTION_IF_ROOM | + it.setShowAsActionFlags(MenuItem.SHOW_AS_ACTION_IF_ROOM | MenuItem.SHOW_AS_ACTION_WITH_TEXT); return true; } @@ -345,26 +345,26 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { getView().findViewById(R.id.DescriptionText).setVisibility(View.GONE); listAdapter.notifyDataSetChanged(); } - + }); - - if(R.string.local_index_mi_upload_gpx == actionResId){ + + if (R.string.local_index_mi_upload_gpx == actionResId) { ((TextView) getView().findViewById(R.id.DescriptionText)).setText(R.string.local_index_upload_gpx_description); ((TextView) getView().findViewById(R.id.DescriptionText)).setVisibility(View.VISIBLE); } listAdapter.notifyDataSetChanged(); } - + private void renameFile(GpxInfo info) { final File f = info.file; Builder b = new AlertDialog.Builder(getActivity()); - if(f.exists()){ + if (f.exists()) { final EditText editText = new EditText(getActivity()); editText.setPadding(7, 3, 7, 3); editText.setText(f.getName()); b.setView(editText); b.setPositiveButton(R.string.default_buttons_save, new DialogInterface.OnClickListener() { - + @Override public void onClick(DialogInterface dialog, int which) { String newName = editText.getText().toString(); @@ -372,24 +372,24 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { if (dest.exists()) { AccessibleToast.makeText(getActivity(), R.string.file_with_name_already_exists, Toast.LENGTH_LONG).show(); } else { - if(!f.getParentFile().exists()) { + if (!f.getParentFile().exists()) { f.getParentFile().mkdirs(); } - if(f.renameTo(dest)){ + if (f.renameTo(dest)) { asyncLoader = new LoadGpxTask(); asyncLoader.execute(getActivity()); } else { AccessibleToast.makeText(getActivity(), R.string.file_can_not_be_renamed, Toast.LENGTH_LONG).show(); } } - + } }); b.setNegativeButton(R.string.default_buttons_cancel, null); b.show(); } } - + private void basicFileOperation(final GpxInfo info, ContextMenuAdapter adapter) { OnContextMenuClick listener = new OnContextMenuClick() { @Override @@ -406,7 +406,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { confirm.setPositiveButton(R.string.default_buttons_yes, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { - new DeleteGpxTask().execute(info); + new DeleteGpxTask().execute(info); } }); confirm.setNegativeButton(R.string.default_buttons_no, null); @@ -437,12 +437,21 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { } } }; - if(info.gpx != null && info.file != null){ - if(getMyApplication().getSelectedGpxHelper().getSelectedFileByPath(info.file.getAbsolutePath()) == null) { - adapter.item(R.string.local_index_select_gpx_file).listen(listener).reg(); - } else { - adapter.item(R.string.local_index_unselect_gpx_file).listen(listener).reg(); - } + if (info.gpx != null) { + if (info.file == null){ + GpxSelectionHelper.SelectedGpxFile selectedGpxFile = selectedGpxHelper.getSelectedCurrentRecordingTrack(); + if (selectedGpxFile != null && selectedGpxFile.getGpxFile() == info.gpx){ + adapter.item(R.string.local_index_unselect_gpx_file).listen(listener).reg(); + } else { + adapter.item(R.string.local_index_select_gpx_file).listen(listener).reg(); + } + } else { + if (getMyApplication().getSelectedGpxHelper().getSelectedFileByPath(info.file.getAbsolutePath()) == null) { + adapter.item(R.string.local_index_select_gpx_file).listen(listener).reg(); + } else { + adapter.item(R.string.local_index_unselect_gpx_file).listen(listener).reg(); + } + } } adapter.item(R.string.show_gpx_route).listen(listener).reg(); if (info.file != null) { @@ -452,7 +461,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { } OsmandPlugin.onContextMenuActivity(getSherlockActivity(), this, info, adapter); } - + private void showContextMenu(final GpxInfo info) { Builder builder = new AlertDialog.Builder(getActivity()); final ContextMenuAdapter adapter = new ContextMenuAdapter(getActivity()); @@ -471,8 +480,8 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { }); builder.show(); } - - + + public class LoadGpxTask extends AsyncTask> { private List result; @@ -480,11 +489,11 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { @Override protected List doInBackground(Activity... params) { List result = new ArrayList(); - if(!savingTrackHelper.getCurrentGpx().isEmpty()) { + if (!savingTrackHelper.getCurrentGpx().isEmpty()) { loadFile(new GpxInfo(savingTrackHelper.getCurrentGpx(), app.getString(R.string.gpx_available_current_track))); } - loadGPXData(app.getAppPath(IndexConstants.GPX_INDEX_DIR), result, this); + loadGPXData(app.getAppPath(IndexConstants.GPX_INDEX_DIR), result, this); return result; } @@ -497,7 +506,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { getSherlockActivity().setSupportProgressBarIndeterminateVisibility(true); listAdapter.clear(); } - + @Override protected void onProgressUpdate(GpxInfo... values) { for (GpxInfo v : values) { @@ -505,11 +514,11 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { } listAdapter.notifyDataSetChanged(); } - + public void setResult(List result) { this.result = result; listAdapter.clear(); - if(result != null){ + if (result != null) { for (GpxInfo v : result) { listAdapter.addLocalIndexInfo(v); } @@ -523,16 +532,16 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { this.result = result; getSherlockActivity().setSupportProgressBarIndeterminateVisibility(false); } - - private File[] listFilesSorted(File dir){ + + private File[] listFilesSorted(File dir) { File[] listFiles = dir.listFiles(); - if(listFiles == null) { + if (listFiles == null) { return new File[0]; } Arrays.sort(listFiles); return listFiles; } - + private void loadGPXData(File mapPath, List result, LoadGpxTask loadTask) { if (mapPath.canRead()) { List progress = new ArrayList(); @@ -544,7 +553,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { } private void loadGPXFolder(File mapPath, List result, LoadGpxTask loadTask, - List progress, String gpxSubfolder) { + List progress, String gpxSubfolder) { for (File gpxFile : listFilesSorted(mapPath)) { if (gpxFile.isDirectory()) { String sub = gpxSubfolder.length() == 0 ? gpxFile.getName() : gpxSubfolder + "/" + gpxFile.getName(); @@ -563,18 +572,16 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { } } } - + public List getResult() { return result; } } - - - protected class GpxIndexesAdapter extends OsmandBaseExpandableListAdapter implements Filterable { - + protected class GpxIndexesAdapter extends OsmandBaseExpandableListAdapter implements Filterable { + Map> data = new LinkedHashMap>(); List category = new ArrayList(); int warningColor; @@ -582,7 +589,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { int defaultColor; int corruptedColor; private SearchFilter filter; - + public GpxIndexesAdapter(Context ctx) { warningColor = ctx.getResources().getColor(R.color.color_warning); @@ -591,7 +598,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { defaultColor = ta.getColor(0, ctx.getResources().getColor(R.color.color_unknown)); ta.recycle(); } - + public Set getSelectedGpx() { Set originalSelectedItems = new HashSet(); for (List l : data.values()) { @@ -611,7 +618,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { } return originalSelectedItems; } - + public void clear() { data.clear(); category.clear(); @@ -620,7 +627,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { public void addLocalIndexInfo(GpxInfo info) { String catName; - if(info.gpx != null && info.gpx.showCurrentTrack) { + if (info.gpx != null && info.gpx.showCurrentTrack) { catName = info.name; } else { catName = app.getString(R.string.local_indexes_cat_gpx) + " " + info.subfolder; @@ -660,17 +667,17 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { public View getChildView(int groupPosition, int childPosition, boolean isLastChild, View convertView, ViewGroup parent) { View v = convertView; final GpxInfo child = (GpxInfo) getChild(groupPosition, childPosition); - if (v == null ) { + if (v == null) { LayoutInflater inflater = getActivity().getLayoutInflater(); v = inflater.inflate(net.osmand.plus.R.layout.local_index_list_item, parent, false); } TextView viewName = ((TextView) v.findViewById(R.id.local_index_name)); viewName.setText(child.getName()); - + if (child.isCorrupted()) { viewName.setTextColor(corruptedColor); viewName.setTypeface(Typeface.DEFAULT, Typeface.NORMAL); - } else if(selectedGpxHelper.getSelectedFileByName(child.getFileName()) != null){ + } else if (selectedGpxHelper.getSelectedFileByName(child.getFileName()) != null) { viewName.setTextColor(okColor); viewName.setTypeface(Typeface.DEFAULT, Typeface.NORMAL); } else { @@ -680,7 +687,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { if (child.getSize() >= 0) { String size; if (child.getSize() > 100) { - size = formatMb.format(new Object[] { (float) child.getSize() / (1 << 10) }); + size = formatMb.format(new Object[]{(float) child.getSize() / (1 << 10)}); } else { size = child.getSize() + " kB"; } @@ -700,11 +707,11 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { if (selectionMode) { checkbox.setChecked(selectedItems.contains(child)); checkbox.setOnClickListener(new View.OnClickListener() { - + @Override public void onClick(View v) { - if(checkbox.isChecked()){ + if (checkbox.isChecked()) { selectedItems.add(child); } else { selectedItems.remove(child); @@ -713,7 +720,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { } }); } - + return v; } @@ -757,7 +764,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { @Override public String getGroup(int groupPosition) { - return category.get(groupPosition) ; + return category.get(groupPosition); } @Override @@ -782,7 +789,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { @Override public Filter getFilter() { - if(filter == null) { + if (filter == null) { filter = new SearchFilter(); } return filter; @@ -798,12 +805,12 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { break; } } - if(found != -1) { + if (found != -1) { data.get(category.get(found)).remove(g); } } } - + public class LoadLocalIndexDescriptionTask extends AsyncTask { @Override @@ -828,13 +835,13 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { protected void onPostExecute(GpxInfo[] result) { hideProgressBar(); listAdapter.notifyDataSetChanged(); - + } } - + public class DeleteGpxTask extends AsyncTask { - + @Override protected String doInBackground(GpxInfo... params) { int count = 0; @@ -856,12 +863,12 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { @Override protected void onProgressUpdate(GpxInfo... values) { - for(GpxInfo g : values) { + for (GpxInfo g : values) { listAdapter.delete(g); } listAdapter.notifyDataSetChanged(); } - + @Override protected void onPreExecute() { getSherlockActivity().setProgressBarIndeterminateVisibility(true); @@ -873,9 +880,9 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { AccessibleToast.makeText(getSherlockActivity(), result, Toast.LENGTH_LONG).show(); } } - + public class SelectGpxTask extends AsyncTask { - + private boolean showOnMap; private WptPt toShow; @@ -898,16 +905,16 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { @Override protected void onProgressUpdate(GpxInfo... values) { - for(GpxInfo g : values) { + for (GpxInfo g : values) { final boolean visible = selectedItems.contains(g); selectedGpxHelper.selectGpxFile(g.gpx, visible, false); - if(visible && toShow == null) { + if (visible && toShow == null) { toShow = g.gpx.findPointToShow(); } } listAdapter.notifyDataSetInvalidated(); } - + @Override protected void onPreExecute() { getSherlockActivity().setProgressBarIndeterminateVisibility(true); @@ -917,7 +924,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { protected void onPostExecute(String result) { selectedGpxHelper.runUiListeners(); getSherlockActivity().setProgressBarIndeterminateVisibility(false); - if(showOnMap && toShow != null) { + if (showOnMap && toShow != null) { getMyApplication().getSettings().setMapLocationToShow(toShow.lat, toShow.lon, getMyApplication().getSettings().getLastKnownMapZoom()); MapActivity.launchMapActivityMoveToTop(getActivity()); @@ -938,8 +945,8 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { } else { String cs = constraint.toString().toLowerCase(); List res = new ArrayList(); - for(GpxInfo r : raw) { - if(r.getName().toLowerCase().indexOf(cs) != -1) { + for (GpxInfo r : raw) { + if (r.getName().toLowerCase().indexOf(cs) != -1) { res.add(r); } } @@ -967,14 +974,14 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { } } - + @Override public void onDestroy() { super.onDestroy(); - if(descriptionLoader != null) { + if (descriptionLoader != null) { descriptionLoader.cancel(true); } - if(asyncLoader != null) { + if (asyncLoader != null) { asyncLoader.cancel(true); } } @@ -1000,35 +1007,35 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { return true; } - + public static class GpxInfo { - public GPXFile gpx; - public File file; - public String subfolder; - - private String name = null; - private int sz = -1; - private String fileName = null; + public GPXFile gpx; + public File file; + public String subfolder; + + private String name = null; + private int sz = -1; + private String fileName = null; private String description; private boolean corrupted; private boolean expanded; private Spanned htmlDescription; - - public GpxInfo(){ + + public GpxInfo() { } - + public GpxInfo(GPXFile file, String name) { this.gpx = file; this.name = name; } - + public String getName() { - if(name == null) { + if (name == null) { name = formatName(file.getName()); } return name; } - + private String formatName(String name) { int ext = name.lastIndexOf('.'); if (ext != -1) { @@ -1036,74 +1043,73 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { } return name.replace('_', ' '); } - + public boolean isCorrupted() { return corrupted; } - + public int getSize() { - if(sz == -1) { - if(file == null) { + if (sz == -1) { + if (file == null) { return -1; } sz = (int) (file.length() >> 10); } return sz; } - + public boolean isExpanded() { return expanded; } - + public void setExpanded(boolean expanded) { this.expanded = expanded; } - + public CharSequence getDescription() { - if(description == null) { - return ""; + if (description == null) { + return ""; } return description; } - + public Spanned getHtmlDescription() { - if(htmlDescription != null) { + if (htmlDescription != null) { return htmlDescription; } htmlDescription = Html.fromHtml(getDescription().toString().replace("\n", "
")); return htmlDescription; } - - - + + public void setGpx(GPXFile gpx) { this.gpx = gpx; } - - public void updateGpxInfo(OsmandApplication app ) { - if(gpx == null){ + + public void updateGpxInfo(OsmandApplication app) { + if (gpx == null) { gpx = GPXUtilities.loadGPXFile(app, file); } - if(gpx.warning != null){ + if (gpx.warning != null) { corrupted = true; description = gpx.warning; } else { // 'Long-press for options' message - description = GpxUiHelper.getDescription(app, gpx, file, true) + - app.getString(R.string.local_index_gpx_info_show); + description = GpxUiHelper.getDescription(app, gpx, file, true) + + app.getString(R.string.local_index_gpx_info_show); } htmlDescription = null; getHtmlDescription(); } - + public String getFileName() { - if(fileName != null) { + if (fileName != null) { return fileName; } - if(file == null) { + if (file == null) { return ""; } return fileName = file.getName(); } - } + } } From 74aac2b2486bb6ebc26f55993e8c18513e71b39b Mon Sep 17 00:00:00 2001 From: Zahnstocher Date: Wed, 2 Jul 2014 14:27:03 +0200 Subject: [PATCH 28/49] Fix issue 2322 --- OsmAnd/src/net/osmand/plus/OsmandSettings.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/OsmandSettings.java index 28e72eb8f1..3bea71414e 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandSettings.java +++ b/OsmAnd/src/net/osmand/plus/OsmandSettings.java @@ -922,7 +922,7 @@ public class OsmandSettings { public final CommonPreference CENTER_POSITION_ON_MAP = new BooleanPreference("center_position_on_map", false).makeProfile(); // this value string is synchronized with settings_pref.xml preference name - public final OsmandPreference MAX_LEVEL_TO_DOWNLOAD_TILE = new IntPreference("max_level_download_tile", 18).makeProfile().cache(); + public final OsmandPreference MAX_LEVEL_TO_DOWNLOAD_TILE = new IntPreference("max_level_download_tile", 20).makeProfile().cache(); // this value string is synchronized with settings_pref.xml preference name public final OsmandPreference LEVEL_TO_SWITCH_VECTOR_RASTER = new IntPreference("level_to_switch_vector_raster", 1).makeGlobal().cache(); From 2398b55d271117d705b9b6b3b5a59dddef19a038 Mon Sep 17 00:00:00 2001 From: Zahnstocher Date: Thu, 3 Jul 2014 10:49:45 +0200 Subject: [PATCH 29/49] Fix null --- .../plus/views/controls/MapRoutePreferencesControl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/views/controls/MapRoutePreferencesControl.java b/OsmAnd/src/net/osmand/plus/views/controls/MapRoutePreferencesControl.java index 1003032cf5..f937f460be 100644 --- a/OsmAnd/src/net/osmand/plus/views/controls/MapRoutePreferencesControl.java +++ b/OsmAnd/src/net/osmand/plus/views/controls/MapRoutePreferencesControl.java @@ -283,7 +283,7 @@ public class MapRoutePreferencesControl extends MapControls { final LocalRoutingParameter rp = getItem(position); tv.setText(rp.getText(mapActivity)); tv.setPadding((int) (5 * scaleCoefficient), 0, 0, 0); - if (rp.routingParameter.getId().equals("short_way")){ + if (rp.routingParameter != null && rp.routingParameter.getId().equals("short_way")){ //if short route settings - it should be inverse of fast_route_mode ch.setChecked(!settings.FAST_ROUTE_MODE.get()); } else { @@ -294,7 +294,7 @@ public class MapRoutePreferencesControl extends MapControls { @Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { //if short way that it should set valut to fast mode opposite of current - if (rp.routingParameter.getId().equals("short_way")){ + if (rp.routingParameter != null && rp.routingParameter.getId().equals("short_way")){ settings.FAST_ROUTE_MODE.set(!isChecked); } else { rp.setSelected(settings, isChecked); From 2bb034f21902088c100ac8217409045702ad1491 Mon Sep 17 00:00:00 2001 From: Mirco Zorzo Date: Thu, 3 Jul 2014 07:04:36 +0200 Subject: [PATCH 30/49] Translated using Weblate (Italian) Currently translated at 100.0% (1431 of 1431 strings) --- OsmAnd/res/values-it/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/values-it/strings.xml b/OsmAnd/res/values-it/strings.xml index 024f23f367..4047dc0a22 100644 --- a/OsmAnd/res/values-it/strings.xml +++ b/OsmAnd/res/values-it/strings.xml @@ -1149,7 +1149,7 @@ Punto intermedio %1$s Attiva il GPS nelle impostazioni Visualizza la direzione della destinazione - Calcola un percorso anche non ottimale su lunghe distanze + Calcola un percorso, eventualmente anche non ottimale, su lunghe distanze Abilita il plugin di monitoraggio per utilizzare i servizi di registrazione della posizione (tracking, tracking in tempo reale) Seleziona una combinazione di colori per le strade: Schema di colorazioni per le strade @@ -1860,7 +1860,7 @@ Si consiglia di aggiungere uno o più punti intermedi per migliorarne le prestaz Orario di arrivo: %1$tF, %1$tT Gamma altitudini: %1$s Discesa/salita: %1$s - Intervallo di tempo: %1$s + Durata: %1$s Tempo in movimento: %1$s Segmento %1$s punti From a5e87ebd4382b9f4c1fce85f10ea541cce0392d6 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 2 Jul 2014 12:22:15 +0300 Subject: [PATCH 31/49] Fixed bug 119 in Jira. --- OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java b/OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java index e48768a880..6f0b7c821a 100644 --- a/OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java +++ b/OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java @@ -437,7 +437,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { } } }; - if (info.gpx != null) { + if(info.gpx != null){ if (info.file == null){ GpxSelectionHelper.SelectedGpxFile selectedGpxFile = selectedGpxHelper.getSelectedCurrentRecordingTrack(); if (selectedGpxFile != null && selectedGpxFile.getGpxFile() == info.gpx){ From e1177cf3cebce4bdaa8fcc9622b8d168e26c4785 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 3 Jul 2014 12:35:11 +0300 Subject: [PATCH 32/49] fixed bug 95 --- .../osmand/router/RoutePlannerFrontEnd.java | 101 +++++++++--------- .../osmand/plus/routing/RouteProvider.java | 2 +- 2 files changed, 53 insertions(+), 50 deletions(-) diff --git a/OsmAnd-java/src/net/osmand/router/RoutePlannerFrontEnd.java b/OsmAnd-java/src/net/osmand/router/RoutePlannerFrontEnd.java index 8191ff5fe0..b2176a03b9 100644 --- a/OsmAnd-java/src/net/osmand/router/RoutePlannerFrontEnd.java +++ b/OsmAnd-java/src/net/osmand/router/RoutePlannerFrontEnd.java @@ -213,60 +213,63 @@ public class RoutePlannerFrontEnd { private List searchRoute(final RoutingContext ctx, List points, PrecalculatedRouteDirection routeDirection) throws IOException, InterruptedException { - if(points.size() > 2) { - ArrayList firstPartRecalculatedRoute = null; - ArrayList restPartRecalculatedRoute = null; - if (ctx.previouslyCalculatedRoute != null) { - List prev = ctx.previouslyCalculatedRoute; - long id = points.get(1).getRoad().id; - int ss = points.get(1).getSegmentStart(); - for (int i = 0; i < prev.size(); i++) { - RouteSegmentResult rsr = prev.get(i); - if (id == rsr.getObject().getId() && ss == rsr.getEndPointIndex()) { - firstPartRecalculatedRoute = new ArrayList(i + 1); - restPartRecalculatedRoute = new ArrayList(prev.size() - i); - for(int k = 0; k < prev.size(); k++) { - if(k <= i) { - firstPartRecalculatedRoute.add(prev.get(k)); - } else { - restPartRecalculatedRoute.add(prev.get(k)); - } - } - break; - } - } - } - List results = new ArrayList(); - for (int i = 0; i < points.size() - 1; i++) { - RoutingContext local = new RoutingContext(ctx); - if(i == 0) { - local.previouslyCalculatedRoute = firstPartRecalculatedRoute; - } - local.visitor = ctx.visitor; - local.calculationProgress = ctx.calculationProgress; - List res = searchRouteInternalPrepare(local, points.get(i), points.get(i + 1), routeDirection); + if (points.size() <= 2) { + ctx.previouslyCalculatedRoute = null; + return searchRoute(ctx, points.get(0), points.get(1), routeDirection); + } - results.addAll(res); - ctx.distinctLoadedTiles += local.distinctLoadedTiles; - ctx.loadedTiles += local.loadedTiles; - ctx.visitedSegments += local.visitedSegments; - ctx.loadedPrevUnloadedTiles += local.loadedPrevUnloadedTiles; - ctx.timeToCalculate += local.timeToCalculate; - ctx.timeToLoad += local.timeToLoad; - ctx.timeToLoadHeaders += local.timeToLoadHeaders; - ctx.relaxedSegments += local.relaxedSegments; - ctx.routingTime += local.routingTime; - - local.unloadAllData(ctx); - if(restPartRecalculatedRoute != null) { - results.addAll(restPartRecalculatedRoute); + ArrayList firstPartRecalculatedRoute = null; + ArrayList restPartRecalculatedRoute = null; + if (ctx.previouslyCalculatedRoute != null) { + List prev = ctx.previouslyCalculatedRoute; + long id = points.get(1).getRoad().id; + int ss = points.get(1).getSegmentStart(); + for (int i = 0; i < prev.size(); i++) { + RouteSegmentResult rsr = prev.get(i); + if (id == rsr.getObject().getId() && ss == rsr.getEndPointIndex()) { + firstPartRecalculatedRoute = new ArrayList(i + 1); + restPartRecalculatedRoute = new ArrayList(prev.size() - i); + for (int k = 0; k < prev.size(); k++) { + if (k <= i) { + firstPartRecalculatedRoute.add(prev.get(k)); + } else { + restPartRecalculatedRoute.add(prev.get(k)); + } + } break; } } - ctx.unloadAllData(); - return results; } - return searchRoute(ctx, points.get(0), points.get(1), routeDirection); + List results = new ArrayList(); + for (int i = 0; i < points.size() - 1; i++) { + RoutingContext local = new RoutingContext(ctx); + if (i == 0) { + //local.previouslyCalculatedRoute = firstPartRecalculatedRoute; + } + local.visitor = ctx.visitor; + local.calculationProgress = ctx.calculationProgress; + List res = searchRouteInternalPrepare(local, points.get(i), points.get(i + 1), routeDirection); + + results.addAll(res); + ctx.distinctLoadedTiles += local.distinctLoadedTiles; + ctx.loadedTiles += local.loadedTiles; + ctx.visitedSegments += local.visitedSegments; + ctx.loadedPrevUnloadedTiles += local.loadedPrevUnloadedTiles; + ctx.timeToCalculate += local.timeToCalculate; + ctx.timeToLoad += local.timeToLoad; + ctx.timeToLoadHeaders += local.timeToLoadHeaders; + ctx.relaxedSegments += local.relaxedSegments; + ctx.routingTime += local.routingTime; + + local.unloadAllData(ctx); + if (restPartRecalculatedRoute != null) { + results.addAll(restPartRecalculatedRoute); + break; + } + } + ctx.unloadAllData(); + return results; + } @SuppressWarnings("static-access") diff --git a/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java b/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java index 28f1f7d5dc..77b1c41e29 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java +++ b/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java @@ -670,7 +670,7 @@ public class RouteProvider { ctx.calculationProgress = params.calculationProgress; if(params.previousToRecalculate != null) { // not used any more - // ctx.previouslyCalculatedRoute = params.previousToRecalculate.getOriginalRoute(); + ctx.previouslyCalculatedRoute = params.previousToRecalculate.getOriginalRoute(); } LatLon st = new LatLon(params.start.getLatitude(), params.start.getLongitude()); LatLon en = new LatLon(params.end.getLatitude(), params.end.getLongitude()); From 68e2d2e134e55c63580695d0074547c6c7d2f0e5 Mon Sep 17 00:00:00 2001 From: cho bkwon Date: Thu, 3 Jul 2014 15:06:15 +0200 Subject: [PATCH 33/49] Translated using Weblate (Korean) Currently translated at 100.0% (1431 of 1431 strings) --- OsmAnd/res/values-ko/strings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/OsmAnd/res/values-ko/strings.xml b/OsmAnd/res/values-ko/strings.xml index 1e97c5ec28..8eab49dd19 100644 --- a/OsmAnd/res/values-ko/strings.xml +++ b/OsmAnd/res/values-ko/strings.xml @@ -2091,4 +2091,5 @@ Vanuatu, Venezuela, Vietnam, Wallis and Futuna, Western Sahara, Yemen, Zambia, Z 이름으로 정렬 지도에서 보기 \t + 아무것도 다운로드 되지 않았다면, 인터넷 연결을 확인 하십시오. From 21d88d6dbc9443dac22c2477a828752c41a7f413 Mon Sep 17 00:00:00 2001 From: sonora Date: Thu, 3 Jul 2014 18:56:52 +0200 Subject: [PATCH 34/49] add blank --- OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java b/OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java index 6f0b7c821a..e409498210 100644 --- a/OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java +++ b/OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java @@ -440,7 +440,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { if(info.gpx != null){ if (info.file == null){ GpxSelectionHelper.SelectedGpxFile selectedGpxFile = selectedGpxHelper.getSelectedCurrentRecordingTrack(); - if (selectedGpxFile != null && selectedGpxFile.getGpxFile() == info.gpx){ + if (selectedGpxFile != null && selectedGpxFile.getGpxFile() == info.gpx) { adapter.item(R.string.local_index_unselect_gpx_file).listen(listener).reg(); } else { adapter.item(R.string.local_index_select_gpx_file).listen(listener).reg(); From 5488c76e94503bced7da83fdb17d018431d15730 Mon Sep 17 00:00:00 2001 From: stephan 75 Date: Thu, 3 Jul 2014 18:07:52 +0200 Subject: [PATCH 35/49] Translated using Weblate (German) Currently translated at 99.5% (1425 of 1431 strings) --- OsmAnd/res/values-de/strings.xml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/OsmAnd/res/values-de/strings.xml b/OsmAnd/res/values-de/strings.xml index c71aa72399..69d37308e2 100644 --- a/OsmAnd/res/values-de/strings.xml +++ b/OsmAnd/res/values-de/strings.xml @@ -1,4 +1,4 @@ - + Die Route ist wahrscheinlich zu lang um vom OsmAnd-Offline-Router berechnet zu werden. Offline-Routing ist bis ungefähr 200 km Abstand zwischen einzelnen Punkten möglich. Bitte einen oder mehrere Zwischenpunkte setzen um die Route berechnen zu können. Kein Auto-Zoom Auf Nahbereich @@ -876,7 +876,7 @@ Herunterladen… Die Liste der verfügbaren Regionen wird geladen… Die Liste der Regionen wurde von osmand.net nicht geladen. - Nicht gefunden. Nicht vorhandene Regionen können selbst erstellt werden, siehe http://osmand.net. + Suche war erfolglos. Karten für nicht vorhandene Regionen können selbst erstellt werden, siehe http://osmand.net. Auf Karte anzeigen Favorit wurde bearbeitet Keine Favoriten vorhanden @@ -1773,7 +1773,7 @@ Afghanistan, Ägypten, Albanien, Algerien, Andorra, Angola, Anguilla, Antigua an Gesendete Standorte %1$d (im Zwischenspeicher %2$d) Verbindung erfolgreich: %1$s OsMo-Sitzung neustarten - Dubug-Information + Debug-Information Nutzername Aufzeichnungs-ID Mit Gerät koppeln @@ -1875,4 +1875,8 @@ Afghanistan, Ägypten, Albanien, Algerien, Andorra, Angola, Anguilla, Antigua an Zoom-Buttons bei Navigation anzeigen Zeige Zoom-Buttons Zentrieren auf dem Bildschirm + Download-Ziel nicht gefunden. Bitte Internet-Verbindung überprüfen. + Keine GPX-Spur ausgewählt. Zum Auswählen auf eine Spur lange drücken. + Deselektieren + Zum Anzeigen auswählen From e4dcc4e0e06af5d8682de6fc02d9fe031c5dcb24 Mon Sep 17 00:00:00 2001 From: Aleksei Polkhirev Date: Thu, 3 Jul 2014 15:44:54 +0200 Subject: [PATCH 36/49] Translated using Weblate (Russian) Currently translated at 99.5% (1424 of 1431 strings) --- OsmAnd/res/values-ru/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/res/values-ru/strings.xml b/OsmAnd/res/values-ru/strings.xml index 1294a16d1e..cb5c056cde 100644 --- a/OsmAnd/res/values-ru/strings.xml +++ b/OsmAnd/res/values-ru/strings.xml @@ -1724,7 +1724,7 @@ OsmAnd - открытый источник и активно развается. Показывать кнопки изменения масштаба Сортировать по дистанции Сортировать по имени - Показывать + Отображать на карте Цвет метки Нет выбранных файлов GPX. Используйте длительное нажатие для выбора доступного трека. Сбросить выбор From 5023a0184635cb7828de2cef7c7b05e82f50bdf0 Mon Sep 17 00:00:00 2001 From: sonora Date: Thu, 3 Jul 2014 19:12:21 +0200 Subject: [PATCH 37/49] more blanks --- .../src/net/osmand/plus/activities/AvailableGPXFragment.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java b/OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java index e409498210..2a42be6123 100644 --- a/OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java +++ b/OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java @@ -437,8 +437,8 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { } } }; - if(info.gpx != null){ - if (info.file == null){ + if (info.gpx != null) { + if (info.file == null) { GpxSelectionHelper.SelectedGpxFile selectedGpxFile = selectedGpxHelper.getSelectedCurrentRecordingTrack(); if (selectedGpxFile != null && selectedGpxFile.getGpxFile() == info.gpx) { adapter.item(R.string.local_index_unselect_gpx_file).listen(listener).reg(); From 430e0820227f0b9572dc177881858f775d065dde Mon Sep 17 00:00:00 2001 From: ace shadow Date: Fri, 4 Jul 2014 00:01:50 +0200 Subject: [PATCH 38/49] Translated using Weblate (Slovak) Currently translated at 100.0% (1431 of 1431 strings) --- OsmAnd/res/values-sk/strings.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/OsmAnd/res/values-sk/strings.xml b/OsmAnd/res/values-sk/strings.xml index 519769dbc6..19573cf9aa 100644 --- a/OsmAnd/res/values-sk/strings.xml +++ b/OsmAnd/res/values-sk/strings.xml @@ -1896,4 +1896,5 @@ Afganistan, Albánsko, Alžírsko, Andora, Angola, Anguilla, Antigua a Barbuda, Odznačiť Vybrať na zobrazenie \t + Nenašlo sa nič na stiahnutie, prosím skontrolujte pripojenie na Internet. From 0eaecf971ecbc3e6a0e98b4c1664cb385888fc36 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 2 Jul 2014 12:22:15 +0300 Subject: [PATCH 39/49] Fixed bug 119 in Jira. --- OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java b/OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java index 2a42be6123..193c5d175d 100644 --- a/OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java +++ b/OsmAnd/src/net/osmand/plus/activities/AvailableGPXFragment.java @@ -437,7 +437,7 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { } } }; - if (info.gpx != null) { + if(info.gpx != null){ if (info.file == null) { GpxSelectionHelper.SelectedGpxFile selectedGpxFile = selectedGpxHelper.getSelectedCurrentRecordingTrack(); if (selectedGpxFile != null && selectedGpxFile.getGpxFile() == info.gpx) { From 33531a3c6b0f8b691139cb65e61fcf4abd362c03 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 3 Jul 2014 17:44:23 +0300 Subject: [PATCH 40/49] First implementation of map layers dialog change --- OsmAnd/res/layout/list_menu_item.xml | 10 +- OsmAnd/res/layout/list_menu_item_native.xml | 12 ++- .../plus/activities/MapActivityLayers.java | 97 +++++++++++++------ .../net/osmand/plus/helpers/GpxUiHelper.java | 40 +++++++- 4 files changed, 119 insertions(+), 40 deletions(-) diff --git a/OsmAnd/res/layout/list_menu_item.xml b/OsmAnd/res/layout/list_menu_item.xml index 1bc96fbdc0..8b10baea70 100644 --- a/OsmAnd/res/layout/list_menu_item.xml +++ b/OsmAnd/res/layout/list_menu_item.xml @@ -31,18 +31,22 @@ android:textColor="@color/color_black" android:layout_weight="1"/> + android:layout_height="fill_parent" + android:gravity="center_vertical"> + + /> \ No newline at end of file diff --git a/OsmAnd/res/layout/list_menu_item_native.xml b/OsmAnd/res/layout/list_menu_item_native.xml index fa360a2eeb..88d2e16d6f 100644 --- a/OsmAnd/res/layout/list_menu_item_native.xml +++ b/OsmAnd/res/layout/list_menu_item_native.xml @@ -30,17 +30,21 @@ android:layout_weight="1"/> + android:layout_height="fill_parent" + android:gravity="center_vertical"> + + + android:focusable="false" /> \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java index c679be499c..ba52b388e8 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java @@ -6,6 +6,7 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map.Entry; +import android.widget.*; import net.osmand.CallbackWithObject; import net.osmand.ResultMatcher; import net.osmand.StateChangedListener; @@ -13,20 +14,12 @@ import net.osmand.access.AccessibleToast; import net.osmand.data.AmenityType; import net.osmand.map.ITileSource; import net.osmand.map.TileSourceManager.TileSourceTemplate; -import net.osmand.plus.ContextMenuAdapter; +import net.osmand.plus.*; import net.osmand.plus.ContextMenuAdapter.Item; import net.osmand.plus.ContextMenuAdapter.OnContextMenuClick; import net.osmand.plus.GPXUtilities.GPXFile; import net.osmand.plus.GPXUtilities.WptPt; -import net.osmand.plus.OsmAndFormatter; -import net.osmand.plus.OsmandApplication; -import net.osmand.plus.OsmandPlugin; -import net.osmand.plus.OsmandSettings; import net.osmand.plus.OsmandSettings.CommonPreference; -import net.osmand.plus.PoiFilter; -import net.osmand.plus.PoiFiltersHelper; -import net.osmand.plus.R; -import net.osmand.plus.SQLiteTileSource; import net.osmand.plus.helpers.GpxUiHelper; import net.osmand.plus.rastermaps.OsmandRasterMapsPlugin; import net.osmand.plus.render.MapVectorLayer; @@ -55,15 +48,8 @@ import android.content.Intent; import android.os.Build; import android.view.View; import android.view.ViewGroup; -import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener; -import android.widget.ArrayAdapter; -import android.widget.CheckBox; -import android.widget.CompoundButton; import android.widget.CompoundButton.OnCheckedChangeListener; -import android.widget.ListAdapter; -import android.widget.TextView; -import android.widget.Toast; /** * Object is responsible to maintain layers using by map activity @@ -90,9 +76,11 @@ public class MapActivityLayers { private ContextMenuLayer contextMenuLayer; private MapControlsLayer mapControlsLayer; private DownloadedRegionsLayer downloadedRegionsLayer; + private GpxSelectionHelper gpxSelectionHelper; public MapActivityLayers(MapActivity activity) { this.activity = activity; + gpxSelectionHelper = getApplication().getSelectedGpxHelper(); } public OsmandApplication getApplication(){ @@ -261,7 +249,7 @@ public class MapActivityLayers { getApplication().getSelectedGpxHelper().clearAllGpxFileToShow(); } else { dialog.dismiss(); - showGPXFileLayer(mapView); + showGPXFileLayer(getAlreadySelectedGpx(), mapView); } } else if(itemId == R.string.layer_transport_route){ transportInfoLayer.setVisible(isChecked); @@ -318,8 +306,37 @@ public class MapActivityLayers { public View getView(final int position, View convertView, ViewGroup parent) { // User super class to create the View View v = activity.getLayoutInflater().inflate(layout, null); - TextView tv = (TextView)v.findViewById(R.id.title); - tv.setText(adapter.getItemName(position)); + TextView tv = (TextView)v.findViewById(R.id.title); + tv.setText(adapter.getItemName(position)); + + //if it's gpx or poi layer - need to show settings icon + int specialItemId = adapter.getItemId(position); + if (specialItemId == R.string.layer_poi || specialItemId == R.string.layer_gpx_layer) { + ImageView set = (ImageView) v.findViewById(R.id.icon_settings); + + //setting icon depending on theme + if(light){ + set.setImageResource(R.drawable.ic_action_settings_light); + } else { + set.setImageResource(R.drawable.ic_action_settings_dark); + } + + if (specialItemId == R.string.layer_poi){ + set.setOnClickListener( new View.OnClickListener() { + @Override + public void onClick(View view) { + selectPOIFilterLayer(mapView); + } + }); + } else { + set.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + showGPXFileLayer(getAlreadySelectedGpx(), mapView); + } + }); + } + } //Put the image on the TextView if(adapter.getImageId(position, light) != 0) { @@ -372,37 +389,53 @@ public class MapActivityLayers { }); dlg.show(); } - - public void showGPXFileLayer(final OsmandMapTileView mapView){ + + public void showGPXFileLayer(List files, final OsmandMapTileView mapView) { final OsmandSettings settings = getApplication().getSettings(); - GpxUiHelper.selectGPXFile(activity, true, true, new CallbackWithObject() { + CallbackWithObject callbackWithObject = new CallbackWithObject() { @Override public boolean processResult(GPXFile[] result) { WptPt locToShow = null; - for(GPXFile g : result) { - if(g.showCurrentTrack) { - if(!settings.SAVE_TRACK_TO_GPX.get()){ + for (GPXFile g : result) { + if (g.showCurrentTrack) { + if (!settings.SAVE_TRACK_TO_GPX.get()) { AccessibleToast.makeText(activity, R.string.gpx_monitoring_disabled_warn, Toast.LENGTH_SHORT).show(); - } + } break; - } - if(!g.showCurrentTrack || locToShow == null) { + } + if (!g.showCurrentTrack || locToShow == null) { locToShow = g.findPointToShow(); } } getApplication().getSelectedGpxHelper().setGpxFileToDisplay(result); - if(locToShow != null){ - mapView.getAnimatedDraggingThread().startMoving(locToShow.lat, locToShow.lon, + if (locToShow != null) { + mapView.getAnimatedDraggingThread().startMoving(locToShow.lat, locToShow.lon, mapView.getZoom(), true); } mapView.refreshMap(); return true; } - }); + }; + + if (files == null) { + GpxUiHelper.selectGPXFile(activity, true, true, callbackWithObject); + } else { + GpxUiHelper.selectGPXFile(files, activity, true, true, callbackWithObject); + } } - + private List getAlreadySelectedGpx(){ + if (gpxSelectionHelper == null){ + return null; + } + List selectedGpxFiles = gpxSelectionHelper.getSelectedGPXFiles(); + List files = new ArrayList(); + for (GpxSelectionHelper.SelectedGpxFile file : selectedGpxFiles) { + files.add(file.getGpxFile().path); + } + return files; + } private void selectPOIFilterLayer(final OsmandMapTileView mapView){ diff --git a/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java b/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java index f9a6da583b..202d71c6fe 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java @@ -127,6 +127,44 @@ public class GpxUiHelper { } return description.toString(); } + + public static void selectGPXFile(List list, final Activity activity, + final boolean showCurrentGpx, final boolean multipleChoice, final CallbackWithObject callbackWithObject){ + OsmandApplication app = (OsmandApplication) activity.getApplication(); + final File dir = app.getAppPath(IndexConstants.GPX_INDEX_DIR); + final List allGpxList = getSortedGPXFilenames(dir); + if(allGpxList.isEmpty()){ + AccessibleToast.makeText(activity, R.string.gpx_files_not_found, Toast.LENGTH_LONG).show(); + } + + if(!allGpxList.isEmpty() || showCurrentGpx){ + final ContextMenuAdapter adapter = new ContextMenuAdapter(activity); + if(showCurrentGpx){ + allGpxList.add(0, activity.getString(R.string.show_current_gpx_title)); + } + + //element position in adapter + int i =0; + for(String s : allGpxList) { + String fileName = s; + if (s.endsWith(".gpx")) { + s = s.substring(0, s.length() - ".gpx".length()); + } + s = s.replace('_', ' '); + + adapter.item(s).selected(multipleChoice ? 0 : -1) + .icons(R.drawable.ic_action_info_dark, R.drawable.ic_action_info_light).reg(); + for (String file : list) { + if (file.endsWith(fileName)) { + adapter.setSelection(i, 1); + break; + } + } + i++; + } + createDialog(activity, showCurrentGpx, multipleChoice, callbackWithObject, allGpxList, adapter); + } + } public static void selectGPXFile(final Activity activity, final boolean showCurrentGpx, final boolean multipleChoice, final CallbackWithObject callbackWithObject) { @@ -137,7 +175,7 @@ public class GpxUiHelper { AccessibleToast.makeText(activity, R.string.gpx_files_not_found, Toast.LENGTH_LONG).show(); } if(!list.isEmpty() || showCurrentGpx){ - + final ContextMenuAdapter adapter = new ContextMenuAdapter(activity); if(showCurrentGpx){ list.add(0, activity.getString(R.string.show_current_gpx_title)); From 4d96697618de19b206bbef65a359d29bc753a676 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 3 Jul 2014 18:45:38 +0300 Subject: [PATCH 41/49] updated functionality of settings button --- .../plus/activities/MapActivityLayers.java | 26 ++++++++++++++----- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java index ba52b388e8..49ae83ab46 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java @@ -310,28 +310,33 @@ public class MapActivityLayers { tv.setText(adapter.getItemName(position)); //if it's gpx or poi layer - need to show settings icon - int specialItemId = adapter.getItemId(position); - if (specialItemId == R.string.layer_poi || specialItemId == R.string.layer_gpx_layer) { - ImageView set = (ImageView) v.findViewById(R.id.icon_settings); + //need imageview and specialItemId o + final ImageView settingsImage = (ImageView) v.findViewById(R.id.icon_settings); + final int specialItemId = adapter.getItemId(position); + if ((specialItemId == R.string.layer_poi || specialItemId == R.string.layer_gpx_layer) + && adapter.getSelection(position) > 0) { //setting icon depending on theme if(light){ - set.setImageResource(R.drawable.ic_action_settings_light); + settingsImage.setImageResource(R.drawable.ic_action_settings_light); } else { - set.setImageResource(R.drawable.ic_action_settings_dark); + settingsImage.setImageResource(R.drawable.ic_action_settings_dark); } if (specialItemId == R.string.layer_poi){ - set.setOnClickListener( new View.OnClickListener() { + settingsImage.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { selectPOIFilterLayer(mapView); } }); } else { - set.setOnClickListener(new View.OnClickListener() { + settingsImage.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { + if (listener.dialog != null) { + listener.dialog.dismiss(); + } showGPXFileLayer(getAlreadySelectedGpx(), mapView); } }); @@ -355,6 +360,13 @@ public class MapActivityLayers { ch.setOnCheckedChangeListener(new OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { + if (specialItemId == R.string.layer_poi){ + if (isChecked){ + settingsImage.setVisibility(View.VISIBLE); + } else { + settingsImage.setVisibility(View.GONE); + } + } listener.onClick(position, isChecked); } }); From ac6dc7081aa8ce889f40f3b32880210c33a69673 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 3 Jul 2014 18:56:07 +0300 Subject: [PATCH 42/49] hotfix to settings button in layout menu --- OsmAnd/res/layout/list_menu_item.xml | 4 +++- OsmAnd/res/layout/list_menu_item_native.xml | 4 +++- OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/layout/list_menu_item.xml b/OsmAnd/res/layout/list_menu_item.xml index 8b10baea70..59c76e0f15 100644 --- a/OsmAnd/res/layout/list_menu_item.xml +++ b/OsmAnd/res/layout/list_menu_item.xml @@ -37,7 +37,9 @@ + android:gravity="center_vertical" + android:visibility="gone" + android:focusable="false"/> + android:gravity="center_vertical" + android:visibility="gone" + android:focusable="false"/> 0) { + settingsImage.setVisibility(View.VISIBLE); //setting icon depending on theme if(light){ settingsImage.setImageResource(R.drawable.ic_action_settings_light); From 2eb942aa0a1ec7134b49dce3584292503af0f273 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 4 Jul 2014 11:58:41 +0300 Subject: [PATCH 43/49] Created service to find straight route --- .../osmand/plus/routing/RouteProvider.java | 36 ++++++++++++++++--- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java b/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java index 77b1c41e29..ed088077a1 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java +++ b/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java @@ -77,7 +77,7 @@ public class RouteProvider { public enum RouteService { OSMAND("OsmAnd (offline)"), YOURS("YOURS"), ORS("OpenRouteService"), OSRM("OSRM (only car)"), - BROUTER("BRouter (offline)"); + BROUTER("BRouter (offline)"), STRAIGHT("Straight line(offline)"); private final String name; private RouteService(String name){ this.name = name; @@ -324,7 +324,10 @@ public class RouteProvider { res = findORSRoute(params); } else if (params.type == RouteService.OSRM) { res = findOSRMRoute(params); - } else { + } else if (params.type == RouteService.STRAIGHT){ + res = findStraightRoute(params); + } + else { res = new RouteCalculationResult("Selected route service is not available"); } if(log.isInfoEnabled() ){ @@ -344,7 +347,6 @@ public class RouteProvider { return new RouteCalculationResult(null); } - public RouteCalculationResult recalculatePartOfflineRoute(RouteCalculationResult res, RouteCalculationParams params) { RouteCalculationResult rcr = params.previousToRecalculate; List locs = new ArrayList(rcr.getRouteLocations()); @@ -1205,7 +1207,31 @@ public class RouteProvider { } return new RouteCalculationResult(res, null, params, null); } - - + private RouteCalculationResult findStraightRoute(RouteCalculationParams params) { + double[] lats = new double[] { params.start.getLatitude(), params.end.getLatitude() }; + double[] lons = new double[] { params.start.getLongitude(), params.end.getLongitude() }; + List intermediates = params.intermediates; + List dots = new ArrayList(); + //writing start location + Location location = new Location(String.valueOf("start")); + location.setLatitude(lats[0]); + location.setLongitude(lons[0]); + //adding intermediate dots if they exists + if (intermediates != null){ + for(int i =0; i Date: Fri, 4 Jul 2014 11:45:52 +0200 Subject: [PATCH 44/49] Update MapActivityActions.java --- .../net/osmand/plus/activities/MapActivityActions.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java index afaa01a474..6308b9b3bc 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java @@ -614,10 +614,13 @@ public class MapActivityActions implements DialogProvider { } private void enterRoutePlanningModeImpl(GPXFile gpxFile, LatLon from, String fromName) { + ApplicationMode mode = settings.DEFAULT_APPLICATION_MODE.get(); - if (mode == ApplicationMode.DEFAULT) { - ApplicationMode selected = settings.APPLICATION_MODE.get(); - mode = selected == ApplicationMode.DEFAULT ? ApplicationMode.CAR : selected; + ApplicationMode selected = settings.APPLICATION_MODE.get(); + if( selected != ApplicationMode.DEFAULT) { + mode = selected; + } else if (mode == ApplicationMode.DEFAULT) { + mode = ApplicationMode.CAR ; } OsmandApplication app = mapActivity.getMyApplication(); From 58d0eb7f217f1175320c68396f6323398d021d2b Mon Sep 17 00:00:00 2001 From: ezjerry liao Date: Fri, 4 Jul 2014 01:20:41 +0200 Subject: [PATCH 45/49] Translated using Weblate (Traditional Chinese) Currently translated at 100.0% (1431 of 1431 strings) --- OsmAnd/res/values-zh-rTW/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/res/values-zh-rTW/strings.xml b/OsmAnd/res/values-zh-rTW/strings.xml index ce25bf5bc7..80e92dd005 100644 --- a/OsmAnd/res/values-zh-rTW/strings.xml +++ b/OsmAnd/res/values-zh-rTW/strings.xml @@ -1754,7 +1754,7 @@ OsmAnd 是開放原始碼,而且正在積極的開發。應用程式從報告 分享 經由 OsmAnd 分享我的最愛 預估兩點之間的路線 - "在1.8的變更: * 預估 GPX 軌跡路線標點之間的路線 * 為下載變更了各國的配置(支援當地名稱搜索) * 支援 GPX/KML 匯入(由 KML 轉換為 GPX ) * GPX軌跡已經移到\'我的資料\' * 您可以按路程分割 GPX 軌跡和查對海拔高度差異/速度 * 自動開始導航後延遲 " + "在1.8的變更: * 預估 GPX 軌跡路線標點之間的路線 * 為下載變更了各國的配置(支援當地名稱搜索) * 支援 GPX/KML 匯入(由 KML 轉換為 GPX ) * GPX 軌跡已經移到\'我的資料\' * 您可以按路程分割 GPX 軌跡和查對海拔高度差異/速度 * 自動開始導航後延遲 " 自動開始追蹤區段和發送位置之後啟動應用程式 自動開始追蹤區段 個人追蹤 ID From 8cedb02cbd91050d03e20be85a720bd451cc7bb3 Mon Sep 17 00:00:00 2001 From: Bars107 Date: Fri, 4 Jul 2014 13:14:12 +0300 Subject: [PATCH 46/49] Update MapActivityLayers.java --- OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java index f3f0b7a7ad..8e2d1bfae2 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityLayers.java @@ -331,7 +331,7 @@ public class MapActivityLayers { selectPOIFilterLayer(mapView); } }); - } else { + } else if (specialItemId == R.string.layer_gpx_layer) { settingsImage.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { From fe68ff3a3c31bf2dd8c687ef6d3c6fa6a5d35c50 Mon Sep 17 00:00:00 2001 From: Bars107 Date: Fri, 4 Jul 2014 13:14:40 +0300 Subject: [PATCH 47/49] Update RouteProvider.java --- OsmAnd/src/net/osmand/plus/routing/RouteProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java b/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java index ed088077a1..c05f4af02d 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java +++ b/OsmAnd/src/net/osmand/plus/routing/RouteProvider.java @@ -77,7 +77,7 @@ public class RouteProvider { public enum RouteService { OSMAND("OsmAnd (offline)"), YOURS("YOURS"), ORS("OpenRouteService"), OSRM("OSRM (only car)"), - BROUTER("BRouter (offline)"), STRAIGHT("Straight line(offline)"); + BROUTER("BRouter (offline)"), STRAIGHT("Straight line"); private final String name; private RouteService(String name){ this.name = name; From 350c5ccc0a6693842d246f32599b89e28b6bd932 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 4 Jul 2014 14:18:44 +0300 Subject: [PATCH 48/49] refactored gpx layers dialog --- .../net/osmand/plus/helpers/GpxUiHelper.java | 69 ++++++++++--------- 1 file changed, 37 insertions(+), 32 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java b/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java index 202d71c6fe..0366481bad 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/GpxUiHelper.java @@ -128,7 +128,7 @@ public class GpxUiHelper { return description.toString(); } - public static void selectGPXFile(List list, final Activity activity, + public static void selectGPXFile(List selectedGpxList, final Activity activity, final boolean showCurrentGpx, final boolean multipleChoice, final CallbackWithObject callbackWithObject){ OsmandApplication app = (OsmandApplication) activity.getApplication(); final File dir = app.getAppPath(IndexConstants.GPX_INDEX_DIR); @@ -138,30 +138,10 @@ public class GpxUiHelper { } if(!allGpxList.isEmpty() || showCurrentGpx){ - final ContextMenuAdapter adapter = new ContextMenuAdapter(activity); if(showCurrentGpx){ allGpxList.add(0, activity.getString(R.string.show_current_gpx_title)); } - - //element position in adapter - int i =0; - for(String s : allGpxList) { - String fileName = s; - if (s.endsWith(".gpx")) { - s = s.substring(0, s.length() - ".gpx".length()); - } - s = s.replace('_', ' '); - - adapter.item(s).selected(multipleChoice ? 0 : -1) - .icons(R.drawable.ic_action_info_dark, R.drawable.ic_action_info_light).reg(); - for (String file : list) { - if (file.endsWith(fileName)) { - adapter.setSelection(i, 1); - break; - } - } - i++; - } + final ContextMenuAdapter adapter = createGpxContextMenuAdapter(activity,allGpxList, selectedGpxList, multipleChoice); createDialog(activity, showCurrentGpx, multipleChoice, callbackWithObject, allGpxList, adapter); } } @@ -175,22 +155,42 @@ public class GpxUiHelper { AccessibleToast.makeText(activity, R.string.gpx_files_not_found, Toast.LENGTH_LONG).show(); } if(!list.isEmpty() || showCurrentGpx){ - - final ContextMenuAdapter adapter = new ContextMenuAdapter(activity); if(showCurrentGpx){ list.add(0, activity.getString(R.string.show_current_gpx_title)); } - for(String s : list) { - if (s.endsWith(".gpx")) { - s = s.substring(0, s.length() - ".gpx".length()); - } - s = s.replace('_', ' '); - adapter.item(s).selected(multipleChoice ? 0 : -1) - .icons(R.drawable.ic_action_info_dark, R.drawable.ic_action_info_light).reg(); - } + + final ContextMenuAdapter adapter = createGpxContextMenuAdapter(activity, list, null, multipleChoice); createDialog(activity, showCurrentGpx, multipleChoice, callbackWithObject, list, adapter); } } + + private static ContextMenuAdapter createGpxContextMenuAdapter(Activity activity, List allGpxList, List selectedGpxList, boolean multipleChoice) { + final ContextMenuAdapter adapter = new ContextMenuAdapter(activity); + //element position in adapter + int i = 0; + for (String s : allGpxList) { + String fileName = s; + if (s.endsWith(".gpx")) { + s = s.substring(0, s.length() - ".gpx".length()); + } + s = s.replace('_', ' '); + + adapter.item(s).selected(multipleChoice ? 0 : -1) + .icons(R.drawable.ic_action_info_dark, R.drawable.ic_action_info_light).reg(); + + //if there's some selected files - need to mark them as selected + if (selectedGpxList != null) { + for (String file : selectedGpxList) { + if (file.endsWith(fileName)) { + adapter.setSelection(i, 1); + break; + } + } + } + i++; + } + return adapter; + } private static void setDescripionInDialog(final ArrayAdapter adapter, final ContextMenuAdapter cmAdapter, Activity activity, final File dir, String filename, final int position) { @@ -290,6 +290,11 @@ public class GpxUiHelper { @Override public void onClick(DialogInterface dialog, int which) { GPXFile currentGPX = null; + //clear all previously selected files before adding new one + OsmandApplication app = (OsmandApplication) activity.getApplication(); + if(app != null && app.getSelectedGpxHelper() != null){ + app.getSelectedGpxHelper().clearAllGpxFileToShow(); + } if (showCurrentGpx && adapter.getSelection(0) > 0) { currentGPX = app.getSavingTrackHelper().getCurrentGpx(); } From 4a9d2e976d6adab1d084662603b75fe203296c8a Mon Sep 17 00:00:00 2001 From: ezjerry liao Date: Fri, 4 Jul 2014 12:30:33 +0200 Subject: [PATCH 49/49] Translated using Weblate (Traditional Chinese) Currently translated at 100.0% (1431 of 1431 strings) --- OsmAnd/res/values-zh-rTW/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OsmAnd/res/values-zh-rTW/strings.xml b/OsmAnd/res/values-zh-rTW/strings.xml index 80e92dd005..c319dbd510 100644 --- a/OsmAnd/res/values-zh-rTW/strings.xml +++ b/OsmAnd/res/values-zh-rTW/strings.xml @@ -517,7 +517,7 @@ 不要使用 安裝新資料… - 選用線上導航服務,但是沒有可用網路連線。 + 選用線上導航服務,但是沒有能使用的網路連線。 該語言未支援 選用的語言 Android TTS 引擎未支援,您要到 Play 商場找其它引擎嗎?否則使用之前設定的語言。 資料遺失