diff options
72 files changed, 15427 insertions, 9394 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml index 69facbbae..eecf98b57 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -65,7 +65,7 @@ jobs: name: Install cmake gettext libsaxonb-java librsvg2-bin pkg-config command: | sudo apt-get update - sudo apt-get install -y cmake gettext libsaxonb-java librsvg2-bin pkg-config + sudo apt-get install -y cmake gettext libsaxonb-java librsvg2-bin pkg-config libprotobuf-c-dev protobuf-c-compiler cmake ./ -Dsvg2png_scaling:STRING=-1,24,32,48,64,96,128 -Dsvg2png_scaling_nav:STRING=-1,24,32,48,64,96,128 -Dsvg2png_scaling_flag:STRING=-1,24,32,64,96 - run: name: Process icons @@ -160,7 +160,11 @@ jobs: - run: name: Build for Windows command: | - bash scripts/setup_common_requirements.sh + apt-get update && xargs -a scripts/setup_14.04_requirements.list apt-get install -y + apt-get install -y software-properties-common + add-apt-repository -y ppa:george-edison55/cmake-3.x + apt-get remove -y cmake + apt-get install -y cmake3 bash scripts/build_win32.sh - store_artifacts: path: win32/navit.exe diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..09919cf68 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,23 @@ +sudo: required + +language: c + +services: + - docker + +before_install: +- mkdir ../rpmbuild +- docker pull hoehnp/sailfishos-platform-sdk:2.2.1.18-r1 +- docker run -e VERSION_ID=2.2.1.18 -v `pwd`:/home/nemo/navit hoehnp/sailfishos-platform-sdk:2.2.1.18-r1 /bin/bash -x /home/nemo/navit/contrib/sailfish/build_sailfish_ci.sh + +before_deploy: + - provider: pages + - skip-cleanup: true + - github-token: $GITHUB_TOKEN + - keep-history: true + - local-history: `pwd`/../rpmbuild/RPMS/armv7hl/ + - local-history: `pwd`/../rpmbuild/RPMS/i586/ +before_script: skip +script: skip +after_success: skip +after_script: skip diff --git a/CMakeLists.txt b/CMakeLists.txt index 681b27b9d..d7fd1bcd8 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -150,12 +150,13 @@ find_package(Glib) find_package(Gmodule) find_package(ZLIB) find_package(Freetype) -find_library(SDL2MAIN SDL2) -find_library(SDL2IMAGE SDL2_image) -find_library(GLES2 GLESv2) +#find_library(SDL2MAIN SDL2) +#find_library(SDL2IMAGE SDL2_image) find_package(SDL) -find_package(SDL_ttf) +#find_package(SDL_ttf) find_package(SDL_image) + +find_library(GLES2 GLESv2) find_package(OpenGL) find_package(GLUT) find_package(GTK2 2.6 COMPONENTS gtk) @@ -405,6 +406,7 @@ else() endif(FREETYPE_FOUND) if(SDL_FOUND AND SDLIMAGE_FOUND AND FREETYPE_FOUND) + include_directories( ${SDL_INCLUDE_DIRS} ${SDL_IMAGE_INCLUDE_DIRS}) set(SDL_IMAGE 1) if(SDLTTF_FOUND) set(SDL_TTF 1) @@ -499,6 +501,9 @@ add_module(plugin/j1850 "Default" FALSE) add_module(speech/android "Default" FALSE) add_module(speech/espeak "Default" FALSE) add_module(speech/iphone "Default" FALSE) +add_module(traffic/dummy "Default" TRUE) +add_module(traffic/null "Default" TRUE) +add_module(traffic/traff_android "Default" FALSE) add_module(vehicle/android "Default" FALSE) add_module(vehicle/iphone "Default" FALSE) add_module(vehicle/wince "Default" FALSE) @@ -706,6 +711,7 @@ if(ANDROID) set_with_reason(graphics/null "Android detected" FALSE) set_with_reason(graphics/android "Android detected" TRUE) set_with_reason(speech/android "Android detected" TRUE) + set_with_reason(traffic/traff_android "Android detected" TRUE) set_with_reason(vehicle/android "Android detected" TRUE) set_with_reason(vehicle/file "Android detected" FALSE) set_with_reason(vehicle/gpsd "Android detected" FALSE) @@ -16,7 +16,7 @@ Navit on Linux based Carputer: <a href="https://f-droid.org/repository/browse/?fdfilter=navit&fdid=org.navitproject.navit"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/Get_it_on_F-Droid.svg/200px-Get_it_on_F-Droid.svg.png" height="100"/></a> </p> -NavIT +Navit ===== Navit is a open source (GPL) car navigation system with routing engine. @@ -48,14 +48,14 @@ If you don't know where to start, we recommend you to read the Interactive Help : http://wiki.navit-project.org/index.php/Interactive_help -Maps: -===== +Maps +==== The best navigation system is useless without maps. Those three maps are known to work: -- OpenStreetMaps: display, routing, but street name search isn't complete - (see http://wiki.navit-project.org/index.php/OpenStreetMaps) +- OpenStreetMap: display, routing, but street name search isn't complete + (see http://wiki.navit-project.org/index.php/OpenStreetMap) - Grosser Reiseplaner and compliant maps: full support (see http://wiki.navit-project.org/index.php/European_maps) @@ -64,29 +64,31 @@ are known to work: (see http://wiki.navit-project.org/index.php/Garmin_maps) -GPS Support: -============ +GPS Support +=========== -Navit read the current vehicle position: -- directly from a file +Navit reads the current vehicle position: +- directly from a file or port - from gpsd (local or remote) +- from the location service of several mobile platforms - from udp server (friends tracking) (experimental) Routing algorithm ================= -NavIt uses a Dijkstra algorithm for routing. The routing starts at the -destination by assigning a value to each point directly connected to -destination point. The value represents the estimated time needed to -pass this distance. +Navit uses LPA* (see https://en.wikipedia.org/wiki/Lifelong_Planning_A*), a derivative of the Dijkstra algorithm, for +routing. Routing starts at the destination by assigning a value to each point directly connected to the destination +point. The value represents the estimated time needed to reach the destination from that point. -Now the point with the lowest value is chosen using the Fibonacci -heap and a value is assigned to connected points whos are -unevaluated or whos current value ist greater than the new one. +Now the point with the lowest value is chosen using the Fibonacci heap, and a value is assigned to connected points +which are unevaluated or whose current value is greater than the new one. The search is repeated until the origin is found. -Once the origin is reached, all that needs to be done is to follow the -points with the lowest values to the destination. +Once the origin is reached, all that needs to be done is to follow the points with the lowest values to the +destination. +LPA* is slightly more complex, as it allows partial re-evaluation of the route graph as segment costs change. This is +used by the (still experimental) traffic module, which can process traffic reports and tries to find a way around +traffic problems. Refer to the Wikipedia page for a full description.
\ No newline at end of file diff --git a/build.gradle b/build.gradle index ec95872d8..5d598ab8b 100644 --- a/build.gradle +++ b/build.gradle @@ -2,12 +2,12 @@ buildscript { repositories { + google() jcenter() maven { url 'https://maven.google.com/' name 'Google' } - google() } dependencies { classpath 'com.android.tools.build:gradle:3.1.2' @@ -19,6 +19,7 @@ buildscript { allprojects { repositories { + google() jcenter() maven { url 'https://maven.google.com/' diff --git a/cmake/FindProtobuf-c.cmake b/cmake/FindProtobuf-c.cmake new file mode 100644 index 000000000..170c1a03d --- /dev/null +++ b/cmake/FindProtobuf-c.cmake @@ -0,0 +1,121 @@ +# Locate and configure the Google Protocol Buffers library. +# Defines the following variables: +# +# PROTOBUF_C_FOUND - Found the Google Protocol Buffers library +# PROTOBUF_C_INCLUDE_DIRS - Include directories for Google Protocol Buffers +# PROTOBUF_C_LIBRARIES - The protobuf library +# +# The following cache variables are also defined: +# PROTOBUF_C_LIBRARY - The protobuf library +# PROTOBUF_C_PROTOC_LIBRARY - The protoc library +# PROTOBUF_C_INCLUDE_DIR - The include directory for protocol buffers +# PROTOBUF_C_PROTOC_EXECUTABLE - The protoc compiler +# +# ==================================================================== +# Example: +# +# find_package(Protobuf-c REQUIRED) +# include_directories(${PROTOBUF_C_INCLUDE_DIRS}) +# +# include_directories(${CMAKE_CURRENT_BINARY_DIR}) +# PROTOBUF_C_GENERATE_C(PROTO_SRCS PROTO_HDRS foo.proto) +# add_executable(bar bar.c ${PROTO_SRCS} ${PROTO_HDRS}) +# target_link_libraries(bar ${PROTOBUF_C_LIBRARY}) +# +# NOTE: You may need to link against pthreads, depending +# on the platform. +# ==================================================================== +# +# PROTOBUF_C_GENERATE_C (public function) +# SRCS = Variable to define with autogenerated +# source files +# HDRS = Variable to define with autogenerated +# header files +# ARGN = proto files +# +# ==================================================================== + + +#============================================================================= +# Copyright 2009 Kitware, Inc. +# Copyright 2009 Philip Lowman <philip@yhbt.com> +# Copyright 2008 Esben Mose Hansen, Ange Optimization ApS +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distributed this file outside of CMake, substitute the full +# License text for the above reference.) + +function(PROTOBUF_C_GENERATE_C SRCS HDRS) + if(NOT ARGN) + message(SEND_ERROR "Error: PROTOBUF_C_GENERATE_C() called without any proto files") + return() + endif(NOT ARGN) + + set(${SRCS}) + set(${HDRS}) + foreach(FIL ${ARGN}) + get_filename_component(ABS_FIL ${FIL} ABSOLUTE) + get_filename_component(FIL_WE ${FIL} NAME_WE) + + list(APPEND ${SRCS} "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb-c.c") + list(APPEND ${HDRS} "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb-c.h") + + add_custom_command( + OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb-c.c" + "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.pb-c.h" + COMMAND ${PROTOBUF_C_PROTOC_EXECUTABLE} + ARGS --c_out=${CMAKE_CURRENT_BINARY_DIR} --proto_path ${CMAKE_CURRENT_SOURCE_DIR} ${ABS_FIL} + DEPENDS ${ABS_FIL} + COMMENT "Running C protocol buffer compiler on ${FIL}" + VERBATIM ) + endforeach() + + set_source_files_properties(${${SRCS}} ${${HDRS}} PROPERTIES GENERATED TRUE) + set(${SRCS} ${${SRCS}} PARENT_SCOPE) + set(${HDRS} ${${HDRS}} PARENT_SCOPE) +endfunction() + + +find_path(PROTOBUF_C_INCLUDE_DIR google/protobuf-c/protobuf-c.h) + +# Google's provided vcproj files generate libraries with a "lib" +# prefix on Windows +if(WIN32) + set(PROTOBUF_C_ORIG_FIND_LIBRARY_PREFIXES "${CMAKE_FIND_LIBRARY_PREFIXES}") + set(CMAKE_FIND_LIBRARY_PREFIXES "lib" "") +endif() + +find_library(PROTOBUF_C_LIBRARY NAMES protobuf-c + DOC "The Google Protocol Buffers Library" +) +find_library(PROTOBUF_C_PROTOC_LIBRARY NAMES protoc-c + DOC "The Google Protocol Buffers Compiler Library" +) +find_program(PROTOBUF_C_PROTOC_EXECUTABLE NAMES protoc-c + DOC "The Google Protocol Buffers Compiler" +) + +mark_as_advanced(PROTOBUF_C_INCLUDE_DIR + PROTOBUF_C_LIBRARY + PROTOBUF_C_PROTOC_LIBRARY + PROTOBUF_C_PROTOC_EXECUTABLE) + +# Restore original find library prefixes +if(WIN32) + set(CMAKE_FIND_LIBRARY_PREFIXES "${PROTOBUF_C_ORIG_FIND_LIBRARY_PREFIXES}") +endif() + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(PROTOBUF_C DEFAULT_MSG + PROTOBUF_C_LIBRARY PROTOBUF_C_INCLUDE_DIR) + +if(PROTOBUF_C_FOUND) + set(PROTOBUF_C_INCLUDE_DIRS ${PROTOBUF_C_INCLUDE_DIR}) + set(PROTOBUF_C_LIBRARIES ${PROTOBUF_C_LIBRARY}) +endif() diff --git a/contrib/sailfish/build_sailfish_ci.sh b/contrib/sailfish/build_sailfish_ci.sh new file mode 100755 index 000000000..58d1022f3 --- /dev/null +++ b/contrib/sailfish/build_sailfish_ci.sh @@ -0,0 +1,22 @@ +#!/bin/sh +#run on the Sailfish OS sdk docker container. Check that rpmbuild directory exists. Remember to export VERSION_ID +# please don't mess around with those lines without testing, +# even if some fancy tool tells you to do so to save some pipes. +# -hoehnp- + +if [ -z ${VERSION_ID+x} ]; then echo "VERSION_ID not set. Forgot to export VERSION_ID?"; exit 1; fi + +# First we need to cd to the directory containing this script and the spec file. +# Makes calling it directly from docker easier. +SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )" +cd $SCRIPTPATH +ls -lah /navit +mkdir $HOME/rpmbuild + +#arm devices +sb2 -t SailfishOS-${VERSION_ID}-armv7hl -m sdk-install -R zypper --non-interactive in $(grep "^BuildRequires: " navit-sailfish.spec | sed -e "s/BuildRequires: //") +sb2 -t SailfishOS-${VERSION_ID}-armv7hl -m sdk-build rpmbuild --define "_topdir /home/nemo/rpmbuild" --define "navit_source ${SCRIPTPATH}/../.." -bb navit-sailfish.spec +#intel devices +sb2 -t SailfishOS-${VERSION_ID}-i486 -m sdk-install -R zypper --non-interactive in $(grep "^BuildRequires: " navit-sailfish.spec | sed -e "s/BuildRequires: //") +sb2 -t SailfishOS-${VERSION_ID}-i486 -m sdk-build rpmbuild --define "_topdir /home/nemo/rpmbuild" --define "navit_source ${SCRIPTPATH}/../.." -bb navit-sailfish.spec + diff --git a/navit/CMakeLists.txt b/navit/CMakeLists.txt index e4a6fbd0c..f6dbe5bb8 100644 --- a/navit/CMakeLists.txt +++ b/navit/CMakeLists.txt @@ -9,7 +9,7 @@ set(NAVIT_SRC announcement.c atom.c attr.c cache.c callback.c command.c config_. event.c file.c geom.c graphics.c gui.c item.c layout.c log.c main.c map.c maps.c linguistics.c mapset.c maptype.c menu.c messages.c bookmarks.c navit.c navit_nls.c navigation.c osd.c param.c phrase.c plugin.c popup.c profile.c profile_option.c projection.c roadprofile.c route.c script.c search.c speech.c start_real.c sunriset.c transform.c track.c - search_houseno_interpol.c util.c vehicle.c vehicleprofile.c xmlconfig.c ) + search_houseno_interpol.c traffic.c util.c vehicle.c vehicleprofile.c xmlconfig.c ) if(NOT USE_PLUGINS) list(APPEND NAVIT_SRC ${CMAKE_CURRENT_BINARY_DIR}/builtin.c) diff --git a/navit/android.c b/navit/android.c index d595cd43c..9b06ebb44 100644 --- a/navit/android.c +++ b/navit/android.c @@ -172,6 +172,17 @@ JNIEXPORT void JNICALL Java_org_navitproject_navit_NavitSensors_SensorCallback( callback_call_4((struct callback *)id, sensor, &x, &y, &z); } +JNIEXPORT void JNICALL Java_org_navitproject_navit_NavitTraff_onFeedReceived(JNIEnv * env, jobject thiz, int id, + jstring feed) { + const char *s; + s = (*env)->GetStringUTFChars(env, feed, NULL); + if (id) + callback_call_1((struct callback *) id, s); + (*env)->ReleaseStringUTFChars(env, feed, s); +} + + + // type: 0=town, 1=street, 2=House# void android_return_search_result(struct jni_object *jni_o, int type, struct pcoord *location, const char *address) { struct coord_geo geo_location; diff --git a/navit/android/src/org/navitproject/navit/NavitTraff.java b/navit/android/src/org/navitproject/navit/NavitTraff.java new file mode 100644 index 000000000..a98b91948 --- /dev/null +++ b/navit/android/src/org/navitproject/navit/NavitTraff.java @@ -0,0 +1,108 @@ +/** + * Navit, a modular navigation system. + * Copyright (C) 2005-2018 Navit Team + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +package org.navitproject.navit; + +import android.Manifest; +import android.content.BroadcastReceiver; +import android.content.ComponentName; +import android.content.Context; +import android.content.Intent; +import android.content.IntentFilter; +import android.content.pm.PackageManager; +import android.content.pm.ResolveInfo; +import android.util.Log; + +import java.util.List; + +/** + * @brief The TraFF receiver implementation. + * + * This class registers the broadcast receiver for TraFF feeds, polls all registered sources once on creation, receives + * TraFF feeds and forwards them to the traffic module for processing. + */ +public class NavitTraff extends BroadcastReceiver { + public static String ACTION_TRAFF_FEED = "org.traffxml.traff.FEED"; + + public static String ACTION_TRAFF_POLL = "org.traffxml.traff.POLL"; + + public static String EXTRA_FEED = "feed"; + + /** Identifier for the callback function. */ + private int cbid; + + private Context context = null; + + /** An intent filter for TraFF events. */ + private IntentFilter traffFilter = new IntentFilter(); + + /** + * @brief Forwards a newly received TraFF feed to the traffic module for processing. + * + * This is called when a TraFF feed is received. + * + * @param id The identifier for the native callback implementation + * @param feed The TraFF feed + */ + public native void onFeedReceived(int id, String feed); + + /** + * @brief Creates a new {@code NavitTraff} instance. + * + * Creating a new {@code NavitTraff} instance registers a broadcast receiver for TraFF broadcasts and polls all + * registered sources once to ensure we have messages which were received by these sources before we started up. + * + * @param context The context + * @param cbid The callback identifier for the native method to call upon receiving a feed + */ + NavitTraff(Context context, int cbid) { + this.context = context; + this.cbid = cbid; + + traffFilter.addAction(ACTION_TRAFF_FEED); + traffFilter.addAction(ACTION_TRAFF_POLL); + + context.registerReceiver(this, traffFilter); + /* TODO unregister receiver on exit */ + + /* Broadcast a poll intent */ + Intent outIntent = new Intent(ACTION_TRAFF_POLL); + PackageManager pm = context.getPackageManager(); + List<ResolveInfo> receivers = pm.queryBroadcastReceivers(outIntent, 0); + if (receivers != null) + for (ResolveInfo receiver : receivers) { + ComponentName cn = new ComponentName(receiver.activityInfo.applicationInfo.packageName, + receiver.activityInfo.name); + outIntent = new Intent(ACTION_TRAFF_POLL); + outIntent.setComponent(cn); + context.sendBroadcast(outIntent, Manifest.permission.ACCESS_COARSE_LOCATION); + } + } + + @Override + public void onReceive(Context context, Intent intent) { + if ((intent != null) && (intent.getAction().equals(ACTION_TRAFF_FEED))) { + String feed = intent.getStringExtra(EXTRA_FEED); + if (feed == null) + Log.w(this.getClass().getSimpleName(), "empty feed, ignoring"); + else + onFeedReceived(cbid, feed); + } + } +} diff --git a/navit/attr.h b/navit/attr.h index c9e1ca30f..dca3a6107 100644 --- a/navit/attr.h +++ b/navit/attr.h @@ -91,6 +91,7 @@ enum attr_format { #define AF_PBH (AF_PEDESTRIAN|AF_BIKE|AF_HORSE) #define AF_MOTORIZED_FAST (AF_MOTORCYCLE|AF_CAR|AF_HIGH_OCCUPANCY_CAR|AF_TAXI|AF_PUBLIC_BUS|AF_DELIVERY_TRUCK|AF_TRANSPORT_TRUCK|AF_EMERGENCY_VEHICLES) #define AF_ALL (AF_PBH|AF_MOPED|AF_MOTORIZED_FAST) +#define AF_DISTORTIONMASK (AF_ALL|AF_ONEWAYMASK) #define AF_DG_ANY (1<<0) diff --git a/navit/attr_def.h b/navit/attr_def.h index 1a0c92ee4..0dffc93e5 100644 --- a/navit/attr_def.h +++ b/navit/attr_def.h @@ -478,6 +478,7 @@ ATTR(maps) ATTR(layout) ATTR(profile_option) ATTR(script) +ATTR(traffic) ATTR2(0x0008ffff,type_object_end) ATTR2(0x00090000,type_coord_begin) ATTR2(0x0009ffff,type_coord_end) diff --git a/navit/binding/dbus/binding_dbus.c b/navit/binding/dbus/binding_dbus.c index 35aebf12a..aa776db10 100644 --- a/navit/binding/dbus/binding_dbus.c +++ b/navit/binding/dbus/binding_dbus.c @@ -52,6 +52,7 @@ #include "util.h" #include "transform.h" #include "event.h" +#include "traffic.h" static DBusConnection *connection; static dbus_uint32_t dbus_serial; @@ -336,6 +337,11 @@ static DBusHandlerResult dbus_error_navigation_not_configured(DBusConnection *co "navigation is not configured (no <navigation> element in config file?)"); } +static DBusHandlerResult dbus_error_traffic_not_configured(DBusConnection *connection, DBusMessage *message) { + return dbus_error(connection, message, DBUS_ERROR_FAILED, + "traffic is not configured (no <traffic> element in config file?)"); +} + static DBusHandlerResult dbus_error_no_data_available(DBusConnection *connection, DBusMessage *message) { #if 1 return dbus_error(connection, message, DBUS_ERROR_FILE_NOT_FOUND, "no data available"); @@ -1195,6 +1201,185 @@ static DBusHandlerResult request_navit_quit(DBusConnection *connection, DBusMess return empty_reply(connection, message); } +/** + * @brief Exports currently active traffic distortions as a GPX file. + * + * @param connection The DBusConnection object through which a message arrived + * @param message The DBusMessage including the `filename` parameter + * @returns An empty reply if everything went right, otherwise `DBUS_HANDLER_RESULT_NOT_YET_HANDLED` + */ +static DBusHandlerResult request_navit_traffic_export_gpx(DBusConnection *connection, DBusMessage *message) { + char * filename; + struct navit * navit; + DBusMessageIter iter; + struct attr attr; + struct attr_iter * a_iter; + struct traffic * traffic = NULL; + FILE *fp; + struct traffic_message ** messages; + struct traffic_message ** curr_msg; + char * wpt_types[] = {"from", "at", "via", "not_via", "to"}; + struct traffic_point * wpts[5]; + int i; + struct item ** items; + struct item ** curr_itm; + int dir, lastdir = 0; + struct coord c, c_last; + struct coord_geo g; + + char *header = "<?xml version='1.0' encoding='UTF-8'?>\n" + "<gpx version='1.1' creator='Navit http://navit.sourceforge.net'\n" + " xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'\n" + " xmlns:navit='http://www.navit-project.org/schema/navit'\n" + " xmlns='http://www.topografix.com/GPX/1/1'\n" + " xsi:schemaLocation='http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd'>\n"; + char *trailer = "</gpx>\n"; + + navit = object_get_from_message(message, "navit"); + if (! navit) + return dbus_error_invalid_object_path(connection, message); + + dbus_message_iter_init(message, &iter); + + dbus_message_iter_get_basic(&iter, &filename); + + a_iter = navit_attr_iter_new(); + if (navit_get_attr(navit, attr_traffic, &attr, a_iter)) + traffic = (struct traffic *) attr.u.navit_object; + navit_attr_iter_destroy(a_iter); + + if (!traffic) + return dbus_error_traffic_not_configured(connection, message); + + dbg(lvl_debug,"Dumping traffic distortions from dbus to %s", filename); + + fp = fopen(filename, "w"); + if (!fp) { + return dbus_error(connection, message, DBUS_ERROR_FAILED, + "could not open file for writing"); + } + + fprintf(fp, "%s", header); + + messages = traffic_get_stored_messages(traffic); + + for (curr_msg = messages; *curr_msg; curr_msg++) { + if (!(*curr_msg)->location) + continue; + wpts[0] = (*curr_msg)->location->from; + wpts[1] = (*curr_msg)->location->at; + wpts[2] = (*curr_msg)->location->via; + wpts[3] = (*curr_msg)->location->not_via; + wpts[4] = (*curr_msg)->location->to; + for (i = 0; i <= 4; i++) { + if (!wpts[i]) + continue; + fprintf(fp, "<wpt lon='%4.16f' lat='%4.16f'><type>%s</type><name>%s</name></wpt>\n", + wpts[i]->coord.lng, wpts[i]->coord.lat, wpt_types[i], (*curr_msg)->id); + } + } + + for (curr_msg = messages; *curr_msg; curr_msg++) { + items = traffic_message_get_items(*curr_msg); + for (curr_itm = items; *curr_itm; curr_itm++) { + /* + * Don’t blindly copy this code unless you know what you are doing. + * It is based on various assumptions which hold true for traffic map items, but not necessarily for items + * obtained from other maps. + */ + item_coord_rewind(*curr_itm); + item_coord_get(*curr_itm, &c, 1); + item_attr_rewind(*curr_itm); + if (item_attr_get(*curr_itm, attr_flags, &attr)) { + if (attr.u.num & AF_ONEWAY) + dir = 1; + else if (attr.u.num & AF_ONEWAYREV) + dir = -1; + else + dir = 0; + } else + dir = 0; + if ((curr_itm == items) || (c.x != c_last.x) || (c.y != c_last.y) || lastdir != dir) { + /* + * Start a new route for the first item, or if the last point of the previous item does not coincide + * with the first point of the current one. This includes closing the previous route (if any) and + * adding the first point. + */ + if (curr_itm != items) + fprintf(fp, "</rte>\n"); + fprintf(fp, "<rte><type>%s</type><name>%s</name>\n", + dir ? (dir > 0 ? "forward" : "backward") : "bidirectional", (*curr_msg)->id); + transform_to_geo(projection_mg, &c, &g); + fprintf(fp,"<rtept lon='%4.16f' lat='%4.16f'></rtept>\n", g.lng, g.lat); + } + while (item_coord_get(*curr_itm, &c, 1)) { + transform_to_geo(projection_mg, &c, &g); + fprintf(fp,"<rtept lon='%4.16f' lat='%4.16f'></rtept>\n", g.lng, g.lat); + } + c_last.x = c.x; + c_last.y = c.y; + lastdir = dir; + } + if (curr_itm != items) + fprintf(fp, "</rte>\n"); + g_free(items); + } + + fprintf(fp,"%s",trailer); + + fclose(fp); + + g_free(messages); + + return empty_reply(connection, message); +} + +/** + * @brief Injects a traffic feed. + * + * @param connection The DBusConnection object through which a message arrived + * @param message The DBusMessage including the `filename` parameter + * @returns An empty reply if everything went right, otherwise `DBUS_HANDLER_RESULT_NOT_YET_HANDLED` + */ +static DBusHandlerResult request_navit_traffic_inject(DBusConnection *connection, DBusMessage *message) { + char * filename; + struct navit *navit; + DBusMessageIter iter; + struct attr * attr; + struct attr_iter * a_iter; + struct traffic * traffic = NULL; + struct traffic_message ** messages; + + navit = object_get_from_message(message, "navit"); + if (! navit) + return dbus_error_invalid_object_path(connection, message); + + dbus_message_iter_init(message, &iter); + + dbus_message_iter_get_basic(&iter, &filename); + + attr = g_new0(struct attr, 1); + a_iter = navit_attr_iter_new(); + if (navit_get_attr(navit, attr_traffic, attr, a_iter)) + traffic = (struct traffic *) attr->u.navit_object; + navit_attr_iter_destroy(a_iter); + g_free(attr); + + if (!traffic) + return dbus_error_traffic_not_configured(connection, message); + + dbg(lvl_debug, "Processing traffic feed from file %s", filename); + + messages = traffic_get_messages_from_xml_file(traffic, filename); + if (messages) { + dbg(lvl_debug, "got messages from file %s, processing", filename); + traffic_process_messages(traffic, messages); + g_free(messages); + } + + return empty_reply(connection, message); +} + static DBusHandlerResult request_navit_zoom(DBusConnection *connection, DBusMessage *message) { int factor; struct point p, *pp=NULL; @@ -1292,6 +1477,12 @@ static DBusHandlerResult request_navit_route_export_gpx(DBusConnection *connecti FILE *fp; fp = fopen(filename,"w"); + if (!fp) { + map_rect_destroy(mr); + return dbus_error(connection, message, DBUS_ERROR_FAILED, + "could not open file for writing"); + } + fprintf(fp, "%s", header); while((item = map_rect_get_item(mr))) { @@ -1306,6 +1497,8 @@ static DBusHandlerResult request_navit_route_export_gpx(DBusConnection *connecti fclose(fp); + map_rect_destroy(mr); + return empty_reply(connection, message); } @@ -1369,6 +1562,11 @@ static DBusHandlerResult request_navit_route_export_geojson(DBusConnection *conn FILE *fp; fp = fopen(filename,"w"); + if (!fp) { + return dbus_error(connection, message, DBUS_ERROR_FAILED, + "could not open file for writing"); + } + fprintf(fp, "%s", header); int is_first=1; char * instructions; @@ -1796,6 +1994,8 @@ struct dbus_method { {".navit", "set_center", "(iii)", "(projection,longitude,latitude)", "", "", request_navit_set_center}, {".navit", "set_center_screen", "(ii)", "(pixel_x,pixel_y)", "", "", request_navit_set_center_screen}, {".navit", "set_layout", "s", "layoutname", "", "", request_navit_set_layout}, + {".navit", "traffic_export", "s", "filename", "", "", request_navit_traffic_export_gpx}, + {".navit", "traffic_inject", "s", "filename", "", "", request_navit_traffic_inject}, {".navit", "zoom", "i(ii)", "factor(pixel_x,pixel_y)", "", "", request_navit_zoom}, {".navit", "zoom", "i", "factor", "", "", request_navit_zoom}, {".navit", "zoom_to_route", "", "", "", "", request_navit_zoom_to_route}, diff --git a/navit/graphics/egl/graphics_egl.c b/navit/graphics/egl/graphics_egl.c index f9c33c775..2da56047c 100644 --- a/navit/graphics/egl/graphics_egl.c +++ b/navit/graphics/egl/graphics_egl.c @@ -38,7 +38,7 @@ #include "window.h" #include "navit/font/freetype/font_freetype.h" -#include <SDL2/SDL_image.h> +#include "SDL_image.h" #include <GLES2/gl2.h> #include <EGL/egl.h> @@ -88,7 +88,8 @@ struct graphics_priv { struct graphics_gc_priv *background_gc; enum draw_mode_num mode; GLuint program; - GLint mvp_location, position_location, color_location, texture_position_location, use_texture_location, texture_location; + GLint mvp_location, position_location, color_location, texture_position_location, use_texture_location, + texture_location; struct callback_list *cbl; struct font_freetype_methods freetype_methods; struct navit *nav; @@ -430,7 +431,8 @@ static struct graphics_gc_priv *gc_new(struct graphics_priv *gr, struct graphics static struct graphics_image_priv image_error; -static struct graphics_image_priv *image_new(struct graphics_priv *gr, struct graphics_image_methods *meth, char *name, int *w, int *h, struct point *hot, int rotation) { +static struct graphics_image_priv *image_new(struct graphics_priv *gr, struct graphics_image_methods *meth, char *name, + int *w, int *h, struct point *hot, int rotation) { struct graphics_image_priv *gi; /* FIXME: meth is not used yet.. so gi leaks. at least xpm is small */ @@ -640,7 +642,8 @@ static void draw_rectangle(struct graphics_priv *gr, struct graphics_gc_priv *gc graphics_priv_root->dirty = 1; } -static void display_text_draw(struct font_freetype_text *text, struct graphics_priv *gr, struct graphics_gc_priv *fg, struct graphics_gc_priv *bg, int color, struct point *p) { +static void display_text_draw(struct font_freetype_text *text, struct graphics_priv *gr, struct graphics_gc_priv *fg, + struct graphics_gc_priv *bg, int color, struct point *p) { int i, x, y, stride; struct font_freetype_glyph *g, **gp; unsigned char *shadow, *glyph; @@ -745,7 +748,8 @@ static void display_text_draw(struct font_freetype_text *text, struct graphics_p } } -static void draw_text(struct graphics_priv *gr, struct graphics_gc_priv *fg, struct graphics_gc_priv *bg, struct graphics_font_priv *font, char *text, struct point *p, int dx, int dy) { +static void draw_text(struct graphics_priv *gr, struct graphics_gc_priv *fg, struct graphics_gc_priv *bg, + struct graphics_font_priv *font, char *text, struct point *p, int dx, int dy) { if ((gr->parent && !gr->parent->overlay_enabled) || (gr->parent && gr->parent->overlay_enabled && !gr->overlay_enabled)) { @@ -772,7 +776,8 @@ static void draw_text(struct graphics_priv *gr, struct graphics_gc_priv *fg, str } -static void draw_image(struct graphics_priv *gr, struct graphics_gc_priv *fg, struct point *p, struct graphics_image_priv *img) { +static void draw_image(struct graphics_priv *gr, struct graphics_gc_priv *fg, struct point *p, + struct graphics_image_priv *img) { draw_image_es(gr, p, img->img->w, img->img->h, img->img->pixels); } @@ -908,7 +913,8 @@ static void *get_data(struct graphics_priv *this, const char *type) { glClearColor ( 0, 0, 0, 1); glClear ( GL_COLOR_BUFFER_BIT ); - callback_list_call_attr_2(graphics_priv_root->cbl, attr_resize, GINT_TO_POINTER(this->width), GINT_TO_POINTER(this->height)); + callback_list_call_attr_2(graphics_priv_root->cbl, attr_resize, GINT_TO_POINTER(this->width), + GINT_TO_POINTER(this->height)); this->program = glCreateProgram(); vertexShader = load_shader(vertex_src, GL_VERTEX_SHADER); @@ -1073,7 +1079,8 @@ static void create_framebuffer_texture(struct graphics_priv *gr) { } } -static struct graphics_priv *overlay_new(struct graphics_priv *gr, struct graphics_methods *meth, struct point *p, int w, int h, int wraparound) { +static struct graphics_priv *overlay_new(struct graphics_priv *gr, struct graphics_methods *meth, struct point *p, + int w, int h, int wraparound) { struct graphics_priv *this = graphics_opengl_new_helper(meth); this->p.x = p->x; @@ -1228,7 +1235,8 @@ static gboolean graphics_sdl_idle(void *data) { } -static struct graphics_priv *graphics_opengl_new(struct navit *nav, struct graphics_methods *meth, struct attr **attrs, struct callback_list *cbl) { +static struct graphics_priv *graphics_opengl_new(struct navit *nav, struct graphics_methods *meth, struct attr **attrs, + struct callback_list *cbl) { struct attr *attr; if (!event_request_system("glib", "graphics_opengl_new")) return NULL; @@ -1319,4 +1327,3 @@ error: void plugin_init(void) { plugin_register_category_graphics("egl", graphics_opengl_new); } - diff --git a/navit/graphics/sdl/event_sdl.c b/navit/graphics/sdl/event_sdl.c index 5e258c643..454e9eb06 100644 --- a/navit/graphics/sdl/event_sdl.c +++ b/navit/graphics/sdl/event_sdl.c @@ -19,7 +19,7 @@ #include <glib.h> #include <poll.h> -#include <SDL/SDL.h> +#include "SDL.h" #include <pthread.h> #include <signal.h> #include "config.h" diff --git a/navit/graphics/sdl/event_sdl.h b/navit/graphics/sdl/event_sdl.h index 7dceedec5..ee47f60d9 100644 --- a/navit/graphics/sdl/event_sdl.h +++ b/navit/graphics/sdl/event_sdl.h @@ -2,7 +2,7 @@ #ifndef __EVENT_SDL_H #define __EVENT_SDL_H -#include <SDL/SDL.h> +#include "SDL.h" #include "config.h" #include "callback.h" #include "event.h" diff --git a/navit/graphics/sdl/graphics_sdl.c b/navit/graphics/sdl/graphics_sdl.c index d9d31df8e..efd0faad5 100644 --- a/navit/graphics/sdl/graphics_sdl.c +++ b/navit/graphics/sdl/graphics_sdl.c @@ -34,7 +34,7 @@ #include "callback.h" #include "font/freetype/font_freetype.h" -#include <SDL/SDL.h> +#include "SDL.h" #include <math.h> #ifdef USE_WEBOS @@ -56,7 +56,7 @@ #include "raster.h" #include <event.h> -#include <SDL/SDL_image.h> +#include "SDL_image.h" #include <alloca.h> /* TODO: union overlay + non-overlay to reduce size */ @@ -252,7 +252,8 @@ static struct graphics_gc_priv *gc_new(struct graphics_priv *gr, struct graphics } -static struct graphics_image_priv *image_new(struct graphics_priv *gr, struct graphics_image_methods *meth, char *name, int *w, int *h, struct point *hot, int rotation) { +static struct graphics_image_priv *image_new(struct graphics_priv *gr, struct graphics_image_methods *meth, char *name, + int *w, int *h, struct point *hot, int rotation) { struct graphics_image_priv *gi; /* FIXME: meth is not used yet.. so gi leaks. at least xpm is small */ @@ -526,7 +527,8 @@ static void resize_ft_buffer (unsigned int new_size) { } } -static void display_text_draw(struct font_freetype_text *text, struct graphics_priv *gr, struct graphics_gc_priv *fg, struct graphics_gc_priv *bg, int color, struct point *p) { +static void display_text_draw(struct font_freetype_text *text, struct graphics_priv *gr, struct graphics_gc_priv *fg, + struct graphics_gc_priv *bg, int color, struct point *p) { int i, x, y, stride; struct font_freetype_glyph *g, **gp; struct color transparent = { 0x0000, 0x0000, 0x0000, 0x0000 }; @@ -661,7 +663,8 @@ static void display_text_draw(struct font_freetype_text *text, struct graphics_p } } -static void draw_text(struct graphics_priv *gr, struct graphics_gc_priv *fg, struct graphics_gc_priv *bg, struct graphics_font_priv *font, char *text, struct point *p, int dx, int dy) { +static void draw_text(struct graphics_priv *gr, struct graphics_gc_priv *fg, struct graphics_gc_priv *bg, + struct graphics_font_priv *font, char *text, struct point *p, int dx, int dy) { if ((gr->overlay_parent && !gr->overlay_parent->overlay_enable) || (gr->overlay_parent && gr->overlay_parent->overlay_enable && !gr->overlay_enable)) { @@ -685,7 +688,8 @@ static void draw_text(struct graphics_priv *gr, struct graphics_gc_priv *fg, str gr->freetype_methods.text_destroy(t); } -static void draw_image(struct graphics_priv *gr, struct graphics_gc_priv *fg, struct point *p, struct graphics_image_priv *img) { +static void draw_image(struct graphics_priv *gr, struct graphics_gc_priv *fg, struct point *p, + struct graphics_image_priv *img) { if ((gr->overlay_parent && !gr->overlay_parent->overlay_enable) || (gr->overlay_parent && gr->overlay_parent->overlay_enable && !gr->overlay_enable) ) { return; @@ -817,7 +821,8 @@ static struct graphics_methods graphics_methods = { NULL, /* hide_native_keyboard */ }; -static struct graphics_priv *overlay_new(struct graphics_priv *gr, struct graphics_methods *meth, struct point *p, int w, int h,int wraparound) { +static struct graphics_priv *overlay_new(struct graphics_priv *gr, struct graphics_methods *meth, struct point *p, + int w, int h,int wraparound) { struct graphics_priv *ov; Uint32 rmask, gmask, bmask, amask; int i; @@ -1275,7 +1280,8 @@ static gboolean graphics_sdl_idle(void *data) { } -static struct graphics_priv *graphics_sdl_new(struct navit *nav, struct graphics_methods *meth, struct attr **attrs, struct callback_list *cbl) { +static struct graphics_priv *graphics_sdl_new(struct navit *nav, struct graphics_methods *meth, struct attr **attrs, + struct callback_list *cbl) { struct graphics_priv *this=g_new0(struct graphics_priv, 1); struct font_priv *(*font_freetype_new) (void *meth); struct attr *attr; diff --git a/navit/graphics/sdl/raster.h b/navit/graphics/sdl/raster.h index 8f50b2715..2e68ea05f 100644 --- a/navit/graphics/sdl/raster.h +++ b/navit/graphics/sdl/raster.h @@ -9,7 +9,7 @@ #define __RASTER_H #include <stdint.h> -#include <SDL/SDL.h> +#include "SDL.h" void raster_rect(SDL_Surface *s, int16_t x, int16_t y, int16_t w, int16_t h, uint32_t col); @@ -22,4 +22,3 @@ void raster_aacircle(SDL_Surface *s, int16_t x, int16_t y, int16_t r, uint32_t c void raster_aapolygon(SDL_Surface *s, int16_t n, int16_t *vx, int16_t *vy, uint32_t col); #endif /* __RASTER_H */ - diff --git a/navit/gui/internal/gui_internal_html.c b/navit/gui/internal/gui_internal_html.c index ca33581be..41dab9f50 100644 --- a/navit/gui/internal/gui_internal_html.c +++ b/navit/gui/internal/gui_internal_html.c @@ -445,7 +445,14 @@ static void gui_internal_html_text(xml_context *dummy, const char *text, gsize l } void gui_internal_html_parse_text(struct gui_priv *this, char *doc) { - xml_parse_text(doc, this, gui_internal_html_start, gui_internal_html_end, gui_internal_html_text); + int res; + + res = xml_parse_text(doc, this, gui_internal_html_start, gui_internal_html_end, gui_internal_html_text); + + if (!res) { + dbg(lvl_error, "FATAL: Failed to parse XML data (looks like incorrect configuration for internal GUI).\n"); + exit(1); + } } void gui_internal_html_menu(struct gui_priv *this, const char *document, char *anchor) { diff --git a/navit/item.c b/navit/item.c index f50971ee1..4f64a1edb 100644 --- a/navit/item.c +++ b/navit/item.c @@ -225,6 +225,57 @@ int item_coord_get_within_selection(struct item *it, struct coord *c, int count, } /** + * @brief Gets all the coordinates of an item within a specified range + * + * This will get all the coordinates of the item `i`, starting with `start` and ending with `end`, and + * return them in `c`, up to `max` coordinates. + * + * If `i` does not contain the coordinates in `start`, no coordinates are retrieved and zero is returned. + * + * If `i` contains the coordinates in `start` but not those in `end`, all coordinates beginning with + * `start` are retrieved, ending with the last coordinate of `i` or after `max` coordinates have been + * retrieved, whichever occurs first. + * + * This function is not safe to call after destroying the item's map rect, and doing so may cause errors + * with some map implementations. + * + * @important Make sure that `c` points to a buffer large enough to hold `max` coordinates! + * + * @param i The item to get the coordinates of + * @param c Pointer to memory allocated for holding the coordinates + * @param max Maximum number of coordinates to return + * @param start First coordinate to get + * @param end Last coordinate to get + * + * @return The number of coordinates stored in `c` + */ +int item_coord_get_within_range(struct item *i, struct coord *c, int max, + struct coord *start, struct coord *end) { + struct map_rect *mr; + struct item *item; + int rc = 0, p = 0; + struct coord c1; + mr=map_rect_new(i->map, NULL); + if (!mr) + return 0; + item = map_rect_get_item_byid(mr, i->id_hi, i->id_lo); + if (item) { + rc = item_coord_get(item, &c1, 1); + while (rc && (c1.x != start->x || c1.y != start->y)) { + rc = item_coord_get(item, &c1, 1); + } + while (rc && p < max) { + c[p++] = c1; + if (c1.x == end->x && c1.y == end->y) + break; + rc = item_coord_get(item, &c1, 1); + } + } + map_rect_destroy(mr); + return p; +} + +/** * @brief Gets the next coordinates from an item and reprojects them * * This function returns a list of coordinates from an item and advances the "coordinate pointer" diff --git a/navit/item.h b/navit/item.h index bf65555fc..5374240d2 100644 --- a/navit/item.h +++ b/navit/item.h @@ -130,6 +130,7 @@ void item_coord_rewind(struct item *it); int item_coord_get(struct item *it, struct coord *c, int count); int item_coord_set(struct item *it, struct coord *c, int count, enum change_mode mode); int item_coord_get_within_selection(struct item *it, struct coord *c, int count, struct map_selection *sel); +int item_coord_get_within_range(struct item *i, struct coord *c, int max, struct coord *start, struct coord *end); int item_coord_get_pro(struct item *it, struct coord *c, int count, enum projection to); int item_coord_is_node(struct item *it); void item_attr_rewind(struct item *it); diff --git a/navit/maps/CMakeLists.txt b/navit/maps/CMakeLists.txt index dbda66e2e..ee9babdf9 100644 --- a/navit/maps/CMakeLists.txt +++ b/navit/maps/CMakeLists.txt @@ -15,7 +15,7 @@ if(SAMPLE_MAP) add_custom_command ( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${SAMPLE_MAP_NAME}.bin COMMAND ${CMAKE_COMMAND} - -D URL=http://www.navit-project.org/maps/${SAMPLE_MAP_NAME}.bin + -D URL=http://www1.navit-project.org/maps/${SAMPLE_MAP_NAME}.bin -D DST=${CMAKE_CURRENT_BINARY_DIR}/${SAMPLE_MAP_NAME}.bin -P ${PROJECT_SOURCE_DIR}/cmake/navit_download.cmake VERBATIM @@ -31,7 +31,7 @@ if(SAMPLE_MAP) add_custom_command ( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${SAMPLE_MAP_NAME}.osm.bz2 COMMAND ${CMAKE_COMMAND} - -D URL=http://www.navit-project.org/maps/${SAMPLE_MAP_NAME}.osm.bz2 + -D URL=http://www1.navit-project.org/maps/${SAMPLE_MAP_NAME}.osm.bz2 -D DST=${CMAKE_CURRENT_BINARY_DIR}/${SAMPLE_MAP_NAME}.osm.bz2 -P ${PROJECT_SOURCE_DIR}/cmake/navit_download.cmake VERBATIM diff --git a/navit/maptool/CMakeLists.txt b/navit/maptool/CMakeLists.txt index b9df91dd4..624ea907b 100644 --- a/navit/maptool/CMakeLists.txt +++ b/navit/maptool/CMakeLists.txt @@ -1,16 +1,29 @@ - if(BUILD_MAPTOOL) + + find_package(Protobuf-c REQUIRED) + include_directories(${PROTOBUF-C_INCLUDE_DIR}) + include_directories(${CMAKE_CURRENT_BINARY_DIR}) + #PROTOBUF_C_GENERATE_C(PROTO_SRCS PROTO_HDRS zfs.proto) + add_definitions( -DMODULE=maptool ${NAVIT_COMPILE_FLAGS}) - include_directories(${CMAKE_CURRENT_SOURCE_DIR}) - SET(MAPTOOL_SOURCE boundaries.c buffer.c ch.c coastline.c itembin.c itembin_buffer.c misc.c osm.c osm_o5m.c osm_psql.c osm_relations.c sourcesink.c tempfile.c tile.c zip.c osm_xml.c) + + add_executable (maptool maptool.c) + add_library (maptool_core boundaries.c buffer.c ch.c coastline.c itembin.c + itembin_buffer.c misc.c osm.c osm_o5m.c osm_psql.c osm_relations.c + sourcesink.c tempfile.c tile.c zip.c osm_xml.c) + if(NOT MSVC) - SET(MAPTOOL_SOURCE ${MAPTOOL_SOURCE} osm_protobuf.c osm_protobufdb.c generated-code/fileformat.pb-c.c generated-code/osmformat.pb-c.c google/protobuf-c/protobuf-c.c) + PROTOBUF_C_GENERATE_C (PROTO_SRCS PROTO_HDRS osmformat.proto) + PROTOBUF_C_GENERATE_C (PROTO_SRCS PROTO_HDRS fileformat.proto) + target_sources(maptool_core PRIVATE osm_protobuf.c osm_protobufdb.c + fileformat.pb-c.c osmformat.pb-c.c) + target_link_libraries(maptool_core ${PROTOBUF_C_LIBRARY}) endif(NOT MSVC) - add_library (maptool_core ${MAPTOOL_SOURCE}) - add_executable (maptool maptool.c) + if(NOT MSVC) SET(NAVIT_LIBS ${NAVIT_LIBS} m) endif(NOT MSVC) + target_link_libraries(maptool maptool_core ${NAVIT_LIBNAME} ${NAVIT_LIBS}) install(TARGETS maptool diff --git a/navit/maptool/fileformat.proto b/navit/maptool/fileformat.proto index 006cba767..2f1765935 100644 --- a/navit/maptool/fileformat.proto +++ b/navit/maptool/fileformat.proto @@ -1,3 +1,4 @@ +syntax = "proto2"; option java_package = "crosby.binary"; package OSMPBF; @@ -32,5 +33,3 @@ message BlobHeader { optional bytes indexdata = 2; required int32 datasize = 3; } - - diff --git a/navit/maptool/generated-code/fileformat.pb-c.c b/navit/maptool/generated-code/fileformat.pb-c.c deleted file mode 100644 index 7189091ad..000000000 --- a/navit/maptool/generated-code/fileformat.pb-c.c +++ /dev/null @@ -1,230 +0,0 @@ -/* Generated by the protocol buffer compiler. DO NOT EDIT! */ - -/* Do not generate deprecated warnings for self */ -#ifndef PROTOBUF_C_NO_DEPRECATED -#define PROTOBUF_C_NO_DEPRECATED -#endif - -#include "fileformat.pb-c.h" -void osmpbf__blob__init -(OSMPBF__Blob *message) { - static OSMPBF__Blob init_value = OSMPBF__BLOB__INIT; - *message = init_value; -} -size_t osmpbf__blob__get_packed_size -(const OSMPBF__Blob *message) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__blob__descriptor); - return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); -} -size_t osmpbf__blob__pack -(const OSMPBF__Blob *message, - uint8_t *out) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__blob__descriptor); - return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); -} -size_t osmpbf__blob__pack_to_buffer -(const OSMPBF__Blob *message, - ProtobufCBuffer *buffer) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__blob__descriptor); - return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); -} -OSMPBF__Blob * -osmpbf__blob__unpack -(ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data) { - return (OSMPBF__Blob *) - protobuf_c_message_unpack (&osmpbf__blob__descriptor, - allocator, len, data); -} -void osmpbf__blob__free_unpacked -(OSMPBF__Blob *message, - ProtobufCAllocator *allocator) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__blob__descriptor); - protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); -} -void osmpbf__blob_header__init -(OSMPBF__BlobHeader *message) { - static OSMPBF__BlobHeader init_value = OSMPBF__BLOB_HEADER__INIT; - *message = init_value; -} -size_t osmpbf__blob_header__get_packed_size -(const OSMPBF__BlobHeader *message) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__blob_header__descriptor); - return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); -} -size_t osmpbf__blob_header__pack -(const OSMPBF__BlobHeader *message, - uint8_t *out) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__blob_header__descriptor); - return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); -} -size_t osmpbf__blob_header__pack_to_buffer -(const OSMPBF__BlobHeader *message, - ProtobufCBuffer *buffer) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__blob_header__descriptor); - return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); -} -OSMPBF__BlobHeader * -osmpbf__blob_header__unpack -(ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data) { - return (OSMPBF__BlobHeader *) - protobuf_c_message_unpack (&osmpbf__blob_header__descriptor, - allocator, len, data); -} -void osmpbf__blob_header__free_unpacked -(OSMPBF__BlobHeader *message, - ProtobufCAllocator *allocator) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__blob_header__descriptor); - protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); -} -static const ProtobufCFieldDescriptor osmpbf__blob__field_descriptors[5] = { - { - "raw", - 1, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_BYTES, - PROTOBUF_C_OFFSETOF(OSMPBF__Blob, has_raw), - PROTOBUF_C_OFFSETOF(OSMPBF__Blob, raw), - NULL, - NULL, - 0, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "raw_size", - 2, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_INT32, - PROTOBUF_C_OFFSETOF(OSMPBF__Blob, has_raw_size), - PROTOBUF_C_OFFSETOF(OSMPBF__Blob, raw_size), - NULL, - NULL, - 0, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "zlib_data", - 3, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_BYTES, - PROTOBUF_C_OFFSETOF(OSMPBF__Blob, has_zlib_data), - PROTOBUF_C_OFFSETOF(OSMPBF__Blob, zlib_data), - NULL, - NULL, - 0, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "lzma_data", - 4, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_BYTES, - PROTOBUF_C_OFFSETOF(OSMPBF__Blob, has_lzma_data), - PROTOBUF_C_OFFSETOF(OSMPBF__Blob, lzma_data), - NULL, - NULL, - 0, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "OBSOLETE_bzip2_data", - 5, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_BYTES, - PROTOBUF_C_OFFSETOF(OSMPBF__Blob, has_obsolete_bzip2_data), - PROTOBUF_C_OFFSETOF(OSMPBF__Blob, obsolete_bzip2_data), - NULL, - NULL, - 0, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned osmpbf__blob__field_indices_by_name[] = { - 4, /* field[4] = OBSOLETE_bzip2_data */ - 3, /* field[3] = lzma_data */ - 0, /* field[0] = raw */ - 1, /* field[1] = raw_size */ - 2, /* field[2] = zlib_data */ -}; -static const ProtobufCIntRange osmpbf__blob__number_ranges[1 + 1] = { - { 1, 0 }, - { 0, 5 } -}; -const ProtobufCMessageDescriptor osmpbf__blob__descriptor = { - PROTOBUF_C_MESSAGE_DESCRIPTOR_MAGIC, - "OSMPBF.Blob", - "Blob", - "OSMPBF__Blob", - "OSMPBF", - sizeof(OSMPBF__Blob), - 5, - osmpbf__blob__field_descriptors, - osmpbf__blob__field_indices_by_name, - 1, osmpbf__blob__number_ranges, - (ProtobufCMessageInit) osmpbf__blob__init, - NULL,NULL,NULL /* reserved[123] */ -}; -static const ProtobufCFieldDescriptor osmpbf__blob_header__field_descriptors[3] = { - { - "type", - 1, - PROTOBUF_C_LABEL_REQUIRED, - PROTOBUF_C_TYPE_STRING, - 0, /* quantifier_offset */ - PROTOBUF_C_OFFSETOF(OSMPBF__BlobHeader, type), - NULL, - NULL, - 0, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "indexdata", - 2, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_BYTES, - PROTOBUF_C_OFFSETOF(OSMPBF__BlobHeader, has_indexdata), - PROTOBUF_C_OFFSETOF(OSMPBF__BlobHeader, indexdata), - NULL, - NULL, - 0, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "datasize", - 3, - PROTOBUF_C_LABEL_REQUIRED, - PROTOBUF_C_TYPE_INT32, - 0, /* quantifier_offset */ - PROTOBUF_C_OFFSETOF(OSMPBF__BlobHeader, datasize), - NULL, - NULL, - 0, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned osmpbf__blob_header__field_indices_by_name[] = { - 2, /* field[2] = datasize */ - 1, /* field[1] = indexdata */ - 0, /* field[0] = type */ -}; -static const ProtobufCIntRange osmpbf__blob_header__number_ranges[1 + 1] = { - { 1, 0 }, - { 0, 3 } -}; -const ProtobufCMessageDescriptor osmpbf__blob_header__descriptor = { - PROTOBUF_C_MESSAGE_DESCRIPTOR_MAGIC, - "OSMPBF.BlobHeader", - "BlobHeader", - "OSMPBF__BlobHeader", - "OSMPBF", - sizeof(OSMPBF__BlobHeader), - 3, - osmpbf__blob_header__field_descriptors, - osmpbf__blob_header__field_indices_by_name, - 1, osmpbf__blob_header__number_ranges, - (ProtobufCMessageInit) osmpbf__blob_header__init, - NULL,NULL,NULL /* reserved[123] */ -}; diff --git a/navit/maptool/generated-code/fileformat.pb-c.h b/navit/maptool/generated-code/fileformat.pb-c.h deleted file mode 100644 index 9996bfbea..000000000 --- a/navit/maptool/generated-code/fileformat.pb-c.h +++ /dev/null @@ -1,110 +0,0 @@ -/* Generated by the protocol buffer compiler. DO NOT EDIT! */ - -#ifndef PROTOBUF_C_fileformat_2eproto__INCLUDED -#define PROTOBUF_C_fileformat_2eproto__INCLUDED - -#include <google/protobuf-c/protobuf-c.h> - -PROTOBUF_C_BEGIN_DECLS - - -typedef struct _OSMPBF__Blob OSMPBF__Blob; -typedef struct _OSMPBF__BlobHeader OSMPBF__BlobHeader; - - -/* --- enums --- */ - - -/* --- messages --- */ - -struct _OSMPBF__Blob -{ - ProtobufCMessage base; - protobuf_c_boolean has_raw; - ProtobufCBinaryData raw; - protobuf_c_boolean has_raw_size; - int32_t raw_size; - protobuf_c_boolean has_zlib_data; - ProtobufCBinaryData zlib_data; - protobuf_c_boolean has_lzma_data; - ProtobufCBinaryData lzma_data; - protobuf_c_boolean has_obsolete_bzip2_data PROTOBUF_C_DEPRECATED; - ProtobufCBinaryData obsolete_bzip2_data PROTOBUF_C_DEPRECATED; -}; -#define OSMPBF__BLOB__INIT \ - { PROTOBUF_C_MESSAGE_INIT (&osmpbf__blob__descriptor) \ - , 0,{0,NULL}, 0,0, 0,{0,NULL}, 0,{0,NULL}, 0,{0,NULL} } - - -struct _OSMPBF__BlobHeader -{ - ProtobufCMessage base; - char *type; - protobuf_c_boolean has_indexdata; - ProtobufCBinaryData indexdata; - int32_t datasize; -}; -#define OSMPBF__BLOB_HEADER__INIT \ - { PROTOBUF_C_MESSAGE_INIT (&osmpbf__blob_header__descriptor) \ - , NULL, 0,{0,NULL}, 0 } - - -/* OSMPBF__Blob methods */ -void osmpbf__blob__init - (OSMPBF__Blob *message); -size_t osmpbf__blob__get_packed_size - (const OSMPBF__Blob *message); -size_t osmpbf__blob__pack - (const OSMPBF__Blob *message, - uint8_t *out); -size_t osmpbf__blob__pack_to_buffer - (const OSMPBF__Blob *message, - ProtobufCBuffer *buffer); -OSMPBF__Blob * - osmpbf__blob__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data); -void osmpbf__blob__free_unpacked - (OSMPBF__Blob *message, - ProtobufCAllocator *allocator); -/* OSMPBF__BlobHeader methods */ -void osmpbf__blob_header__init - (OSMPBF__BlobHeader *message); -size_t osmpbf__blob_header__get_packed_size - (const OSMPBF__BlobHeader *message); -size_t osmpbf__blob_header__pack - (const OSMPBF__BlobHeader *message, - uint8_t *out); -size_t osmpbf__blob_header__pack_to_buffer - (const OSMPBF__BlobHeader *message, - ProtobufCBuffer *buffer); -OSMPBF__BlobHeader * - osmpbf__blob_header__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data); -void osmpbf__blob_header__free_unpacked - (OSMPBF__BlobHeader *message, - ProtobufCAllocator *allocator); -/* --- per-message closures --- */ - -typedef void (*OSMPBF__Blob_Closure) - (const OSMPBF__Blob *message, - void *closure_data); -typedef void (*OSMPBF__BlobHeader_Closure) - (const OSMPBF__BlobHeader *message, - void *closure_data); - -/* --- services --- */ - - -/* --- descriptors --- */ - -extern const ProtobufCMessageDescriptor osmpbf__blob__descriptor; -extern const ProtobufCMessageDescriptor osmpbf__blob_header__descriptor; - -PROTOBUF_C_END_DECLS - - -#endif /* PROTOBUF_fileformat_2eproto__INCLUDED */ diff --git a/navit/maptool/generated-code/osmformat.pb-c.c b/navit/maptool/generated-code/osmformat.pb-c.c deleted file mode 100644 index 118b2ee5d..000000000 --- a/navit/maptool/generated-code/osmformat.pb-c.c +++ /dev/null @@ -1,1471 +0,0 @@ -/* Generated by the protocol buffer compiler. DO NOT EDIT! */ - -/* Do not generate deprecated warnings for self */ -#ifndef PROTOBUF_C_NO_DEPRECATED -#define PROTOBUF_C_NO_DEPRECATED -#endif - -#include "osmformat.pb-c.h" -void osmpbf__header_block__init -(OSMPBF__HeaderBlock *message) { - static OSMPBF__HeaderBlock init_value = OSMPBF__HEADER_BLOCK__INIT; - *message = init_value; -} -size_t osmpbf__header_block__get_packed_size -(const OSMPBF__HeaderBlock *message) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__header_block__descriptor); - return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); -} -size_t osmpbf__header_block__pack -(const OSMPBF__HeaderBlock *message, - uint8_t *out) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__header_block__descriptor); - return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); -} -size_t osmpbf__header_block__pack_to_buffer -(const OSMPBF__HeaderBlock *message, - ProtobufCBuffer *buffer) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__header_block__descriptor); - return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); -} -OSMPBF__HeaderBlock * -osmpbf__header_block__unpack -(ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data) { - return (OSMPBF__HeaderBlock *) - protobuf_c_message_unpack (&osmpbf__header_block__descriptor, - allocator, len, data); -} -void osmpbf__header_block__free_unpacked -(OSMPBF__HeaderBlock *message, - ProtobufCAllocator *allocator) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__header_block__descriptor); - protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); -} -void osmpbf__header_bbox__init -(OSMPBF__HeaderBBox *message) { - static OSMPBF__HeaderBBox init_value = OSMPBF__HEADER_BBOX__INIT; - *message = init_value; -} -size_t osmpbf__header_bbox__get_packed_size -(const OSMPBF__HeaderBBox *message) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__header_bbox__descriptor); - return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); -} -size_t osmpbf__header_bbox__pack -(const OSMPBF__HeaderBBox *message, - uint8_t *out) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__header_bbox__descriptor); - return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); -} -size_t osmpbf__header_bbox__pack_to_buffer -(const OSMPBF__HeaderBBox *message, - ProtobufCBuffer *buffer) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__header_bbox__descriptor); - return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); -} -OSMPBF__HeaderBBox * -osmpbf__header_bbox__unpack -(ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data) { - return (OSMPBF__HeaderBBox *) - protobuf_c_message_unpack (&osmpbf__header_bbox__descriptor, - allocator, len, data); -} -void osmpbf__header_bbox__free_unpacked -(OSMPBF__HeaderBBox *message, - ProtobufCAllocator *allocator) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__header_bbox__descriptor); - protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); -} -void osmpbf__primitive_block__init -(OSMPBF__PrimitiveBlock *message) { - static OSMPBF__PrimitiveBlock init_value = OSMPBF__PRIMITIVE_BLOCK__INIT; - *message = init_value; -} -size_t osmpbf__primitive_block__get_packed_size -(const OSMPBF__PrimitiveBlock *message) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__primitive_block__descriptor); - return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); -} -size_t osmpbf__primitive_block__pack -(const OSMPBF__PrimitiveBlock *message, - uint8_t *out) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__primitive_block__descriptor); - return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); -} -size_t osmpbf__primitive_block__pack_to_buffer -(const OSMPBF__PrimitiveBlock *message, - ProtobufCBuffer *buffer) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__primitive_block__descriptor); - return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); -} -OSMPBF__PrimitiveBlock * -osmpbf__primitive_block__unpack -(ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data) { - return (OSMPBF__PrimitiveBlock *) - protobuf_c_message_unpack (&osmpbf__primitive_block__descriptor, - allocator, len, data); -} -void osmpbf__primitive_block__free_unpacked -(OSMPBF__PrimitiveBlock *message, - ProtobufCAllocator *allocator) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__primitive_block__descriptor); - protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); -} -void osmpbf__primitive_group__init -(OSMPBF__PrimitiveGroup *message) { - static OSMPBF__PrimitiveGroup init_value = OSMPBF__PRIMITIVE_GROUP__INIT; - *message = init_value; -} -size_t osmpbf__primitive_group__get_packed_size -(const OSMPBF__PrimitiveGroup *message) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__primitive_group__descriptor); - return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); -} -size_t osmpbf__primitive_group__pack -(const OSMPBF__PrimitiveGroup *message, - uint8_t *out) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__primitive_group__descriptor); - return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); -} -size_t osmpbf__primitive_group__pack_to_buffer -(const OSMPBF__PrimitiveGroup *message, - ProtobufCBuffer *buffer) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__primitive_group__descriptor); - return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); -} -OSMPBF__PrimitiveGroup * -osmpbf__primitive_group__unpack -(ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data) { - return (OSMPBF__PrimitiveGroup *) - protobuf_c_message_unpack (&osmpbf__primitive_group__descriptor, - allocator, len, data); -} -void osmpbf__primitive_group__free_unpacked -(OSMPBF__PrimitiveGroup *message, - ProtobufCAllocator *allocator) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__primitive_group__descriptor); - protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); -} -void osmpbf__string_table__init -(OSMPBF__StringTable *message) { - static OSMPBF__StringTable init_value = OSMPBF__STRING_TABLE__INIT; - *message = init_value; -} -size_t osmpbf__string_table__get_packed_size -(const OSMPBF__StringTable *message) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__string_table__descriptor); - return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); -} -size_t osmpbf__string_table__pack -(const OSMPBF__StringTable *message, - uint8_t *out) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__string_table__descriptor); - return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); -} -size_t osmpbf__string_table__pack_to_buffer -(const OSMPBF__StringTable *message, - ProtobufCBuffer *buffer) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__string_table__descriptor); - return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); -} -OSMPBF__StringTable * -osmpbf__string_table__unpack -(ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data) { - return (OSMPBF__StringTable *) - protobuf_c_message_unpack (&osmpbf__string_table__descriptor, - allocator, len, data); -} -void osmpbf__string_table__free_unpacked -(OSMPBF__StringTable *message, - ProtobufCAllocator *allocator) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__string_table__descriptor); - protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); -} -void osmpbf__info__init -(OSMPBF__Info *message) { - static OSMPBF__Info init_value = OSMPBF__INFO__INIT; - *message = init_value; -} -size_t osmpbf__info__get_packed_size -(const OSMPBF__Info *message) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__info__descriptor); - return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); -} -size_t osmpbf__info__pack -(const OSMPBF__Info *message, - uint8_t *out) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__info__descriptor); - return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); -} -size_t osmpbf__info__pack_to_buffer -(const OSMPBF__Info *message, - ProtobufCBuffer *buffer) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__info__descriptor); - return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); -} -OSMPBF__Info * -osmpbf__info__unpack -(ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data) { - return (OSMPBF__Info *) - protobuf_c_message_unpack (&osmpbf__info__descriptor, - allocator, len, data); -} -void osmpbf__info__free_unpacked -(OSMPBF__Info *message, - ProtobufCAllocator *allocator) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__info__descriptor); - protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); -} -void osmpbf__dense_info__init -(OSMPBF__DenseInfo *message) { - static OSMPBF__DenseInfo init_value = OSMPBF__DENSE_INFO__INIT; - *message = init_value; -} -size_t osmpbf__dense_info__get_packed_size -(const OSMPBF__DenseInfo *message) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__dense_info__descriptor); - return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); -} -size_t osmpbf__dense_info__pack -(const OSMPBF__DenseInfo *message, - uint8_t *out) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__dense_info__descriptor); - return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); -} -size_t osmpbf__dense_info__pack_to_buffer -(const OSMPBF__DenseInfo *message, - ProtobufCBuffer *buffer) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__dense_info__descriptor); - return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); -} -OSMPBF__DenseInfo * -osmpbf__dense_info__unpack -(ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data) { - return (OSMPBF__DenseInfo *) - protobuf_c_message_unpack (&osmpbf__dense_info__descriptor, - allocator, len, data); -} -void osmpbf__dense_info__free_unpacked -(OSMPBF__DenseInfo *message, - ProtobufCAllocator *allocator) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__dense_info__descriptor); - protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); -} -void osmpbf__change_set__init -(OSMPBF__ChangeSet *message) { - static OSMPBF__ChangeSet init_value = OSMPBF__CHANGE_SET__INIT; - *message = init_value; -} -size_t osmpbf__change_set__get_packed_size -(const OSMPBF__ChangeSet *message) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__change_set__descriptor); - return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); -} -size_t osmpbf__change_set__pack -(const OSMPBF__ChangeSet *message, - uint8_t *out) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__change_set__descriptor); - return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); -} -size_t osmpbf__change_set__pack_to_buffer -(const OSMPBF__ChangeSet *message, - ProtobufCBuffer *buffer) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__change_set__descriptor); - return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); -} -OSMPBF__ChangeSet * -osmpbf__change_set__unpack -(ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data) { - return (OSMPBF__ChangeSet *) - protobuf_c_message_unpack (&osmpbf__change_set__descriptor, - allocator, len, data); -} -void osmpbf__change_set__free_unpacked -(OSMPBF__ChangeSet *message, - ProtobufCAllocator *allocator) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__change_set__descriptor); - protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); -} -void osmpbf__node__init -(OSMPBF__Node *message) { - static OSMPBF__Node init_value = OSMPBF__NODE__INIT; - *message = init_value; -} -size_t osmpbf__node__get_packed_size -(const OSMPBF__Node *message) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__node__descriptor); - return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); -} -size_t osmpbf__node__pack -(const OSMPBF__Node *message, - uint8_t *out) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__node__descriptor); - return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); -} -size_t osmpbf__node__pack_to_buffer -(const OSMPBF__Node *message, - ProtobufCBuffer *buffer) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__node__descriptor); - return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); -} -OSMPBF__Node * -osmpbf__node__unpack -(ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data) { - return (OSMPBF__Node *) - protobuf_c_message_unpack (&osmpbf__node__descriptor, - allocator, len, data); -} -void osmpbf__node__free_unpacked -(OSMPBF__Node *message, - ProtobufCAllocator *allocator) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__node__descriptor); - protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); -} -void osmpbf__dense_nodes__init -(OSMPBF__DenseNodes *message) { - static OSMPBF__DenseNodes init_value = OSMPBF__DENSE_NODES__INIT; - *message = init_value; -} -size_t osmpbf__dense_nodes__get_packed_size -(const OSMPBF__DenseNodes *message) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__dense_nodes__descriptor); - return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); -} -size_t osmpbf__dense_nodes__pack -(const OSMPBF__DenseNodes *message, - uint8_t *out) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__dense_nodes__descriptor); - return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); -} -size_t osmpbf__dense_nodes__pack_to_buffer -(const OSMPBF__DenseNodes *message, - ProtobufCBuffer *buffer) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__dense_nodes__descriptor); - return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); -} -OSMPBF__DenseNodes * -osmpbf__dense_nodes__unpack -(ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data) { - return (OSMPBF__DenseNodes *) - protobuf_c_message_unpack (&osmpbf__dense_nodes__descriptor, - allocator, len, data); -} -void osmpbf__dense_nodes__free_unpacked -(OSMPBF__DenseNodes *message, - ProtobufCAllocator *allocator) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__dense_nodes__descriptor); - protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); -} -void osmpbf__way__init -(OSMPBF__Way *message) { - static OSMPBF__Way init_value = OSMPBF__WAY__INIT; - *message = init_value; -} -size_t osmpbf__way__get_packed_size -(const OSMPBF__Way *message) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__way__descriptor); - return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); -} -size_t osmpbf__way__pack -(const OSMPBF__Way *message, - uint8_t *out) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__way__descriptor); - return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); -} -size_t osmpbf__way__pack_to_buffer -(const OSMPBF__Way *message, - ProtobufCBuffer *buffer) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__way__descriptor); - return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); -} -OSMPBF__Way * -osmpbf__way__unpack -(ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data) { - return (OSMPBF__Way *) - protobuf_c_message_unpack (&osmpbf__way__descriptor, - allocator, len, data); -} -void osmpbf__way__free_unpacked -(OSMPBF__Way *message, - ProtobufCAllocator *allocator) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__way__descriptor); - protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); -} -void osmpbf__relation__init -(OSMPBF__Relation *message) { - static OSMPBF__Relation init_value = OSMPBF__RELATION__INIT; - *message = init_value; -} -size_t osmpbf__relation__get_packed_size -(const OSMPBF__Relation *message) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__relation__descriptor); - return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message)); -} -size_t osmpbf__relation__pack -(const OSMPBF__Relation *message, - uint8_t *out) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__relation__descriptor); - return protobuf_c_message_pack ((const ProtobufCMessage*)message, out); -} -size_t osmpbf__relation__pack_to_buffer -(const OSMPBF__Relation *message, - ProtobufCBuffer *buffer) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__relation__descriptor); - return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer); -} -OSMPBF__Relation * -osmpbf__relation__unpack -(ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data) { - return (OSMPBF__Relation *) - protobuf_c_message_unpack (&osmpbf__relation__descriptor, - allocator, len, data); -} -void osmpbf__relation__free_unpacked -(OSMPBF__Relation *message, - ProtobufCAllocator *allocator) { - PROTOBUF_C_ASSERT (message->base.descriptor == &osmpbf__relation__descriptor); - protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator); -} -static const ProtobufCFieldDescriptor osmpbf__header_block__field_descriptors[5] = { - { - "bbox", - 1, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_MESSAGE, - 0, /* quantifier_offset */ - PROTOBUF_C_OFFSETOF(OSMPBF__HeaderBlock, bbox), - &osmpbf__header_bbox__descriptor, - NULL, - 0, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "required_features", - 4, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_STRING, - PROTOBUF_C_OFFSETOF(OSMPBF__HeaderBlock, n_required_features), - PROTOBUF_C_OFFSETOF(OSMPBF__HeaderBlock, required_features), - NULL, - NULL, - 0, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "optional_features", - 5, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_STRING, - PROTOBUF_C_OFFSETOF(OSMPBF__HeaderBlock, n_optional_features), - PROTOBUF_C_OFFSETOF(OSMPBF__HeaderBlock, optional_features), - NULL, - NULL, - 0, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "writingprogram", - 16, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_STRING, - 0, /* quantifier_offset */ - PROTOBUF_C_OFFSETOF(OSMPBF__HeaderBlock, writingprogram), - NULL, - NULL, - 0, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "source", - 17, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_STRING, - 0, /* quantifier_offset */ - PROTOBUF_C_OFFSETOF(OSMPBF__HeaderBlock, source), - NULL, - NULL, - 0, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned osmpbf__header_block__field_indices_by_name[] = { - 0, /* field[0] = bbox */ - 2, /* field[2] = optional_features */ - 1, /* field[1] = required_features */ - 4, /* field[4] = source */ - 3, /* field[3] = writingprogram */ -}; -static const ProtobufCIntRange osmpbf__header_block__number_ranges[3 + 1] = { - { 1, 0 }, - { 4, 1 }, - { 16, 3 }, - { 0, 5 } -}; -const ProtobufCMessageDescriptor osmpbf__header_block__descriptor = { - PROTOBUF_C_MESSAGE_DESCRIPTOR_MAGIC, - "OSMPBF.HeaderBlock", - "HeaderBlock", - "OSMPBF__HeaderBlock", - "OSMPBF", - sizeof(OSMPBF__HeaderBlock), - 5, - osmpbf__header_block__field_descriptors, - osmpbf__header_block__field_indices_by_name, - 3, osmpbf__header_block__number_ranges, - (ProtobufCMessageInit) osmpbf__header_block__init, - NULL,NULL,NULL /* reserved[123] */ -}; -static const ProtobufCFieldDescriptor osmpbf__header_bbox__field_descriptors[4] = { - { - "left", - 1, - PROTOBUF_C_LABEL_REQUIRED, - PROTOBUF_C_TYPE_SINT64, - 0, /* quantifier_offset */ - PROTOBUF_C_OFFSETOF(OSMPBF__HeaderBBox, left), - NULL, - NULL, - 0, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "right", - 2, - PROTOBUF_C_LABEL_REQUIRED, - PROTOBUF_C_TYPE_SINT64, - 0, /* quantifier_offset */ - PROTOBUF_C_OFFSETOF(OSMPBF__HeaderBBox, right), - NULL, - NULL, - 0, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "top", - 3, - PROTOBUF_C_LABEL_REQUIRED, - PROTOBUF_C_TYPE_SINT64, - 0, /* quantifier_offset */ - PROTOBUF_C_OFFSETOF(OSMPBF__HeaderBBox, top), - NULL, - NULL, - 0, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "bottom", - 4, - PROTOBUF_C_LABEL_REQUIRED, - PROTOBUF_C_TYPE_SINT64, - 0, /* quantifier_offset */ - PROTOBUF_C_OFFSETOF(OSMPBF__HeaderBBox, bottom), - NULL, - NULL, - 0, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned osmpbf__header_bbox__field_indices_by_name[] = { - 3, /* field[3] = bottom */ - 0, /* field[0] = left */ - 1, /* field[1] = right */ - 2, /* field[2] = top */ -}; -static const ProtobufCIntRange osmpbf__header_bbox__number_ranges[1 + 1] = { - { 1, 0 }, - { 0, 4 } -}; -const ProtobufCMessageDescriptor osmpbf__header_bbox__descriptor = { - PROTOBUF_C_MESSAGE_DESCRIPTOR_MAGIC, - "OSMPBF.HeaderBBox", - "HeaderBBox", - "OSMPBF__HeaderBBox", - "OSMPBF", - sizeof(OSMPBF__HeaderBBox), - 4, - osmpbf__header_bbox__field_descriptors, - osmpbf__header_bbox__field_indices_by_name, - 1, osmpbf__header_bbox__number_ranges, - (ProtobufCMessageInit) osmpbf__header_bbox__init, - NULL,NULL,NULL /* reserved[123] */ -}; -static const int32_t osmpbf__primitive_block__granularity__default_value = 100; -static const int64_t osmpbf__primitive_block__lat_offset__default_value = 0; -static const int64_t osmpbf__primitive_block__lon_offset__default_value = 0; -static const int32_t osmpbf__primitive_block__date_granularity__default_value = 1000; -static const ProtobufCFieldDescriptor osmpbf__primitive_block__field_descriptors[6] = { - { - "stringtable", - 1, - PROTOBUF_C_LABEL_REQUIRED, - PROTOBUF_C_TYPE_MESSAGE, - 0, /* quantifier_offset */ - PROTOBUF_C_OFFSETOF(OSMPBF__PrimitiveBlock, stringtable), - &osmpbf__string_table__descriptor, - NULL, - 0, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "primitivegroup", - 2, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_MESSAGE, - PROTOBUF_C_OFFSETOF(OSMPBF__PrimitiveBlock, n_primitivegroup), - PROTOBUF_C_OFFSETOF(OSMPBF__PrimitiveBlock, primitivegroup), - &osmpbf__primitive_group__descriptor, - NULL, - 0, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "granularity", - 17, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_INT32, - PROTOBUF_C_OFFSETOF(OSMPBF__PrimitiveBlock, has_granularity), - PROTOBUF_C_OFFSETOF(OSMPBF__PrimitiveBlock, granularity), - NULL, - &osmpbf__primitive_block__granularity__default_value, - 0, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "date_granularity", - 18, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_INT32, - PROTOBUF_C_OFFSETOF(OSMPBF__PrimitiveBlock, has_date_granularity), - PROTOBUF_C_OFFSETOF(OSMPBF__PrimitiveBlock, date_granularity), - NULL, - &osmpbf__primitive_block__date_granularity__default_value, - 0, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "lat_offset", - 19, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_INT64, - PROTOBUF_C_OFFSETOF(OSMPBF__PrimitiveBlock, has_lat_offset), - PROTOBUF_C_OFFSETOF(OSMPBF__PrimitiveBlock, lat_offset), - NULL, - &osmpbf__primitive_block__lat_offset__default_value, - 0, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "lon_offset", - 20, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_INT64, - PROTOBUF_C_OFFSETOF(OSMPBF__PrimitiveBlock, has_lon_offset), - PROTOBUF_C_OFFSETOF(OSMPBF__PrimitiveBlock, lon_offset), - NULL, - &osmpbf__primitive_block__lon_offset__default_value, - 0, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned osmpbf__primitive_block__field_indices_by_name[] = { - 3, /* field[3] = date_granularity */ - 2, /* field[2] = granularity */ - 4, /* field[4] = lat_offset */ - 5, /* field[5] = lon_offset */ - 1, /* field[1] = primitivegroup */ - 0, /* field[0] = stringtable */ -}; -static const ProtobufCIntRange osmpbf__primitive_block__number_ranges[2 + 1] = { - { 1, 0 }, - { 17, 2 }, - { 0, 6 } -}; -const ProtobufCMessageDescriptor osmpbf__primitive_block__descriptor = { - PROTOBUF_C_MESSAGE_DESCRIPTOR_MAGIC, - "OSMPBF.PrimitiveBlock", - "PrimitiveBlock", - "OSMPBF__PrimitiveBlock", - "OSMPBF", - sizeof(OSMPBF__PrimitiveBlock), - 6, - osmpbf__primitive_block__field_descriptors, - osmpbf__primitive_block__field_indices_by_name, - 2, osmpbf__primitive_block__number_ranges, - (ProtobufCMessageInit) osmpbf__primitive_block__init, - NULL,NULL,NULL /* reserved[123] */ -}; -static const ProtobufCFieldDescriptor osmpbf__primitive_group__field_descriptors[5] = { - { - "nodes", - 1, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_MESSAGE, - PROTOBUF_C_OFFSETOF(OSMPBF__PrimitiveGroup, n_nodes), - PROTOBUF_C_OFFSETOF(OSMPBF__PrimitiveGroup, nodes), - &osmpbf__node__descriptor, - NULL, - 0, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "dense", - 2, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_MESSAGE, - 0, /* quantifier_offset */ - PROTOBUF_C_OFFSETOF(OSMPBF__PrimitiveGroup, dense), - &osmpbf__dense_nodes__descriptor, - NULL, - 0, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "ways", - 3, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_MESSAGE, - PROTOBUF_C_OFFSETOF(OSMPBF__PrimitiveGroup, n_ways), - PROTOBUF_C_OFFSETOF(OSMPBF__PrimitiveGroup, ways), - &osmpbf__way__descriptor, - NULL, - 0, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "relations", - 4, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_MESSAGE, - PROTOBUF_C_OFFSETOF(OSMPBF__PrimitiveGroup, n_relations), - PROTOBUF_C_OFFSETOF(OSMPBF__PrimitiveGroup, relations), - &osmpbf__relation__descriptor, - NULL, - 0, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "changesets", - 5, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_MESSAGE, - PROTOBUF_C_OFFSETOF(OSMPBF__PrimitiveGroup, n_changesets), - PROTOBUF_C_OFFSETOF(OSMPBF__PrimitiveGroup, changesets), - &osmpbf__change_set__descriptor, - NULL, - 0, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned osmpbf__primitive_group__field_indices_by_name[] = { - 4, /* field[4] = changesets */ - 1, /* field[1] = dense */ - 0, /* field[0] = nodes */ - 3, /* field[3] = relations */ - 2, /* field[2] = ways */ -}; -static const ProtobufCIntRange osmpbf__primitive_group__number_ranges[1 + 1] = { - { 1, 0 }, - { 0, 5 } -}; -const ProtobufCMessageDescriptor osmpbf__primitive_group__descriptor = { - PROTOBUF_C_MESSAGE_DESCRIPTOR_MAGIC, - "OSMPBF.PrimitiveGroup", - "PrimitiveGroup", - "OSMPBF__PrimitiveGroup", - "OSMPBF", - sizeof(OSMPBF__PrimitiveGroup), - 5, - osmpbf__primitive_group__field_descriptors, - osmpbf__primitive_group__field_indices_by_name, - 1, osmpbf__primitive_group__number_ranges, - (ProtobufCMessageInit) osmpbf__primitive_group__init, - NULL,NULL,NULL /* reserved[123] */ -}; -static const ProtobufCFieldDescriptor osmpbf__string_table__field_descriptors[1] = { - { - "s", - 1, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_BYTES, - PROTOBUF_C_OFFSETOF(OSMPBF__StringTable, n_s), - PROTOBUF_C_OFFSETOF(OSMPBF__StringTable, s), - NULL, - NULL, - 0, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned osmpbf__string_table__field_indices_by_name[] = { - 0, /* field[0] = s */ -}; -static const ProtobufCIntRange osmpbf__string_table__number_ranges[1 + 1] = { - { 1, 0 }, - { 0, 1 } -}; -const ProtobufCMessageDescriptor osmpbf__string_table__descriptor = { - PROTOBUF_C_MESSAGE_DESCRIPTOR_MAGIC, - "OSMPBF.StringTable", - "StringTable", - "OSMPBF__StringTable", - "OSMPBF", - sizeof(OSMPBF__StringTable), - 1, - osmpbf__string_table__field_descriptors, - osmpbf__string_table__field_indices_by_name, - 1, osmpbf__string_table__number_ranges, - (ProtobufCMessageInit) osmpbf__string_table__init, - NULL,NULL,NULL /* reserved[123] */ -}; -static const int32_t osmpbf__info__version__default_value = -1; -static const ProtobufCFieldDescriptor osmpbf__info__field_descriptors[5] = { - { - "version", - 1, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_INT32, - PROTOBUF_C_OFFSETOF(OSMPBF__Info, has_version), - PROTOBUF_C_OFFSETOF(OSMPBF__Info, version), - NULL, - &osmpbf__info__version__default_value, - 0, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "timestamp", - 2, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_INT64, - PROTOBUF_C_OFFSETOF(OSMPBF__Info, has_timestamp), - PROTOBUF_C_OFFSETOF(OSMPBF__Info, timestamp), - NULL, - NULL, - 0, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "changeset", - 3, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_INT64, - PROTOBUF_C_OFFSETOF(OSMPBF__Info, has_changeset), - PROTOBUF_C_OFFSETOF(OSMPBF__Info, changeset), - NULL, - NULL, - 0, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "uid", - 4, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_INT32, - PROTOBUF_C_OFFSETOF(OSMPBF__Info, has_uid), - PROTOBUF_C_OFFSETOF(OSMPBF__Info, uid), - NULL, - NULL, - 0, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "user_sid", - 5, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_UINT32, - PROTOBUF_C_OFFSETOF(OSMPBF__Info, has_user_sid), - PROTOBUF_C_OFFSETOF(OSMPBF__Info, user_sid), - NULL, - NULL, - 0, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned osmpbf__info__field_indices_by_name[] = { - 2, /* field[2] = changeset */ - 1, /* field[1] = timestamp */ - 3, /* field[3] = uid */ - 4, /* field[4] = user_sid */ - 0, /* field[0] = version */ -}; -static const ProtobufCIntRange osmpbf__info__number_ranges[1 + 1] = { - { 1, 0 }, - { 0, 5 } -}; -const ProtobufCMessageDescriptor osmpbf__info__descriptor = { - PROTOBUF_C_MESSAGE_DESCRIPTOR_MAGIC, - "OSMPBF.Info", - "Info", - "OSMPBF__Info", - "OSMPBF", - sizeof(OSMPBF__Info), - 5, - osmpbf__info__field_descriptors, - osmpbf__info__field_indices_by_name, - 1, osmpbf__info__number_ranges, - (ProtobufCMessageInit) osmpbf__info__init, - NULL,NULL,NULL /* reserved[123] */ -}; -static const ProtobufCFieldDescriptor osmpbf__dense_info__field_descriptors[5] = { - { - "version", - 1, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_INT32, - PROTOBUF_C_OFFSETOF(OSMPBF__DenseInfo, n_version), - PROTOBUF_C_OFFSETOF(OSMPBF__DenseInfo, version), - NULL, - NULL, - 1, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "timestamp", - 2, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_SINT64, - PROTOBUF_C_OFFSETOF(OSMPBF__DenseInfo, n_timestamp), - PROTOBUF_C_OFFSETOF(OSMPBF__DenseInfo, timestamp), - NULL, - NULL, - 1, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "changeset", - 3, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_SINT64, - PROTOBUF_C_OFFSETOF(OSMPBF__DenseInfo, n_changeset), - PROTOBUF_C_OFFSETOF(OSMPBF__DenseInfo, changeset), - NULL, - NULL, - 1, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "uid", - 4, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_SINT32, - PROTOBUF_C_OFFSETOF(OSMPBF__DenseInfo, n_uid), - PROTOBUF_C_OFFSETOF(OSMPBF__DenseInfo, uid), - NULL, - NULL, - 1, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "user_sid", - 5, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_SINT32, - PROTOBUF_C_OFFSETOF(OSMPBF__DenseInfo, n_user_sid), - PROTOBUF_C_OFFSETOF(OSMPBF__DenseInfo, user_sid), - NULL, - NULL, - 1, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned osmpbf__dense_info__field_indices_by_name[] = { - 2, /* field[2] = changeset */ - 1, /* field[1] = timestamp */ - 3, /* field[3] = uid */ - 4, /* field[4] = user_sid */ - 0, /* field[0] = version */ -}; -static const ProtobufCIntRange osmpbf__dense_info__number_ranges[1 + 1] = { - { 1, 0 }, - { 0, 5 } -}; -const ProtobufCMessageDescriptor osmpbf__dense_info__descriptor = { - PROTOBUF_C_MESSAGE_DESCRIPTOR_MAGIC, - "OSMPBF.DenseInfo", - "DenseInfo", - "OSMPBF__DenseInfo", - "OSMPBF", - sizeof(OSMPBF__DenseInfo), - 5, - osmpbf__dense_info__field_descriptors, - osmpbf__dense_info__field_indices_by_name, - 1, osmpbf__dense_info__number_ranges, - (ProtobufCMessageInit) osmpbf__dense_info__init, - NULL,NULL,NULL /* reserved[123] */ -}; -static const ProtobufCFieldDescriptor osmpbf__change_set__field_descriptors[1] = { - { - "id", - 1, - PROTOBUF_C_LABEL_REQUIRED, - PROTOBUF_C_TYPE_INT64, - 0, /* quantifier_offset */ - PROTOBUF_C_OFFSETOF(OSMPBF__ChangeSet, id), - NULL, - NULL, - 0, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned osmpbf__change_set__field_indices_by_name[] = { - 0, /* field[0] = id */ -}; -static const ProtobufCIntRange osmpbf__change_set__number_ranges[1 + 1] = { - { 1, 0 }, - { 0, 1 } -}; -const ProtobufCMessageDescriptor osmpbf__change_set__descriptor = { - PROTOBUF_C_MESSAGE_DESCRIPTOR_MAGIC, - "OSMPBF.ChangeSet", - "ChangeSet", - "OSMPBF__ChangeSet", - "OSMPBF", - sizeof(OSMPBF__ChangeSet), - 1, - osmpbf__change_set__field_descriptors, - osmpbf__change_set__field_indices_by_name, - 1, osmpbf__change_set__number_ranges, - (ProtobufCMessageInit) osmpbf__change_set__init, - NULL,NULL,NULL /* reserved[123] */ -}; -static const ProtobufCFieldDescriptor osmpbf__node__field_descriptors[6] = { - { - "id", - 1, - PROTOBUF_C_LABEL_REQUIRED, - PROTOBUF_C_TYPE_SINT64, - 0, /* quantifier_offset */ - PROTOBUF_C_OFFSETOF(OSMPBF__Node, id), - NULL, - NULL, - 0, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "keys", - 2, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_UINT32, - PROTOBUF_C_OFFSETOF(OSMPBF__Node, n_keys), - PROTOBUF_C_OFFSETOF(OSMPBF__Node, keys), - NULL, - NULL, - 1, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "vals", - 3, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_UINT32, - PROTOBUF_C_OFFSETOF(OSMPBF__Node, n_vals), - PROTOBUF_C_OFFSETOF(OSMPBF__Node, vals), - NULL, - NULL, - 1, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "info", - 4, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_MESSAGE, - 0, /* quantifier_offset */ - PROTOBUF_C_OFFSETOF(OSMPBF__Node, info), - &osmpbf__info__descriptor, - NULL, - 0, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "lat", - 8, - PROTOBUF_C_LABEL_REQUIRED, - PROTOBUF_C_TYPE_SINT64, - 0, /* quantifier_offset */ - PROTOBUF_C_OFFSETOF(OSMPBF__Node, lat), - NULL, - NULL, - 0, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "lon", - 9, - PROTOBUF_C_LABEL_REQUIRED, - PROTOBUF_C_TYPE_SINT64, - 0, /* quantifier_offset */ - PROTOBUF_C_OFFSETOF(OSMPBF__Node, lon), - NULL, - NULL, - 0, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned osmpbf__node__field_indices_by_name[] = { - 0, /* field[0] = id */ - 3, /* field[3] = info */ - 1, /* field[1] = keys */ - 4, /* field[4] = lat */ - 5, /* field[5] = lon */ - 2, /* field[2] = vals */ -}; -static const ProtobufCIntRange osmpbf__node__number_ranges[2 + 1] = { - { 1, 0 }, - { 8, 4 }, - { 0, 6 } -}; -const ProtobufCMessageDescriptor osmpbf__node__descriptor = { - PROTOBUF_C_MESSAGE_DESCRIPTOR_MAGIC, - "OSMPBF.Node", - "Node", - "OSMPBF__Node", - "OSMPBF", - sizeof(OSMPBF__Node), - 6, - osmpbf__node__field_descriptors, - osmpbf__node__field_indices_by_name, - 2, osmpbf__node__number_ranges, - (ProtobufCMessageInit) osmpbf__node__init, - NULL,NULL,NULL /* reserved[123] */ -}; -static const ProtobufCFieldDescriptor osmpbf__dense_nodes__field_descriptors[5] = { - { - "id", - 1, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_SINT64, - PROTOBUF_C_OFFSETOF(OSMPBF__DenseNodes, n_id), - PROTOBUF_C_OFFSETOF(OSMPBF__DenseNodes, id), - NULL, - NULL, - 1, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "denseinfo", - 5, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_MESSAGE, - 0, /* quantifier_offset */ - PROTOBUF_C_OFFSETOF(OSMPBF__DenseNodes, denseinfo), - &osmpbf__dense_info__descriptor, - NULL, - 0, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "lat", - 8, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_SINT64, - PROTOBUF_C_OFFSETOF(OSMPBF__DenseNodes, n_lat), - PROTOBUF_C_OFFSETOF(OSMPBF__DenseNodes, lat), - NULL, - NULL, - 1, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "lon", - 9, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_SINT64, - PROTOBUF_C_OFFSETOF(OSMPBF__DenseNodes, n_lon), - PROTOBUF_C_OFFSETOF(OSMPBF__DenseNodes, lon), - NULL, - NULL, - 1, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "keys_vals", - 10, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_INT32, - PROTOBUF_C_OFFSETOF(OSMPBF__DenseNodes, n_keys_vals), - PROTOBUF_C_OFFSETOF(OSMPBF__DenseNodes, keys_vals), - NULL, - NULL, - 1, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned osmpbf__dense_nodes__field_indices_by_name[] = { - 1, /* field[1] = denseinfo */ - 0, /* field[0] = id */ - 4, /* field[4] = keys_vals */ - 2, /* field[2] = lat */ - 3, /* field[3] = lon */ -}; -static const ProtobufCIntRange osmpbf__dense_nodes__number_ranges[3 + 1] = { - { 1, 0 }, - { 5, 1 }, - { 8, 2 }, - { 0, 5 } -}; -const ProtobufCMessageDescriptor osmpbf__dense_nodes__descriptor = { - PROTOBUF_C_MESSAGE_DESCRIPTOR_MAGIC, - "OSMPBF.DenseNodes", - "DenseNodes", - "OSMPBF__DenseNodes", - "OSMPBF", - sizeof(OSMPBF__DenseNodes), - 5, - osmpbf__dense_nodes__field_descriptors, - osmpbf__dense_nodes__field_indices_by_name, - 3, osmpbf__dense_nodes__number_ranges, - (ProtobufCMessageInit) osmpbf__dense_nodes__init, - NULL,NULL,NULL /* reserved[123] */ -}; -static const ProtobufCFieldDescriptor osmpbf__way__field_descriptors[5] = { - { - "id", - 1, - PROTOBUF_C_LABEL_REQUIRED, - PROTOBUF_C_TYPE_INT64, - 0, /* quantifier_offset */ - PROTOBUF_C_OFFSETOF(OSMPBF__Way, id), - NULL, - NULL, - 0, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "keys", - 2, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_UINT32, - PROTOBUF_C_OFFSETOF(OSMPBF__Way, n_keys), - PROTOBUF_C_OFFSETOF(OSMPBF__Way, keys), - NULL, - NULL, - 1, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "vals", - 3, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_UINT32, - PROTOBUF_C_OFFSETOF(OSMPBF__Way, n_vals), - PROTOBUF_C_OFFSETOF(OSMPBF__Way, vals), - NULL, - NULL, - 1, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "info", - 4, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_MESSAGE, - 0, /* quantifier_offset */ - PROTOBUF_C_OFFSETOF(OSMPBF__Way, info), - &osmpbf__info__descriptor, - NULL, - 0, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "refs", - 8, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_SINT64, - PROTOBUF_C_OFFSETOF(OSMPBF__Way, n_refs), - PROTOBUF_C_OFFSETOF(OSMPBF__Way, refs), - NULL, - NULL, - 1, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned osmpbf__way__field_indices_by_name[] = { - 0, /* field[0] = id */ - 3, /* field[3] = info */ - 1, /* field[1] = keys */ - 4, /* field[4] = refs */ - 2, /* field[2] = vals */ -}; -static const ProtobufCIntRange osmpbf__way__number_ranges[2 + 1] = { - { 1, 0 }, - { 8, 4 }, - { 0, 5 } -}; -const ProtobufCMessageDescriptor osmpbf__way__descriptor = { - PROTOBUF_C_MESSAGE_DESCRIPTOR_MAGIC, - "OSMPBF.Way", - "Way", - "OSMPBF__Way", - "OSMPBF", - sizeof(OSMPBF__Way), - 5, - osmpbf__way__field_descriptors, - osmpbf__way__field_indices_by_name, - 2, osmpbf__way__number_ranges, - (ProtobufCMessageInit) osmpbf__way__init, - NULL,NULL,NULL /* reserved[123] */ -}; -const ProtobufCEnumValue osmpbf__relation__member_type__enum_values_by_number[3] = { - { "NODE", "OSMPBF__RELATION__MEMBER_TYPE__NODE", 0 }, - { "WAY", "OSMPBF__RELATION__MEMBER_TYPE__WAY", 1 }, - { "RELATION", "OSMPBF__RELATION__MEMBER_TYPE__RELATION", 2 }, -}; -static const ProtobufCIntRange osmpbf__relation__member_type__value_ranges[] = { - {0, 0},{0, 3} -}; -const ProtobufCEnumValueIndex osmpbf__relation__member_type__enum_values_by_name[3] = { - { "NODE", 0 }, - { "RELATION", 2 }, - { "WAY", 1 }, -}; -const ProtobufCEnumDescriptor osmpbf__relation__member_type__descriptor = { - PROTOBUF_C_ENUM_DESCRIPTOR_MAGIC, - "OSMPBF.Relation.MemberType", - "MemberType", - "OSMPBF__Relation__MemberType", - "OSMPBF", - 3, - osmpbf__relation__member_type__enum_values_by_number, - 3, - osmpbf__relation__member_type__enum_values_by_name, - 1, - osmpbf__relation__member_type__value_ranges, - NULL,NULL,NULL,NULL /* reserved[1234] */ -}; -static const ProtobufCFieldDescriptor osmpbf__relation__field_descriptors[7] = { - { - "id", - 1, - PROTOBUF_C_LABEL_REQUIRED, - PROTOBUF_C_TYPE_INT64, - 0, /* quantifier_offset */ - PROTOBUF_C_OFFSETOF(OSMPBF__Relation, id), - NULL, - NULL, - 0, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "keys", - 2, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_UINT32, - PROTOBUF_C_OFFSETOF(OSMPBF__Relation, n_keys), - PROTOBUF_C_OFFSETOF(OSMPBF__Relation, keys), - NULL, - NULL, - 1, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "vals", - 3, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_UINT32, - PROTOBUF_C_OFFSETOF(OSMPBF__Relation, n_vals), - PROTOBUF_C_OFFSETOF(OSMPBF__Relation, vals), - NULL, - NULL, - 1, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "info", - 4, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_TYPE_MESSAGE, - 0, /* quantifier_offset */ - PROTOBUF_C_OFFSETOF(OSMPBF__Relation, info), - &osmpbf__info__descriptor, - NULL, - 0, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "roles_sid", - 8, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_INT32, - PROTOBUF_C_OFFSETOF(OSMPBF__Relation, n_roles_sid), - PROTOBUF_C_OFFSETOF(OSMPBF__Relation, roles_sid), - NULL, - NULL, - 1, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "memids", - 9, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_SINT64, - PROTOBUF_C_OFFSETOF(OSMPBF__Relation, n_memids), - PROTOBUF_C_OFFSETOF(OSMPBF__Relation, memids), - NULL, - NULL, - 1, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, - { - "types", - 10, - PROTOBUF_C_LABEL_REPEATED, - PROTOBUF_C_TYPE_ENUM, - PROTOBUF_C_OFFSETOF(OSMPBF__Relation, n_types), - PROTOBUF_C_OFFSETOF(OSMPBF__Relation, types), - &osmpbf__relation__member_type__descriptor, - NULL, - 1, /* packed */ - 0,NULL,NULL /* reserved1,reserved2, etc */ - }, -}; -static const unsigned osmpbf__relation__field_indices_by_name[] = { - 0, /* field[0] = id */ - 3, /* field[3] = info */ - 1, /* field[1] = keys */ - 5, /* field[5] = memids */ - 4, /* field[4] = roles_sid */ - 6, /* field[6] = types */ - 2, /* field[2] = vals */ -}; -static const ProtobufCIntRange osmpbf__relation__number_ranges[2 + 1] = { - { 1, 0 }, - { 8, 4 }, - { 0, 7 } -}; -const ProtobufCMessageDescriptor osmpbf__relation__descriptor = { - PROTOBUF_C_MESSAGE_DESCRIPTOR_MAGIC, - "OSMPBF.Relation", - "Relation", - "OSMPBF__Relation", - "OSMPBF", - sizeof(OSMPBF__Relation), - 7, - osmpbf__relation__field_descriptors, - osmpbf__relation__field_indices_by_name, - 2, osmpbf__relation__number_ranges, - (ProtobufCMessageInit) osmpbf__relation__init, - NULL,NULL,NULL /* reserved[123] */ -}; diff --git a/navit/maptool/generated-code/osmformat.pb-c.h b/navit/maptool/generated-code/osmformat.pb-c.h deleted file mode 100644 index 32ac75767..000000000 --- a/navit/maptool/generated-code/osmformat.pb-c.h +++ /dev/null @@ -1,523 +0,0 @@ -/* Generated by the protocol buffer compiler. DO NOT EDIT! */ - -#ifndef PROTOBUF_C_osmformat_2eproto__INCLUDED -#define PROTOBUF_C_osmformat_2eproto__INCLUDED - -#include <google/protobuf-c/protobuf-c.h> - -PROTOBUF_C_BEGIN_DECLS - - -typedef struct _OSMPBF__HeaderBlock OSMPBF__HeaderBlock; -typedef struct _OSMPBF__HeaderBBox OSMPBF__HeaderBBox; -typedef struct _OSMPBF__PrimitiveBlock OSMPBF__PrimitiveBlock; -typedef struct _OSMPBF__PrimitiveGroup OSMPBF__PrimitiveGroup; -typedef struct _OSMPBF__StringTable OSMPBF__StringTable; -typedef struct _OSMPBF__Info OSMPBF__Info; -typedef struct _OSMPBF__DenseInfo OSMPBF__DenseInfo; -typedef struct _OSMPBF__ChangeSet OSMPBF__ChangeSet; -typedef struct _OSMPBF__Node OSMPBF__Node; -typedef struct _OSMPBF__DenseNodes OSMPBF__DenseNodes; -typedef struct _OSMPBF__Way OSMPBF__Way; -typedef struct _OSMPBF__Relation OSMPBF__Relation; - - -/* --- enums --- */ - -typedef enum _OSMPBF__Relation__MemberType { - OSMPBF__RELATION__MEMBER_TYPE__NODE = 0, - OSMPBF__RELATION__MEMBER_TYPE__WAY = 1, - OSMPBF__RELATION__MEMBER_TYPE__RELATION = 2 -} OSMPBF__Relation__MemberType; - -/* --- messages --- */ - -struct _OSMPBF__HeaderBlock -{ - ProtobufCMessage base; - OSMPBF__HeaderBBox *bbox; - size_t n_required_features; - char **required_features; - size_t n_optional_features; - char **optional_features; - char *writingprogram; - char *source; -}; -#define OSMPBF__HEADER_BLOCK__INIT \ - { PROTOBUF_C_MESSAGE_INIT (&osmpbf__header_block__descriptor) \ - , NULL, 0,NULL, 0,NULL, NULL, NULL } - - -struct _OSMPBF__HeaderBBox -{ - ProtobufCMessage base; - int64_t left; - int64_t right; - int64_t top; - int64_t bottom; -}; -#define OSMPBF__HEADER_BBOX__INIT \ - { PROTOBUF_C_MESSAGE_INIT (&osmpbf__header_bbox__descriptor) \ - , 0, 0, 0, 0 } - - -struct _OSMPBF__PrimitiveBlock -{ - ProtobufCMessage base; - OSMPBF__StringTable *stringtable; - size_t n_primitivegroup; - OSMPBF__PrimitiveGroup **primitivegroup; - protobuf_c_boolean has_granularity; - int32_t granularity; - protobuf_c_boolean has_lat_offset; - int64_t lat_offset; - protobuf_c_boolean has_lon_offset; - int64_t lon_offset; - protobuf_c_boolean has_date_granularity; - int32_t date_granularity; -}; -#define OSMPBF__PRIMITIVE_BLOCK__INIT \ - { PROTOBUF_C_MESSAGE_INIT (&osmpbf__primitive_block__descriptor) \ - , NULL, 0,NULL, 0,100, 0,0, 0,0, 0,1000 } - - -struct _OSMPBF__PrimitiveGroup -{ - ProtobufCMessage base; - size_t n_nodes; - OSMPBF__Node **nodes; - OSMPBF__DenseNodes *dense; - size_t n_ways; - OSMPBF__Way **ways; - size_t n_relations; - OSMPBF__Relation **relations; - size_t n_changesets; - OSMPBF__ChangeSet **changesets; -}; -#define OSMPBF__PRIMITIVE_GROUP__INIT \ - { PROTOBUF_C_MESSAGE_INIT (&osmpbf__primitive_group__descriptor) \ - , 0,NULL, NULL, 0,NULL, 0,NULL, 0,NULL } - - -struct _OSMPBF__StringTable -{ - ProtobufCMessage base; - size_t n_s; - ProtobufCBinaryData *s; -}; -#define OSMPBF__STRING_TABLE__INIT \ - { PROTOBUF_C_MESSAGE_INIT (&osmpbf__string_table__descriptor) \ - , 0,NULL } - - -struct _OSMPBF__Info -{ - ProtobufCMessage base; - protobuf_c_boolean has_version; - int32_t version; - protobuf_c_boolean has_timestamp; - int64_t timestamp; - protobuf_c_boolean has_changeset; - int64_t changeset; - protobuf_c_boolean has_uid; - int32_t uid; - protobuf_c_boolean has_user_sid; - uint32_t user_sid; -}; -#define OSMPBF__INFO__INIT \ - { PROTOBUF_C_MESSAGE_INIT (&osmpbf__info__descriptor) \ - , 0,-1, 0,0, 0,0, 0,0, 0,0 } - - -struct _OSMPBF__DenseInfo -{ - ProtobufCMessage base; - size_t n_version; - int32_t *version; - size_t n_timestamp; - int64_t *timestamp; - size_t n_changeset; - int64_t *changeset; - size_t n_uid; - int32_t *uid; - size_t n_user_sid; - int32_t *user_sid; -}; -#define OSMPBF__DENSE_INFO__INIT \ - { PROTOBUF_C_MESSAGE_INIT (&osmpbf__dense_info__descriptor) \ - , 0,NULL, 0,NULL, 0,NULL, 0,NULL, 0,NULL } - - -struct _OSMPBF__ChangeSet -{ - ProtobufCMessage base; - int64_t id; -}; -#define OSMPBF__CHANGE_SET__INIT \ - { PROTOBUF_C_MESSAGE_INIT (&osmpbf__change_set__descriptor) \ - , 0 } - - -struct _OSMPBF__Node -{ - ProtobufCMessage base; - int64_t id; - size_t n_keys; - uint32_t *keys; - size_t n_vals; - uint32_t *vals; - OSMPBF__Info *info; - int64_t lat; - int64_t lon; -}; -#define OSMPBF__NODE__INIT \ - { PROTOBUF_C_MESSAGE_INIT (&osmpbf__node__descriptor) \ - , 0, 0,NULL, 0,NULL, NULL, 0, 0 } - - -struct _OSMPBF__DenseNodes -{ - ProtobufCMessage base; - size_t n_id; - int64_t *id; - OSMPBF__DenseInfo *denseinfo; - size_t n_lat; - int64_t *lat; - size_t n_lon; - int64_t *lon; - size_t n_keys_vals; - int32_t *keys_vals; -}; -#define OSMPBF__DENSE_NODES__INIT \ - { PROTOBUF_C_MESSAGE_INIT (&osmpbf__dense_nodes__descriptor) \ - , 0,NULL, NULL, 0,NULL, 0,NULL, 0,NULL } - - -struct _OSMPBF__Way -{ - ProtobufCMessage base; - int64_t id; - size_t n_keys; - uint32_t *keys; - size_t n_vals; - uint32_t *vals; - OSMPBF__Info *info; - size_t n_refs; - int64_t *refs; -}; -#define OSMPBF__WAY__INIT \ - { PROTOBUF_C_MESSAGE_INIT (&osmpbf__way__descriptor) \ - , 0, 0,NULL, 0,NULL, NULL, 0,NULL } - - -struct _OSMPBF__Relation -{ - ProtobufCMessage base; - int64_t id; - size_t n_keys; - uint32_t *keys; - size_t n_vals; - uint32_t *vals; - OSMPBF__Info *info; - size_t n_roles_sid; - int32_t *roles_sid; - size_t n_memids; - int64_t *memids; - size_t n_types; - OSMPBF__Relation__MemberType *types; -}; -#define OSMPBF__RELATION__INIT \ - { PROTOBUF_C_MESSAGE_INIT (&osmpbf__relation__descriptor) \ - , 0, 0,NULL, 0,NULL, NULL, 0,NULL, 0,NULL, 0,NULL } - - -/* OSMPBF__HeaderBlock methods */ -void osmpbf__header_block__init - (OSMPBF__HeaderBlock *message); -size_t osmpbf__header_block__get_packed_size - (const OSMPBF__HeaderBlock *message); -size_t osmpbf__header_block__pack - (const OSMPBF__HeaderBlock *message, - uint8_t *out); -size_t osmpbf__header_block__pack_to_buffer - (const OSMPBF__HeaderBlock *message, - ProtobufCBuffer *buffer); -OSMPBF__HeaderBlock * - osmpbf__header_block__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data); -void osmpbf__header_block__free_unpacked - (OSMPBF__HeaderBlock *message, - ProtobufCAllocator *allocator); -/* OSMPBF__HeaderBBox methods */ -void osmpbf__header_bbox__init - (OSMPBF__HeaderBBox *message); -size_t osmpbf__header_bbox__get_packed_size - (const OSMPBF__HeaderBBox *message); -size_t osmpbf__header_bbox__pack - (const OSMPBF__HeaderBBox *message, - uint8_t *out); -size_t osmpbf__header_bbox__pack_to_buffer - (const OSMPBF__HeaderBBox *message, - ProtobufCBuffer *buffer); -OSMPBF__HeaderBBox * - osmpbf__header_bbox__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data); -void osmpbf__header_bbox__free_unpacked - (OSMPBF__HeaderBBox *message, - ProtobufCAllocator *allocator); -/* OSMPBF__PrimitiveBlock methods */ -void osmpbf__primitive_block__init - (OSMPBF__PrimitiveBlock *message); -size_t osmpbf__primitive_block__get_packed_size - (const OSMPBF__PrimitiveBlock *message); -size_t osmpbf__primitive_block__pack - (const OSMPBF__PrimitiveBlock *message, - uint8_t *out); -size_t osmpbf__primitive_block__pack_to_buffer - (const OSMPBF__PrimitiveBlock *message, - ProtobufCBuffer *buffer); -OSMPBF__PrimitiveBlock * - osmpbf__primitive_block__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data); -void osmpbf__primitive_block__free_unpacked - (OSMPBF__PrimitiveBlock *message, - ProtobufCAllocator *allocator); -/* OSMPBF__PrimitiveGroup methods */ -void osmpbf__primitive_group__init - (OSMPBF__PrimitiveGroup *message); -size_t osmpbf__primitive_group__get_packed_size - (const OSMPBF__PrimitiveGroup *message); -size_t osmpbf__primitive_group__pack - (const OSMPBF__PrimitiveGroup *message, - uint8_t *out); -size_t osmpbf__primitive_group__pack_to_buffer - (const OSMPBF__PrimitiveGroup *message, - ProtobufCBuffer *buffer); -OSMPBF__PrimitiveGroup * - osmpbf__primitive_group__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data); -void osmpbf__primitive_group__free_unpacked - (OSMPBF__PrimitiveGroup *message, - ProtobufCAllocator *allocator); -/* OSMPBF__StringTable methods */ -void osmpbf__string_table__init - (OSMPBF__StringTable *message); -size_t osmpbf__string_table__get_packed_size - (const OSMPBF__StringTable *message); -size_t osmpbf__string_table__pack - (const OSMPBF__StringTable *message, - uint8_t *out); -size_t osmpbf__string_table__pack_to_buffer - (const OSMPBF__StringTable *message, - ProtobufCBuffer *buffer); -OSMPBF__StringTable * - osmpbf__string_table__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data); -void osmpbf__string_table__free_unpacked - (OSMPBF__StringTable *message, - ProtobufCAllocator *allocator); -/* OSMPBF__Info methods */ -void osmpbf__info__init - (OSMPBF__Info *message); -size_t osmpbf__info__get_packed_size - (const OSMPBF__Info *message); -size_t osmpbf__info__pack - (const OSMPBF__Info *message, - uint8_t *out); -size_t osmpbf__info__pack_to_buffer - (const OSMPBF__Info *message, - ProtobufCBuffer *buffer); -OSMPBF__Info * - osmpbf__info__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data); -void osmpbf__info__free_unpacked - (OSMPBF__Info *message, - ProtobufCAllocator *allocator); -/* OSMPBF__DenseInfo methods */ -void osmpbf__dense_info__init - (OSMPBF__DenseInfo *message); -size_t osmpbf__dense_info__get_packed_size - (const OSMPBF__DenseInfo *message); -size_t osmpbf__dense_info__pack - (const OSMPBF__DenseInfo *message, - uint8_t *out); -size_t osmpbf__dense_info__pack_to_buffer - (const OSMPBF__DenseInfo *message, - ProtobufCBuffer *buffer); -OSMPBF__DenseInfo * - osmpbf__dense_info__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data); -void osmpbf__dense_info__free_unpacked - (OSMPBF__DenseInfo *message, - ProtobufCAllocator *allocator); -/* OSMPBF__ChangeSet methods */ -void osmpbf__change_set__init - (OSMPBF__ChangeSet *message); -size_t osmpbf__change_set__get_packed_size - (const OSMPBF__ChangeSet *message); -size_t osmpbf__change_set__pack - (const OSMPBF__ChangeSet *message, - uint8_t *out); -size_t osmpbf__change_set__pack_to_buffer - (const OSMPBF__ChangeSet *message, - ProtobufCBuffer *buffer); -OSMPBF__ChangeSet * - osmpbf__change_set__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data); -void osmpbf__change_set__free_unpacked - (OSMPBF__ChangeSet *message, - ProtobufCAllocator *allocator); -/* OSMPBF__Node methods */ -void osmpbf__node__init - (OSMPBF__Node *message); -size_t osmpbf__node__get_packed_size - (const OSMPBF__Node *message); -size_t osmpbf__node__pack - (const OSMPBF__Node *message, - uint8_t *out); -size_t osmpbf__node__pack_to_buffer - (const OSMPBF__Node *message, - ProtobufCBuffer *buffer); -OSMPBF__Node * - osmpbf__node__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data); -void osmpbf__node__free_unpacked - (OSMPBF__Node *message, - ProtobufCAllocator *allocator); -/* OSMPBF__DenseNodes methods */ -void osmpbf__dense_nodes__init - (OSMPBF__DenseNodes *message); -size_t osmpbf__dense_nodes__get_packed_size - (const OSMPBF__DenseNodes *message); -size_t osmpbf__dense_nodes__pack - (const OSMPBF__DenseNodes *message, - uint8_t *out); -size_t osmpbf__dense_nodes__pack_to_buffer - (const OSMPBF__DenseNodes *message, - ProtobufCBuffer *buffer); -OSMPBF__DenseNodes * - osmpbf__dense_nodes__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data); -void osmpbf__dense_nodes__free_unpacked - (OSMPBF__DenseNodes *message, - ProtobufCAllocator *allocator); -/* OSMPBF__Way methods */ -void osmpbf__way__init - (OSMPBF__Way *message); -size_t osmpbf__way__get_packed_size - (const OSMPBF__Way *message); -size_t osmpbf__way__pack - (const OSMPBF__Way *message, - uint8_t *out); -size_t osmpbf__way__pack_to_buffer - (const OSMPBF__Way *message, - ProtobufCBuffer *buffer); -OSMPBF__Way * - osmpbf__way__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data); -void osmpbf__way__free_unpacked - (OSMPBF__Way *message, - ProtobufCAllocator *allocator); -/* OSMPBF__Relation methods */ -void osmpbf__relation__init - (OSMPBF__Relation *message); -size_t osmpbf__relation__get_packed_size - (const OSMPBF__Relation *message); -size_t osmpbf__relation__pack - (const OSMPBF__Relation *message, - uint8_t *out); -size_t osmpbf__relation__pack_to_buffer - (const OSMPBF__Relation *message, - ProtobufCBuffer *buffer); -OSMPBF__Relation * - osmpbf__relation__unpack - (ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data); -void osmpbf__relation__free_unpacked - (OSMPBF__Relation *message, - ProtobufCAllocator *allocator); -/* --- per-message closures --- */ - -typedef void (*OSMPBF__HeaderBlock_Closure) - (const OSMPBF__HeaderBlock *message, - void *closure_data); -typedef void (*OSMPBF__HeaderBBox_Closure) - (const OSMPBF__HeaderBBox *message, - void *closure_data); -typedef void (*OSMPBF__PrimitiveBlock_Closure) - (const OSMPBF__PrimitiveBlock *message, - void *closure_data); -typedef void (*OSMPBF__PrimitiveGroup_Closure) - (const OSMPBF__PrimitiveGroup *message, - void *closure_data); -typedef void (*OSMPBF__StringTable_Closure) - (const OSMPBF__StringTable *message, - void *closure_data); -typedef void (*OSMPBF__Info_Closure) - (const OSMPBF__Info *message, - void *closure_data); -typedef void (*OSMPBF__DenseInfo_Closure) - (const OSMPBF__DenseInfo *message, - void *closure_data); -typedef void (*OSMPBF__ChangeSet_Closure) - (const OSMPBF__ChangeSet *message, - void *closure_data); -typedef void (*OSMPBF__Node_Closure) - (const OSMPBF__Node *message, - void *closure_data); -typedef void (*OSMPBF__DenseNodes_Closure) - (const OSMPBF__DenseNodes *message, - void *closure_data); -typedef void (*OSMPBF__Way_Closure) - (const OSMPBF__Way *message, - void *closure_data); -typedef void (*OSMPBF__Relation_Closure) - (const OSMPBF__Relation *message, - void *closure_data); - -/* --- services --- */ - - -/* --- descriptors --- */ - -extern const ProtobufCMessageDescriptor osmpbf__header_block__descriptor; -extern const ProtobufCMessageDescriptor osmpbf__header_bbox__descriptor; -extern const ProtobufCMessageDescriptor osmpbf__primitive_block__descriptor; -extern const ProtobufCMessageDescriptor osmpbf__primitive_group__descriptor; -extern const ProtobufCMessageDescriptor osmpbf__string_table__descriptor; -extern const ProtobufCMessageDescriptor osmpbf__info__descriptor; -extern const ProtobufCMessageDescriptor osmpbf__dense_info__descriptor; -extern const ProtobufCMessageDescriptor osmpbf__change_set__descriptor; -extern const ProtobufCMessageDescriptor osmpbf__node__descriptor; -extern const ProtobufCMessageDescriptor osmpbf__dense_nodes__descriptor; -extern const ProtobufCMessageDescriptor osmpbf__way__descriptor; -extern const ProtobufCMessageDescriptor osmpbf__relation__descriptor; -extern const ProtobufCEnumDescriptor osmpbf__relation__member_type__descriptor; - -PROTOBUF_C_END_DECLS - - -#endif /* PROTOBUF_osmformat_2eproto__INCLUDED */ diff --git a/navit/maptool/google/protobuf-c/protobuf-c-private.h b/navit/maptool/google/protobuf-c/protobuf-c-private.h deleted file mode 100644 index 53a33b51b..000000000 --- a/navit/maptool/google/protobuf-c/protobuf-c-private.h +++ /dev/null @@ -1,72 +0,0 @@ -/* --- protobuf-c-private.h: private structures and functions --- */ -/* - * Copyright 2008, Dave Benson. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with - * the License. You may obtain a copy of the License - * at http://www.apache.org/licenses/LICENSE-2.0 Unless - * required by applicable law or agreed to in writing, - * software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - - -/* === needs to be declared for the PROTOBUF_C_BUFFER_SIMPLE_INIT macro === */ - -void protobuf_c_buffer_simple_append (ProtobufCBuffer *buffer, - size_t len, - const unsigned char *data); - -/* === stuff which needs to be declared for use in the generated code === */ - -struct _ProtobufCEnumValueIndex -{ - const char *name; - unsigned index; /* into values[] array */ -}; - -/* IntRange: helper structure for optimizing - int => index lookups - in the case where the keys are mostly consecutive values, - as they presumably are for enums and fields. - - The data structures assumes that the values in the original - array are sorted */ -struct _ProtobufCIntRange -{ - int start_value; - unsigned orig_index; - /* NOTE: the number of values in the range can - be inferred by looking at the next element's orig_index. - a dummy element is added to make this simple */ -}; - - -/* === declared for exposition on ProtobufCIntRange === */ -/* note: ranges must have an extra sentinel IntRange at the end whose - orig_index is set to the number of actual values in the original array */ -/* returns -1 if no orig_index found */ -int protobuf_c_int_ranges_lookup (unsigned n_ranges, - ProtobufCIntRange *ranges); - -#define PROTOBUF_C_SERVICE_DESCRIPTOR_MAGIC 0x14159bc3 -#define PROTOBUF_C_MESSAGE_DESCRIPTOR_MAGIC 0x28aaeef9 -#define PROTOBUF_C_ENUM_DESCRIPTOR_MAGIC 0x114315af - -/* === behind the scenes on the generated service's __init functions */ -typedef void (*ProtobufCServiceDestroy) (ProtobufCService *service); -void -protobuf_c_service_generated_init (ProtobufCService *service, - const ProtobufCServiceDescriptor *descriptor, - ProtobufCServiceDestroy destroy); - -void -protobuf_c_service_invoke_internal(ProtobufCService *service, - unsigned method_index, - const ProtobufCMessage *input, - ProtobufCClosure closure, - void *closure_data); diff --git a/navit/maptool/google/protobuf-c/protobuf-c.c b/navit/maptool/google/protobuf-c/protobuf-c.c deleted file mode 100644 index a7a8516f2..000000000 --- a/navit/maptool/google/protobuf-c/protobuf-c.c +++ /dev/null @@ -1,2283 +0,0 @@ -/* --- protobuf-c.c: public protobuf c runtime implementation --- */ - -/* - * Copyright 2008, Dave Benson. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with - * the License. You may obtain a copy of the License - * at http://www.apache.org/licenses/LICENSE-2.0 Unless - * required by applicable law or agreed to in writing, - * software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -/* TODO items: - - * 64-BIT OPTIMIZATION: certain implementations use 32-bit math even on 64-bit platforms - (uint64_size, uint64_pack, parse_uint64) - - * get_packed_size and pack seem to use type-prefixed names, - whereas parse uses type-suffixed names. pick one and stick with it. - Decision: go with type-suffixed, since the type (or its instance) - is typically the object of the verb. - NOTE: perhaps the "parse" methods should be reanemd to "unpack" - at the same time. (this only affects internal (static) functions) - - * use TRUE and FALSE instead of 1 and 0 as appropriate - - * use size_t consistently - */ - -#include <stdio.h> /* for occasional printf()s */ -#include <stdlib.h> /* for abort(), malloc() etc */ -#include <string.h> /* for strlen(), memcpy(), memmove() */ - -#ifndef PRINT_UNPACK_ERRORS -#define PRINT_UNPACK_ERRORS 1 -#endif - -#include "protobuf-c.h" - -#define MAX_UINT64_ENCODED_SIZE 10 - -/* convenience macros */ -#define TMPALLOC(allocator, size) ((allocator)->tmp_alloc ((allocator)->allocator_data, (size))) -#define FREE(allocator, ptr) \ - do { if ((ptr) != NULL) ((allocator)->free ((allocator)->allocator_data, (ptr))); } while(0) -#define UNALIGNED_ALLOC(allocator, size) ALLOC (allocator, size) /* placeholder */ -#define STRUCT_MEMBER_P(struct_p, struct_offset) \ - ((void *) ((uint8_t*) (struct_p) + (struct_offset))) -#define STRUCT_MEMBER(member_type, struct_p, struct_offset) \ - (*(member_type*) STRUCT_MEMBER_P ((struct_p), (struct_offset))) -#define STRUCT_MEMBER_PTR(member_type, struct_p, struct_offset) \ - ((member_type*) STRUCT_MEMBER_P ((struct_p), (struct_offset))) -#define TRUE 1 -#define FALSE 0 - -static void alloc_failed_warning (unsigned size, const char *filename, unsigned line) { - fprintf (stderr, - "WARNING: out-of-memory allocating a block of size %u (%s:%u)\n", - size, filename, line); -} - -/* Try to allocate memory, running some special code if it fails. */ -#define DO_ALLOC(dst, allocator, size, fail_code) \ -{ size_t da__allocation_size = (size); \ - if (da__allocation_size == 0) \ - dst = NULL; \ - else if ((dst=((allocator)->alloc ((allocator)->allocator_data, \ - da__allocation_size))) == NULL) \ - { \ - alloc_failed_warning (da__allocation_size, __FILE__, __LINE__); \ - fail_code; \ - } \ -} -#define DO_UNALIGNED_ALLOC DO_ALLOC /* placeholder */ - - - -#define ASSERT_IS_ENUM_DESCRIPTOR(desc) \ - assert((desc)->magic == PROTOBUF_C_ENUM_DESCRIPTOR_MAGIC) -#define ASSERT_IS_MESSAGE_DESCRIPTOR(desc) \ - assert((desc)->magic == PROTOBUF_C_MESSAGE_DESCRIPTOR_MAGIC) -#define ASSERT_IS_MESSAGE(message) \ - ASSERT_IS_MESSAGE_DESCRIPTOR((message)->descriptor) -#define ASSERT_IS_SERVICE_DESCRIPTOR(desc) \ - assert((desc)->magic == PROTOBUF_C_SERVICE_DESCRIPTOR_MAGIC) - -/* --- allocator --- */ - -static void protobuf_c_out_of_memory_default (void) { - fprintf (stderr, "Out Of Memory!!!\n"); - abort (); -} -void (*protobuf_c_out_of_memory) (void) = protobuf_c_out_of_memory_default; - -static void *system_alloc(void *allocator_data, size_t size) { - void *rv; - (void) allocator_data; - if (size == 0) - return NULL; - rv = g_malloc (size); - if (rv == NULL) - protobuf_c_out_of_memory (); - return rv; -} - -static void system_free (void *allocator_data, void *data) { - (void) allocator_data; - g_free (data); -} - -/* Some users may configure the default allocator; - providing your own allocator to unpack() is prefered. - this allocator is still used for packing nested messages. */ -ProtobufCAllocator protobuf_c_default_allocator = { - system_alloc, - system_free, - NULL, - 8192, - NULL -}; - -/* Users should NOT modify this structure, - but it's difficult to prevent. - - please modify protobuf_c_default_allocator instead. */ -ProtobufCAllocator protobuf_c_system_allocator = { - system_alloc, - system_free, - NULL, - 8192, - NULL -}; - -/* === buffer-simple === */ -void protobuf_c_buffer_simple_append (ProtobufCBuffer *buffer, - size_t len, - const uint8_t *data) { - ProtobufCBufferSimple *simp = (ProtobufCBufferSimple *) buffer; - size_t new_len = simp->len + len; - if (new_len > simp->alloced) { - size_t new_alloced = simp->alloced * 2; - uint8_t *new_data; - while (new_alloced < new_len) - new_alloced += new_alloced; - DO_ALLOC (new_data, &protobuf_c_default_allocator, new_alloced, return); - memcpy (new_data, simp->data, simp->len); - if (simp->must_free_data) - FREE (&protobuf_c_default_allocator, simp->data); - else - simp->must_free_data = 1; - simp->data = new_data; - simp->alloced = new_alloced; - } - memcpy (simp->data + simp->len, data, len); - simp->len = new_len; -} - -/* === get_packed_size() === */ - -/* Return the number of bytes required to store the - tag for the field (which includes 3 bits for - the wire-type, and a single bit that denotes the end-of-tag. */ -static inline size_t get_tag_size (unsigned number) { - if (number < (1<<4)) - return 1; - else if (number < (1<<11)) - return 2; - else if (number < (1<<18)) - return 3; - else if (number < (1<<25)) - return 4; - else - return 5; -} - -/* Return the number of bytes required to store - a variable-length unsigned integer that fits in 32-bit uint - in base-128 encoding. */ -static inline size_t uint32_size (uint32_t v) { - if (v < (1<<7)) - return 1; - else if (v < (1<<14)) - return 2; - else if (v < (1<<21)) - return 3; - else if (v < (1<<28)) - return 4; - else - return 5; -} -/* Return the number of bytes required to store - a variable-length signed integer that fits in 32-bit int - in base-128 encoding. */ -static inline size_t int32_size (int32_t v) { - if (v < 0) - return 10; - else if (v < (1<<7)) - return 1; - else if (v < (1<<14)) - return 2; - else if (v < (1<<21)) - return 3; - else if (v < (1<<28)) - return 4; - else - return 5; -} -/* return the zigzag-encoded 32-bit unsigned int from a 32-bit signed int */ -static inline uint32_t zigzag32 (int32_t v) { - if (v < 0) - return ((uint32_t)(-v)) * 2 - 1; - else - return v * 2; -} -/* Return the number of bytes required to store - a variable-length signed integer that fits in 32-bit int, - converted to unsigned via the zig-zag algorithm, - then packed using base-128 encoding. */ -static inline size_t sint32_size (int32_t v) { - return uint32_size(zigzag32(v)); -} - -/* Return the number of bytes required to store - a variable-length unsigned integer that fits in 64-bit uint - in base-128 encoding. */ -static inline size_t uint64_size (uint64_t v) { - uint32_t upper_v = (v>>32); - if (upper_v == 0) - return uint32_size ((uint32_t)v); - else if (upper_v < (1<<3)) - return 5; - else if (upper_v < (1<<10)) - return 6; - else if (upper_v < (1<<17)) - return 7; - else if (upper_v < (1<<24)) - return 8; - else if (upper_v < (1U<<31)) - return 9; - else - return 10; -} - -/* return the zigzag-encoded 64-bit unsigned int from a 64-bit signed int */ -static inline uint64_t zigzag64 (int64_t v) { - if (v < 0) - return ((uint64_t)(-v)) * 2 - 1; - else - return v * 2; -} - -/* Return the number of bytes required to store - a variable-length signed integer that fits in 64-bit int, - converted to unsigned via the zig-zag algorithm, - then packed using base-128 encoding. */ -static inline size_t sint64_size (int64_t v) { - return uint64_size(zigzag64(v)); -} - -/* Get serialized size of a single field in the message, - including the space needed by the identifying tag. */ -static size_t required_field_get_packed_size (const ProtobufCFieldDescriptor *field, - const void *member) { - size_t rv = get_tag_size (field->id); - switch (field->type) { - case PROTOBUF_C_TYPE_SINT32: - return rv + sint32_size (*(const int32_t *) member); - case PROTOBUF_C_TYPE_INT32: - return rv + int32_size (*(const uint32_t *) member); - case PROTOBUF_C_TYPE_UINT32: - return rv + uint32_size (*(const uint32_t *) member); - case PROTOBUF_C_TYPE_SINT64: - return rv + sint64_size (*(const int64_t *) member); - case PROTOBUF_C_TYPE_INT64: - case PROTOBUF_C_TYPE_UINT64: - return rv + uint64_size (*(const uint64_t *) member); - case PROTOBUF_C_TYPE_SFIXED32: - case PROTOBUF_C_TYPE_FIXED32: - return rv + 4; - case PROTOBUF_C_TYPE_SFIXED64: - case PROTOBUF_C_TYPE_FIXED64: - return rv + 8; - case PROTOBUF_C_TYPE_BOOL: - return rv + 1; - case PROTOBUF_C_TYPE_FLOAT: - return rv + 4; - case PROTOBUF_C_TYPE_DOUBLE: - return rv + 8; - case PROTOBUF_C_TYPE_ENUM: - // TODO: is this correct for negative-valued enums? - return rv + uint32_size (*(const uint32_t *) member); - case PROTOBUF_C_TYPE_STRING: { - const char *str = *(char * const *) member; - size_t len = str ? strlen (str) : 0; - return rv + uint32_size (len) + len; - } - case PROTOBUF_C_TYPE_BYTES: { - size_t len = ((const ProtobufCBinaryData*) member)->len; - return rv + uint32_size (len) + len; - } - //case PROTOBUF_C_TYPE_GROUP: - case PROTOBUF_C_TYPE_MESSAGE: { - const ProtobufCMessage *msg = * (ProtobufCMessage * const *) member; - size_t subrv = msg ? protobuf_c_message_get_packed_size (msg) : 0; - return rv + uint32_size (subrv) + subrv; - } - } - PROTOBUF_C_ASSERT_NOT_REACHED (); - return 0; -} - -/* Get serialized size of a single optional field in the message, - including the space needed by the identifying tag. - Returns 0 if the optional field isn't set. */ -static size_t optional_field_get_packed_size (const ProtobufCFieldDescriptor *field, - const protobuf_c_boolean *has, - const void *member) { - if (field->type == PROTOBUF_C_TYPE_MESSAGE - || field->type == PROTOBUF_C_TYPE_STRING) { - const void *ptr = * (const void * const *) member; - if (ptr == NULL - || ptr == field->default_value) - return 0; - } else { - if (!*has) - return 0; - } - return required_field_get_packed_size (field, member); -} - -/* Get serialized size of a repeated field in the message, - which may consist of any number of values (including 0). - Includes the space needed by the identifying tags (as needed). */ -static size_t repeated_field_get_packed_size (const ProtobufCFieldDescriptor *field, - size_t count, - const void *member) { - size_t header_size; - size_t rv = 0; - unsigned i; - void *array = * (void * const *) member; - if (count == 0) - return 0; - header_size = get_tag_size (field->id); - if (!field->packed) - header_size *= count; - switch (field->type) { - case PROTOBUF_C_TYPE_SINT32: - for (i = 0; i < count; i++) - rv += sint32_size (((int32_t*)array)[i]); - break; - case PROTOBUF_C_TYPE_INT32: - for (i = 0; i < count; i++) - rv += int32_size (((uint32_t*)array)[i]); - break; - case PROTOBUF_C_TYPE_UINT32: - case PROTOBUF_C_TYPE_ENUM: - for (i = 0; i < count; i++) - rv += uint32_size (((uint32_t*)array)[i]); - break; - case PROTOBUF_C_TYPE_SINT64: - for (i = 0; i < count; i++) - rv += sint64_size (((int64_t*)array)[i]); - break; - case PROTOBUF_C_TYPE_INT64: - case PROTOBUF_C_TYPE_UINT64: - for (i = 0; i < count; i++) - rv += uint64_size (((uint64_t*)array)[i]); - break; - case PROTOBUF_C_TYPE_SFIXED32: - case PROTOBUF_C_TYPE_FIXED32: - case PROTOBUF_C_TYPE_FLOAT: - rv += 4 * count; - break; - case PROTOBUF_C_TYPE_SFIXED64: - case PROTOBUF_C_TYPE_FIXED64: - case PROTOBUF_C_TYPE_DOUBLE: - rv += 8 * count; - break; - case PROTOBUF_C_TYPE_BOOL: - rv += count; - break; - case PROTOBUF_C_TYPE_STRING: - for (i = 0; i < count; i++) { - size_t len = strlen (((char**) array)[i]); - rv += uint32_size (len) + len; - } - break; - - case PROTOBUF_C_TYPE_BYTES: - for (i = 0; i < count; i++) { - size_t len = ((ProtobufCBinaryData*) array)[i].len; - rv += uint32_size (len) + len; - } - break; - case PROTOBUF_C_TYPE_MESSAGE: - for (i = 0; i < count; i++) { - size_t len = protobuf_c_message_get_packed_size (((ProtobufCMessage **) array)[i]); - rv += uint32_size (len) + len; - } - break; - //case PROTOBUF_C_TYPE_GROUP: // NOT SUPPORTED - } - if (field->packed) - header_size += uint32_size (rv); - return header_size + rv; -} - -/* Get the packed size of a unknown field (meaning one that - is passed through mostly uninterpreted... this is done - for forward compatibilty with the addition of new fields). */ -static inline size_t unknown_field_get_packed_size (const ProtobufCMessageUnknownField *field) { - return get_tag_size (field->tag) + field->len; -} - -/* Get the number of bytes that the message will occupy once serialized. */ -size_t protobuf_c_message_get_packed_size(const ProtobufCMessage *message) { - unsigned i; - size_t rv = 0; - ASSERT_IS_MESSAGE (message); - for (i = 0; i < message->descriptor->n_fields; i++) { - const ProtobufCFieldDescriptor *field = message->descriptor->fields + i; - const void *member = ((const char *) message) + field->offset; - const void *qmember = ((const char *) message) + field->quantifier_offset; - - if (field->label == PROTOBUF_C_LABEL_REQUIRED) - rv += required_field_get_packed_size (field, member); - else if (field->label == PROTOBUF_C_LABEL_OPTIONAL) - rv += optional_field_get_packed_size (field, qmember, member); - else - rv += repeated_field_get_packed_size (field, * (const size_t *) qmember, member); - } - for (i = 0; i < message->n_unknown_fields; i++) - rv += unknown_field_get_packed_size (&message->unknown_fields[i]); - return rv; -} -/* === pack() === */ -/* Pack an unsigned 32-bit integer in base-128 encoding, and return the number of bytes needed: - this will be 5 or less. */ -static inline size_t uint32_pack (uint32_t value, uint8_t *out) { - unsigned rv = 0; - if (value >= 0x80) { - out[rv++] = value | 0x80; - value >>= 7; - if (value >= 0x80) { - out[rv++] = value | 0x80; - value >>= 7; - if (value >= 0x80) { - out[rv++] = value | 0x80; - value >>= 7; - if (value >= 0x80) { - out[rv++] = value | 0x80; - value >>= 7; - } - } - } - } - /* assert: value<128 */ - out[rv++] = value; - return rv; -} - -/* Pack a 32-bit signed integer, returning the number of bytes needed. - Negative numbers are packed as twos-complement 64-bit integers. */ -static inline size_t int32_pack (int32_t value, uint8_t *out) { - if (value < 0) { - out[0] = value | 0x80; - out[1] = (value>>7) | 0x80; - out[2] = (value>>14) | 0x80; - out[3] = (value>>21) | 0x80; - out[4] = (value>>28) | 0x80; - out[5] = out[6] = out[7] = out[8] = 0xff; - out[9] = 0x01; - return 10; - } else - return uint32_pack (value, out); -} - -/* Pack a 32-bit integer in zigwag encoding. */ -static inline size_t sint32_pack (int32_t value, uint8_t *out) { - return uint32_pack (zigzag32 (value), out); -} - -/* Pack a 64-bit unsigned integer that fits in a 64-bit uint, - using base-128 encoding. */ -static size_t uint64_pack (uint64_t value, uint8_t *out) { - uint32_t hi = value>>32; - uint32_t lo = value; - unsigned rv; - if (hi == 0) - return uint32_pack ((uint32_t)lo, out); - out[0] = (lo) | 0x80; - out[1] = (lo>>7) | 0x80; - out[2] = (lo>>14) | 0x80; - out[3] = (lo>>21) | 0x80; - if (hi < 8) { - out[4] = (hi<<4) | (lo>>28); - return 5; - } else { - out[4] = ((hi&7)<<4) | (lo>>28) | 0x80; - hi >>= 3; - } - rv = 5; - while (hi >= 128) { - out[rv++] = hi | 0x80; - hi >>= 7; - } - out[rv++] = hi; - return rv; -} - -/* Pack a 64-bit signed integer in zigzan encoding, - return the size of the packed output. - (Max returned value is 10) */ -static inline size_t sint64_pack (int64_t value, uint8_t *out) { - return uint64_pack (zigzag64 (value), out); -} - -/* Pack a 32-bit value, little-endian. - Used for fixed32, sfixed32, float) */ -static inline size_t fixed32_pack (uint32_t value, uint8_t *out) { -#ifdef IS_LITTLE_ENDIAN - memcpy (out, &value, 4); -#else - out[0] = value; - out[1] = value>>8; - out[2] = value>>16; - out[3] = value>>24; -#endif - return 4; -} - -/* Pack a 64-bit fixed-length value. - (Used for fixed64, sfixed64, double) */ -/* XXX: the big-endian impl is really only good for 32-bit machines, - a 64-bit version would be appreciated, plus a way - to decide to use 64-bit math where convenient. */ -static inline size_t fixed64_pack (uint64_t value, uint8_t *out) { -#ifdef IS_LITTLE_ENDIAN - memcpy (out, &value, 8); -#else - fixed32_pack (value, out); - fixed32_pack (value>>32, out+4); -#endif - return 8; -} - - -/* Pack a boolean as 0 or 1, even though the protobuf_c_boolean - can really assume any integer value. */ -/* XXX: perhaps on some platforms "*out = !!value" would be - a better impl, b/c that is idiotmatic c++ in some stl impls. */ -static inline size_t boolean_pack (protobuf_c_boolean value, uint8_t *out) { - *out = value ? 1 : 0; - return 1; -} - -/* Pack a length-prefixed string. - The input string is NUL-terminated. - - The NULL pointer is treated as an empty string. - This isn't really necessary, but it allows people - to leave required strings blank. - (See Issue 13 in the bug tracker for a - little more explanation). - */ -static inline size_t string_pack (const char * str, uint8_t *out) { - if (str == NULL) { - out[0] = 0; - return 1; - } else { - size_t len = strlen (str); - size_t rv = uint32_pack (len, out); - memcpy (out + rv, str, len); - return rv + len; - } -} - -static inline size_t binary_data_pack (const ProtobufCBinaryData *bd, uint8_t *out) { - size_t len = bd->len; - size_t rv = uint32_pack (len, out); - memcpy (out + rv, bd->data, len); - return rv + len; -} - -static inline size_t prefixed_message_pack (const ProtobufCMessage *message, uint8_t *out) { - if (message == NULL) { - out[0] = 0; - return 1; - } else { - size_t rv = protobuf_c_message_pack (message, out + 1); - uint32_t rv_packed_size = uint32_size (rv); - if (rv_packed_size != 1) - memmove (out + rv_packed_size, out + 1, rv); - return uint32_pack (rv, out) + rv; - } -} - -/* wire-type will be added in required_field_pack() */ -/* XXX: just call uint64_pack on 64-bit platforms. */ -static size_t tag_pack (uint32_t id, uint8_t *out) { - if (id < (1<<(32-3))) - return uint32_pack (id<<3, out); - else - return uint64_pack (((uint64_t)id) << 3, out); -} - -static size_t required_field_pack (const ProtobufCFieldDescriptor *field, - const void *member, - uint8_t *out) { - size_t rv = tag_pack (field->id, out); - switch (field->type) { - case PROTOBUF_C_TYPE_SINT32: - out[0] |= PROTOBUF_C_WIRE_TYPE_VARINT; - return rv + sint32_pack (*(const int32_t *) member, out + rv); - case PROTOBUF_C_TYPE_INT32: - out[0] |= PROTOBUF_C_WIRE_TYPE_VARINT; - return rv + int32_pack (*(const uint32_t *) member, out + rv); - case PROTOBUF_C_TYPE_UINT32: - case PROTOBUF_C_TYPE_ENUM: - out[0] |= PROTOBUF_C_WIRE_TYPE_VARINT; - return rv + uint32_pack (*(const uint32_t *) member, out + rv); - case PROTOBUF_C_TYPE_SINT64: - out[0] |= PROTOBUF_C_WIRE_TYPE_VARINT; - return rv + sint64_pack (*(const int64_t *) member, out + rv); - case PROTOBUF_C_TYPE_INT64: - case PROTOBUF_C_TYPE_UINT64: - out[0] |= PROTOBUF_C_WIRE_TYPE_VARINT; - return rv + uint64_pack (*(const uint64_t *) member, out + rv); - case PROTOBUF_C_TYPE_SFIXED32: - case PROTOBUF_C_TYPE_FIXED32: - case PROTOBUF_C_TYPE_FLOAT: - out[0] |= PROTOBUF_C_WIRE_TYPE_32BIT; - return rv + fixed32_pack (*(const uint32_t *) member, out + rv); - case PROTOBUF_C_TYPE_SFIXED64: - case PROTOBUF_C_TYPE_FIXED64: - case PROTOBUF_C_TYPE_DOUBLE: - out[0] |= PROTOBUF_C_WIRE_TYPE_64BIT; - return rv + fixed64_pack (*(const uint64_t *) member, out + rv); - case PROTOBUF_C_TYPE_BOOL: - out[0] |= PROTOBUF_C_WIRE_TYPE_VARINT; - return rv + boolean_pack (*(const protobuf_c_boolean *) member, out + rv); - case PROTOBUF_C_TYPE_STRING: { - out[0] |= PROTOBUF_C_WIRE_TYPE_LENGTH_PREFIXED; - return rv + string_pack (*(char * const *) member, out + rv); - } - - case PROTOBUF_C_TYPE_BYTES: { - const ProtobufCBinaryData * bd = ((const ProtobufCBinaryData*) member); - out[0] |= PROTOBUF_C_WIRE_TYPE_LENGTH_PREFIXED; - return rv + binary_data_pack (bd, out + rv); - } - //case PROTOBUF_C_TYPE_GROUP: // NOT SUPPORTED - case PROTOBUF_C_TYPE_MESSAGE: { - out[0] |= PROTOBUF_C_WIRE_TYPE_LENGTH_PREFIXED; - return rv + prefixed_message_pack (*(ProtobufCMessage * const *) member, - out + rv); - } - } - PROTOBUF_C_ASSERT_NOT_REACHED (); - return 0; -} -static size_t optional_field_pack (const ProtobufCFieldDescriptor *field, - const protobuf_c_boolean *has, - const void *member, - uint8_t *out) { - if (field->type == PROTOBUF_C_TYPE_MESSAGE - || field->type == PROTOBUF_C_TYPE_STRING) { - const void *ptr = * (const void * const *) member; - if (ptr == NULL - || ptr == field->default_value) - return 0; - } else { - if (!*has) - return 0; - } - return required_field_pack (field, member, out); -} - -/* TODO: implement as a table lookup */ -static inline size_t sizeof_elt_in_repeated_array (ProtobufCType type) { - switch (type) { - case PROTOBUF_C_TYPE_SINT32: - case PROTOBUF_C_TYPE_INT32: - case PROTOBUF_C_TYPE_UINT32: - case PROTOBUF_C_TYPE_SFIXED32: - case PROTOBUF_C_TYPE_FIXED32: - case PROTOBUF_C_TYPE_FLOAT: - case PROTOBUF_C_TYPE_ENUM: - return 4; - case PROTOBUF_C_TYPE_SINT64: - case PROTOBUF_C_TYPE_INT64: - case PROTOBUF_C_TYPE_UINT64: - case PROTOBUF_C_TYPE_SFIXED64: - case PROTOBUF_C_TYPE_FIXED64: - case PROTOBUF_C_TYPE_DOUBLE: - return 8; - case PROTOBUF_C_TYPE_BOOL: - return sizeof (protobuf_c_boolean); - case PROTOBUF_C_TYPE_STRING: - case PROTOBUF_C_TYPE_MESSAGE: - return sizeof (void *); - case PROTOBUF_C_TYPE_BYTES: - return sizeof (ProtobufCBinaryData); - } - PROTOBUF_C_ASSERT_NOT_REACHED (); - return 0; -} - -static void copy_to_little_endian_32 (void *out, const void *in, unsigned N) { -#ifdef IS_LITTLE_ENDIAN - memcpy (out, in, N * 4); -#else - unsigned i; - const uint32_t *ini = in; - for (i = 0; i < N; i++) - fixed32_pack (ini[i], (uint8_t*)out + 4*i); -#endif -} -static void copy_to_little_endian_64 (void *out, const void *in, unsigned N) { -#ifdef IS_LITTLE_ENDIAN - memcpy (out, in, N * 8); -#else - unsigned i; - const uint64_t *ini = in; - for (i = 0; i < N; i++) - fixed64_pack (ini[i], (uint8_t*)out + 8*i); -#endif -} - -static unsigned get_type_min_size (ProtobufCType type) { - if (type == PROTOBUF_C_TYPE_SFIXED32 - || type == PROTOBUF_C_TYPE_FIXED32 - || type == PROTOBUF_C_TYPE_FLOAT) - return 4; - if (type == PROTOBUF_C_TYPE_SFIXED64 - || type == PROTOBUF_C_TYPE_FIXED64 - || type == PROTOBUF_C_TYPE_DOUBLE) - return 8; - return 1; -} - -static size_t repeated_field_pack (const ProtobufCFieldDescriptor *field, - size_t count, - const void *member, - uint8_t *out) { - char *array = * (char * const *) member; - unsigned i; - if (field->packed) { - unsigned header_len; - unsigned len_start; - unsigned min_length; - unsigned payload_len; - unsigned length_size_min; - unsigned actual_length_size; - uint8_t *payload_at; - if (count == 0) - return 0; - header_len = tag_pack (field->id, out); - out[0] |= PROTOBUF_C_WIRE_TYPE_LENGTH_PREFIXED; - len_start = header_len; - min_length = get_type_min_size (field->type) * count; - length_size_min = uint32_size (min_length); - header_len += length_size_min; - payload_at = out + header_len; - switch (field->type) { - case PROTOBUF_C_TYPE_SFIXED32: - case PROTOBUF_C_TYPE_FIXED32: - case PROTOBUF_C_TYPE_FLOAT: - copy_to_little_endian_32 (payload_at, array, count); - payload_at += count * 4; - break; - - case PROTOBUF_C_TYPE_SFIXED64: - case PROTOBUF_C_TYPE_FIXED64: - case PROTOBUF_C_TYPE_DOUBLE: - copy_to_little_endian_64 (payload_at, array, count); - payload_at += count * 8; - break; - - case PROTOBUF_C_TYPE_INT32: { - const int32_t *arr = (const int32_t *) array; - for (i = 0; i < count; i++) - payload_at += int32_pack (arr[i], payload_at); - } - break; - - case PROTOBUF_C_TYPE_SINT32: { - const int32_t *arr = (const int32_t *) array; - for (i = 0; i < count; i++) - payload_at += sint32_pack (arr[i], payload_at); - } - break; - - case PROTOBUF_C_TYPE_SINT64: { - const int64_t *arr = (const int64_t *) array; - for (i = 0; i < count; i++) - payload_at += sint64_pack (arr[i], payload_at); - } - break; - case PROTOBUF_C_TYPE_ENUM: - case PROTOBUF_C_TYPE_UINT32: { - const uint32_t *arr = (const uint32_t *) array; - for (i = 0; i < count; i++) - payload_at += uint32_pack (arr[i], payload_at); - } - break; - case PROTOBUF_C_TYPE_INT64: - case PROTOBUF_C_TYPE_UINT64: { - const uint64_t *arr = (const uint64_t *) array; - for (i = 0; i < count; i++) - payload_at += uint64_pack (arr[i], payload_at); - } - break; - case PROTOBUF_C_TYPE_BOOL: { - const protobuf_c_boolean *arr = (const protobuf_c_boolean *) array; - for (i = 0; i < count; i++) - payload_at += boolean_pack (arr[i], payload_at); - } - break; - - default: - assert (0); - } - payload_len = payload_at - (out + header_len); - actual_length_size = uint32_size (payload_len); - if (length_size_min != actual_length_size) { - assert (actual_length_size == length_size_min + 1); - memmove (out + header_len + 1, out + header_len, payload_len); - header_len++; - } - uint32_pack (payload_len, out + len_start); - return header_len + payload_len; - } else { - /* CONSIDER: optimize this case a bit (by putting the loop inside the switch) */ - size_t rv = 0; - unsigned siz = sizeof_elt_in_repeated_array (field->type); - for (i = 0; i < count; i++) { - rv += required_field_pack (field, array, out + rv); - array += siz; - } - return rv; - } -} -static size_t unknown_field_pack (const ProtobufCMessageUnknownField *field, - uint8_t *out) { - size_t rv = tag_pack (field->tag, out); - out[0] |= field->wire_type; - memcpy (out + rv, field->data, field->len); - return rv + field->len; -} - -size_t protobuf_c_message_pack (const ProtobufCMessage *message, - uint8_t *out) { - unsigned i; - size_t rv = 0; - ASSERT_IS_MESSAGE (message); - for (i = 0; i < message->descriptor->n_fields; i++) { - const ProtobufCFieldDescriptor *field = message->descriptor->fields + i; - const void *member = ((const char *) message) + field->offset; - - /* it doesn't hurt to compute qmember (a pointer to the quantifier - field of the structure), but the pointer is only valid if - the field is one of: - - a repeated field - - an optional field that isn't a pointer type - (meaning: not a message or a string) */ - const void *qmember = ((const char *) message) + field->quantifier_offset; - - if (field->label == PROTOBUF_C_LABEL_REQUIRED) - rv += required_field_pack (field, member, out + rv); - else if (field->label == PROTOBUF_C_LABEL_OPTIONAL) - /* note that qmember is bogus for strings and messages, - but it isn't used */ - rv += optional_field_pack (field, qmember, member, out + rv); - else - rv += repeated_field_pack (field, * (const size_t *) qmember, member, out + rv); - } - for (i = 0; i < message->n_unknown_fields; i++) - rv += unknown_field_pack (&message->unknown_fields[i], out + rv); - return rv; -} - -/* === pack_to_buffer() === */ -static size_t required_field_pack_to_buffer (const ProtobufCFieldDescriptor *field, - const void *member, - ProtobufCBuffer *buffer) { - size_t rv; - uint8_t scratch[MAX_UINT64_ENCODED_SIZE * 2]; - rv = tag_pack (field->id, scratch); - switch (field->type) { - case PROTOBUF_C_TYPE_SINT32: - scratch[0] |= PROTOBUF_C_WIRE_TYPE_VARINT; - rv += sint32_pack (*(const int32_t *) member, scratch + rv); - buffer->append (buffer, rv, scratch); - break; - case PROTOBUF_C_TYPE_INT32: - scratch[0] |= PROTOBUF_C_WIRE_TYPE_VARINT; - rv += int32_pack (*(const uint32_t *) member, scratch + rv); - buffer->append (buffer, rv, scratch); - break; - case PROTOBUF_C_TYPE_UINT32: - case PROTOBUF_C_TYPE_ENUM: - scratch[0] |= PROTOBUF_C_WIRE_TYPE_VARINT; - rv += uint32_pack (*(const uint32_t *) member, scratch + rv); - buffer->append (buffer, rv, scratch); - break; - case PROTOBUF_C_TYPE_SINT64: - scratch[0] |= PROTOBUF_C_WIRE_TYPE_VARINT; - rv += sint64_pack (*(const int64_t *) member, scratch + rv); - buffer->append (buffer, rv, scratch); - break; - case PROTOBUF_C_TYPE_INT64: - case PROTOBUF_C_TYPE_UINT64: - scratch[0] |= PROTOBUF_C_WIRE_TYPE_VARINT; - rv += uint64_pack (*(const uint64_t *) member, scratch + rv); - buffer->append (buffer, rv, scratch); - break; - case PROTOBUF_C_TYPE_SFIXED32: - case PROTOBUF_C_TYPE_FIXED32: - case PROTOBUF_C_TYPE_FLOAT: - scratch[0] |= PROTOBUF_C_WIRE_TYPE_32BIT; - rv += fixed32_pack (*(const uint32_t *) member, scratch + rv); - buffer->append (buffer, rv, scratch); - break; - case PROTOBUF_C_TYPE_SFIXED64: - case PROTOBUF_C_TYPE_FIXED64: - case PROTOBUF_C_TYPE_DOUBLE: - scratch[0] |= PROTOBUF_C_WIRE_TYPE_64BIT; - rv += fixed64_pack (*(const uint64_t *) member, scratch + rv); - buffer->append (buffer, rv, scratch); - break; - case PROTOBUF_C_TYPE_BOOL: - scratch[0] |= PROTOBUF_C_WIRE_TYPE_VARINT; - rv += boolean_pack (*(const protobuf_c_boolean *) member, scratch + rv); - buffer->append (buffer, rv, scratch); - break; - case PROTOBUF_C_TYPE_STRING: { - const char *str = *(char * const *) member; - size_t sublen = str ? strlen (str) : 0; - scratch[0] |= PROTOBUF_C_WIRE_TYPE_LENGTH_PREFIXED; - rv += uint32_pack (sublen, scratch + rv); - buffer->append (buffer, rv, scratch); - buffer->append (buffer, sublen, (const uint8_t *) str); - rv += sublen; - break; - } - - case PROTOBUF_C_TYPE_BYTES: { - const ProtobufCBinaryData * bd = ((const ProtobufCBinaryData*) member); - size_t sublen = bd->len; - scratch[0] |= PROTOBUF_C_WIRE_TYPE_LENGTH_PREFIXED; - rv += uint32_pack (sublen, scratch + rv); - buffer->append (buffer, rv, scratch); - buffer->append (buffer, sublen, bd->data); - rv += sublen; - break; - } - //PROTOBUF_C_TYPE_GROUP, // NOT SUPPORTED - case PROTOBUF_C_TYPE_MESSAGE: { - uint8_t simple_buffer_scratch[256]; - size_t sublen; - ProtobufCBufferSimple simple_buffer - = PROTOBUF_C_BUFFER_SIMPLE_INIT (simple_buffer_scratch); - const ProtobufCMessage *msg = *(ProtobufCMessage * const *) member; - scratch[0] |= PROTOBUF_C_WIRE_TYPE_LENGTH_PREFIXED; - if (msg == NULL) - sublen = 0; - else - sublen = protobuf_c_message_pack_to_buffer (msg, &simple_buffer.base); - rv += uint32_pack (sublen, scratch + rv); - buffer->append (buffer, rv, scratch); - buffer->append (buffer, sublen, simple_buffer.data); - rv += sublen; - PROTOBUF_C_BUFFER_SIMPLE_CLEAR (&simple_buffer); - break; - } - default: - PROTOBUF_C_ASSERT_NOT_REACHED (); - } - return rv; -} -static size_t optional_field_pack_to_buffer (const ProtobufCFieldDescriptor *field, - const protobuf_c_boolean *has, - const void *member, - ProtobufCBuffer *buffer) { - if (field->type == PROTOBUF_C_TYPE_MESSAGE - || field->type == PROTOBUF_C_TYPE_STRING) { - const void *ptr = * (const void * const *) member; - if (ptr == NULL - || ptr == field->default_value) - return 0; - } else { - if (!*has) - return 0; - } - return required_field_pack_to_buffer (field, member, buffer); -} - -static size_t get_packed_payload_length (const ProtobufCFieldDescriptor *field, - unsigned count, - const void *array) { - unsigned rv = 0; - unsigned i; - switch (field->type) { - case PROTOBUF_C_TYPE_SFIXED32: - case PROTOBUF_C_TYPE_FIXED32: - case PROTOBUF_C_TYPE_FLOAT: - return count * 4; - - case PROTOBUF_C_TYPE_SFIXED64: - case PROTOBUF_C_TYPE_FIXED64: - case PROTOBUF_C_TYPE_DOUBLE: - return count * 8; - - case PROTOBUF_C_TYPE_INT32: { - const int32_t *arr = (const int32_t *) array; - for (i = 0; i < count; i++) - rv += int32_size (arr[i]); - } - break; - - case PROTOBUF_C_TYPE_SINT32: { - const int32_t *arr = (const int32_t *) array; - for (i = 0; i < count; i++) - rv += sint32_size (arr[i]); - } - break; - case PROTOBUF_C_TYPE_ENUM: - case PROTOBUF_C_TYPE_UINT32: { - const uint32_t *arr = (const uint32_t *) array; - for (i = 0; i < count; i++) - rv += uint32_size (arr[i]); - } - break; - - case PROTOBUF_C_TYPE_SINT64: { - const int64_t *arr = (const int64_t *) array; - for (i = 0; i < count; i++) - rv += sint64_size (arr[i]); - } - break; - case PROTOBUF_C_TYPE_INT64: - case PROTOBUF_C_TYPE_UINT64: { - const uint64_t *arr = (const uint64_t *) array; - for (i = 0; i < count; i++) - rv += uint64_size (arr[i]); - } - break; - case PROTOBUF_C_TYPE_BOOL: - return count; - default: - assert (0); - } - return rv; -} -static size_t pack_buffer_packed_payload (const ProtobufCFieldDescriptor *field, - unsigned count, - const void *array, - ProtobufCBuffer *buffer) { - uint8_t scratch[16]; - size_t rv = 0; - unsigned i; - switch (field->type) { - case PROTOBUF_C_TYPE_SFIXED32: - case PROTOBUF_C_TYPE_FIXED32: - case PROTOBUF_C_TYPE_FLOAT: -#ifdef IS_LITTLE_ENDIAN - rv = count * 4; - goto no_packing_needed; -#else - for (i = 0; i < count; i++) { - unsigned len = fixed32_pack (((uint32_t*)array)[i], scratch); - buffer->append (buffer, len, scratch); - rv += len; - } -#endif - break; - case PROTOBUF_C_TYPE_SFIXED64: - case PROTOBUF_C_TYPE_FIXED64: - case PROTOBUF_C_TYPE_DOUBLE: -#ifdef IS_LITTLE_ENDIAN - rv = count * 8; - goto no_packing_needed; -#else - for (i = 0; i < count; i++) { - unsigned len = fixed64_pack (((uint64_t*)array)[i], scratch); - buffer->append (buffer, len, scratch); - rv += len; - } - break; -#endif - case PROTOBUF_C_TYPE_INT32: - for (i = 0; i < count; i++) { - unsigned len = int32_pack (((int32_t*)array)[i], scratch); - buffer->append (buffer, len, scratch); - rv += len; - } - break; - - case PROTOBUF_C_TYPE_SINT32: - for (i = 0; i < count; i++) { - unsigned len = sint32_pack (((int32_t*)array)[i], scratch); - buffer->append (buffer, len, scratch); - rv += len; - } - break; - case PROTOBUF_C_TYPE_ENUM: - case PROTOBUF_C_TYPE_UINT32: - for (i = 0; i < count; i++) { - unsigned len = uint32_pack (((uint32_t*)array)[i], scratch); - buffer->append (buffer, len, scratch); - rv += len; - } - break; - - case PROTOBUF_C_TYPE_SINT64: - for (i = 0; i < count; i++) { - unsigned len = sint64_pack (((int64_t*)array)[i], scratch); - buffer->append (buffer, len, scratch); - rv += len; - } - break; - case PROTOBUF_C_TYPE_INT64: - case PROTOBUF_C_TYPE_UINT64: - for (i = 0; i < count; i++) { - unsigned len = uint64_pack (((uint64_t*)array)[i], scratch); - buffer->append (buffer, len, scratch); - rv += len; - } - break; - case PROTOBUF_C_TYPE_BOOL: - for (i = 0; i < count; i++) { - unsigned len = boolean_pack (((protobuf_c_boolean*)array)[i], scratch); - buffer->append (buffer, len, scratch); - rv += len; - } - return count; - default: - assert(0); - } - return rv; - -#ifdef IS_LITTLE_ENDIAN -no_packing_needed: - buffer->append (buffer, rv, array); - return rv; -#endif -} - -static size_t repeated_field_pack_to_buffer (const ProtobufCFieldDescriptor *field, - unsigned count, - const void *member, - ProtobufCBuffer *buffer) { - char *array = * (char * const *) member; - if (count == 0) - return 0; - if (field->packed) { - uint8_t scratch[MAX_UINT64_ENCODED_SIZE * 2]; - size_t rv = tag_pack (field->id, scratch); - size_t payload_len = get_packed_payload_length (field, count, array); - size_t tmp; - scratch[0] |= PROTOBUF_C_WIRE_TYPE_LENGTH_PREFIXED; - rv += uint32_pack (payload_len, scratch + rv); - buffer->append (buffer, rv, scratch); - tmp = pack_buffer_packed_payload (field, count, array, buffer); - if (tmp != payload_len) { - fprintf (stderr, "Unexpected payload length: %zu (expected: %zu). Aborting.\n", tmp, payload_len); - abort (); - } - return rv + payload_len; - } else { - size_t siz; - unsigned i; - /* CONSIDER: optimize this case a bit (by putting the loop inside the switch) */ - unsigned rv = 0; - siz = sizeof_elt_in_repeated_array (field->type); - for (i = 0; i < count; i++) { - rv += required_field_pack_to_buffer (field, array, buffer); - array += siz; - } - return rv; - } -} - -static size_t unknown_field_pack_to_buffer (const ProtobufCMessageUnknownField *field, - ProtobufCBuffer *buffer) { - uint8_t header[MAX_UINT64_ENCODED_SIZE]; - size_t rv = tag_pack (field->tag, header); - header[0] |= field->wire_type; - buffer->append (buffer, rv, header); - buffer->append (buffer, field->len, field->data); - return rv + field->len; -} - -size_t protobuf_c_message_pack_to_buffer (const ProtobufCMessage *message, - ProtobufCBuffer *buffer) { - unsigned i; - size_t rv = 0; - ASSERT_IS_MESSAGE (message); - for (i = 0; i < message->descriptor->n_fields; i++) { - const ProtobufCFieldDescriptor *field = message->descriptor->fields + i; - const void *member = ((const char *) message) + field->offset; - const void *qmember = ((const char *) message) + field->quantifier_offset; - - if (field->label == PROTOBUF_C_LABEL_REQUIRED) - rv += required_field_pack_to_buffer (field, member, buffer); - else if (field->label == PROTOBUF_C_LABEL_OPTIONAL) - rv += optional_field_pack_to_buffer (field, qmember, member, buffer); - else - rv += repeated_field_pack_to_buffer (field, * (const size_t *) qmember, member, buffer); - } - for (i = 0; i < message->n_unknown_fields; i++) - rv += unknown_field_pack_to_buffer (&message->unknown_fields[i], buffer); - - return rv; -} - -/* === unpacking === */ -#if PRINT_UNPACK_ERRORS -# define UNPACK_ERROR(args) do { printf args;printf("\n"); }while(0) -#else -# define UNPACK_ERROR(args) do { } while (0) -#endif - -static inline int int_range_lookup (unsigned n_ranges, - const ProtobufCIntRange *ranges, - int value) { - unsigned start, n; - if (n_ranges == 0) - return -1; - start = 0; - n = n_ranges; - while (n > 1) { - unsigned mid = start + n / 2; - if (value < ranges[mid].start_value) { - n = mid - start; - } else if (value >= ranges[mid].start_value + (int)(ranges[mid+1].orig_index-ranges[mid].orig_index)) { - unsigned new_start = mid + 1; - n = start + n - new_start; - start = new_start; - } else - return (value - ranges[mid].start_value) + ranges[mid].orig_index; - } - if (n > 0) { - unsigned start_orig_index = ranges[start].orig_index; - unsigned range_size = ranges[start+1].orig_index - start_orig_index; - - if (ranges[start].start_value <= value - && value < (int)(ranges[start].start_value + range_size)) - return (value - ranges[start].start_value) + start_orig_index; - } - return -1; -} - -static size_t parse_tag_and_wiretype (size_t len, - const uint8_t *data, - uint32_t *tag_out, - ProtobufCWireType *wiretype_out) { - unsigned max_rv = len > 5 ? 5 : len; - uint32_t tag = (data[0]&0x7f) >> 3; - unsigned shift = 4; - unsigned rv; - *wiretype_out = data[0] & 7; - if ((data[0] & 0x80) == 0) { - *tag_out = tag; - return 1; - } - for (rv = 1; rv < max_rv; rv++) - if (data[rv] & 0x80) { - tag |= (data[rv] & 0x7f) << shift; - shift += 7; - } else { - tag |= data[rv] << shift; - *tag_out = tag; - return rv + 1; - } - return 0; /* error: bad header */ -} - -/* sizeof(ScannedMember) must be <= (1<<BOUND_SIZEOF_SCANNED_MEMBER_LOG2) */ -#define BOUND_SIZEOF_SCANNED_MEMBER_LOG2 5 -typedef struct _ScannedMember ScannedMember; -struct _ScannedMember { - uint32_t tag; - uint8_t wire_type; - uint8_t length_prefix_len; - const ProtobufCFieldDescriptor *field; - size_t len; - const uint8_t *data; -}; - -static inline uint32_t scan_length_prefixed_data (size_t len, const uint8_t *data, size_t *prefix_len_out) { - unsigned hdr_max = len < 5 ? len : 5; - unsigned hdr_len; - uint32_t val = 0; - unsigned i; - unsigned shift = 0; - for (i = 0; i < hdr_max; i++) { - val |= (data[i] & 0x7f) << shift; - shift += 7; - if ((data[i] & 0x80) == 0) - break; - } - if (i == hdr_max) { - UNPACK_ERROR (("error parsing length for length-prefixed data")); - return 0; - } - hdr_len = i + 1; - *prefix_len_out = hdr_len; - if (hdr_len + val > len) { - UNPACK_ERROR (("data too short after length-prefix of %u", - val)); - return 0; - } - return hdr_len + val; -} - -static size_t max_b128_numbers (size_t len, const uint8_t *data) { - size_t rv = 0; - while (len--) - if ((*data++ & 0x80) == 0) - ++rv; - return rv; -} - - -/* Given a raw slab of packed-repeated values, - determine the number of elements. - This function detects certain kinds of errors - but not others; the remaining error checking is done by - parse_packed_repeated_member() */ -static protobuf_c_boolean count_packed_elements (ProtobufCType type, - size_t len, - const uint8_t *data, - size_t *count_out) { - switch (type) { - case PROTOBUF_C_TYPE_SFIXED32: - case PROTOBUF_C_TYPE_FIXED32: - case PROTOBUF_C_TYPE_FLOAT: - if (len % 4 != 0) { - UNPACK_ERROR (("length must be a multiple of 4 for fixed-length 32-bit types")); - return FALSE; - } - *count_out = len / 4; - return TRUE; - - case PROTOBUF_C_TYPE_SFIXED64: - case PROTOBUF_C_TYPE_FIXED64: - case PROTOBUF_C_TYPE_DOUBLE: - if (len % 8 != 0) { - UNPACK_ERROR (("length must be a multiple of 8 for fixed-length 64-bit types")); - return FALSE; - } - *count_out = len / 8; - return TRUE; - - case PROTOBUF_C_TYPE_INT32: - case PROTOBUF_C_TYPE_SINT32: - case PROTOBUF_C_TYPE_ENUM: - case PROTOBUF_C_TYPE_UINT32: - case PROTOBUF_C_TYPE_INT64: - case PROTOBUF_C_TYPE_SINT64: - case PROTOBUF_C_TYPE_UINT64: - *count_out = max_b128_numbers (len, data); - return TRUE; - case PROTOBUF_C_TYPE_BOOL: - *count_out = len; - return TRUE; - - case PROTOBUF_C_TYPE_STRING: - case PROTOBUF_C_TYPE_BYTES: - case PROTOBUF_C_TYPE_MESSAGE: - default: - UNPACK_ERROR (("bad protobuf-c type %u for packed-repeated", type)); - return FALSE; - } -} - -static inline uint32_t parse_uint32 (unsigned len, const uint8_t *data) { - unsigned rv = data[0] & 0x7f; - if (len > 1) { - rv |= ((data[1] & 0x7f) << 7); - if (len > 2) { - rv |= ((data[2] & 0x7f) << 14); - if (len > 3) { - rv |= ((data[3] & 0x7f) << 21); - if (len > 4) - rv |= (data[4] << 28); - } - } - } - return rv; -} -static inline uint32_t parse_int32 (unsigned len, const uint8_t *data) { - return parse_uint32 (len, data); -} -static inline int32_t unzigzag32 (uint32_t v) { - if (v&1) - return -(v>>1) - 1; - else - return v>>1; -} -static inline uint32_t parse_fixed_uint32 (const uint8_t *data) { -#ifdef IS_LITTLE_ENDIAN - uint32_t t; - memcpy (&t, data, 4); - return t; -#else - return data[0] | (data[1] << 8) | (data[2] << 16) | (data[3] << 24); -#endif -} -static uint64_t parse_uint64 (unsigned len, const uint8_t *data) { - unsigned shift, i; - if (len < 5) - return parse_uint32 (len, data); - uint64_t rv = ((data[0] & 0x7f)) - | ((data[1] & 0x7f)<<7) - | ((data[2] & 0x7f)<<14) - | ((data[3] & 0x7f)<<21); - shift = 28; - for (i = 4; i < len; i++) { - rv |= (((uint64_t)(data[i]&0x7f)) << shift); - shift += 7; - } - return rv; -} -static inline int64_t unzigzag64 (uint64_t v) { - if (v&1) - return -(v>>1) - 1; - else - return v>>1; -} -static inline uint64_t parse_fixed_uint64 (const uint8_t *data) { -#ifdef IS_LITTLE_ENDIAN - uint64_t t; - memcpy (&t, data, 8); - return t; -#else - return (uint64_t)parse_fixed_uint32 (data) - | (((uint64_t)parse_fixed_uint32(data+4)) << 32); -#endif -} -static protobuf_c_boolean parse_boolean (unsigned len, const uint8_t *data) { - unsigned i; - for (i = 0; i < len; i++) - if (data[i] & 0x7f) - return 1; - return 0; -} -static protobuf_c_boolean parse_required_member (ScannedMember *scanned_member, - void *member, - ProtobufCAllocator *allocator, - protobuf_c_boolean maybe_clear) { - unsigned len = scanned_member->len; - const uint8_t *data = scanned_member->data; - ProtobufCWireType wire_type = scanned_member->wire_type; - switch (scanned_member->field->type) { - case PROTOBUF_C_TYPE_INT32: - if (wire_type != PROTOBUF_C_WIRE_TYPE_VARINT) - return 0; - *(uint32_t*)member = parse_int32 (len, data); - return 1; - case PROTOBUF_C_TYPE_UINT32: - if (wire_type != PROTOBUF_C_WIRE_TYPE_VARINT) - return 0; - *(uint32_t*)member = parse_uint32 (len, data); - return 1; - case PROTOBUF_C_TYPE_SINT32: - if (wire_type != PROTOBUF_C_WIRE_TYPE_VARINT) - return 0; - *(int32_t*)member = unzigzag32 (parse_uint32 (len, data)); - return 1; - case PROTOBUF_C_TYPE_SFIXED32: - case PROTOBUF_C_TYPE_FIXED32: - case PROTOBUF_C_TYPE_FLOAT: - if (wire_type != PROTOBUF_C_WIRE_TYPE_32BIT) - return 0; - *(uint32_t*)member = parse_fixed_uint32 (data); - return 1; - - case PROTOBUF_C_TYPE_INT64: - case PROTOBUF_C_TYPE_UINT64: - if (wire_type != PROTOBUF_C_WIRE_TYPE_VARINT) - return 0; - *(uint64_t*)member = parse_uint64 (len, data); - return 1; - case PROTOBUF_C_TYPE_SINT64: - if (wire_type != PROTOBUF_C_WIRE_TYPE_VARINT) - return 0; - *(int64_t*)member = unzigzag64 (parse_uint64 (len, data)); - return 1; - case PROTOBUF_C_TYPE_SFIXED64: - case PROTOBUF_C_TYPE_FIXED64: - case PROTOBUF_C_TYPE_DOUBLE: - if (wire_type != PROTOBUF_C_WIRE_TYPE_64BIT) - return 0; - *(uint64_t*)member = parse_fixed_uint64 (data); - return 1; - - case PROTOBUF_C_TYPE_BOOL: - *(protobuf_c_boolean*)member = parse_boolean (len, data); - return 1; - - case PROTOBUF_C_TYPE_ENUM: - if (wire_type != PROTOBUF_C_WIRE_TYPE_VARINT) - return 0; - *(uint32_t*)member = parse_uint32 (len, data); - return 1; - - case PROTOBUF_C_TYPE_STRING: - if (wire_type != PROTOBUF_C_WIRE_TYPE_LENGTH_PREFIXED) - return 0; - { - char **pstr = member; - unsigned pref_len = scanned_member->length_prefix_len; - if (maybe_clear && *pstr != NULL) { - const char *def = scanned_member->field->default_value; - if (*pstr != NULL && *pstr != def) - FREE (allocator, *pstr); - } - DO_ALLOC (*pstr, allocator, len - pref_len + 1, return 0); - memcpy (*pstr, data + pref_len, len - pref_len); - (*pstr)[len-pref_len] = 0; - return 1; - } - case PROTOBUF_C_TYPE_BYTES: - if (wire_type != PROTOBUF_C_WIRE_TYPE_LENGTH_PREFIXED) - return 0; - { - ProtobufCBinaryData *bd = member; - const ProtobufCBinaryData *def_bd; - unsigned pref_len = scanned_member->length_prefix_len; - def_bd = scanned_member->field->default_value; - if (maybe_clear && bd->data != NULL && bd->data != def_bd->data) - FREE (allocator, bd->data); - DO_ALLOC (bd->data, allocator, len - pref_len, return 0); - memcpy (bd->data, data + pref_len, len - pref_len); - bd->len = len - pref_len; - return 1; - } - //case PROTOBUF_C_TYPE_GROUP, // NOT SUPPORTED - case PROTOBUF_C_TYPE_MESSAGE: - if (wire_type != PROTOBUF_C_WIRE_TYPE_LENGTH_PREFIXED) - return 0; - { - ProtobufCMessage **pmessage = member; - ProtobufCMessage *subm; - const ProtobufCMessage *def_mess; - unsigned pref_len = scanned_member->length_prefix_len; - def_mess = scanned_member->field->default_value; - if (maybe_clear && *pmessage != NULL && *pmessage != def_mess) - protobuf_c_message_free_unpacked (*pmessage, allocator); - subm = protobuf_c_message_unpack (scanned_member->field->descriptor, - allocator, - len - pref_len, data + pref_len); - *pmessage = subm; /* since we freed the message we must clear the field, even if NULL */ - if (subm == NULL) - return 0; - return 1; - } - } - return 0; -} - -static protobuf_c_boolean parse_optional_member (ScannedMember *scanned_member, - void *member, - ProtobufCMessage *message, - ProtobufCAllocator *allocator) { - if (!parse_required_member (scanned_member, member, allocator, TRUE)) - return 0; - if (scanned_member->field->quantifier_offset != 0) - STRUCT_MEMBER (protobuf_c_boolean, - message, - scanned_member->field->quantifier_offset) = 1; - return 1; -} - -static protobuf_c_boolean parse_repeated_member (ScannedMember *scanned_member, - void *member, - ProtobufCMessage *message, - ProtobufCAllocator *allocator) { - const ProtobufCFieldDescriptor *field = scanned_member->field; - size_t *p_n = STRUCT_MEMBER_PTR(size_t, message, field->quantifier_offset); - size_t siz = sizeof_elt_in_repeated_array (field->type); - char *array = *(char**)member; - if (!parse_required_member (scanned_member, - array + siz * (*p_n), - allocator, - FALSE)) - return 0; - *p_n += 1; - return 1; -} - -static unsigned scan_varint (unsigned len, const uint8_t *data) { - unsigned i; - if (len > 10) - len = 10; - for (i = 0; i < len; i++) - if ((data[i] & 0x80) == 0) - break; - if (i == len) - return 0; - return i + 1; -} - -static protobuf_c_boolean parse_packed_repeated_member (ScannedMember *scanned_member, - void *member, - ProtobufCMessage *message) { - const ProtobufCFieldDescriptor *field = scanned_member->field; - size_t *p_n = STRUCT_MEMBER_PTR(size_t, message, field->quantifier_offset); - size_t siz = sizeof_elt_in_repeated_array (field->type); - char *array = *(char**)member + siz * (*p_n); - const uint8_t *at = scanned_member->data + scanned_member->length_prefix_len; - size_t rem = scanned_member->len - scanned_member->length_prefix_len; - size_t count = 0; - unsigned i; - switch (field->type) { - case PROTOBUF_C_TYPE_SFIXED32: - case PROTOBUF_C_TYPE_FIXED32: - case PROTOBUF_C_TYPE_FLOAT: - count = (scanned_member->len - scanned_member->length_prefix_len) / 4; -#ifdef IS_LITTLE_ENDIAN - goto no_unpacking_needed; -#else - for (i = 0; i < count; i++) { - ((uint32_t*)array)[i] = parse_fixed_uint32 (at); - at += 4; - } -#endif - break; - case PROTOBUF_C_TYPE_SFIXED64: - case PROTOBUF_C_TYPE_FIXED64: - case PROTOBUF_C_TYPE_DOUBLE: - count = (scanned_member->len - scanned_member->length_prefix_len) / 8; -#ifdef IS_LITTLE_ENDIAN - goto no_unpacking_needed; -#else - for (i = 0; i < count; i++) { - ((uint64_t*)array)[i] = parse_fixed_uint64 (at); - at += 8; - } - break; -#endif - case PROTOBUF_C_TYPE_INT32: - while (rem > 0) { - unsigned s = scan_varint (rem, at); - if (s == 0) { - UNPACK_ERROR (("bad packed-repeated int32 value")); - return FALSE; - } - ((int32_t*)array)[count++] = parse_int32 (s, at); - at += s; - rem -= s; - } - break; - - case PROTOBUF_C_TYPE_SINT32: - while (rem > 0) { - unsigned s = scan_varint (rem, at); - if (s == 0) { - UNPACK_ERROR (("bad packed-repeated sint32 value")); - return FALSE; - } - ((int32_t*)array)[count++] = unzigzag32 (parse_uint32 (s, at)); - at += s; - rem -= s; - } - break; - case PROTOBUF_C_TYPE_ENUM: - case PROTOBUF_C_TYPE_UINT32: - while (rem > 0) { - unsigned s = scan_varint (rem, at); - if (s == 0) { - UNPACK_ERROR (("bad packed-repeated enum or uint32 value")); - return FALSE; - } - ((uint32_t*)array)[count++] = parse_uint32 (s, at); - at += s; - rem -= s; - } - break; - - case PROTOBUF_C_TYPE_SINT64: - while (rem > 0) { - unsigned s = scan_varint (rem, at); - if (s == 0) { - UNPACK_ERROR (("bad packed-repeated sint64 value")); - return FALSE; - } - ((int64_t*)array)[count++] = unzigzag64 (parse_uint64 (s, at)); - at += s; - rem -= s; - } - break; - case PROTOBUF_C_TYPE_INT64: - case PROTOBUF_C_TYPE_UINT64: - while (rem > 0) { - unsigned s = scan_varint (rem, at); - if (s == 0) { - UNPACK_ERROR (("bad packed-repeated int64/uint64 value")); - return FALSE; - } - ((int64_t*)array)[count++] = parse_uint64 (s, at); - at += s; - rem -= s; - } - break; - case PROTOBUF_C_TYPE_BOOL: - count = rem; - for (i = 0; i < count; i++) { - if (at[i] > 1) { - UNPACK_ERROR (("bad packed-repeated boolean value")); - return FALSE; - } - ((protobuf_c_boolean*)array)[i] = at[i]; - } - break; - default: - assert(0); - } - *p_n += count; - return TRUE; - -#ifdef IS_LITTLE_ENDIAN -no_unpacking_needed: - memcpy (array, at, count * siz); - *p_n += count; - return TRUE; -#endif -} - -static protobuf_c_boolean parse_member (ScannedMember *scanned_member, - ProtobufCMessage *message, - ProtobufCAllocator *allocator) { - const ProtobufCFieldDescriptor *field = scanned_member->field; - void *member; - if (field == NULL) { - ProtobufCMessageUnknownField *ufield = message->unknown_fields + (message->n_unknown_fields++); - ufield->tag = scanned_member->tag; - ufield->wire_type = scanned_member->wire_type; - ufield->len = scanned_member->len; - DO_UNALIGNED_ALLOC (ufield->data, allocator, scanned_member->len, return 0); - memcpy (ufield->data, scanned_member->data, ufield->len); - return 1; - } - member = (char*)message + field->offset; - switch (field->label) { - case PROTOBUF_C_LABEL_REQUIRED: - return parse_required_member (scanned_member, member, allocator, TRUE); - case PROTOBUF_C_LABEL_OPTIONAL: - return parse_optional_member (scanned_member, member, message, allocator); - case PROTOBUF_C_LABEL_REPEATED: - if (field->packed - && scanned_member->wire_type == PROTOBUF_C_WIRE_TYPE_LENGTH_PREFIXED) - return parse_packed_repeated_member (scanned_member, member, message); - else - return parse_repeated_member (scanned_member, member, message, allocator); - } - PROTOBUF_C_ASSERT_NOT_REACHED (); - return 0; -} - - -/* TODO: expose/use this function if desc->message_init==NULL - (which occurs for old code, and may be useful for certain - programatic techniques for generating descriptors). */ -static void protobuf_c_message_init_generic (const ProtobufCMessageDescriptor *desc, - ProtobufCMessage *message) { - unsigned i; - memset (message, 0, desc->sizeof_message); - message->descriptor = desc; - for (i = 0; i < desc->n_fields; i++) - if (desc->fields[i].default_value != NULL - && desc->fields[i].label != PROTOBUF_C_LABEL_REPEATED) { - void *field = STRUCT_MEMBER_P (message, desc->fields[i].offset); - const void *dv = desc->fields[i].default_value; - switch (desc->fields[i].type) { - case PROTOBUF_C_TYPE_INT32: - case PROTOBUF_C_TYPE_SINT32: - case PROTOBUF_C_TYPE_SFIXED32: - case PROTOBUF_C_TYPE_UINT32: - case PROTOBUF_C_TYPE_FIXED32: - case PROTOBUF_C_TYPE_FLOAT: - case PROTOBUF_C_TYPE_ENUM: - memcpy (field, dv, 4); - break; - - case PROTOBUF_C_TYPE_INT64: - case PROTOBUF_C_TYPE_SINT64: - case PROTOBUF_C_TYPE_SFIXED64: - case PROTOBUF_C_TYPE_UINT64: - case PROTOBUF_C_TYPE_FIXED64: - case PROTOBUF_C_TYPE_DOUBLE: - memcpy (field, dv, 8); - break; - - case PROTOBUF_C_TYPE_BOOL: - memcpy (field, dv, sizeof (protobuf_c_boolean)); - break; - - case PROTOBUF_C_TYPE_BYTES: - memcpy (field, dv, sizeof (ProtobufCBinaryData)); - break; - - case PROTOBUF_C_TYPE_STRING: - case PROTOBUF_C_TYPE_MESSAGE: - /* the next line essentially implements a cast from const, - which is totally unavoidable. */ - *(const void**)field = dv; - break; - } - } -} - -/* ScannedMember slabs (an unpacking implementation detail). - Before doing real unpacking, we first scan through the - elements to see how many there are (for repeated fields), - and which field to use (for non-repeated fields given twice). - - * In order to avoid allocations for small messages, - we keep a stack-allocated slab of ScannedMembers of - size FIRST_SCANNED_MEMBER_SLAB_SIZE (16). - After we fill that up, we allocate each slab twice - as large as the previous one. */ -#define FIRST_SCANNED_MEMBER_SLAB_SIZE_LOG2 4 - -/* The number of slabs, including the stack-allocated ones; - choose the number so that we would overflow if we needed - a slab larger than provided. */ -#define MAX_SCANNED_MEMBER_SLAB \ - (sizeof(void*)*8 - 1 \ - - BOUND_SIZEOF_SCANNED_MEMBER_LOG2 \ - - FIRST_SCANNED_MEMBER_SLAB_SIZE_LOG2) - -ProtobufCMessage *protobuf_c_message_unpack (const ProtobufCMessageDescriptor *desc, - ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data) { - ProtobufCMessage *rv; - size_t rem = len; - const uint8_t *at = data; - const ProtobufCFieldDescriptor *last_field = desc->fields + 0; - ScannedMember first_member_slab[1<<FIRST_SCANNED_MEMBER_SLAB_SIZE_LOG2]; - - /* scanned_member_slabs[i] is an array of arrays of ScannedMember. - The first slab (scanned_member_slabs[0] is just a pointer to - first_member_slab), above. All subsequent slabs will be allocated - using the allocator. */ - ScannedMember *scanned_member_slabs[MAX_SCANNED_MEMBER_SLAB+1]; - unsigned which_slab = 0; /* the slab we are currently populating */ - unsigned in_slab_index = 0; /* number of members in the slab */ - size_t n_unknown = 0; - unsigned f; - unsigned i_slab; - unsigned last_field_index = 0; - unsigned long *required_fields_bitmap; - unsigned required_fields_bitmap_len; - static const unsigned word_bits = sizeof(long) * 8; - - ASSERT_IS_MESSAGE_DESCRIPTOR (desc); - - if (allocator == NULL) - allocator = &protobuf_c_default_allocator; - - required_fields_bitmap_len = (desc->n_fields + word_bits - 1) / word_bits; - required_fields_bitmap = alloca(required_fields_bitmap_len * sizeof(long)); - memset(required_fields_bitmap, 0, required_fields_bitmap_len * sizeof(long)); - - DO_ALLOC (rv, allocator, desc->sizeof_message, return NULL); - scanned_member_slabs[0] = first_member_slab; - - /* Generated code always defines "message_init". - However, we provide a fallback for (1) users of old protobuf-c - generated-code that do not provide the function, - and (2) descriptors constructed from some other source - (most likely, direct construction from the .proto file) */ - if (desc->message_init != NULL) - protobuf_c_message_init (desc, rv); - else - protobuf_c_message_init_generic (desc, rv); - - while (rem > 0) { - uint32_t tag; - ProtobufCWireType wire_type; - size_t used = parse_tag_and_wiretype (rem, at, &tag, &wire_type); - const ProtobufCFieldDescriptor *field; - ScannedMember tmp; - if (used == 0) { - UNPACK_ERROR (("error parsing tag/wiretype at offset %u", - (unsigned)(at-data))); - goto error_cleanup_during_scan; - } - /* XXX: consider optimizing for field[1].id == tag, if field[1] exists! */ - if (last_field->id != tag) { - /* lookup field */ - int field_index = int_range_lookup (desc->n_field_ranges, - desc->field_ranges, - tag); - if (field_index < 0) { - field = NULL; - n_unknown++; - } else { - field = desc->fields + field_index; - last_field = field; - last_field_index = field_index; - } - } else - field = last_field; - - if (field != NULL && field->label == PROTOBUF_C_LABEL_REQUIRED) - required_fields_bitmap[last_field_index / word_bits] |= (1UL << (last_field_index % word_bits)); - - at += used; - rem -= used; - tmp.tag = tag; - tmp.wire_type = wire_type; - tmp.field = field; - tmp.data = at; - switch (wire_type) { - case PROTOBUF_C_WIRE_TYPE_VARINT: { - unsigned max_len = rem < 10 ? rem : 10; - unsigned i; - for (i = 0; i < max_len; i++) - if ((at[i] & 0x80) == 0) - break; - if (i == max_len) { - UNPACK_ERROR (("unterminated varint at offset %u", - (unsigned)(at-data))); - goto error_cleanup_during_scan; - } - tmp.len = i + 1; - } - break; - case PROTOBUF_C_WIRE_TYPE_64BIT: - if (rem < 8) { - UNPACK_ERROR (("too short after 64bit wiretype at offset %u", - (unsigned)(at-data))); - goto error_cleanup_during_scan; - } - tmp.len = 8; - break; - case PROTOBUF_C_WIRE_TYPE_LENGTH_PREFIXED: { - size_t pref_len; - tmp.len = scan_length_prefixed_data (rem, at, &pref_len); - if (tmp.len == 0) { - /* NOTE: scan_length_prefixed_data calls UNPACK_ERROR */ - goto error_cleanup_during_scan; - } - tmp.length_prefix_len = pref_len; - break; - } - case PROTOBUF_C_WIRE_TYPE_32BIT: - if (rem < 4) { - UNPACK_ERROR (("too short after 32bit wiretype at offset %u", - (unsigned)(at-data))); - goto error_cleanup_during_scan; - } - tmp.len = 4; - break; - default: - UNPACK_ERROR (("unsupported tag %u at offset %u", - wire_type, (unsigned)(at-data))); - goto error_cleanup_during_scan; - } - if (in_slab_index == (1U<<(which_slab+FIRST_SCANNED_MEMBER_SLAB_SIZE_LOG2))) { - size_t size; - in_slab_index = 0; - if (which_slab == MAX_SCANNED_MEMBER_SLAB) { - UNPACK_ERROR (("too many fields")); - goto error_cleanup_during_scan; - } - which_slab++; - size = sizeof(ScannedMember) << (which_slab+FIRST_SCANNED_MEMBER_SLAB_SIZE_LOG2); - /* TODO: consider using alloca() ! */ - if (allocator->tmp_alloc != NULL) - scanned_member_slabs[which_slab] = TMPALLOC(allocator, size); - else - DO_ALLOC (scanned_member_slabs[which_slab], allocator, size, goto error_cleanup_during_scan); - } - scanned_member_slabs[which_slab][in_slab_index++] = tmp; - - if (field != NULL && field->label == PROTOBUF_C_LABEL_REPEATED) { - size_t *n = STRUCT_MEMBER_PTR (size_t, rv, field->quantifier_offset); - if (field->packed - && wire_type == PROTOBUF_C_WIRE_TYPE_LENGTH_PREFIXED) { - size_t count; - if (!count_packed_elements (field->type, - tmp.len - tmp.length_prefix_len, - tmp.data + tmp.length_prefix_len, - &count)) { - UNPACK_ERROR (("counting packed elements")); - goto error_cleanup_during_scan; - } - *n += count; - } else - *n += 1; - } - - at += tmp.len; - rem -= tmp.len; - } - - /* allocate space for repeated fields, also check that all required fields have been set */ - for (f = 0; f < desc->n_fields; f++) { - const ProtobufCFieldDescriptor *field = desc->fields + f; - if (field->label == PROTOBUF_C_LABEL_REPEATED) { - size_t siz = sizeof_elt_in_repeated_array (field->type); - size_t *n_ptr = STRUCT_MEMBER_PTR (size_t, rv, field->quantifier_offset); - if (*n_ptr != 0) { - unsigned n = *n_ptr; - *n_ptr = 0; - assert(rv->descriptor != NULL); -#define CLEAR_REMAINING_N_PTRS() \ - for(f++;f < desc->n_fields; f++) \ - { \ - field = desc->fields + f; \ - if (field->label == PROTOBUF_C_LABEL_REPEATED) \ - STRUCT_MEMBER (size_t, rv, field->quantifier_offset) = 0; \ - } - DO_ALLOC (STRUCT_MEMBER (void *, rv, field->offset), - allocator, siz * n, - CLEAR_REMAINING_N_PTRS (); goto error_cleanup); -#undef CLEAR_REMAINING_N_PTRS - } - } else if (field->label == PROTOBUF_C_LABEL_REQUIRED) { - if (field->default_value == NULL && 0 == (required_fields_bitmap[f / word_bits] & (1UL << (f % word_bits)))) { - UNPACK_ERROR (("message '%s': missing required field '%s'", desc->name, field->name)); - goto error_cleanup; - } - } - } - - /* allocate space for unknown fields */ - if (n_unknown) { - DO_ALLOC (rv->unknown_fields, - allocator, n_unknown * sizeof (ProtobufCMessageUnknownField), - goto error_cleanup); - } - - /* do real parsing */ - for (i_slab = 0; i_slab <= which_slab; i_slab++) { - unsigned max = (i_slab == which_slab) ? in_slab_index : (1U<<(i_slab+4)); - ScannedMember *slab = scanned_member_slabs[i_slab]; - unsigned j; - for (j = 0; j < max; j++) { - if (!parse_member (slab + j, rv, allocator)) { - UNPACK_ERROR (("error parsing member %s of %s", - slab->field ? slab->field->name : "*unknown-field*", desc->name)); - goto error_cleanup; - } - } - } - - /* cleanup */ - if (allocator->tmp_alloc == NULL) { - unsigned j; - for (j = 1; j <= which_slab; j++) - FREE (allocator, scanned_member_slabs[j]); - } - - return rv; - -error_cleanup: - protobuf_c_message_free_unpacked (rv, allocator); - if (allocator->tmp_alloc == NULL) { - unsigned j; - for (j = 1; j <= which_slab; j++) - FREE (allocator, scanned_member_slabs[j]); - } - return NULL; - -error_cleanup_during_scan: - FREE (allocator, rv); - if (allocator->tmp_alloc == NULL) { - unsigned j; - for (j = 1; j <= which_slab; j++) - FREE (allocator, scanned_member_slabs[j]); - } - return NULL; -} - -/* === free_unpacked === */ -void protobuf_c_message_free_unpacked (ProtobufCMessage *message, - ProtobufCAllocator *allocator) { - const ProtobufCMessageDescriptor *desc = message->descriptor; - unsigned f; - ASSERT_IS_MESSAGE (message); - if (allocator == NULL) - allocator = &protobuf_c_default_allocator; - message->descriptor = NULL; - for (f = 0; f < desc->n_fields; f++) { - if (desc->fields[f].label == PROTOBUF_C_LABEL_REPEATED) { - size_t n = STRUCT_MEMBER (size_t, message, desc->fields[f].quantifier_offset); - void * arr = STRUCT_MEMBER (void *, message, desc->fields[f].offset); - if (desc->fields[f].type == PROTOBUF_C_TYPE_STRING) { - unsigned i; - for (i = 0; i < n; i++) - FREE (allocator, ((char**)arr)[i]); - } else if (desc->fields[f].type == PROTOBUF_C_TYPE_BYTES) { - unsigned i; - for (i = 0; i < n; i++) - FREE (allocator, ((ProtobufCBinaryData*)arr)[i].data); - } else if (desc->fields[f].type == PROTOBUF_C_TYPE_MESSAGE) { - unsigned i; - for (i = 0; i < n; i++) - protobuf_c_message_free_unpacked (((ProtobufCMessage**)arr)[i], allocator); - } - if (arr != NULL) - FREE (allocator, arr); - } else if (desc->fields[f].type == PROTOBUF_C_TYPE_STRING) { - char *str = STRUCT_MEMBER (char *, message, desc->fields[f].offset); - if (str && str != desc->fields[f].default_value) - FREE (allocator, str); - } else if (desc->fields[f].type == PROTOBUF_C_TYPE_BYTES) { - void *data = STRUCT_MEMBER (ProtobufCBinaryData, message, desc->fields[f].offset).data; - const ProtobufCBinaryData *default_bd; - default_bd = desc->fields[f].default_value; - if (data != NULL - && (default_bd == NULL || default_bd->data != data)) - FREE (allocator, data); - } else if (desc->fields[f].type == PROTOBUF_C_TYPE_MESSAGE) { - ProtobufCMessage *sm; - sm = STRUCT_MEMBER (ProtobufCMessage *, message,desc->fields[f].offset); - if (sm && sm != desc->fields[f].default_value) - protobuf_c_message_free_unpacked (sm, allocator); - } - } - - for (f = 0; f < message->n_unknown_fields; f++) - FREE (allocator, message->unknown_fields[f].data); - if (message->unknown_fields != NULL) - FREE (allocator, message->unknown_fields); - - FREE (allocator, message); -} - -/* === services === */ -typedef void (*GenericHandler)(void *service, - const ProtobufCMessage *input, - ProtobufCClosure closure, - void *closure_data); -void protobuf_c_service_invoke_internal(ProtobufCService *service, - unsigned method_index, - const ProtobufCMessage *input, - ProtobufCClosure closure, - void *closure_data) { - GenericHandler *handlers; - GenericHandler handler; - - /* Verify that method_index is within range. - If this fails, you are likely invoking a newly added - method on an old service. (Although other memory corruption - bugs can cause this assertion too) */ - PROTOBUF_C_ASSERT (method_index < service->descriptor->n_methods); - - /* Get the array of virtual methods (which are enumerated by - the generated code) */ - handlers = (GenericHandler *) (service + 1); - - /* get our method and invoke it */ - /* TODO: seems like handler==NULL is a situation that - needs handling */ - handler = handlers[method_index]; - (*handler) (service, input, closure, closure_data); -} - -void protobuf_c_service_generated_init (ProtobufCService *service, - const ProtobufCServiceDescriptor *descriptor, - ProtobufCServiceDestroy destroy) { - ASSERT_IS_SERVICE_DESCRIPTOR(descriptor); - service->descriptor = descriptor; - service->destroy = destroy; - service->invoke = protobuf_c_service_invoke_internal; - memset (service + 1, 0, descriptor->n_methods * sizeof (GenericHandler)); -} - -void protobuf_c_service_destroy (ProtobufCService *service) { - service->destroy (service); -} - -/* --- querying the descriptors --- */ -const ProtobufCEnumValue * -protobuf_c_enum_descriptor_get_value_by_name -(const ProtobufCEnumDescriptor *desc, - const char *name) { - unsigned start = 0, count = desc->n_value_names; - while (count > 1) { - unsigned mid = start + count / 2; - int rv = g_strcmp0(desc->values_by_name[mid].name, name); - if (rv == 0) - return desc->values + desc->values_by_name[mid].index; - else if (rv < 0) { - count = start + count - (mid + 1); - start = mid + 1; - } else - count = mid - start; - } - if (count == 0) - return NULL; - if (g_strcmp0(desc->values_by_name[start].name, name) == 0) - return desc->values + desc->values_by_name[start].index; - return NULL; -} -const ProtobufCEnumValue * -protobuf_c_enum_descriptor_get_value -(const ProtobufCEnumDescriptor *desc, - int value) { - int rv = int_range_lookup (desc->n_value_ranges, desc->value_ranges, value); - if (rv < 0) - return NULL; - return desc->values + rv; -} - -const ProtobufCFieldDescriptor * -protobuf_c_message_descriptor_get_field_by_name -(const ProtobufCMessageDescriptor *desc, - const char *name) { - unsigned start = 0, count = desc->n_fields; - const ProtobufCFieldDescriptor *field; - while (count > 1) { - unsigned mid = start + count / 2; - int rv; - field = desc->fields + desc->fields_sorted_by_name[mid]; - rv = g_strcmp0(field->name, name); - if (rv == 0) - return field; - else if (rv < 0) { - count = start + count - (mid + 1); - start = mid + 1; - } else - count = mid - start; - } - if (count == 0) - return NULL; - field = desc->fields + desc->fields_sorted_by_name[start]; - if (g_strcmp0(field->name, name) == 0) - return field; - return NULL; -} - -const ProtobufCFieldDescriptor * -protobuf_c_message_descriptor_get_field -(const ProtobufCMessageDescriptor *desc, - unsigned value) { - int rv = int_range_lookup (desc->n_field_ranges, - desc->field_ranges, - value); - if (rv < 0) - return NULL; - return desc->fields + rv; -} - -const ProtobufCMethodDescriptor * -protobuf_c_service_descriptor_get_method_by_name -(const ProtobufCServiceDescriptor *desc, - const char *name) { - unsigned start = 0, count = desc->n_methods; - while (count > 1) { - unsigned mid = start + count / 2; - unsigned mid_index = desc->method_indices_by_name[mid]; - const char *mid_name = desc->methods[mid_index].name; - int rv = g_strcmp0(mid_name, name); - if (rv == 0) - return desc->methods + desc->method_indices_by_name[mid]; - if (rv < 0) { - count = start + count - (mid + 1); - start = mid + 1; - } else { - count = mid - start; - } - } - if (count == 0) - return NULL; - if (g_strcmp0(desc->methods[desc->method_indices_by_name[start]].name, name) == 0) - return desc->methods + desc->method_indices_by_name[start]; - return NULL; -} diff --git a/navit/maptool/google/protobuf-c/protobuf-c.h b/navit/maptool/google/protobuf-c/protobuf-c.h deleted file mode 100644 index 50af74dac..000000000 --- a/navit/maptool/google/protobuf-c/protobuf-c.h +++ /dev/null @@ -1,444 +0,0 @@ -/* --- protobuf-c.h: public protobuf c runtime api --- */ - -/* - * Copyright 2008, Dave Benson. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with - * the License. You may obtain a copy of the License - * at http://www.apache.org/licenses/LICENSE-2.0 Unless - * required by applicable law or agreed to in writing, - * software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#ifndef __PROTOBUF_C_RUNTIME_H_ -#define __PROTOBUF_C_RUNTIME_H_ - -#include <stddef.h> -#include <assert.h> - -#ifdef __cplusplus -# define PROTOBUF_C_BEGIN_DECLS extern "C" { -# define PROTOBUF_C_END_DECLS } -#else -# define PROTOBUF_C_BEGIN_DECLS -# define PROTOBUF_C_END_DECLS -#endif - -#if !defined(PROTOBUF_C_NO_DEPRECATED) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) -#define PROTOBUF_C_DEPRECATED __attribute__((__deprecated__)) -#else -#define PROTOBUF_C_DEPRECATED -#endif - -/* Define int32_t, int64_t, uint32_t, uint64_t, uint8_t. - - Usually, just include <inttypes.h> to do the work. - XXX: should we use stdint.h? - */ -#ifndef PROTOBUF_C_SKIP_INTTYPES_H -# if defined(_MSC_VER) - /* On windows, in ms visual studio, define the types ourselves */ -# define int32_t signed __int32 -# define uint32_t unsigned __int32 -# define int64_t signed __int64 -# define uint64_t unsigned __int64 -# define uint8_t unsigned char -# else - /* Use the system inttypes.h */ -# include <inttypes.h> -# endif -#endif - -PROTOBUF_C_BEGIN_DECLS - -typedef enum -{ - PROTOBUF_C_LABEL_REQUIRED, - PROTOBUF_C_LABEL_OPTIONAL, - PROTOBUF_C_LABEL_REPEATED -} ProtobufCLabel; - -typedef enum -{ - PROTOBUF_C_TYPE_INT32, - PROTOBUF_C_TYPE_SINT32, - PROTOBUF_C_TYPE_SFIXED32, - PROTOBUF_C_TYPE_INT64, - PROTOBUF_C_TYPE_SINT64, - PROTOBUF_C_TYPE_SFIXED64, - PROTOBUF_C_TYPE_UINT32, - PROTOBUF_C_TYPE_FIXED32, - PROTOBUF_C_TYPE_UINT64, - PROTOBUF_C_TYPE_FIXED64, - PROTOBUF_C_TYPE_FLOAT, - PROTOBUF_C_TYPE_DOUBLE, - PROTOBUF_C_TYPE_BOOL, - PROTOBUF_C_TYPE_ENUM, - PROTOBUF_C_TYPE_STRING, - PROTOBUF_C_TYPE_BYTES, - //PROTOBUF_C_TYPE_GROUP, // NOT SUPPORTED - PROTOBUF_C_TYPE_MESSAGE, -} ProtobufCType; - -typedef int protobuf_c_boolean; -#define PROTOBUF_C_OFFSETOF(struct, member) offsetof(struct, member) - -#define PROTOBUF_C_ASSERT(condition) assert(condition) -#define PROTOBUF_C_ASSERT_NOT_REACHED() assert(0) - -typedef struct _ProtobufCBinaryData ProtobufCBinaryData; -struct _ProtobufCBinaryData -{ - size_t len; - uint8_t *data; -}; - -typedef struct _ProtobufCIntRange ProtobufCIntRange; /* private */ - -/* --- memory management --- */ -typedef struct _ProtobufCAllocator ProtobufCAllocator; -struct _ProtobufCAllocator -{ - void *(*alloc)(void *allocator_data, size_t size); - void (*free)(void *allocator_data, void *pointer); - void *(*tmp_alloc)(void *allocator_data, size_t size); - unsigned max_alloca; - void *allocator_data; -}; - -/* This is a configurable allocator. - * By default, it uses the system allocator (meaning malloc() and free()). - * This is typically changed to adapt to frameworks that provide - * some nonstandard allocation functions. - * - * NOTE: you may modify this allocator. - */ -extern ProtobufCAllocator protobuf_c_default_allocator; /* settable */ - -/* This is the system allocator, meaning it uses malloc() and free(). - * - * NOTE: please do NOT modify this allocator. - */ -extern ProtobufCAllocator protobuf_c_system_allocator; /* use malloc, free etc */ - -/* This is the function that our default allocators call when they - run out-of-memory. The default behavior of this function is to - terminate your program. */ -extern void (*protobuf_c_out_of_memory) (void); - -/* --- append-only data buffer --- */ -typedef struct _ProtobufCBuffer ProtobufCBuffer; -struct _ProtobufCBuffer -{ - void (*append)(ProtobufCBuffer *buffer, - size_t len, - const uint8_t *data); -}; -/* --- enums --- */ -typedef struct _ProtobufCEnumValue ProtobufCEnumValue; -typedef struct _ProtobufCEnumValueIndex ProtobufCEnumValueIndex; -typedef struct _ProtobufCEnumDescriptor ProtobufCEnumDescriptor; - -/* ProtobufCEnumValue: this represents a single value of - * an enumeration. - * 'name' is the string identifying this value, as given in the .proto file. - * 'c_name' is the full name of the C enumeration value. - * 'value' is the number assigned to this value, as given in the .proto file. - */ -struct _ProtobufCEnumValue -{ - const char *name; - const char *c_name; - int value; -}; - -/* ProtobufCEnumDescriptor: the represents the enum as a whole, - * with all its values. - * 'magic' is a code we check to ensure that the api is used correctly. - * 'name' is the qualified name (e.g. "namespace.Type"). - * 'short_name' is the unqualified name ("Type"), as given in the .proto file. - * 'package_name' is the '.'-separated namespace - * 'n_values' is the number of distinct values. - * 'values' is the array of distinct values. - * 'n_value_names' number of named values (including aliases). - * 'value_names' are the named values (including aliases). - * - * The rest of the values are private essentially. - * - * see also: Use protobuf_c_enum_descriptor_get_value_by_name() - * and protobuf_c_enum_descriptor_get_value() to efficiently - * lookup values in the descriptor. - */ -struct _ProtobufCEnumDescriptor -{ - uint32_t magic; - - const char *name; - const char *short_name; - const char *c_name; - const char *package_name; - - /* sorted by value */ - unsigned n_values; - const ProtobufCEnumValue *values; - - /* sorted by name */ - unsigned n_value_names; - const ProtobufCEnumValueIndex *values_by_name; - - /* value-ranges, for faster lookups by number */ - unsigned n_value_ranges; - const ProtobufCIntRange *value_ranges; - - void *reserved1; - void *reserved2; - void *reserved3; - void *reserved4; -}; - -/* --- messages --- */ -typedef struct _ProtobufCMessageDescriptor ProtobufCMessageDescriptor; -typedef struct _ProtobufCFieldDescriptor ProtobufCFieldDescriptor; -typedef struct _ProtobufCMessage ProtobufCMessage; -typedef void (*ProtobufCMessageInit)(ProtobufCMessage *); -/* ProtobufCFieldDescriptor: description of a single field - * in a message. - * 'name' is the name of the field, as given in the .proto file. - * 'id' is the code representing the field, as given in the .proto file. - * 'label' is one of PROTOBUF_C_LABEL_{REQUIRED,OPTIONAL,REPEATED} - * 'type' is the type of field. - * 'quantifier_offset' is the offset in bytes into the message's C structure - * for this member's "has_MEMBER" field (for optional members) or - * "n_MEMBER" field (for repeated members). - * 'offset' is the offset in bytes into the message's C structure - * for the member itself. - * 'descriptor' is a pointer to a ProtobufC{Enum,Message}Descriptor - * if type is PROTOBUF_C_TYPE_{ENUM,MESSAGE} respectively, - * otherwise NULL. - * 'default_value' is a pointer to a default value for this field, - * where allowed. - */ -struct _ProtobufCFieldDescriptor -{ - const char *name; - uint32_t id; - ProtobufCLabel label; - ProtobufCType type; - unsigned quantifier_offset; - unsigned offset; - const void *descriptor; /* for MESSAGE and ENUM types */ - const void *default_value; /* or NULL if no default-value */ - protobuf_c_boolean packed; - - unsigned reserved_flags; - void *reserved2; - void *reserved3; -}; -/* ProtobufCMessageDescriptor: description of a message. - * - * 'magic' is a code we check to ensure that the api is used correctly. - * 'name' is the qualified name (e.g. "namespace.Type"). - * 'short_name' is the unqualified name ("Type"), as given in the .proto file. - * 'c_name' is the c-formatted name of the structure - * 'package_name' is the '.'-separated namespace - * 'sizeof_message' is the size in bytes of the C structure - * representing an instance of this type of message. - * 'n_fields' is the number of known fields in this message. - * 'fields' is the fields sorted by id number. - * 'fields_sorted_by_name', 'n_field_ranges' and 'field_ranges' - * are used for looking up fields by name and id. (private) - */ -struct _ProtobufCMessageDescriptor -{ - uint32_t magic; - - const char *name; - const char *short_name; - const char *c_name; - const char *package_name; - - size_t sizeof_message; - - /* sorted by field-id */ - unsigned n_fields; - const ProtobufCFieldDescriptor *fields; - const unsigned *fields_sorted_by_name; - - /* ranges, optimization for looking up fields */ - unsigned n_field_ranges; - const ProtobufCIntRange *field_ranges; - - ProtobufCMessageInit message_init; - void *reserved1; - void *reserved2; - void *reserved3; -}; - - -/* ProtobufCMessage: an instance of a message. - * - * ProtobufCMessage is sort-of a lightweight - * base-class for all messages. - * - * In particular, ProtobufCMessage doesn't have - * any allocation policy associated with it. - * That's because it is common to create ProtobufCMessage's - * on the stack. In fact, we that's what we recommend - * for sending messages (because if you just allocate from the - * stack, then you can't really have a memory leak). - * - * This means that functions like protobuf_c_message_unpack() - * which return a ProtobufCMessage must be paired - * with a free function, like protobuf_c_message_free_unpacked(). - * - * 'descriptor' gives the locations and types of the members of message - * 'n_unknown_fields' is the number of fields we didn't recognize. - * 'unknown_fields' are fields we didn't recognize. - */ -typedef struct _ProtobufCMessageUnknownField ProtobufCMessageUnknownField; -struct _ProtobufCMessage -{ - const ProtobufCMessageDescriptor *descriptor; - unsigned n_unknown_fields; - ProtobufCMessageUnknownField *unknown_fields; -}; -#define PROTOBUF_C_MESSAGE_INIT(descriptor) { descriptor, 0, NULL } - -/* To pack a message: you have two options: - (1) you can compute the size of the message - using protobuf_c_message_get_packed_size() - then pass protobuf_c_message_pack() a buffer of - that length. - (2) Provide a virtual buffer (a ProtobufCBuffer) to - accept data as we scan through it. - */ -size_t protobuf_c_message_get_packed_size(const ProtobufCMessage *message); -size_t protobuf_c_message_pack (const ProtobufCMessage *message, - uint8_t *out); -size_t protobuf_c_message_pack_to_buffer (const ProtobufCMessage *message, - ProtobufCBuffer *buffer); - -ProtobufCMessage * - protobuf_c_message_unpack (const ProtobufCMessageDescriptor *, - ProtobufCAllocator *allocator, - size_t len, - const uint8_t *data); -void protobuf_c_message_free_unpacked (ProtobufCMessage *message, - ProtobufCAllocator *allocator); - -/* WARNING: 'message' must be a block of memory - of size descriptor->sizeof_message. */ -#define protobuf_c_message_init(descriptor, message) ((descriptor)->message_init((ProtobufCMessage*) (message))) - -/* --- services --- */ -typedef struct _ProtobufCMethodDescriptor ProtobufCMethodDescriptor; -typedef struct _ProtobufCServiceDescriptor ProtobufCServiceDescriptor; - -struct _ProtobufCMethodDescriptor -{ - const char *name; - const ProtobufCMessageDescriptor *input; - const ProtobufCMessageDescriptor *output; -}; -struct _ProtobufCServiceDescriptor -{ - uint32_t magic; - - const char *name; - const char *short_name; - const char *c_name; - const char *package; - unsigned n_methods; - const ProtobufCMethodDescriptor *methods; /* in order from .proto file */ - const unsigned *method_indices_by_name; -}; - -typedef struct _ProtobufCService ProtobufCService; -typedef void (*ProtobufCClosure)(const ProtobufCMessage *message, - void *closure_data); -struct _ProtobufCService -{ - const ProtobufCServiceDescriptor *descriptor; - void (*invoke)(ProtobufCService *service, - unsigned method_index, - const ProtobufCMessage *input, - ProtobufCClosure closure, - void *closure_data); - void (*destroy) (ProtobufCService *service); -}; - - -void protobuf_c_service_destroy (ProtobufCService *); - - -/* --- querying the descriptors --- */ -const ProtobufCEnumValue * -protobuf_c_enum_descriptor_get_value_by_name - (const ProtobufCEnumDescriptor *desc, - const char *name); -const ProtobufCEnumValue * -protobuf_c_enum_descriptor_get_value - (const ProtobufCEnumDescriptor *desc, - int value); -const ProtobufCFieldDescriptor * -protobuf_c_message_descriptor_get_field_by_name - (const ProtobufCMessageDescriptor *desc, - const char *name); -const ProtobufCFieldDescriptor * -protobuf_c_message_descriptor_get_field - (const ProtobufCMessageDescriptor *desc, - unsigned value); -const ProtobufCMethodDescriptor * -protobuf_c_service_descriptor_get_method_by_name - (const ProtobufCServiceDescriptor *desc, - const char *name); - -/* --- wire format enums --- */ -typedef enum -{ - PROTOBUF_C_WIRE_TYPE_VARINT, - PROTOBUF_C_WIRE_TYPE_64BIT, - PROTOBUF_C_WIRE_TYPE_LENGTH_PREFIXED, - PROTOBUF_C_WIRE_TYPE_START_GROUP, /* unsupported */ - PROTOBUF_C_WIRE_TYPE_END_GROUP, /* unsupported */ - PROTOBUF_C_WIRE_TYPE_32BIT -} ProtobufCWireType; - -/* --- unknown message fields --- */ -struct _ProtobufCMessageUnknownField -{ - uint32_t tag; - ProtobufCWireType wire_type; - size_t len; - uint8_t *data; -}; - -/* --- extra (superfluous) api: trivial buffer --- */ -typedef struct _ProtobufCBufferSimple ProtobufCBufferSimple; -struct _ProtobufCBufferSimple -{ - ProtobufCBuffer base; - size_t alloced; - size_t len; - uint8_t *data; - protobuf_c_boolean must_free_data; -}; -#define PROTOBUF_C_BUFFER_SIMPLE_INIT(array_of_bytes) \ -{ { protobuf_c_buffer_simple_append }, \ - sizeof(array_of_bytes), 0, (array_of_bytes), 0 } -#define PROTOBUF_C_BUFFER_SIMPLE_CLEAR(simp_buf) \ - do { if ((simp_buf)->must_free_data) \ - protobuf_c_default_allocator.free (&protobuf_c_default_allocator.allocator_data, (simp_buf)->data); } while (0) - -/* ====== private ====== */ -#include "protobuf-c-private.h" - - -PROTOBUF_C_END_DECLS - -#endif /* __PROTOBUF_C_RUNTIME_H_ */ diff --git a/navit/maptool/osm_protobuf.c b/navit/maptool/osm_protobuf.c index b6af3adef..4f71010e4 100644 --- a/navit/maptool/osm_protobuf.c +++ b/navit/maptool/osm_protobuf.c @@ -26,8 +26,8 @@ #include "debug.h" #include "linguistics.h" #include "file.h" -#include "generated-code/fileformat.pb-c.h" -#include "generated-code/osmformat.pb-c.h" +#include "fileformat.pb-c.h" +#include "osmformat.pb-c.h" static double latlon_scale=10000000.0; @@ -57,7 +57,7 @@ static OSMPBF__BlobHeader *read_header(FILE *f) { buffer=alloca(len); if (fread(buffer, len, 1, f) != 1) return NULL; - return osmpbf__blob_header__unpack(&protobuf_c_system_allocator, len, buffer); + return osmpbf__blob_header__unpack(NULL, len, buffer); } @@ -66,7 +66,7 @@ static OSMPBF__Blob *read_blob(OSMPBF__BlobHeader *header, FILE *f, unsigned cha SANITY_CHECK_LENGTH(len, MAX_BLOB_LENGTH) if (fread(buffer, len, 1, f) != 1) return NULL; - return osmpbf__blob__unpack(&protobuf_c_system_allocator, len, buffer); + return osmpbf__blob__unpack(NULL, len, buffer); } static unsigned char *uncompress_blob(OSMPBF__Blob *blob) { @@ -136,8 +136,8 @@ static int get_string(char *buffer, int buffer_size, OSMPBF__PrimitiveBlock *pri static void process_osmheader(OSMPBF__Blob *blob, unsigned char *data) { OSMPBF__HeaderBlock *header_block; - header_block=osmpbf__header_block__unpack(&protobuf_c_system_allocator, blob->raw_size, data); - osmpbf__header_block__free_unpacked(header_block, &protobuf_c_system_allocator); + header_block=osmpbf__header_block__unpack(NULL, blob->raw_size, data); + osmpbf__header_block__free_unpacked(header_block, NULL); } #if 0 @@ -245,7 +245,7 @@ static void process_relation(OSMPBF__PrimitiveBlock *primitive_block, OSMPBF__Re static void process_osmdata(OSMPBF__Blob *blob, unsigned char *data, struct maptool_osm *osm) { int i,j; OSMPBF__PrimitiveBlock *primitive_block; - primitive_block=osmpbf__primitive_block__unpack(&protobuf_c_system_allocator, blob->raw_size, data); + primitive_block=osmpbf__primitive_block__unpack(NULL, blob->raw_size, data); for (i = 0 ; i < primitive_block->n_primitivegroup ; i++) { OSMPBF__PrimitiveGroup *primitive_group=primitive_block->primitivegroup[i]; process_dense(primitive_block, primitive_group->dense, osm); @@ -254,7 +254,7 @@ static void process_osmdata(OSMPBF__Blob *blob, unsigned char *data, struct mapt for (j = 0 ; j < primitive_group->n_relations ; j++) process_relation(primitive_block, primitive_group->relations[j], osm); } - osmpbf__primitive_block__free_unpacked(primitive_block, &protobuf_c_system_allocator); + osmpbf__primitive_block__free_unpacked(primitive_block, NULL); } @@ -277,8 +277,8 @@ int map_collect_data_osm_protobuf(FILE *in, struct maptool_osm *osm) { return 0; } g_free(data); - osmpbf__blob__free_unpacked(blob, &protobuf_c_system_allocator); - osmpbf__blob_header__free_unpacked(header, &protobuf_c_system_allocator); + osmpbf__blob__free_unpacked(blob, NULL); + osmpbf__blob_header__free_unpacked(header, NULL); } g_free(buffer); return 1; diff --git a/navit/maptool/osm_protobufdb.c b/navit/maptool/osm_protobufdb.c index 79897eafb..64b601280 100644 --- a/navit/maptool/osm_protobufdb.c +++ b/navit/maptool/osm_protobufdb.c @@ -26,8 +26,8 @@ #include "debug.h" #include "linguistics.h" #include "file.h" -#include "generated-code/fileformat.pb-c.h" -#include "generated-code/osmformat.pb-c.h" +#include "fileformat.pb-c.h" +#include "osmformat.pb-c.h" static double latlon_scale=10000000.0; @@ -125,8 +125,8 @@ static int osm_protobufdb_finish_block(struct osm_protobufdb_context *ctx) { blob->raw.len=len; blob->raw_size=len; osm_protobufdb_write_blob(blob, ctx->f); - osmpbf__blob__free_unpacked(blob, &protobuf_c_system_allocator); - osmpbf__primitive_block__free_unpacked(ctx->pb, &protobuf_c_system_allocator); + osmpbf__blob__free_unpacked(blob, NULL); + osmpbf__primitive_block__free_unpacked(ctx->pb, NULL); ctx->pb=NULL; ctx->current_block++; return 1; @@ -285,7 +285,7 @@ static void osm_protobufdb_modify_node(OSMPBF__Node *node, OSMPBF__Info *info, i *n=*node; if (!info) { if (old_info) - osmpbf__info__free_unpacked(old_info, &protobuf_c_system_allocator); + osmpbf__info__free_unpacked(old_info, NULL); n->info=NULL; } else { if (old_info) @@ -325,7 +325,7 @@ static void osm_protobufdb_modify_way(OSMPBF__Way *way, OSMPBF__Info *info, int } if (!info) { if (old_info) - osmpbf__info__free_unpacked(old_info, &protobuf_c_system_allocator); + osmpbf__info__free_unpacked(old_info, NULL); w->info=NULL; } else { if (old_info) @@ -368,7 +368,7 @@ static void osm_protobufdb_modify_relation(OSMPBF__Relation *relation, OSMPBF__I } if (!info) { if (old_info) - osmpbf__info__free_unpacked(old_info, &protobuf_c_system_allocator); + osmpbf__info__free_unpacked(old_info, NULL); r->info=NULL; } else { if (old_info) diff --git a/navit/maptool/osmformat.proto b/navit/maptool/osmformat.proto index 560d71deb..78d747ef6 100644 --- a/navit/maptool/osmformat.proto +++ b/navit/maptool/osmformat.proto @@ -1,3 +1,4 @@ +syntax = "proto2"; option java_package = "crosby.binary"; package OSMPBF; @@ -206,4 +207,3 @@ message Relation { repeated sint64 memids = 9 [packed = true]; // DELTA encoded repeated MemberType types = 10 [packed = true]; } - diff --git a/navit/navit.c b/navit/navit.c index dad8eb7aa..84af773e2 100644 --- a/navit/navit.c +++ b/navit/navit.c @@ -44,6 +44,7 @@ #include "coord.h" #include "point.h" #include "transform.h" +#include "traffic.h" #include "param.h" #include "menu.h" #include "graphics.h" @@ -1928,6 +1929,9 @@ void navit_init(struct navit *this_) { struct map *map; int callback; char *center_file; + struct attr_iter *iter; + struct attr *attr; + struct traffic * traffic; dbg(lvl_info,"enter gui %p graphics %p",this_->gui,this_->gra); @@ -1995,6 +1999,26 @@ void navit_init(struct navit *this_) { if (this_->route) tracking_set_route(this_->tracking, this_->route); } + + attr = g_new0(struct attr, 1); + iter = navit_attr_iter_new(); + map = NULL; + while (navit_get_attr(this_, attr_traffic, attr, iter)) { + traffic = (struct traffic *) attr->u.navit_object; + traffic_set_mapset(traffic, ms); + if (this_->route) + traffic_set_route(traffic, this_->route); + /* add the first map found */ + if (!map && (map = traffic_get_map(traffic))) { + struct attr map_a; + map_a.type = attr_map; + map_a.u.map = map; + mapset_add_attr(ms, &map_a); + } + } + navit_attr_iter_destroy(iter); + g_free(attr); + if (this_->navigation) { if ((map=navigation_get_map(this_->navigation))) { struct attr map_a,active; @@ -2843,6 +2867,7 @@ int navit_add_attr(struct navit *this_, struct attr *attr) { break; case attr_layer: case attr_script: + case attr_traffic: break; default: return 0; diff --git a/navit/navit.dtd b/navit/navit.dtd index aa25a1f4c..645816a93 100644 --- a/navit/navit.dtd +++ b/navit/navit.dtd @@ -17,7 +17,7 @@ <!ATTLIST log flush_size CDATA #IMPLIED> <!ATTLIST log flush_time CDATA #IMPLIED> <!ATTLIST log attr_types CDATA #IMPLIED> -<!ELEMENT navit (graphics,gui+,log*,osd*,vehicle*,tracking?,vehicleprofile*,route,navigation,speech,mapset+,layer+,layout+) > +<!ELEMENT navit (graphics,gui+,log*,osd*,traffic*,vehicle*,tracking?,vehicleprofile*,route,navigation,speech,mapset+,layer+,layout+) > <!ATTLIST navit center CDATA #REQUIRED> <!ATTLIST navit zoom CDATA #REQUIRED> <!ATTLIST navit tracking CDATA #REQUIRED> @@ -65,6 +65,8 @@ <!ELEMENT cursor (itemgra+)> <!ATTLIST cursor w CDATA #REQUIRED> <!ATTLIST cursor h CDATA #REQUIRED> +<!ELEMENT traffic EMPTY> +<!ATTLIST traffic type CDATA #REQUIRED> <!ELEMENT tracking ANY> <!ATTLIST tracking cdf_histsize CDATA #IMPLIED> <!ELEMENT route EMPTY> diff --git a/navit/plugin.h b/navit/plugin.h index 03fb4ad5a..5c9636aa2 100644 --- a/navit/plugin.h +++ b/navit/plugin.h @@ -49,6 +49,8 @@ enum plugin_category { plugin_category_event, /** Category for plugins which load fonts. */ plugin_category_font, + /** Category for plugins which retrieve traffic information. */ + plugin_category_traffic, /** Dummy for last entry. */ plugin_category_last, }; diff --git a/navit/plugin_def.h b/navit/plugin_def.h index 985160e6f..3140bddc3 100644 --- a/navit/plugin_def.h +++ b/navit/plugin_def.h @@ -31,3 +31,4 @@ PLUGIN_CATEGORY(speech, (struct speech_methods *meth, struct attr **attrs, struc PLUGIN_CATEGORY(vehicle, (struct vehicle_methods *meth, struct callback_list *cbl, struct attr **attrs)) PLUGIN_CATEGORY(event, (struct event_methods *meth)) PLUGIN_CATEGORY(font, (void *meth)) +PLUGIN_CATEGORY(traffic, (struct navit *nav, struct traffic_methods *meth, struct attr **attrs, struct callback_list *cbl)) diff --git a/navit/route.c b/navit/route.c index 453afa0d1..3933d349e 100644 --- a/navit/route.c +++ b/navit/route.c @@ -31,12 +31,54 @@ * It accomplishes this by first building a "route graph". This graph contains segments and * points. * - * After building this graph in route_graph_build(), the function route_graph_flood() assigns every - * point and segment a "value" which represents the "costs" of traveling from this point to the - * destination. This is done by Dijkstra's algorithm. - * - * When the graph is built a "route path" is created, which is a path in this graph from a given - * position to the destination determined at time of building the graph. + * Routing now relies on the Lifelong Planning A* (LPA*) algorithm, which builds upon the A* algorithm but allows for + * partial updates after the cost of some segments has changed. (With A*, one would need to recalculate the entire + * route graph from scratch.) A*, in turn, is an extension of the Dijkstra algorithm, with the added improvement that + * A* introduces a heuristic (essentially, a lower boundary for the yet-to-be-calculated remainder of the route from a + * given point onwards) and chooses the next point to analyze based on the sum of its cost and its heuristic, where + * Dijkstra uses simply the cost of the node. This makes A* more efficient than Dijkstra in some scenarios. (Navit, + * however, is not one of them, as we currently analyze only a subset of the entire map, and calculating the heuristic + * for each node turned out to cost more than it saved in tests.) + * + * Wikipedia has articles on all three algorithms; refer to these for an in-depth discussion of the algorithms. + * + * If the heuristic is assumed to be zero in all cases, A* behaves exactly as Dijkstra would. Similarly, LPA* behaves + * identically to A* if all segment costs are known prior to route calculation and do not change once route calculation + * has started. + * + * Earlier versions of Navit used Dijkstra for routing. This was upgraded to LPA* when the traffic module was + * introduced, as it became necessary to do fast partial recalculations of the route when the traffic situation + * changes. Navit’s LPA* implementation differs from the canonical implementation in two important ways: + * + * \li The heuristic is not used (or assumed to be zero), for the reasons discussed above. However, this is not set in + * stone and can be revisited if we find using a heuristic provides a true benefit. + * \li Since the destination point may be off-road, Navit may initialize the route graph with multiple candidates for + * the destination point, each of which will get a nonzero cost (which may still decrease if routing later determines + * that it is cheaper to route from that candidate point to a different candidate point). + * + * The cost of a node is always the cost to reach the destination, and route calculation is done “backwards”, i.e. + * starting at the destination and working its way to the current position (or previous waypoint). This is mandatory + * in LPA*, while A* and Dijkstra can also work from the start to the destination. The latter is found in most textbook + * descriptions of these algorithms. Navit has always calculated routes from destination to start, even with Dijkstra, + * as this made it easier to react to changes in the vehicle position (the start of the route). + * + * A route graph first needs to be built with `route_graph_build()`, which fetches the segments from the map. Next + * `route_graph_init()` is called to initialize the destination point candidates. Then + * `route_graph_compute_shortest_path()` is called to assign a `value` to each node, which represents the cost of + * traveling from this point to the destination. Each point is also assigned a “next segment” to take in order to reach + * the destination from this point. Eventually a “route path” is created, i.e. the sequence of segments from the + * current position to the destination are extracted from the route graph and turn instructions are added where + * necessary. + * + * When segment costs change, `route_graph_point_update()` is called for each end point which may have changed. Then + * `route_graph_compute_shortest_path()` is called to update parts of the route which may have changed, and finally the + * route path is recreated. This is used by the traffic module when traffic reports change the cost of individual + * segments. + * + * A completely new route can be created from an existing graph, which happens e.g. between sections of a route when + * waypoints are used. This is done by calling `route_graph_reset()`, which resets all nodes to their initial state. + * Then `route_graph_init()` is called, followed by `route_graph_compute_shortest_path()` and eventually creation of + * the route path. */ #include <stdio.h> @@ -55,6 +97,7 @@ #include "xmlconfig.h" #include "map.h" #include "mapset.h" +#include "route_protected.h" #include "route.h" #include "track.h" #include "transform.h" @@ -73,98 +116,13 @@ struct map_priv { int debug_route=0; -/** - * @brief A point in the route graph - * - * This represents a point in the route graph. A point usually connects two or more segments, - * but there are also points which don't do that (e.g. at the end of a dead-end). - */ -struct route_graph_point { - struct route_graph_point *hash_next; /**< Pointer to a chained hashlist of all route_graph_points with this hash */ - struct route_graph_segment *start; /**< Pointer to a list of segments of which this point is the start. The links - * of this linked-list are in route_graph_segment->start_next.*/ - struct route_graph_segment *end; /**< Pointer to a list of segments of which this pointer is the end. The links - * of this linked-list are in route_graph_segment->end_next. */ - struct route_graph_segment *seg; /**< Pointer to the segment one should use to reach the destination at - * least costs */ - struct fibheap_el *el; /**< When this point is put on a Fibonacci heap, this is a pointer - * to this point's heap-element */ - int value; /**< The cost at which one can reach the destination from this point on. - * {@code INT_MAX} indicates that the destination is unreachable from this - * point, or that this point has not yet been examined. */ - struct coord c; /**< Coordinates of this point */ - int flags; /**< Flags for this point (eg traffic distortion) */ -}; - -#define RP_TRAFFIC_DISTORTION 1 -#define RP_TURN_RESTRICTION 2 -#define RP_TURN_RESTRICTION_RESOLVED 4 - -/** - * @brief A segment in the route graph or path - * - * This is a segment in the route graph or path. A segment represents a driveable way. - */ - -struct route_segment_data { - struct item item; /**< The item (e.g. street) that this segment represents. */ - int flags; - int len; /**< Length of this segment, in meters */ - /*NOTE: After a segment, various fields may follow, depending on what flags are set. Order of fields: - 1.) maxspeed Maximum allowed speed on this segment. Present if AF_SPEED_LIMIT is set. - 2.) offset If the item is segmented (i.e. represented by more than one segment), this - indicates the position of this segment in the item. Present if AF_SEGMENTED is set. - */ -}; - - -struct size_weight_limit { - int width; - int length; - int height; - int weight; - int axle_weight; -}; #define RSD_OFFSET(x) *((int *)route_segment_data_field_pos((x), attr_offset)) -#define RSD_MAXSPEED(x) *((int *)route_segment_data_field_pos((x), attr_maxspeed)) #define RSD_SIZE_WEIGHT(x) *((struct size_weight_limit *)route_segment_data_field_pos((x), attr_vehicle_width)) #define RSD_DANGEROUS_GOODS(x) *((int *)route_segment_data_field_pos((x), attr_vehicle_dangerous_goods)) /** - * @brief Data for a segment in the route graph - */ -struct route_graph_segment_data { - struct item *item; /**< The item which this segment is part of */ - int offset; /**< If the item passed in "item" is segmented (i.e. divided - * into several segments), this indicates the position of - * this segment within the item */ - int flags; /**< Flags for this segment */ - int len; /**< The length of this segment */ - int maxspeed; /**< The maximum speed allowed on this segment in km/h, - * -1 if not known */ - struct size_weight_limit size_weight; /**< Size and weight limits for this segment */ - int dangerous_goods; -}; - -/** - * @brief A segment in the route graph - * - * This is a segment in the route graph. A segment represents a driveable way. - */ -struct route_graph_segment { - struct route_graph_segment *next; /**< Linked-list pointer to a list of all route_graph_segments */ - struct route_graph_segment *start_next; /**< Pointer to the next element in the list of segments that start at the - * same point. Start of this list is in route_graph_point->start. */ - struct route_graph_segment *end_next; /**< Pointer to the next element in the list of segments that end at the - * same point. Start of this list is in route_graph_point->end. */ - struct route_graph_point *start; /**< Pointer to the point this segment starts at. */ - struct route_graph_point *end; /**< Pointer to the point this segment ends at. */ - struct route_segment_data data; /**< The segment data */ -}; - -/** * @brief A traffic distortion * * Traffic distortions represent delays or closures on the route, which can occur for a variety of @@ -264,29 +222,6 @@ struct route { struct vehicle *v; }; -/** - * @brief A complete route graph - * - * The route graph holds all routable segments along with the connections between them and the cost of - * each segment. - */ -struct route_graph { - int busy; /**< The graph is being built */ - struct map_selection *sel; /**< The rectangle selection for the graph */ - struct mapset_handle *h; /**< Handle to the mapset */ - struct map *m; /**< Pointer to the currently active map */ - struct map_rect *mr; /**< Pointer to the currently active map rectangle */ - struct vehicleprofile *vehicleprofile; /**< The vehicle profile */ - struct callback *idle_cb; /**< Idle callback to process the graph */ - struct callback *done_cb; /**< Callback when graph is done */ - struct event_idle *idle_ev; /**< The pointer to the idle event */ - struct route_graph_segment - *route_segments; /**< Pointer to the first route_graph_segment in the linked list of all segments */ - struct route_graph_segment *avoid_seg; -#define HASH_SIZE 8192 - struct route_graph_point *hash[HASH_SIZE]; /**< A hashtable containing all route_graph_points in this graph */ -}; - #define HASHCOORD(c) ((((c)->x +(c)->y) * 2654435761UL) & (HASH_SIZE-1)) /** @@ -309,18 +244,23 @@ struct attr_iter { static struct route_info * route_find_nearest_street(struct vehicleprofile *vehicleprofile, struct mapset *ms, struct pcoord *c); -static struct route_graph_point *route_graph_get_point(struct route_graph *this, struct coord *c); static void route_graph_update(struct route *this, struct callback *cb, int async); -static void route_graph_build_done(struct route_graph *rg, int cancel); static struct route_path *route_path_new(struct route_graph *this, struct route_path *oldpath, struct route_info *pos, struct route_info *dst, struct vehicleprofile *profile); -static void route_process_street_graph(struct route_graph *this, struct item *item, struct vehicleprofile *profile); +static void route_graph_add_street(struct route_graph *this, struct item *item, struct vehicleprofile *profile); static void route_graph_destroy(struct route_graph *this); static void route_path_update(struct route *this, int cancel, int async); static int route_time_seg(struct vehicleprofile *profile, struct route_segment_data *over, struct route_traffic_distortion *dist); -static void route_graph_flood(struct route_graph *this, struct route_info *dst, struct vehicleprofile *profile, - struct callback *cb); +static void route_graph_compute_shortest_path(struct route_graph * graph, struct vehicleprofile * profile, + struct callback *cb); +static int route_graph_is_path_computed(struct route_graph *this_); +static struct route_graph_segment *route_graph_get_segment(struct route_graph *graph, struct street_data *sd, + struct route_graph_segment *last); +static int route_value_seg(struct vehicleprofile *profile, struct route_graph_point *from, + struct route_graph_segment *over, + int dir); +static void route_graph_init(struct route_graph *this, struct route_info *dst, struct vehicleprofile *profile); static void route_graph_reset(struct route_graph *this); @@ -807,7 +747,8 @@ static void route_path_update_done(struct route *this, int new_graph) { this->link_path=1; this->current_dst=prev_dst; route_graph_reset(this->graph); - route_graph_flood(this->graph, this->current_dst, this->vehicleprofile, this->route_graph_flood_done_cb); + route_graph_init(this->graph, this->current_dst, this->vehicleprofile); + route_graph_compute_shortest_path(this->graph, this->vehicleprofile, this->route_graph_flood_done_cb); return; } if (!new_graph && this->path2->updated) @@ -1320,7 +1261,8 @@ void route_remove_waypoint(struct route *this) { this->reached_destinations_count++; route_graph_reset(this->graph); this->current_dst = this->destinations->data; - route_graph_flood(this->graph, this->current_dst, this->vehicleprofile, this->route_graph_flood_done_cb); + route_graph_init(this->graph, this->current_dst, this->vehicleprofile); + route_graph_compute_shortest_path(this->graph, this->vehicleprofile, this->route_graph_flood_done_cb); } } @@ -1333,7 +1275,7 @@ void route_remove_waypoint(struct route *this) { * or {@code NULL} to return the first point * @return The point at the specified coordinates or NULL if not found */ -static struct route_graph_point *route_graph_get_point_next(struct route_graph *this, struct coord *c, +struct route_graph_point *route_graph_get_point_next(struct route_graph *this, struct coord *c, struct route_graph_point *last) { struct route_graph_point *p; int seen=0,hashval=HASHCOORD(c); @@ -1357,7 +1299,7 @@ static struct route_graph_point *route_graph_get_point_next(struct route_graph * * @param c Coordinates to search for * @return The point at the specified coordinates or NULL if not found */ -static struct route_graph_point *route_graph_get_point(struct route_graph *this, struct coord *c) { +struct route_graph_point * route_graph_get_point(struct route_graph *this, struct coord *c) { return route_graph_get_point_next(this, c, NULL); } @@ -1401,6 +1343,7 @@ static struct route_graph_point *route_graph_point_new(struct route_graph *this, p->hash_next=this->hash[hashval]; this->hash[hashval]=p; p->value=INT_MAX; + p->dst_val = INT_MAX; p->c=*f; return p; } @@ -1418,7 +1361,7 @@ static struct route_graph_point *route_graph_point_new(struct route_graph *this, * @param f The coordinates at which the point should be inserted * @return The point inserted or NULL on failure */ -static struct route_graph_point *route_graph_add_point(struct route_graph *this, struct coord *f) { +struct route_graph_point * route_graph_add_point(struct route_graph *this, struct coord *f) { struct route_graph_point *p; p=route_graph_get_point(this,f); @@ -1432,7 +1375,7 @@ static struct route_graph_point *route_graph_add_point(struct route_graph *this, * * @param this The route graph to delete all points from */ -static void route_graph_free_points(struct route_graph *this) { +void route_graph_free_points(struct route_graph *this) { struct route_graph_point *curr,*next; int i; for (i = 0 ; i < HASH_SIZE ; i++) { @@ -1447,12 +1390,58 @@ static void route_graph_free_points(struct route_graph *this) { } /** + * @brief Initializes potential destination nodes. + * + * This method is normally called after building a fresh route graph, or resetting an existing one. It iterates over + * all potential destination nodes (i.e. all nodes which are part of the destination’s street) and initializes them: + * The `dst_val` and `rhs` values are set according to their cost to reach the destination. + * + * @param this The route graph to initialize + * @param dst The destination of the route + * @param profile The vehicle profile to use for routing. This determines which ways are passable + * and how their costs are calculated. + */ +static void route_graph_init(struct route_graph *this, struct route_info *dst, struct vehicleprofile *profile) { + struct route_graph_segment *s = NULL; + int val; + + while ((s = route_graph_get_segment(this, dst->street, s))) { + val = route_value_seg(profile, NULL, s, -1); + if (val != INT_MAX) { + val = val*(100-dst->percent)/100; + s->end->seg = s; + s->end->dst_seg = s; + s->end->rhs = val; + s->end->dst_val = val; + s->end->el = fh_insertkey(this->heap, MIN(s->end->rhs, s->end->value), s->end); + } + val = route_value_seg(profile, NULL, s, 1); + if (val != INT_MAX) { + val = val*dst->percent/100; + s->start->seg = s; + s->start->dst_seg = s; + s->start->rhs = val; + s->start->dst_val = val; + s->start->el = fh_insertkey(this->heap, MIN(s->start->rhs, s->start->value), s->start); + } + } +} + +/** * @brief Resets all nodes * * This iterates through all the points in the route graph, resetting them to their initial state. - * The {@code value} member of each point (cost to reach the destination) is reset to - * {@code INT_MAX}, the {@code seg} member (cheapest way to destination) is reset to {@code NULL} - * and the {@code el} member (pointer to element in Fibonacci heap) is also reset to {@code NULL}. + * The `value` (cost to reach the destination via `seg`) and `dst_val` (cost to destination if this point is the last + * in the route) members of each point are reset to`INT_MAX`, the `seg` member (cheapest way to destination) is reset + * to `NULL` and the `el` member (pointer to element in Fibonacci heap) is also reset to `NULL`. + * + * The Fibonacci heap is also cleared. Inconsistencies between `el` and Fibonacci heap membership are handled + * gracefully, i.e. `el` is reset even if it is invalid, and points are removed from the heap regardless of their `el` + * value. + * + * After this method returns, the caller should call + * {@link route_graph_init(struct route_graph *, struct route_info *, struct vehicleprofile *)} to initialize potential + * end points. After that a route can be calculated. * * References to elements of the route graph which were obtained prior to calling this function * remain valid after it returns. @@ -1462,15 +1451,23 @@ static void route_graph_free_points(struct route_graph *this) { static void route_graph_reset(struct route_graph *this) { struct route_graph_point *curr; int i; + for (i = 0 ; i < HASH_SIZE ; i++) { curr=this->hash[i]; while (curr) { curr->value=INT_MAX; + curr->dst_val = INT_MAX; + curr->rhs = INT_MAX; curr->seg=NULL; + curr->dst_seg = NULL; curr->el=NULL; curr=curr->hash_next; } } + + while (fh_extractmin(this->heap)) { + // no operation, just remove all items (`el` has already been reset) + } } /** @@ -1483,7 +1480,7 @@ static void route_graph_reset(struct route_graph *this) { * @param type Type of the field that should be returned * @return A pointer to a field of a certain type, or NULL if no such field is present */ -static void *route_segment_data_field_pos(struct route_segment_data *seg, enum attr_type type) { +void * route_segment_data_field_pos(struct route_segment_data *seg, enum attr_type type) { unsigned char *ptr; ptr = ((unsigned char*)seg) + sizeof(struct route_segment_data); @@ -1540,7 +1537,7 @@ static int route_segment_data_size(int flags) { * @param start The starting point of the segment * @param data The data for the segment */ -static int route_graph_segment_is_duplicate(struct route_graph_point *start, struct route_graph_segment_data *data) { +int route_graph_segment_is_duplicate(struct route_graph_point *start, struct route_graph_segment_data *data) { struct route_graph_segment *s; s=start->start; while (s) { @@ -1569,8 +1566,8 @@ static int route_graph_segment_is_duplicate(struct route_graph_point *start, str * @param offset If the item passed in "item" is segmented (i.e. divided into several segments), this indicates the position of this segment within the item * @param maxspeed The maximum speed allowed on this segment in km/h. -1 if not known. */ -static void route_graph_add_segment(struct route_graph *this, struct route_graph_point *start, - struct route_graph_point *end, struct route_graph_segment_data *data) { +void route_graph_add_segment(struct route_graph *this, struct route_graph_point *start, + struct route_graph_point *end, struct route_graph_segment_data *data) { struct route_graph_segment *s; int size; @@ -1590,6 +1587,7 @@ static void route_graph_add_segment(struct route_graph *this, struct route_graph s->data.len=data->len; s->data.item=*data->item; s->data.flags=data->flags; + s->data.score = data->score; if (data->flags & AF_SPEED_LIMIT) RSD_MAXSPEED(&s->data)=data->maxspeed; @@ -1607,50 +1605,6 @@ static void route_graph_add_segment(struct route_graph *this, struct route_graph } /** - * @brief Gets all the coordinates of an item - * - * This will get all the coordinates of the item i and return them in c, - * up to max coordinates. Additionally it is possible to limit the coordinates - * returned to all the coordinates of the item between the two coordinates - * start end end. - * - * @important Make sure that whatever c points to has enough memory allocated - * @important to hold max coordinates! - * - * @param i The item to get the coordinates of - * @param c Pointer to memory allocated for holding the coordinates - * @param max Maximum number of coordinates to return - * @param start First coordinate to get - * @param end Last coordinate to get - * @return The number of coordinates returned - */ -static int get_item_seg_coords(struct item *i, struct coord *c, int max, - struct coord *start, struct coord *end) { - struct map_rect *mr; - struct item *item; - int rc = 0, p = 0; - struct coord c1; - mr=map_rect_new(i->map, NULL); - if (!mr) - return 0; - item = map_rect_get_item_byid(mr, i->id_hi, i->id_lo); - if (item) { - rc = item_coord_get(item, &c1, 1); - while (rc && (c1.x != start->x || c1.y != start->y)) { - rc = item_coord_get(item, &c1, 1); - } - while (rc && p < max) { - c[p++] = c1; - if (c1.x == end->x && c1.y == end->y) - break; - rc = item_coord_get(item, &c1, 1); - } - } - map_rect_destroy(mr); - return p; -} - -/** * @brief Returns and removes one segment from a path * * @param path The path to take the segment from @@ -1817,7 +1771,7 @@ static int route_path_add_item_from_graph(struct route_path *this, struct route_ len=dst->lenpos; } } else { - ccnt=get_item_seg_coords(&rgs->data.item, ca, 2047, &rgs->start->c, &rgs->end->c); + ccnt=item_coord_get_within_range(&rgs->data.item, ca, 2047, &rgs->start->c, &rgs->end->c); c=ca; } seg_size=sizeof(*segment) + sizeof(struct coord) * (ccnt + extra); @@ -1865,7 +1819,7 @@ linkold: * * @param this The graph to destroy all segments from */ -static void route_graph_free_segments(struct route_graph *this) { +void route_graph_free_segments(struct route_graph *this) { struct route_graph_segment *curr,*next; int size; curr=this->route_segments; @@ -1888,6 +1842,7 @@ static void route_graph_destroy(struct route_graph *this) { route_graph_build_done(this, 1); route_graph_free_points(this); route_graph_free_segments(this); + fh_deleteheap(this->heap); g_free(this); } } @@ -1979,33 +1934,58 @@ static int route_time_seg(struct vehicleprofile *profile, struct route_segment_d /** * @brief Returns the traffic distortion for a segment. * + * If multiple traffic distortions match a segment, the return value will report the lowest speed limit + * and greatest delay of all matching segments. + * * @param seg The segment for which the traffic distortion is to be returned - * @param ret Points to a {@code struct route_traffic_distortion}, whose members will be filled + * @param dir The direction of `seg` for which to return traffic distortions. Positive values indicate + * travel in the direction of the segment, negative values indicate travel against it. + * @param profile The current vehicle profile + * @param ret Points to a {@code struct route_traffic_distortion}, whose members will be filled with the + * distortion data * * @return true if a traffic distortion was found, 0 if not */ -static int route_get_traffic_distortion(struct route_graph_segment *seg, struct route_traffic_distortion *ret) { +static int route_get_traffic_distortion(struct route_graph_segment *seg, int dir, struct vehicleprofile *profile, + struct route_traffic_distortion *ret) { struct route_graph_point *start=seg->start; struct route_graph_point *end=seg->end; struct route_graph_segment *tmp,*found=NULL; - tmp=start->start; - while (tmp && !found) { - if (tmp->data.item.type == type_traffic_distortion && tmp->start == start && tmp->end == end) + struct route_traffic_distortion result; + + if (!dir) { + dbg(lvl_warning, "dir is zero, assuming positive"); + dir = 1; + } + + result.delay = 0; + result.maxspeed = INT_MAX; + + for (tmp = start->start; tmp; tmp = tmp->start_next) { + if (tmp->data.item.type == type_traffic_distortion && tmp->start == start && tmp->end == end) { + if ((tmp->data.flags & (dir > 0 ? profile->flags_forward_mask : profile->flags_reverse_mask)) != profile->flags) + continue; + if (tmp->data.len > result.delay) + result.delay = tmp->data.len; + if ((tmp->data.flags & AF_SPEED_LIMIT) && (RSD_MAXSPEED(&tmp->data) < result.maxspeed)) + result.maxspeed = RSD_MAXSPEED(&tmp->data); found=tmp; - tmp=tmp->start_next; + } } - tmp=start->end; - while (tmp && !found) { - if (tmp->data.item.type == type_traffic_distortion && tmp->end == start && tmp->start == end) + for (tmp = start->end; tmp; tmp = tmp->end_next) { + if (tmp->data.item.type == type_traffic_distortion && tmp->end == start && tmp->start == end) { + if ((tmp->data.flags & (dir < 0 ? profile->flags_forward_mask : profile->flags_reverse_mask)) != profile->flags) + continue; + if (tmp->data.len > result.delay) + result.delay = tmp->data.len; + if ((tmp->data.flags & AF_SPEED_LIMIT) && (RSD_MAXSPEED(&tmp->data) < result.maxspeed)) + result.maxspeed = RSD_MAXSPEED(&tmp->data); found=tmp; - tmp=tmp->end_next; + } } if (found) { - ret->delay=found->data.len; - if (found->data.flags & AF_SPEED_LIMIT) - ret->maxspeed=RSD_MAXSPEED(&found->data); - else - ret->maxspeed=INT_MAX; + ret->delay = result.delay; + ret->maxspeed = result.maxspeed; return 1; } return 0; @@ -2028,6 +2008,7 @@ static int route_through_traffic_allowed(struct vehicleprofile *profile, struct * checks are done on `from->seg` (the next segment to follow after `over`): * \li If `from->seg` equals `over` (indicating that, after traversing `over` in direction `dir`, we would immediately * traverse it again in the opposite direction), `INT_MAX` is returned. + * \li If `over` loops back to itself (i.e. its `start` and `end` members are equal), `INT_MAX` is returned. * \li Otherwise, if `over` does not allow through traffic but `from->seg` does, the through traffic penalty of the * vehicle profile (`profile`) is applied. * @@ -2046,6 +2027,12 @@ static int route_value_seg(struct vehicleprofile *profile, struct route_graph_po int dir) { int ret; struct route_traffic_distortion dist,*distp=NULL; + if (!dir) { + dbg(lvl_warning, "dir is zero, assuming positive"); + dir = 1; + } + if (from && (over->start == over->end)) + return INT_MAX; if ((over->data.flags & (dir >= 0 ? profile->flags_forward_mask : profile->flags_reverse_mask)) != profile->flags) return INT_MAX; if (dir > 0 && (over->start->flags & RP_TURN_RESTRICTION)) @@ -2054,14 +2041,18 @@ static int route_value_seg(struct vehicleprofile *profile, struct route_graph_po return INT_MAX; if (from && from->seg == over) return INT_MAX; + if (over->data.item.type == type_traffic_distortion) + return INT_MAX; if ((over->start->flags & RP_TRAFFIC_DISTORTION) && (over->end->flags & RP_TRAFFIC_DISTORTION) && - route_get_traffic_distortion(over, &dist) && dir != 2 && dir != -2) { + route_get_traffic_distortion(over, dir, profile, &dist) && dir != 2 && dir != -2) { + /* we have a traffic distortion */ distp=&dist; } ret=route_time_seg(profile, &over->data, distp); if (ret == INT_MAX) return ret; - if (!route_through_traffic_allowed(profile, over) && from && route_through_traffic_allowed(profile, from->seg)) + if (!route_through_traffic_allowed(profile, over) && from && from->seg + && route_through_traffic_allowed(profile, from->seg)) ret+=profile->through_traffic_penalty; return ret; } @@ -2083,6 +2074,141 @@ static int route_graph_segment_match(struct route_graph_segment *s1, struct rout } /** + * @brief Adds two route values with protection against integer overflows. + * + * Unlike regular addition, this function is safe to use if one of the two arguments is `INT_MAX` + * (which Navit uses to express that a segment cannot be traversed or a point cannot be reached): + * If any of the two arguments is `INT_MAX`, then `INT_MAX` is returned; else the sum of the two + * arguments is returned. + * + * Note that this currently does not cover cases in which both arguments are less than `INT_MAX` but add + * up to `val1 + val2 >= INT_MAX`. With Navit’s internal cost definition, `INT_MAX` (2^31) is equivalent + * to approximately 7 years, making this unlikely to become a real issue. + */ +static int route_value_add(int val1, int val2) { + if (val1 == INT_MAX) + return INT_MAX; + if (val2 == INT_MAX) + return INT_MAX; + return val1 + val2; +} + +/** + * @brief Updates the lookahead value of a point in the route graph and updates its heap membership. + * + * This recalculates the lookahead value (the `rhs` member) of point `p`, based on the `value` of each neighbor and the + * cost to reach that neighbor. If the resulting `p->rhs` differs from `p->value`, `p` is inserted into `heap` using + * the lower of the two as its key (if `p` is already a member of `heap`, its key is changed accordingly). If the + * resulting `p->rhs` is equal to `p->value` and `p` is a member of `heap`, it is removed. + * + * This is part of a modified LPA* implementation. + * + * @param profile The vehicle profile to use for routing. This determines which ways are passable and how their costs + * are calculated. + * @param p The point to evaluate + * @param heap The heap + */ +static void route_graph_point_update(struct vehicleprofile *profile, struct route_graph_point * p, + struct fibheap * heap) { + struct route_graph_segment *s = NULL; + int new, val; + + p->rhs = p->dst_val; + p->seg = p->dst_seg; + + for (s = p->start; s; s = s->start_next) { /* Iterate over all the segments leading away from our point */ + val = route_value_seg(profile, s->end, s, 1); + if (val != INT_MAX && s->end->seg && item_is_equal(s->data.item, s->end->seg->data.item)) { + if (profile->turn_around_penalty2) + val += profile->turn_around_penalty2; + else + val = INT_MAX; + } + if (val != INT_MAX) { + new = route_value_add(val, s->end->value); + if (new < p->rhs) { + p->rhs = new; + p->seg = s; + } + } + } + + for (s = p->end; s; s = s->end_next) { /* Iterate over all the segments leading towards our point */ + val = route_value_seg(profile, s->start, s, -1); + if (val != INT_MAX && s->start->seg && item_is_equal(s->data.item, s->start->seg->data.item)) { + if (profile->turn_around_penalty2) + val += profile->turn_around_penalty2; + else + val = INT_MAX; + } + if (val != INT_MAX) { + new = route_value_add(val, s->start->value); + if (new < p->rhs) { + p->rhs = new; + p->seg = s; + } + } + } + + if (p->el) { + /* Due to a limitation of the Fibonacci heap implementation, which causes fh_replacekey() to fail if the new + * key is greater than the current one, we always remove the point from the heap (and, if locally inconsistent, + * re-add it afterwards). */ + fh_delete(heap, p->el); + p->el = NULL; + } + + if (p->rhs != p->value) + /* The point is locally inconsistent, add (or re-add) it to the heap */ + p->el = fh_insertkey(heap, MIN(p->rhs, p->value), p); +} + +/** + * @brief Expands (i.e. calculates the costs for) the points on the route graph’s heap. + * + * This calculates the cost for every point on the route graph’s heap, as well as any neighbors affected by the cost + * change, and sets the next segment. + * + * This is part of a modified LPA* implementation. + * + * @param graph The route graph + * @param profile The vehicle profile to use for routing. This determines which ways are passable and how their costs + * are calculated. + * @param cb The callback function to call when flooding is complete (can be NULL) + */ +static void route_graph_compute_shortest_path(struct route_graph * graph, struct vehicleprofile * profile, + struct callback *cb) { + struct route_graph_point *p_min; + struct route_graph_segment *s = NULL; + + while (!route_graph_is_path_computed(graph) && (p_min = fh_extractmin(graph->heap))) { + p_min->el = NULL; + if (p_min->value > p_min->rhs) + /* cost has decreased, update point value */ + p_min->value = p_min->rhs; + else { + /* cost has increased, re-evaluate */ + p_min->value = INT_MAX; + route_graph_point_update(profile, p_min, graph->heap); + } + + /* in any case, update rhs of predecessors (nodes from which we can reach p_min via a single segment) */ + for (s = p_min->start; s; s = s->start_next) + if ((s->start == s->end) || (s->data.item.type < route_item_first) || (s->data.item.type > route_item_last)) + continue; + else if (route_value_seg(profile, NULL, s, -2) != INT_MAX) + route_graph_point_update(profile, s->end, graph->heap); + for (s = p_min->end; s; s = s->end_next) + if ((s->start == s->end) || (s->data.item.type < route_item_first) || (s->data.item.type > route_item_last)) + continue; + else if (route_value_seg(profile, NULL, s, 2) != INT_MAX) + route_graph_point_update(profile, s->start, graph->heap); + } + if (cb) + callback_call_0(cb); +} + +/** * @brief Sets or clears a traffic distortion for a segment. * * This sets a delay (setting speed is not supported) or clears an existing traffic distortion. @@ -2109,6 +2235,7 @@ static void route_graph_set_traffic_distortion(struct route_graph *this, struct item.type=type_traffic_distortion; data.item=&item; data.len=delay; + data.flags = seg->data.flags & AF_DISTORTIONMASK; s->start->flags |= RP_TRAFFIC_DISTORTION; s->end->flags |= RP_TRAFFIC_DISTORTION; route_graph_add_segment(this, s->start, s->end, &data); @@ -2125,20 +2252,29 @@ static void route_graph_set_traffic_distortion(struct route_graph *this, struct * @brief Adds a traffic distortion item to the route graph * * @param this The route graph to add to + * @param profile The vehicle profile to use for cost calculations * @param item The item to add, must be of {@code type_traffic_distortion} + * @param update Whether to update the point (true for LPA*, false for Dijkstra) */ -static void route_process_traffic_distortion(struct route_graph *this, struct item *item) { +static void route_graph_add_traffic_distortion(struct route_graph *this, struct vehicleprofile *profile, + struct item *item, int update) { struct route_graph_point *s_pnt,*e_pnt; struct coord c,l; - struct attr delay_attr, maxspeed_attr; + struct attr flags_attr, delay_attr, maxspeed_attr; struct route_graph_segment_data data; data.item=item; data.len=0; - data.flags=0; data.offset=1; data.maxspeed = INT_MAX; + item_attr_rewind(item); + if (item_attr_get(item, attr_flags, &flags_attr)) + data.flags = flags_attr.u.num & AF_DISTORTIONMASK; + else + data.flags = 0; + + item_coord_rewind(item); if (item_coord_get(item, &l, 1)) { s_pnt=route_graph_add_point(this,&l); while (item_coord_get(item, &c, 1)) { @@ -2154,21 +2290,150 @@ static void route_process_traffic_distortion(struct route_graph *this, struct it if (item_attr_get(item, attr_delay, &delay_attr)) data.len=delay_attr.u.num; route_graph_add_segment(this, s_pnt, e_pnt, &data); + if (update) { + if (!(data.flags & AF_ONEWAYREV)) + route_graph_point_update(profile, s_pnt, this->heap); + if (!(data.flags & AF_ONEWAY)) + route_graph_point_update(profile, e_pnt, this->heap); + } + } +} + +/** + * @brief Removes a traffic distortion item from the route graph + * + * Removing a traffic distortion which is not in the graph is a no-op. + * + * @param this The route graph to remove from + * @param profile The vehicle profile to use for cost calculations + * @param item The item to remove, must be of {@code type_traffic_distortion} + */ +static void route_graph_remove_traffic_distortion(struct route_graph *this, struct vehicleprofile *profile, + struct item *item) { + struct route_graph_point *s_pnt = NULL, *e_pnt = NULL; + struct coord c, l; + struct route_graph_segment *curr; + + item_coord_rewind(item); + if (item_coord_get(item, &l, 1)) { + s_pnt = route_graph_get_point(this, &l); + while (item_coord_get(item, &c, 1)) + l = c; + e_pnt = route_graph_get_point(this, &l); + } + if (s_pnt && e_pnt) { +#if 1 + curr = s_pnt->start; + s_pnt->flags &= ~RP_TRAFFIC_DISTORTION; + for (curr = s_pnt->start; curr; curr = curr->start_next) { + if ((curr->end == e_pnt) && item_is_equal(curr->data.item, *item)) + curr->data.item.type = type_none; + else if (curr->data.item.type == type_traffic_distortion) + s_pnt->flags |= RP_TRAFFIC_DISTORTION; + } + + e_pnt->flags &= ~RP_TRAFFIC_DISTORTION; + for (curr = e_pnt->end; curr; curr = curr->end_next) + if (curr->data.item.type == type_traffic_distortion) + e_pnt->flags |= RP_TRAFFIC_DISTORTION; +#else + struct route_graph_segment *found = NULL, *prev; + /* this frees up memory but is slower */ + /* remove from global list */ + curr = this->route_segments; + prev = NULL; + while (curr && !found) { + if ((curr->start == s_pnt) && (curr->end == e_pnt) && (curr->data.item == item)) { + if (prev) + prev->next = curr->next; + else + this->route_segments = curr->next; + found = curr; + } else { + prev = curr; + curr = prev->next; + } + } + + if (!found) + return; + + /* remove from s_pnt list */ + curr = s_pnt->start; + prev = NULL; + s_pnt->flags &= ~RP_TRAFFIC_DISTORTION; + while (curr) { + if (curr == found) { + if (prev) + prev->start_next = curr->start_next; + else + s_pnt->start = curr->start_next; + } else { + if (curr->data.item.type == type_traffic_distortion) + s_pnt->flags |= RP_TRAFFIC_DISTORTION; + prev = curr; + } + curr = prev->start_next; + } + + /* remove from e_pnt list */ + curr = e_pnt->end; + prev = NULL; + e_pnt->flags &= ~RP_TRAFFIC_DISTORTION; + while (curr) { + if (curr == found) { + if (prev) + prev->end_next = curr->end_next; + else + s_pnt->end = curr->end_next; + } else { + if (curr->data.item.type == type_traffic_distortion) + e_pnt->flags |= RP_TRAFFIC_DISTORTION; + prev = curr; + } + curr = prev->end_next; + } + + size = sizeof(struct route_graph_segment) - sizeof(struct route_segment_data) + + route_segment_data_size(found->data.flags); + g_slice_free1(size, found); +#endif + + /* TODO figure out if we need to update both points */ + route_graph_point_update(profile, s_pnt, this->heap); + route_graph_point_update(profile, e_pnt, this->heap); } } /** + * @brief Changes a traffic distortion item in the route graph + * + * Attempting to change an idem which is not in the route graph will add it. + * + * @param this The route graph to change + * @param profile The vehicle profile to use for cost calculations + * @param item The item to change, must be of {@code type_traffic_distortion} + */ +static void route_graph_change_traffic_distortion(struct route_graph *this, struct vehicleprofile *profile, + struct item *item) { + /* TODO is there a more elegant way of doing this? */ + route_graph_remove_traffic_distortion(this, profile, item); + route_graph_add_traffic_distortion(this, profile, item, 1); +} + +/** * @brief Adds a turn restriction item to the route graph * * @param this The route graph to add to * @param item The item to add, must be of `type_street_turn_restriction_no` or `type_street_turn_restriction_only` */ -static void route_process_turn_restriction(struct route_graph *this, struct item *item) { +void route_graph_add_turn_restriction(struct route_graph *this, struct item *item) { struct route_graph_point *pnt[4]; struct coord c[5]; int i,count; struct route_graph_segment_data data; + item_coord_rewind(item); count=item_coord_get(item, c, 5); if (count != 3 && count != 4) { dbg(lvl_debug,"wrong count %d",count); @@ -2183,6 +2448,7 @@ static void route_process_turn_restriction(struct route_graph *this, struct item data.item=item; data.flags=0; data.len=0; + data.score = 0; route_graph_add_segment(this, pnt[0], pnt[1], &data); route_graph_add_segment(this, pnt[1], pnt[2], &data); #if 1 @@ -2205,7 +2471,7 @@ static void route_process_turn_restriction(struct route_graph *this, struct item * @param item The item to add * @param profile The vehicle profile currently in use */ -static void route_process_street_graph(struct route_graph *this, struct item *item, struct vehicleprofile *profile) { +static void route_graph_add_street(struct route_graph *this, struct item *item, struct vehicleprofile *profile) { #ifdef AVOID_FLOAT int len=0; #else @@ -2213,6 +2479,8 @@ static void route_process_street_graph(struct route_graph *this, struct item *it #endif int segmented = 0; struct roadprofile *roadp; + int default_flags_value = AF_ALL; + int *default_flags; struct route_graph_point *s_pnt,*e_pnt; /* Start and end point */ struct coord c,l; /* Current and previous point */ struct attr attr; @@ -2228,23 +2496,18 @@ static void route_process_street_graph(struct route_graph *this, struct item *it return; } + item_coord_rewind(item); if (item_coord_get(item, &l, 1)) { - int default_flags_value=AF_ALL; - int *default_flags=item_get_default_flags(item->type); - if (! default_flags) - default_flags=&default_flags_value; + if (!(default_flags = item_get_default_flags(item->type))) + default_flags = &default_flags_value; if (item_attr_get(item, attr_flags, &attr)) { data.flags = attr.u.num; - if (data.flags & AF_SEGMENTED) - segmented = 1; + segmented = (data.flags & AF_SEGMENTED); } else data.flags = *default_flags; - - if (data.flags & AF_SPEED_LIMIT) { - if (item_attr_get(item, attr_maxspeed, &attr)) - data.maxspeed = attr.u.num; - } + if ((data.flags & AF_SPEED_LIMIT) && (item_attr_get(item, attr_maxspeed, &attr))) + data.maxspeed = attr.u.num; if (data.flags & AF_DANGEROUS_GOODS) { if (item_attr_get(item, attr_vehicle_dangerous_goods, &attr)) data.dangerous_goods = attr.u.num; @@ -2347,128 +2610,87 @@ static struct route_graph_segment *route_graph_get_segment(struct route_graph *g } /** - * @brief Calculates the routing costs for each point + * @brief Whether cost (re)calculation of route graph points has reached the start point * - * This function is the heart of routing. It assigns each point in the route graph a - * cost at which one can reach the destination from this point on. Additionally it assigns - * each point a segment one should follow from this point on to reach the destination at the - * stated costs. + * This method serves as the exit criterion for cost calculation in our LPA* implementation. When it returns true, it + * means that calculation of node cost has proceeded far enough to determine the cost of, and cheapest path from, the + * start point. * - * This function uses Dijkstra's algorithm to do the routing. To understand it you should have a look - * at this algorithm. + * The current implementation returns true only when the heap is empty, i.e. all points have been calculated. This is + * not optimal in terms of efficiency, as the cost of the start point and the cheapest path from there no longer + * change during the last few cycles. Future versions may report true before the heap is completely empty, as soon as + * the cost of the start point and the cheapest path are final. However, this needs to be considered for recalculations + * which happen when the vehicle leaves the cheapest path: right now, any point in the route graph has its final cost + * and cheapest path, thus no recalculation is needed if the vehicle leaves the cheapest path. In the future, however, + * a (partial) recalculation may be needed if the vehicle deviates from the cheapest path. * - * References to elements of the route graph which were obtained prior to calling this function - * remain valid after it returns. + * @param this_ The route graph * - * @param this_ The route graph to flood - * @param dst The destination of the route - * @param profile The vehicle profile to use for routing. This determines which ways are passable - * and how their costs are calculated. - * @param cb The callback function to call when flooding is complete + * @return true if calculation is complete, false if not */ -static void route_graph_flood(struct route_graph *this, struct route_info *dst, struct vehicleprofile *profile, - struct callback *cb) { - struct route_graph_point *p_min; - struct route_graph_segment *s=NULL; - int min,new,val; - struct fibheap *heap; /* This heap will hold all points with "temporarily" calculated costs */ +static int route_graph_is_path_computed(struct route_graph *this_) { + /* TODO refine exit criterion */ + if (!fh_min(this_->heap)) + return 1; + else + return 0; +} + +/** + * @brief Triggers partial recalculation of the route, based on the existing route graph. + * + * This is currently used when traffic distortions have been added, changed or removed. Future versions may also use + * it if the current position has changed to a portion of the route graph which has not been flooded (which is + * currently not necessary because the route graph is always flooded completely). + * + * This tends to be faster than full recalculation, as only a subset of all points in the graph needs to be evaluated. + * + * If segment costs have changed (as is the case with traffic distortions), all affected segments must have been added + * to, removed from or updated in the route graph before this method is called. + * + * After recalculation, the route path is updated. + * + * The function uses a modified LPA* algorithm for recalculations. Most modifications were made for compatibility with + * the algorithm used for the initial routing: + * \li The `value` of a node represents the cost to reach the destination and thus decreases along the route + * (eliminating the need for recalculations as the vehicle moves within the route graph) + * \li The heuristic is always assumed to be zero (which would turn A* into Dijkstra, the basis of the main routing + * algorithm, and makes our keys one-dimensional) + * \li Currently, each pass evaluates all locally inconsistent points, leaving an empty heap at the end (though this + * may change in the future). + * + * @param this_ The route + */ +/* TODO This is absolutely not thread-safe and will wreak havoc if run concurrently with route_graph_flood(). This is + * not an issue as long as the two never overlap: Currently both this function and route_graph_flood() run without + * interruption until they finish, and are both on the main thread. If that changes, we need to revisit this. */ +void route_recalculate_partial(struct route *this_) { + struct attr route_status; - heap = fh_makekeyheap(); + /* do nothing if we don’t have a route graph */ + if (!route_has_graph(this_)) + return; - while ((s=route_graph_get_segment(this, dst->street, s))) { - val=route_value_seg(profile, NULL, s, -1); - if (val != INT_MAX) { - val=val*(100-dst->percent)/100; - s->end->seg=s; - s->end->value=val; - s->end->el=fh_insertkey(heap, s->end->value, s->end); - } - val=route_value_seg(profile, NULL, s, 1); - if (val != INT_MAX) { - val=val*dst->percent/100; - s->start->seg=s; - s->start->value=val; - s->start->el=fh_insertkey(heap, s->start->value, s->start); - } - } - for (;;) { - p_min=fh_extractmin(heap); /* Starting Dijkstra by selecting the point with the minimum costs on the heap */ - if (! p_min) /* There are no more points with temporarily calculated costs, Dijkstra has finished */ - break; - min=p_min->value; - if (debug_route) - printf("extract p=%p free el=%p min=%d, 0x%x, 0x%x\n", p_min, p_min->el, min, p_min->c.x, p_min->c.y); - p_min->el=NULL; /* This point is permanently calculated now, we've taken it out of the heap */ - s=p_min->start; - while (s) { /* Iterating all the segments leading away from our point to update the points at their ends */ - val=route_value_seg(profile, p_min, s, -1); - if (val != INT_MAX && item_is_equal(s->data.item,p_min->seg->data.item)) { - if (profile->turn_around_penalty2) - val+=profile->turn_around_penalty2; - else - val=INT_MAX; - } - if (val != INT_MAX) { - new=min+val; - if (debug_route) - printf("begin %d len %d vs %d (0x%x,0x%x)\n",new,val,s->end->value, s->end->c.x, s->end->c.y); - if (new < s->end->value) { /* We've found a less costly way to reach the end of s, update it */ - s->end->value=new; - s->end->seg=s; - if (! s->end->el) { - if (debug_route) - printf("insert_end p=%p el=%p val=%d ", s->end, s->end->el, s->end->value); - s->end->el=fh_insertkey(heap, new, s->end); - if (debug_route) - printf("el new=%p\n", s->end->el); - } else { - if (debug_route) - printf("replace_end p=%p el=%p val=%d\n", s->end, s->end->el, s->end->value); - fh_replacekey(heap, s->end->el, new); - } - } - if (debug_route) - printf("\n"); - } - s=s->start_next; - } - s=p_min->end; - while (s) { /* Doing the same as above with the segments leading towards our point */ - val=route_value_seg(profile, p_min, s, 1); - if (val != INT_MAX && item_is_equal(s->data.item,p_min->seg->data.item)) { - if (profile->turn_around_penalty2) - val+=profile->turn_around_penalty2; - else - val=INT_MAX; - } - if (val != INT_MAX) { - new=min+val; - if (debug_route) - printf("end %d len %d vs %d (0x%x,0x%x)\n",new,val,s->start->value,s->start->c.x, s->start->c.y); - if (new < s->start->value) { - s->start->value=new; - s->start->seg=s; - if (! s->start->el) { - if (debug_route) - printf("insert_start p=%p el=%p val=%d ", s->start, s->start->el, s->start->value); - s->start->el=fh_insertkey(heap, new, s->start); - if (debug_route) - printf("el new=%p\n", s->start->el); - } else { - if (debug_route) - printf("replace_start p=%p el=%p val=%d\n", s->start, s->start->el, s->start->value); - fh_replacekey(heap, s->start->el, new); - } - } - if (debug_route) - printf("\n"); - } - s=s->end_next; - } - } - fh_deleteheap(heap); - callback_call_0(cb); - dbg(lvl_debug,"return"); + /* if the route graph is still being built, it will be calculated from scratch after that, nothing to do here */ + if (this_->graph->busy) + return; + + /* exit if there is no need to recalculate */ + if (route_graph_is_path_computed(this_->graph)) + return; + + route_status.type = attr_route_status; + + route_status.u.num = route_status_building_graph; + route_set_attr(this_, &route_status); + + printf("Expanding points which have changed\n"); + + route_graph_compute_shortest_path(this_->graph, this_->vehicleprofile, NULL); + + printf("Point expansion complete, recalculating route path\n"); + + route_path_update_done(this_, 0); } /** @@ -2639,7 +2861,8 @@ static struct route_path *route_path_new(struct route_graph *this, struct route_ this->avoid_seg=s; route_graph_set_traffic_distortion(this, this->avoid_seg, profile->turn_around_penalty); route_graph_reset(this); - route_graph_flood(this, dst, profile, NULL); + route_graph_init(this, dst, profile); + route_graph_compute_shortest_path(this, profile, NULL); return route_path_new(this, oldpath, pos, dst, profile); } } @@ -2753,6 +2976,7 @@ static void route_graph_clone_segment(struct route_graph *this, struct route_gra data.len=s->data.len+1; data.maxspeed=-1; data.dangerous_goods=0; + data.score = s->data.score; if (s->data.flags & AF_SPEED_LIMIT) data.maxspeed=RSD_MAXSPEED(&s->data); if (s->data.flags & AF_SEGMENTED) @@ -2847,13 +3071,17 @@ static void route_graph_process_restrictions(struct route_graph *this) { /** * @brief Releases all resources needed to build the route graph. * - * If {@code cancel} is false, this function will start processing restrictions and ultimately call - * the route graph's {@code done_cb} callback. + * If `cancel` is false, this function will start processing restrictions and ultimately call the route + * graph's `done_cb` callback. + * + * The traffic module will always call this method with `cancel` set to true, as it does not process + * restrictions and has no callback. Inside the routing module, `cancel` will be true if, and only if, + * navigation has been aborted. * * @param rg Points to the route graph * @param cancel True if the process was aborted before completing, false if it completed normally */ -static void route_graph_build_done(struct route_graph *rg, int cancel) { +void route_graph_build_done(struct route_graph *rg, int cancel) { dbg(lvl_debug,"cancel=%d",cancel); if (rg->idle_ev) event_remove_idle(rg->idle_ev); @@ -2869,7 +3097,8 @@ static void route_graph_build_done(struct route_graph *rg, int cancel) { rg->sel=NULL; if (! cancel) { route_graph_process_restrictions(rg); - callback_call_0(rg->done_cb); + if (rg->done_cb) + callback_call_0(rg->done_cb); } rg->busy=0; } @@ -2889,11 +3118,11 @@ static void route_graph_build_idle(struct route_graph *rg, struct vehicleprofile } } if (item->type == type_traffic_distortion) - route_process_traffic_distortion(rg, item); + route_graph_add_traffic_distortion(rg, profile, item, 0); else if (item->type == type_street_turn_restriction_no || item->type == type_street_turn_restriction_only) - route_process_turn_restriction(rg, item); + route_graph_add_turn_restriction(rg, item); else - route_process_street_graph(rg, item, profile); + route_graph_add_street(rg, item, profile); count--; } } @@ -2927,6 +3156,7 @@ static struct route_graph *route_graph_build(struct mapset *ms, struct coord *c, ret->h=mapset_open(ms); ret->done_cb=done_cb; ret->busy=1; + ret->heap = fh_makekeyheap(); if (route_graph_build_next_map(ret)) { if (async) { ret->idle_cb=callback_new_2(callback_cast(route_graph_build_idle), ret, profile); @@ -2939,7 +3169,8 @@ static struct route_graph *route_graph_build(struct mapset *ms, struct coord *c, } static void route_graph_update_done(struct route *this, struct callback *cb) { - route_graph_flood(this->graph, this->current_dst, this->vehicleprofile, cb); + route_graph_init(this->graph, this->current_dst, this->vehicleprofile); + route_graph_compute_shortest_path(this->graph, this->vehicleprofile, cb); } /** @@ -3216,7 +3447,7 @@ static int rm_attr_get(void *priv_data, enum attr_type attr_type, struct attr *a return 0; case attr_maxspeed: mr->attr_next = attr_street_item; - if (seg && seg->data->flags & AF_SPEED_LIMIT) { + if (seg && (seg->data->flags & AF_SPEED_LIMIT)) { attr->u.num=RSD_MAXSPEED(seg->data); } else { @@ -3249,6 +3480,8 @@ static int rm_attr_get(void *priv_data, enum attr_type attr_type, struct attr *a return 0; return 1; case attr_time: + /* TODO This ignores access flags on traffic distortions, but the attribute does not seem + * to be used anywhere */ mr->attr_next=attr_speed; if (seg) attr->u.num=route_time_seg(route->vehicleprofile, seg->data, NULL); @@ -3256,6 +3489,8 @@ static int rm_attr_get(void *priv_data, enum attr_type attr_type, struct attr *a return 0; return 1; case attr_speed: + /* TODO This ignores access flags on traffic distortions, but the attribute does not seem + * to be used anywhere */ mr->attr_next=attr_label; if (seg) attr->u.num=route_seg_speed(route->vehicleprofile, seg->data, NULL); @@ -3450,9 +3685,11 @@ static int rp_attr_get(void *priv_data, enum attr_type attr_type, struct attr *a &seg->data, NULL), seg->start, seg->end); attr->u.str = mr->str; return 1; + break; default: return 0; } + break; default: mr->attr_next=attr_none; attr->type=attr_none; @@ -3686,11 +3923,13 @@ static struct item *rm_get_item(struct map_rect_priv *mr) { id=route->pos; break; } + /* FALLTHRU */ case type_route_start: case type_route_start_reverse: mr->seg=NULL; mr->dest=mr->mpriv->route->destinations; + /* FALLTHRU */ default: if (mr->item.type == type_waypoint) mr->dest=g_list_next(mr->dest); @@ -3727,6 +3966,7 @@ static struct item *rm_get_item(struct map_rect_priv *mr) { id=&(mr->mpriv->route->destinations); if (mr->mpriv->route->destinations) break; + /* FALLTHRU */ case type_route_end: return NULL; } @@ -3822,6 +4062,30 @@ static struct map *route_get_map_helper(struct route *this_, struct map **map, c } /** + * @brief Adds a traffic distortion item to the route + * + * @param this_ The route + * @param item The item to add, must be of {@code type_traffic_distortion} + */ +void route_add_traffic_distortion(struct route *this_, struct item *item) { + if (route_has_graph(this_)) + route_graph_add_traffic_distortion(this_->graph, this_->vehicleprofile, item, 1); +} + +/** + * @brief Changes a traffic distortion item on the route + * + * Attempting to change an idem which is not in the route graph will add it. + * + * @param this_ The route + * @param item The item to change, must be of {@code type_traffic_distortion} + */ +void route_change_traffic_distortion(struct route *this_, struct item *item) { + if (route_has_graph(this_)) + route_graph_change_traffic_distortion(this_->graph, this_->vehicleprofile, item); +} + +/** * @brief Returns a new map containing the route path * * This function returns a new map containing the route path. @@ -3861,6 +4125,15 @@ enum route_path_flags route_get_flags(struct route *this_) { } /** + * @brief Retrieves the route graph. + * + * @return The route graph, or NULL if the route has no valid graph + */ +struct route_graph * route_get_graph(struct route *this_) { + return this_->graph; +} + +/** * @brief Whether the route has a valid graph. * * @return True if the route has a graph, false if not. @@ -3869,6 +4142,19 @@ int route_has_graph(struct route *this_) { return (this_->graph != NULL); } +/** + * @brief Removes a traffic distortion item from the route + * + * Removing a traffic distortion which is not in the route graph is a no-op. + * + * @param this_ The route + * @param item The item to remove, must be of {@code type_traffic_distortion} + */ +void route_remove_traffic_distortion(struct route *this_, struct item *item) { + if (route_has_graph(this_)) + route_graph_remove_traffic_distortion(this_->graph, this_->vehicleprofile, item); +} + void route_set_projection(struct route *this_, enum projection pro) { } diff --git a/navit/route_protected.h b/navit/route_protected.h new file mode 100644 index 000000000..9b7bf62f6 --- /dev/null +++ b/navit/route_protected.h @@ -0,0 +1,184 @@ +/** + * Navit, a modular navigation system. + * Copyright (C) 2005-2008 Navit Team + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public License + * version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +/** + * @file route_private.h + * + * @brief Contains protected exports for route.c + * + * This file contains code that is exported by route.c. Unlike the exports in route.h, exports in this + * file are intended only for use by modules which are closely related to routing. They are not part of + * the public route API. + */ + +#ifndef NAVIT_ROUTE_PROTECTED_H +#define NAVIT_ROUTE_PROTECTED_H + +#ifdef __cplusplus +extern "C" { +#endif + + +#define RP_TRAFFIC_DISTORTION 1 +#define RP_TURN_RESTRICTION 2 +#define RP_TURN_RESTRICTION_RESOLVED 4 + +#define RSD_MAXSPEED(x) *((int *)route_segment_data_field_pos((x), attr_maxspeed)) + +/** + * @brief A point in the route graph + * + * This represents a point in the route graph. A point usually connects two or more segments, + * but there are also points which don't do that (e.g. at the end of a dead-end). + */ +struct route_graph_point { + struct route_graph_point *hash_next; /**< Pointer to a chained hashlist of all route_graph_points with this hash */ + struct route_graph_segment *start; /**< Pointer to a list of segments of which this point is the start. The links + * of this linked-list are in route_graph_segment->start_next.*/ + struct route_graph_segment *end; /**< Pointer to a list of segments of which this pointer is the end. The links + * of this linked-list are in route_graph_segment->end_next. */ + struct route_graph_segment *seg; /**< Pointer to the segment one should use to reach the destination at + * least costs */ + struct fibheap_el *el; /**< When this point is put on a Fibonacci heap, this is a pointer + * to this point's heap element */ + int value; /**< The cost at which one can reach the destination from this point on. + * {@code INT_MAX} indicates that the destination is unreachable from this + * point, or that this point has not yet been examined. */ + int rhs; /**< Lookahead value based on neighbors’ `value`; used for recalculation and + * equal to `value` after the route graph has been flooded. */ + int dst_val; /**< For points close to the destination, this is the cost of the point if it + * is the last in the graph; `INT_MAX` for all other points. */ + struct route_graph_segment *dst_seg; /**< For points close to the destination, this is the segment over which the + * destination can be reached directly */ + struct coord c; /**< Coordinates of this point */ + int flags; /**< Flags for this point (e.g. traffic distortion) */ +}; + +/** + * @brief A segment in the route graph or path + * + * This is a segment in the route graph or path. A segment represents a driveable way. + */ +struct route_segment_data { + struct item item; /**< The item (e.g. street) that this segment represents. */ + int flags; /**< Flags e.g. for access, restrictions, segmentation or roundabouts. */ + int len; /**< Length of this segment, in meters */ + int score; /**< Used by the traffic module to give preference to some + * segments over others */ + /*NOTE: After a segment, various fields may follow, depending on what flags are set. Order of fields: + 1.) maxspeed Maximum allowed speed on this segment. Present if AF_SPEED_LIMIT is set. + 2.) offset If the item is segmented (i.e. represented by more than one segment), this + indicates the position of this segment in the item. Present if AF_SEGMENTED is set. + */ +}; + +/** + * @brief Size and weight limits for a route segment + */ +struct size_weight_limit { + int width; + int length; + int height; + int weight; + int axle_weight; +}; + +/** + * @brief Data for a segment in the route graph + */ +struct route_graph_segment_data { + struct item *item; /**< The item which this segment is part of */ + int offset; /**< If the item passed in "item" is segmented (i.e. divided + * into several segments), this indicates the position of + * this segment within the item */ + int flags; /**< Flags for this segment */ + int len; /**< The length of this segment */ + int maxspeed; /**< The maximum speed allowed on this segment in km/h, + * -1 if not known */ + struct size_weight_limit size_weight; /**< Size and weight limits for this segment */ + int dangerous_goods; + int score; /**< Used by the traffic module to give preference to some + * segments over others */ +}; + +/** + * @brief A segment in the route graph + * + * This is a segment in the route graph. A segment represents a driveable way. + */ +struct route_graph_segment { + struct route_graph_segment *next; /**< Linked-list pointer to a list of all route_graph_segments */ + struct route_graph_segment *start_next; /**< Pointer to the next element in the list of segments that start at the + * same point. Start of this list is in route_graph_point->start. */ + struct route_graph_segment *end_next; /**< Pointer to the next element in the list of segments that end at the + * same point. Start of this list is in route_graph_point->end. */ + struct route_graph_point *start; /**< Pointer to the point this segment starts at. */ + struct route_graph_point *end; /**< Pointer to the point this segment ends at. */ + struct route_segment_data data; /**< The segment data */ +}; + +/** + * @brief A complete route graph + * + * The route graph holds all routable segments along with the connections between them and the cost of + * each segment. + */ +struct route_graph { + int busy; /**< The graph is being built */ + struct map_selection *sel; /**< The rectangle selection for the graph */ + struct mapset_handle *h; /**< Handle to the mapset */ + struct map *m; /**< Pointer to the currently active map */ + struct map_rect *mr; /**< Pointer to the currently active map rectangle */ + struct vehicleprofile *vehicleprofile; /**< The vehicle profile */ + struct callback *idle_cb; /**< Idle callback to process the graph */ + struct callback *done_cb; /**< Callback when graph is done */ + struct event_idle *idle_ev; /**< The pointer to the idle event */ + struct route_graph_segment *route_segments; /**< Pointer to the first route_graph_segment in the linked list of all segments */ + struct route_graph_segment *avoid_seg; + struct fibheap *heap; /**< Priority queue for points to be expanded */ +#define HASH_SIZE 8192 + struct route_graph_point *hash[HASH_SIZE]; /**< A hashtable containing all route_graph_points in this graph */ +}; + + +/* prototypes */ +struct route_graph * route_get_graph(struct route *this_); +void route_add_traffic_distortion(struct route *this_, struct item *item); +void route_remove_traffic_distortion(struct route *this_, struct item *item); +void route_change_traffic_distortion(struct route *this_, struct item *item); +struct route_graph_point * route_graph_add_point(struct route_graph *this, struct coord *f); +void route_graph_add_turn_restriction(struct route_graph *this, struct item *item); +void route_graph_free_points(struct route_graph *this); +struct route_graph_point *route_graph_get_point(struct route_graph *this, struct coord *c); +struct route_graph_point *route_graph_get_point_next(struct route_graph *this, struct coord *c, + struct route_graph_point *last); +void route_graph_add_segment(struct route_graph *this, struct route_graph_point *start, + struct route_graph_point *end, struct route_graph_segment_data *data); +int route_graph_segment_is_duplicate(struct route_graph_point *start, struct route_graph_segment_data *data); +void route_graph_free_segments(struct route_graph *this); +void route_graph_build_done(struct route_graph *rg, int cancel); +void route_recalculate_partial(struct route *this_); +void * route_segment_data_field_pos(struct route_segment_data *seg, enum attr_type type); +/* end of prototypes */ +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/navit/start_real.c b/navit/start_real.c index fd631916f..c3f8b5622 100644 --- a/navit/start_real.c +++ b/navit/start_real.c @@ -46,6 +46,7 @@ #include "atom.h" #include "command.h" #include "geom.h" +#include "traffic.h" #ifdef HAVE_API_WIN32_CE #include <windows.h> #include <winbase.h> @@ -110,6 +111,7 @@ int main_real(int argc, char * const* argv) { search_init(); linguistics_init(); geom_init(); + traffic_init(); config_file=NULL; #ifdef HAVE_GETOPT_H opterr=0; //don't bomb out on errors. diff --git a/navit/traffic.c b/navit/traffic.c new file mode 100644 index 000000000..74304e3cf --- /dev/null +++ b/navit/traffic.c @@ -0,0 +1,5194 @@ +/** + * Navit, a modular navigation system. + * Copyright (C) 2005-2017 Navit Team + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +/** @file + * @brief Contains code related to processing traffic messages into map items. + * + * Currently the only map items supported are traffic distortions. More may be added in the future. + * + * Traffic distortions are used by Navit to route around traffic problems. + */ + +#include <string.h> +#include <stdlib.h> +#include <time.h> + +#ifdef _POSIX_C_SOURCE +#include <sys/types.h> +#endif +#include <sys/time.h> +#include "glib_slice.h" +#include "config.h" +#include "navit.h" +#include "util.h" +#include "coord.h" +#include "item.h" +#include "map.h" +#include "mapset.h" +#include "route_protected.h" +#include "route.h" +#include "transform.h" +#include "xmlconfig.h" +#include "traffic.h" +#include "plugin.h" +#include "fib.h" +#include "event.h" +#include "callback.h" +#include "vehicleprofile.h" +#include "debug.h" + +#undef TRAFFIC_DEBUG + +/** Flag to indicate new messages have been received */ +#define MESSAGE_UPDATE_MESSAGES 1 << 0 + +/** Flag to indicate segments have changed */ +#define MESSAGE_UPDATE_SEGMENTS 1 << 1 + +/** The penalty applied to an off-road link */ +#define PENALTY_OFFROAD 4 + +/** The maximum penalty applied to points with non-matching attributes */ +#define PENALTY_POINT_MATCH 16 + +/** Flag to indicate expired messages should be purged */ +#define PROCESS_MESSAGES_PURGE_EXPIRED 1 << 0 + +/** Flag to indicate the message store should not be exported */ +#define PROCESS_MESSAGES_NO_DUMP_STORE 1 << 1 + +/** The lowest order of items to consider */ +#define ROUTE_ORDER 18 + +/** The buffer zone around the enclosing rectangle used in route calculations, absolute distance */ +#define ROUTE_RECT_DIST_ABS 1000 + +/** The buffer zone around the enclosing rectangle used in route calculations, relative to rect size */ +#define ROUTE_RECT_DIST_REL 0 + +/** Time slice for idle loops, in milliseconds */ +#define TIME_SLICE 40 + +/** + * @brief Private data shared between all traffic instances. + */ +struct traffic_shared_priv { + GList * messages; /**< Currently active messages */ + GList * message_queue; /**< Queued messages, waiting to be processed */ + // TODO messages by ID? In a later phase… +}; + +/** + * @brief A traffic plugin instance. + * + * If multiple traffic plugins are loaded, each will have its own `struct traffic` instance. + */ +struct traffic { + NAVIT_OBJECT + struct navit *navit; /**< The navit instance */ + struct traffic_shared_priv *shared; /**< Private data shared between all instances */ + struct traffic_priv *priv; /**< Private data used by the plugin */ + struct traffic_methods meth; /**< Methods implemented by the plugin */ + struct callback * callback; /**< The callback function for the idle loop */ + struct event_timeout * timeout; /**< The timeout event that triggers the loop function */ + struct callback *idle_cb; /**< Idle callback to process new messages */ + struct event_idle *idle_ev; /**< The pointer to the idle event */ + struct mapset *ms; /**< The mapset used for routing */ + struct route *rt; /**< The route to notify of traffic changes */ + struct map *map; /**< The traffic map, in which traffic distortions are stored */ +}; + +struct traffic_location_priv { + struct coord_geo * sw; /*!< Southwestern corner of rectangle enclosing all points. + * Calculated by Navit from the points of the location. */ + struct coord_geo * ne; /*!< Northeastern corner of rectangle enclosing all points. + * Calculated by Navit from the points of the location. */ +}; + +struct traffic_message_priv { + struct item **items; /**< The items for this message in the traffic map */ +}; + +/** + * @brief Private data for the traffic map. + * + * If multiple traffic plugins are loaded, the map is shared between all of them. + */ +struct map_priv { + GList * items; /**< The map items */ + // TODO items by start/end coordinates? In a later phase… +}; + +/** + * @brief Implementation-specific map rect data + */ +struct map_rect_priv { + struct map_priv *mpriv; /**< The map to which this map rect refers */ + struct item *item; /**< The current item, i.e. the last item returned by the `map_rect_get_item` method */ + GList * next_item; /**< `GList` entry for the next item to be returned by `map_rect_get_item` */ +}; + +/** + * @brief Message-specific map private data + * + * This structure is needed to handle segments referenced by multiple messages. When a message changes, + * is cancelled or expires, the data of the remaining messages is used to determine the new attributes + * for the segment. + */ +struct item_msg_priv { + char * message_id; /**< Message ID for the associated message */ + int speed; /**< The expected speed in km/h (`INT_MAX` for unlimited, 0 indicates + * that the road is closed) */ + int delay; /**< Expected delay for this segment, in 1/10 s */ + struct attr ** attrs; /**< Additional attributes to add to the segment */ +}; + +/** + * @brief Implementation-specific item data for traffic map items + */ +struct item_priv { + struct map_rect_priv * mr; /**< The private data for the map rect from which the item was obtained */ + struct attr **attrs; /**< The attributes for the item, `NULL`-terminated */ + struct coord *coords; /**< The coordinates for the item */ + int coord_count; /**< The number of elements in `coords` */ + int refcount; /**< How many references to this item exist */ + GList * message_data; /**< Message-specific data, see `struct item_msg_priv` */ + struct attr **next_attr; /**< The next attribute of `item` to be returned by the `item_attr_get` method */ + unsigned int + next_coord; /**< The index of the next coordinate of `item` to be returned by the `item_coord_get` method */ + struct route *rt; /**< The route to which the item has been added */ +}; + +/** + * @brief Data for segments affected by a traffic message. + * + * Speed can be specified in three different ways: + * \li `speed` replaces the maximum speed of the segment, if lower + * \li `speed_penalty` subtracts the specified amount from the maximum speed of the segment + * \li `speed_factor` is the percentage of the maximum speed of the segment to be assumed + * + * Where more than one of these values is set, the lowest speed applies. + */ +struct seg_data { + enum item_type type; /**< The item type; currently only `type_traffic_distortion` is supported */ + int speed; /**< The expected speed in km/h (`INT_MAX` for unlimited, 0 indicates + * that the road is closed) */ + int speed_penalty; /**< Difference between expected speed and the posted speed limit of + * the segment (0 for none); the resulting maximum speed is never + * less than 5 km/h */ + int speed_factor; /**< Expected speed expressed as a percentage of the posted limit (100 + * for full speed) */ + int delay; /**< Expected delay for all segments combined, in 1/10 s */ + enum location_dir dir; /**< Directionality */ + int flags; /**< Access flags (modes of transportation to which the message applies) */ + struct attr ** attrs; /**< Additional attributes to add to the segments */ +}; + +struct point_data { + struct route_graph_point * p; /**< The point in the route graph */ + int score; /**< The attribute matching score */ +}; + +/** + * @brief State for the XML parser. + * + * Several members of this struct are used to cache traffic data model objects until they can be + * incorporated in a message. + * + * All `struct traffic_point` members are reset to NULL when the `location` member is set. Likewise, the + * `si` member is reset to NULL when a new event is added. The `location` and `events` members are reset + * to NULL when a message is created. + */ +struct xml_state { + GList * messages; /**< Messages read so far */ + GList * tagstack; /**< Currently open tags (order is bottom to top) */ + int is_valid; /**< Whether `tagstack` represents a hierarchy of elements we recognize */ + int is_opened; /**< True if we have just opened an element; + * false if child elements have been opened and closed since */ + struct traffic_point * at; /**< The point for a point location, NULL for linear locations. */ + struct traffic_point * from; /**< The start of a linear location, or a point before `at`. */ + struct traffic_point * to; /**< The end of a linear location, or a point after `at`. */ + struct traffic_point * via; /**< A point between `from` and `to`. Required on ring roads + * unless `not_via` is used; cannot be used together with `at`. */ + struct traffic_point * not_via; /**< A point NOT between `from` and `to`. Required on ring roads + * unless `via` is used; cannot be used together with `at`. */ + struct traffic_location * location; /**< The location to which the next message refers. */ + GList * si; /**< Supplementary information items for the next event. */ + GList * events; /**< The events for the next message. */ +}; + +/** + * @brief Data for an XML element + * + * `names` and `values` are always two separate arrays for this struct, regardless of what is indicated by + * `XML_ATTR_DISTANCE`. + */ +struct xml_element { + char * tag_name; /**< The tag name */ + char ** names; /**< Attribute names */ + char ** values; /**< Attribute values (indices correspond to `names`) */ + char * text; /**< Character data (NULL-terminated) */ +}; + +static struct seg_data * seg_data_new(void); +static struct item * tm_add_item(struct map *map, enum item_type type, int id_hi, int id_lo, + int flags, struct attr **attrs, struct coord *c, int count, char * id); +#ifdef TRAFFIC_DEBUG +static void tm_dump_item_to_textfile(struct item * item); +#endif +static void tm_destroy(struct map_priv *priv); +static void tm_coord_rewind(void *priv_data); +static void tm_item_destroy(struct item * item); +static struct item * tm_item_ref(struct item * item); +static struct item * tm_item_unref(struct item * item); +static void tm_item_update_attrs(struct item * item, struct route * route); +static int tm_coord_get(void *priv_data, struct coord *c, int count); +static void tm_attr_rewind(void *priv_data); +static int tm_attr_get(void *priv_data, enum attr_type attr_type, struct attr *attr); +static int tm_type_set(void *priv_data, enum item_type type); +static struct route_graph * traffic_location_get_route_graph(struct traffic_location * this_, + struct mapset * ms); +static int traffic_location_match_attributes(struct traffic_location * this_, struct item *item); +static int traffic_message_add_segments(struct traffic_message * this_, struct mapset * ms, struct seg_data * data, + struct map *map, struct route * route); +static void traffic_location_populate_route_graph(struct traffic_location * this_, struct route_graph * rg, + struct mapset * ms); +static void traffic_dump_messages_to_xml(struct traffic * this_); +static void traffic_loop(struct traffic * this_); +static struct traffic * traffic_new(struct attr *parent, struct attr **attrs); +static int traffic_process_messages_int(struct traffic * this_, int flags); +static void traffic_message_dump_to_stderr(struct traffic_message * this_); +static struct seg_data * traffic_message_parse_events(struct traffic_message * this_); +static struct route_graph_point * traffic_route_flood_graph(struct route_graph * rg, + struct coord * c_start, struct coord * c_dst, struct route_graph_point * start_existing); + +static struct item_methods methods_traffic_item = { + tm_coord_rewind, + tm_coord_get, + tm_attr_rewind, + tm_attr_get, + NULL, + NULL, + NULL, + tm_type_set, +}; + +/** + * @brief Creates a Boolean value from its string representation. + * + * If the string equals `true`, `yes` or can be parsed to a nonzero integer, the result is true. + * + * If the string equals `false`, `no` or begins with the digit 0 and returns zero when parsed to an + * integer, the result is false. + * + * If NULL is supplied, or if the string does not match any known value, the result is the default value. + * + * String comparison is case-insensitive. + * + * Since true is always represented by a return value of 1, passing a `deflt` other than 0 or 1 allows + * the caller to determine if the string could be parsed correctly. + * + * @param string The string representation + * @param deflt The default value to return if `string` is not a valid representation of a Boolean value. + * + * @return The corresponding `enum event_class`, or `event_class_invalid` if `string` does not match a + * known identifier + */ +static int boolean_new(const char * string, int deflt) { + if (!string) + return deflt; + if (!g_ascii_strcasecmp(string, "yes") || !g_ascii_strcasecmp(string, "true") || atoi(string)) + return 1; + if (!g_ascii_strcasecmp(string, "no") || !g_ascii_strcasecmp(string, "false") || ((string[0] == '0') && !atoi(string))) + return 0; + return deflt; +} + +/** + * @brief Creates a new `struct seg_data` and initializes it with default values. + */ +static struct seg_data * seg_data_new(void) { + struct seg_data * ret = g_new0(struct seg_data, 1); + ret->type = type_traffic_distortion; + ret->speed = INT_MAX; + ret->speed_factor = 100; + return ret; +} + +/** + * @brief Creates a timestamp from its ISO8601 representation. + * + * @param string The ISO8601 timestamp + * + * @return The timestamp, or 0 if `string` is NULL. + */ +static time_t time_new(char * string) { + if (!string) + return 0; + return iso8601_to_time(string); +} + +/** + * @brief Whether two `struct seg_data` contain the same data. + * + * @return true if `l` and `r` are equal, false if not. Two NULL values are considered equal; a NULL value and a + * non-NULL value are not. + */ +static int seg_data_equals(struct seg_data * l, struct seg_data * r) { + struct attr ** attrs; + struct attr * attr; + + if (!l && !r) + return 0; + else if (!l || !r) + return 1; + if (l->type != r->type) + return 0; + if (l->speed != r->speed) + return 0; + if (l->speed_penalty != r->speed_penalty) + return 0; + if (l->speed_factor != r->speed_factor) + return 0; + if (l->delay != r->delay) + return 0; + if (l->dir != r->dir) + return 0; + if (l->flags != r->flags) + return 0; + if (!l->attrs && !r->attrs) + return 1; + if (!l->attrs || !r->attrs) + return 0; + /* FIXME this will break if multiple attributes of the same type are present and have different values */ + for (attrs = l->attrs; attrs; attrs++) { + attr = attr_search(r->attrs, NULL, (*attrs)->type); + if (!attr || (attr->u.data != (*attrs)->u.data)) + return 0; + } + for (attrs = r->attrs; attrs; attrs++) { + attr = attr_search(l->attrs, NULL, (*attrs)->type); + if (!attr || (attr->u.data != (*attrs)->u.data)) + return 0; + } + return 1; +} + +/** + * @brief Adds message data to a traffic map item. + * + * This method checks if the item already has data for the message specified in `msgid`. If so, the + * existing data is updated, else a new entry is added. + * + * Data changes also trigger an update of the affected item’s attributes. + * + * @param item The item (its `priv_data` member must point to a `struct item_priv`) + * @param msgid The message ID + * @param speed The maximum speed for the segment (`INT_MAX` if none given) + * @param delay The delay for the segment, in tenths of seconds (0 for none) + * @param attrs Additional attributes specified by the message + * @param route The route affected by the changes + * + * @return true if data was changed, false if not + */ +static int tm_item_add_message_data(struct item * item, char * msgid, int speed, int delay, struct attr ** attrs, + struct route * route) { + int ret = 0; + struct item_priv * priv_data = item->priv_data; + GList * msglist; + struct item_msg_priv * msgdata; + + for (msglist = priv_data->message_data; msglist; msglist = g_list_next(msglist)) { + msgdata = (struct item_msg_priv *) msglist->data; + if (!strcmp(msgdata->message_id, msgid)) + break; + } + + if (msglist) { + /* we have an existing item, update it */ + ret |= ((msgdata->speed != speed) || (msgdata->delay != delay)); + msgdata->speed = speed; + msgdata->delay = delay; + /* TODO attrs */ + } else { + ret = 1; + /* we need to insert a new item */ + msgdata = g_new0(struct item_msg_priv, 1); + msgdata->message_id = g_strdup(msgid); + msgdata->speed = speed; + msgdata->delay = delay; + /* TODO attrs */ + priv_data->message_data = g_list_append(priv_data->message_data, msgdata); + } + + if (ret) + tm_item_update_attrs(item, route); + + return ret; +} + +/** + * @brief Destroys a traffic map item. + * + * This function should never be called directly. Instead, be sure to obtain all references by calling + * `tm_item_ref()` and destroying them by calling `tm_item_unref()`. + * + * @param item The item (its `priv_data` member must point to a `struct item_priv`) + */ +static void tm_item_destroy(struct item * item) { + struct item_priv * priv_data = item->priv_data; + GList * msglist; + struct item_msg_priv * msgdata; + + attr_list_free(priv_data->attrs); + g_free(priv_data->coords); + + for (msglist = priv_data->message_data; msglist; msglist = g_list_remove(msglist, msglist->data)) { + msgdata = (struct item_msg_priv *) msglist->data; + g_free(msgdata->message_id); + attr_list_free(msgdata->attrs); + g_free(msgdata); + } + + g_free(item->priv_data); + g_free(item); +} + +/** + * @brief References a traffic map item. + * + * Storing a reference to a traffic map item should always be done by calling this function, passing the + * item as its argument. This will return the item and increase its reference count by one. + * + * Never store a pointer to a traffic item not obtained via this function. Doing so may have undesired + * side effects as the item will not be aware of the reference to it, and the reference may unexpectedly + * become invalid, leading to a segmentation fault. + * + * @param item The item (its `priv_data` member must point to a `struct item_priv`) + * + * @return The item. `NULL` will be returned if the argument is `NULL` or points to an item whose + * `priv_data` member is `NULL`. + */ +static struct item * tm_item_ref(struct item * item) { + if (!item) + return NULL; + if (!item->priv_data) + return NULL; + ((struct item_priv *) item->priv_data)->refcount++; + return item; +} + +/** + * @brief Unreferences a traffic map item. + * + * This must be called when destroying a reference to a traffic map item. It will decrease the reference + * count of the item by one, and destroy the item if the last reference to is is removed. + * + * The map itself (and only the map) holds weak references to its items, which are not considered in the + * reference count. Consequently, when the reference count reaches zero, the item is also removed from + * the map. + * + * Unreferencing an item with a zero reference count (which is only possible for an item which has never + * been referenced since its creation) is equivalent to dropping the last reference, i.e. it will destroy + * the item. + * + * When the last reference is removed (or an item with a zero reference count is unreferenced) and the item’s `rt` + * member is set (indicating the route to which the item was added), the item is removed from that route. + * + * If the unreference operation is successful, this function returns `NULL`. This allows one-line + * operations such as: + * + * {@code some_item = tm_item_unref(some_item);} + * + * @param item The item (its `priv_data` member must point to a `struct item_priv`) + * + * @return `NULL` if the item was unreferenced successfully, `item` if it points to an item whose + * `priv_data` member is `NULL`. + */ +static struct item * tm_item_unref(struct item * item) { + struct item_priv * priv_data; + struct map_rect * mr; + struct item * mapitem; + if (!item) + return item; + if (!item->priv_data) + return item; + priv_data = (struct item_priv *) item->priv_data; + priv_data->refcount--; + if (priv_data->refcount <= 0) { + if (priv_data->rt) + route_remove_traffic_distortion(priv_data->rt, item); + mr = map_rect_new(item->map, NULL); + do { + mapitem = map_rect_get_item(mr); + } while (mapitem && (mapitem != item)); + if (mapitem) + item_type_set(mapitem, type_none); + map_rect_destroy(mr); + tm_item_destroy(item); + } + return NULL; +} + +/** + * @brief Updates the attributes of an item. + * + * This method must be called after changing the message data associated with an item, i.e. adding, + * removing or modifying message data. + * + * @param item The item + * @param route The route affected by the changes + */ +static void tm_item_update_attrs(struct item * item, struct route * route) { + struct item_priv * priv_data = (struct item_priv *) item->priv_data; + GList * msglist; + struct item_msg_priv * msgdata; + int speed = INT_MAX; + int delay = 0; + struct attr * attr = NULL; + int has_changes = 0; + + for (msglist = priv_data->message_data; msglist; msglist = g_list_next(msglist)) { + msgdata = (struct item_msg_priv *) msglist->data; + if (msgdata->speed < speed) + speed = msgdata->speed; + if (msgdata->delay < delay) + delay = msgdata->delay; + /* TODO attrs */ + } + + if (!priv_data->attrs) + priv_data->attrs = g_new0(struct attr *, 1); + + /* TODO maxspeed vs. delay: + * Currently both values are interpreted as being cumulative, which may give erroneous results. + * Consider a segment with a length of 1000 m and a maxspeed of 120 km/h, thus having a cost of 30 s. + * One message reports a maxspeed of 60 km/h and no delay, increasing the cost to 60 s. A second + * message reports no maxspeed but a delay of 30 s, also increasing the cost to 60 s. Both messages + * together would be interpreted as reducing the maxspeed to 60 km/h and adding a delay of 30 s, + * resulting in a cost of 90 s for the segment. + */ + if (speed < INT_MAX) { + attr = attr_search(priv_data->attrs, NULL, attr_maxspeed); + if (!attr) { + attr = g_new0(struct attr, 1); + attr->type = attr_maxspeed; + attr->u.num = speed; + priv_data->attrs = attr_generic_add_attr(priv_data->attrs, attr); + g_free(attr); + attr = NULL; + has_changes = 1; + } else if (speed < attr->u.num) { + has_changes = 1; + attr->u.num = speed; + } else if (speed > attr->u.num) { + has_changes = 1; + attr->u.num = speed; + } + } else { + while ((attr = attr_search(priv_data->attrs, NULL, attr_maxspeed))) + priv_data->attrs = attr_generic_remove_attr(priv_data->attrs, attr); + } + + if (delay) { + attr = attr_search(priv_data->attrs, NULL, attr_delay); + if (!attr) { + attr = g_new0(struct attr, 1); + attr->type = attr_delay; + attr->u.num = delay; + priv_data->attrs = attr_generic_add_attr(priv_data->attrs, attr); + g_free(attr); + attr = NULL; + has_changes = 1; + } else if (delay > attr->u.num) { + has_changes = 1; + attr->u.num = delay; + } else if (delay < attr->u.num) { + has_changes = 1; + attr->u.num = delay; + } + } else { + while (1) { + attr = attr_search(priv_data->attrs, NULL, attr_delay); + if (!attr) + break; + priv_data->attrs = attr_generic_remove_attr(priv_data->attrs, attr); + } + } + + if (has_changes) { + if (!priv_data->rt) { + priv_data->rt = route; + route_add_traffic_distortion(priv_data->rt, item); + } else + route_change_traffic_distortion(priv_data->rt, item); + } +} + +/** + * @brief Returns an item from the map which matches the supplied data. + * + * Comparison criteria are as follows: + * + * \li The item type must match + * \li Start and end coordinates must match (inverted coordinates will also match) + * \li If `attr_flags` is supplied in `attrs`, the item must have this attribute and the rules listed + * below are applied + * \li Flags in `AF_ALL` must match + * \li Flags in `AF_ONEWAYMASK` must be set either on both sides or neither side + * \li If set, flags in `AF_ONEWAYMASK` must effectively match (equal for same direction, inverted for + * opposite directions) + * \li Other attributes are currently ignored + * + * This is due to the way different reports for the same segment are handled: + * + * \li If multiple reports with the same access flags exist, one item is created; speed and delay are + * evaluated across all currently active reports in `tm_item_update_attrs()` (lowest speed and longest + * delay wins) + * \li If multiple reports exist and access flags differ, one item is created for each set of flags; + * items are deduplicated in `route_get_traffic_distortion()` + * + * @param mr A map rectangle in the traffic map + * @param type Type of the item + * @param attrs The attributes for the item + * @param c Points to an array of coordinates for the item + * @param count Number of items in `c` + */ +static struct item * tm_find_item(struct map_rect *mr, enum item_type type, struct attr **attrs, + struct coord *c, int count) { + struct item * ret = NULL; + struct item * curr; + struct item_priv * curr_priv; + struct attr wanted_flags_attr, curr_flags_attr; + + while ((curr = map_rect_get_item(mr)) && !ret) { + if (curr->type != type) + continue; + if (attr_generic_get_attr(attrs, NULL, attr_flags, &wanted_flags_attr, NULL)) { + if (!item_attr_get(curr, attr_flags, &curr_flags_attr)) + continue; + if ((wanted_flags_attr.u.num & AF_ALL) != (curr_flags_attr.u.num & AF_ALL)) + continue; + continue; + } else + wanted_flags_attr.type = attr_none; + curr_priv = curr->priv_data; + if (curr_priv->coords[0].x == c[0].x && curr_priv->coords[0].y == c[0].y + && curr_priv->coords[curr_priv->coord_count-1].x == c[count-1].x + && curr_priv->coords[curr_priv->coord_count-1].y == c[count-1].y) { + if (wanted_flags_attr.type == attr_none) { + /* no flag comparison, match */ + } else if ((wanted_flags_attr.u.num & AF_ONEWAYMASK) != (curr_flags_attr.u.num & AF_ONEWAYMASK)) + /* different oneway restrictions, no match */ + continue; + ret = curr; + } else if (curr_priv->coords[0].x == c[count-1].x + && curr_priv->coords[0].y == c[count-1].y + && curr_priv->coords[curr_priv->coord_count-1].x == c[0].x + && curr_priv->coords[curr_priv->coord_count-1].y == c[0].y) { + if (wanted_flags_attr.type == attr_none) { + /* no flag comparison, match */ + } else if (!(wanted_flags_attr.u.num & AF_ONEWAYMASK) && !(curr_flags_attr.u.num & AF_ONEWAYMASK)) { + /* two bidirectional distortions, match */ + } else if (wanted_flags_attr.u.num & curr_flags_attr.u.num & AF_ONEWAYMASK) { + /* oneway in opposite directions, no match */ + continue; + } else if ((wanted_flags_attr.u.num ^ AF_ONEWAYMASK) & curr_flags_attr.u.num & AF_ONEWAYMASK) { + /* oneway in same direction, match */ + } else { + continue; + } + ret = curr; + } + } + return ret; +} + +#ifdef TRAFFIC_DEBUG +/** + * @brief Dumps an item to a textfile map. + * + * This method writes the item to a textfile map named `distortion.txt` in the default data folder. + * This map can be added to the active mapset in order for the distortions to be rendered on the map and + * considered for routing. + * + * All data passed to this method is safe to free after the method returns, and doing so is the + * responsibility of the caller. + * + * @param item The item + */ +static void tm_dump_item_to_textfile(struct item * item) { + struct item_priv * ip = (struct item_priv *) item->priv_data; + struct attr **attrs = ip->attrs; + struct coord *c = ip->coords; + int i; + char * attr_text; + + /* add the configuration directory to the name of the file to use */ + char *dist_filename = g_strjoin(NULL, navit_get_user_data_directory(TRUE), + "/distortion.txt", NULL); + if (dist_filename) { + FILE *map = fopen(dist_filename,"a"); + if (map) { + fprintf(map, "type=%s", item_to_name(item->type)); + while (*attrs) { + attr_text = attr_to_text(*attrs, NULL, 0); + /* FIXME this may not work properly for all attribute types */ + fprintf(map, " %s=%s", attr_to_name((*attrs)->type), attr_text); + g_free(attr_text); + attrs++; + } + fprintf(map, "\n"); + + for (i = 0; i < ip->coord_count; i++) { + fprintf(map,"0x%x 0x%x\n", c[i].x, c[i].y); + } + fclose(map); + } else { + dbg(lvl_error,"could not open file for distortions !!"); + + } /* else - if (map) */ + g_free(dist_filename); /* free the file name */ + } /* if (dist_filename) */ +} + +/** + * @brief Dumps the traffic map to a textfile map. + * + * This method writes all items to a textfile map named `distortion.txt` in the default data folder. + * This map can be added to the active mapset in order for the distortions to be rendered on the map and + * considered for routing. + * + * @param map The traffic map + */ +static void tm_dump_to_textfile(struct map * map) { + /* external method, verifies the public API as well as internal structure */ + struct map_rect * mr; + struct item * item; + + mr = map_rect_new(map, NULL); + while ((item = map_rect_get_item(mr))) + tm_dump_item_to_textfile(item); + map_rect_destroy(mr); +} +#endif + +/** + * @brief Adds an item to the map. + * + * If a matching item is already in the map, that item will be returned. + * + * All data passed to this method is safe to free after the method returns, and doing so is the + * responsibility of the caller. + * + * @param map The traffic map + * @param type Type of the item + * @param id_hi First part of the ID of the item (item IDs have two parts) + * @param id_lo Second part of the ID of the item + * @param flags Flags used as a matching criterion, and added to newly-created items + * @param attrs The attributes for the item + * @param c Points to an array of coordinates for the item + * @param count Number of items in `c` + * @param id Message ID for the associated message + * + * @return The map item + */ +static struct item * tm_add_item(struct map *map, enum item_type type, int id_hi, int id_lo, + int flags, struct attr **attrs, struct coord *c, int count, char * id) { + struct item * ret = NULL; + struct item_priv * priv_data; + struct map_rect * mr; + struct attr ** int_attrs = NULL; + struct attr flags_attr; + + flags_attr.type = attr_flags; + flags_attr.u.num = flags; + int_attrs = attr_generic_set_attr(attr_list_dup(attrs), &flags_attr); + + mr = map_rect_new(map, NULL); + ret = tm_find_item(mr, type, int_attrs, c, count); + if (!ret) { + ret = map_rect_create_item(mr, type); + ret->id_hi = id_hi; + ret->id_lo = id_lo; + ret->map = map; + ret->meth = &methods_traffic_item; + priv_data = (struct item_priv *) ret->priv_data; + priv_data->attrs = int_attrs; + priv_data->coords = g_memdup(c, sizeof(struct coord) * count); + priv_data->coord_count = count; + priv_data->next_attr = int_attrs; + priv_data->next_coord = 0; + } else if (int_attrs) { + /* free up our copy of the attribute list if we’re not attaching it to a new item */ + attr_list_free(int_attrs); + } + map_rect_destroy(mr); + //tm_dump_item(ret); + return ret; +} + +/** + * @brief Destroys (closes) the traffic map. + * + * @param priv The private data for the traffic map instance + */ +static void tm_destroy(struct map_priv *priv) { + g_free(priv); +} + +/** + * @brief Opens a new map rectangle on the traffic map. + * + * This function opens a new map rectangle on the route graph's map. + * + * @param priv The traffic graph map's private data + * @param sel The map selection (to restrict search to a rectangle, order and/or item types) + * @return A new map rect's private data + */ +static struct map_rect_priv * tm_rect_new(struct map_priv *priv, struct map_selection *sel) { + struct map_rect_priv * mr; + dbg(lvl_debug,"enter"); + mr=g_new0(struct map_rect_priv, 1); + mr->mpriv = priv; + mr->next_item = priv->items; + /* all other pointers are initially NULL */ + return mr; +} + +/** + * @brief Destroys a map rectangle on the traffic map. + */ +static void tm_rect_destroy(struct map_rect_priv *mr) { + /* just free the map_rect_priv, all its members are pointers to data "owned" by others */ + g_free(mr); +} + +/** + * @brief Returns the next item from the traffic map + * + * @param mr The map rect to search for items + * + * @return The next item, or `NULL` if the last item has already been retrieved. + */ +static struct item * tm_get_item(struct map_rect_priv *mr) { + struct item * ret = NULL; + struct item_priv * ip; + + if (mr->item) { + ip = (struct item_priv *) mr->item->priv_data; + ip->mr = NULL; + } + if (mr->next_item) { + ret = (struct item *) mr->next_item->data; + ip = (struct item_priv *) ret->priv_data; + ip->mr = mr; + tm_attr_rewind(ret->priv_data); + tm_coord_rewind(ret->priv_data); + mr->next_item = g_list_next(mr->next_item); + } + + mr->item = ret; + return ret; +} + +/** + * @brief Returns the next item with the supplied ID from the traffic map + * + * @param mr The map rect to search for items + * @param id_hi The high-order portion of the ID + * @param id_lo The low-order portion of the ID + * + * @return The next item matching the ID; `NULL` if there are no matching items or the last matching + * item has already been retrieved. + */ +static struct item * tm_get_item_byid(struct map_rect_priv *mr, int id_hi, int id_lo) { + struct item *ret = NULL; + do { + ret = tm_get_item(mr); + } while (ret && (ret->id_lo != id_lo || ret->id_hi != id_hi)); + return ret; +} + +/** + * @brief Creates a new item of the specified type and inserts it into the map. + * + * @param mr The map rect in which to create the item + * @param type The type of item to create + * + * @return The new item. The item is of type `type` and has an allocated `priv_data` member; all other + * members of both structs are `NULL`. + */ +static struct item * tm_rect_create_item(struct map_rect_priv *mr, enum item_type type) { + struct map_priv * map_priv = mr->mpriv; + struct item * ret = NULL; + struct item_priv * priv_data; + + priv_data = g_new0(struct item_priv, 1); + + ret = g_new0(struct item, 1); + ret->type = type; + ret->priv_data = priv_data; + map_priv->items = g_list_append(map_priv->items, ret); + + return ret; +} + +/** + * @brief Rewinds the coordinates of the currently selected item. + * + * After rewinding, the next call to the `tm_coord_get()` will return the first coordinate of the + * current item. + * + * @param priv_data The item's private data + */ +static void tm_coord_rewind(void *priv_data) { + struct item_priv * ip = priv_data; + + ip->next_coord = 0; +} + +/** + * @brief Returns the coordinates of a traffic item. + * + * @param priv_data The item's private data + * @param c Pointer to a `struct coord` array where coordinates will be stored + * @param count The maximum number of coordinates to retrieve (must be less than or equal to the number + * of items `c` can hold) + * @return The number of coordinates retrieved + */ +static int tm_coord_get(void *priv_data, struct coord *c, int count) { + struct item_priv * ip = priv_data; + int ret = count; + + if (!ip) + return 0; + if (ip->next_coord >= ip->coord_count) + return 0; + if (ip->next_coord + count > ip->coord_count) + ret = ip->coord_count - ip->next_coord; + memcpy(c, &ip->coords[ip->next_coord], ret * sizeof(struct coord)); + ip->next_coord += ret; + return ret; +} + +/** + * @brief Rewinds the attributes of the currently selected item. + * + * After rewinding, the next call to `tm_attr_get()` will return the first attribute. + * + * @param priv_data The item's private data + */ +static void tm_attr_rewind(void *priv_data) { + struct item_priv * ip = priv_data; + + ip->next_attr = ip->attrs; +} + +/** + * @brief Returns the next attribute of a traffic item which matches the specified type. + * + * @param priv_data The item's private data + * @param attr_type The attribute type to retrieve, or `attr_any` to retrieve the next attribute, + * regardless of type + * @param attr Receives the attribute + * + * @return True on success, false on failure + */ +static int tm_attr_get(void *priv_data, enum attr_type attr_type, struct attr *attr) { + struct item_priv * ip = priv_data; + int ret = 0; + + if (!ip->next_attr) + return 0; + while (*(ip->next_attr) && !ret) { + ret = (attr_type == attr_any) || (attr_type == (*(ip->next_attr))->type); + if (ret) + attr_dup_content(*(ip->next_attr), attr); + ip->next_attr++; + } + return ret; +} + +/** + * @brief Sets the type of a traffic item. + * + * @param priv_data The item's private data + * @param type The new type for the item. Setting it to `type_none` deletes the item from the map. + * + * @return 0 on failure, nonzero on success + */ +static int tm_type_set(void *priv_data, enum item_type type) { + struct item_priv * ip = priv_data; + + if (!ip->mr || !ip->mr->item || (ip->mr->item->priv_data != priv_data)) { + dbg(lvl_error, "this function can only be called for the last item retrieved from its map rect"); + return 0; + } + + if (type == type_none) { + /* if we have multiple occurrences of this item in the list, move forward beyond the last one */ + while (ip->mr->next_item && (ip->mr->next_item->data == ip->mr->item)) + ip->mr->next_item = g_list_next(ip->mr->next_item); + + /* remove the item from the map and set last retrieved item to NULL */ + ip->mr->mpriv->items = g_list_remove_all(ip->mr->mpriv->items, ip->mr->item); + ip->mr->item = NULL; + } else { + ip->mr->item->type = type; + } + + return 1; +} + +static struct map_methods traffic_map_meth = { + projection_mg, /* pro: The projection used for that type of map */ + "utf-8", /* charset: The charset this map uses. */ + tm_destroy, /* map_destroy: Destroy ("close") a map. */ + tm_rect_new, /* map_rect_new: Create a new map rect on the map. */ + tm_rect_destroy, /* map_rect_destroy: Destroy a map rect */ + tm_get_item, /* map_rect_get_item: Return the next item from a map rect */ + tm_get_item_byid, /* map_rect_get_item_byid: Get an item with a specific ID from a map rect, can be NULL */ + NULL, /* map_search_new: Start a new search on the map, can be NULL */ + NULL, /* map_search_destroy: Destroy a map search struct, ignored if `map_search_new` is NULL */ + NULL, /* map_search_get_item: Get the next item of a search on the map */ + tm_rect_create_item, /* map_rect_create_item: Create a new item in the map */ + NULL, /* map_get_attr */ + NULL, /* map_set_attr */ +}; + +/** + * @brief Whether the contents of an event are valid. + * + * This identifies any malformed events in which mandatory members are not set. + * + * @return true if the event is valid, false if it is malformed + */ +static int traffic_event_is_valid(struct traffic_event * this_) { + if (!this_->event_class || !this_->type) { + dbg(lvl_debug, "event_class (%d) or type (%d) are unknown", this_->event_class, this_->type); + return 0; + } + switch (this_->event_class) { + case event_class_congestion: + if ((this_->type < event_congestion_cleared) || (this_->type >= event_delay_clearance)) { + dbg(lvl_debug, "illegal type (%d) for event_class_congestion", this_->type); + return 0; + } + break; + case event_class_delay: + if ((this_->type < event_delay_clearance) + || (this_->type >= event_restriction_access_restrictions_lifted)) { + dbg(lvl_debug, "illegal type (%d) for event_class_delay", this_->type); + return 0; + } + break; + case event_class_restriction: + if ((this_->type < event_restriction_access_restrictions_lifted) + || (this_->type > event_restriction_speed_limit_lifted)) { + dbg(lvl_debug, "illegal type (%d) for event_class_restriction", this_->type); + return 0; + } + break; + default: + dbg(lvl_debug, "unknown event class %d", this_->event_class); + return 0; + } + if (this_->si_count && !this_->si) { + dbg(lvl_debug, "si_count=%d but no supplementary information", this_->si_count); + return 0; + } + /* TODO check SI */ + return 1; +} + +/** + * @brief Determines the degree to which the attributes of a location and a map item match. + * + * The result of this method is used to match a location to a map item. Its result is a score—the higher + * the score, the better the match. + * + * To calculate the score, all supplied attributes are examined and points are given for each attribute + * which is defined for the location. An exact match adds 4 points, a partial match adds 2. Values of 1 + * and 3 are added where additional granularity is needed. The number of points attained is divided by + * the maximum number of points attainable, and the result is returned as a percentage value. + * + * If no points can be attained (because no attributes which must match are supplied), the score is 100 + * for any item supplied. + * + * @param this_ The location + * @param item The map item + * + * @return The score, as a percentage value + */ +static int traffic_location_match_attributes(struct traffic_location * this_, struct item *item) { + int score = 0; + int maxscore = 0; + struct attr attr; + + /* road type */ + if ((this_->road_type != type_line_unspecified)) { + maxscore += 400; + if (item->type == this_->road_type) + score += 400; + else + switch (this_->road_type) { + /* motorway */ + case type_highway_land: + if (item->type == type_highway_city) + score += 300; + else if (item->type == type_street_n_lanes) + score += 200; + break; + case type_highway_city: + if (item->type == type_highway_land) + score += 300; + else if (item->type == type_street_n_lanes) + score += 200; + break; + /* trunk */ + case type_street_n_lanes: + if ((item->type == type_highway_land) || (item->type == type_highway_city) + || (item->type == type_street_4_land) + || (item->type == type_street_4_city)) + score += 200; + break; + /* primary */ + case type_street_4_land: + if (item->type == type_street_4_city) + score += 300; + else if ((item->type == type_street_n_lanes) + || (item->type == type_street_3_land)) + score += 200; + else if (item->type == type_street_3_city) + score += 100; + break; + case type_street_4_city: + if (item->type == type_street_4_land) + score += 300; + else if ((item->type == type_street_n_lanes) + || (item->type == type_street_3_city)) + score += 200; + else if (item->type == type_street_3_land) + score += 100; + break; + /* secondary */ + case type_street_3_land: + if (item->type == type_street_3_city) + score += 300; + else if ((item->type == type_street_4_land) + || (item->type == type_street_2_land)) + score += 200; + else if ((item->type == type_street_4_city) + || (item->type == type_street_2_city)) + score += 100; + break; + case type_street_3_city: + if (item->type == type_street_3_land) + score += 300; + else if ((item->type == type_street_4_city) + || (item->type == type_street_2_city)) + score += 200; + else if ((item->type == type_street_4_land) + || (item->type == type_street_2_land)) + score += 100; + break; + /* tertiary */ + case type_street_2_land: + if (item->type == type_street_2_city) + score += 300; + else if (item->type == type_street_3_land) + score += 200; + else if (item->type == type_street_3_city) + score += 100; + break; + case type_street_2_city: + if (item->type == type_street_2_land) + score += 300; + else if (item->type == type_street_3_city) + score += 200; + else if (item->type == type_street_3_land) + score += 100; + break; + default: + break; + } + } + + /* road_ref */ + if (this_->road_ref) { + maxscore += 400; + if (item_attr_get(item, attr_street_name_systematic, &attr)) + score += (400 * (MAX_MISMATCH - compare_name_systematic(this_->road_ref, attr.u.str))) / MAX_MISMATCH; + } + + /* road_name */ + if (this_->road_name) { + maxscore += 200; + if (item_attr_get(item, attr_street_name, &attr)) { + // TODO crude comparison in need of refinement + if (!strcmp(this_->road_name, attr.u.str)) + score += 200; + } + } + + // TODO direction + // TODO destination + + // TODO ramps + + if (!maxscore) + return 100; + return (score * 100) / maxscore; +} + +/** + * @brief Determines the degree to which the attributes of a point and a map item match. + * + * The result of this method is used to match a location to a map item. Its result is a score—the higher + * the score, the better the match. + * + * To calculate the score, all supplied attributes are examined and points are given for each attribute + * which is defined for the location. An exact match adds 4 points, a partial match adds 2. Values of 1 + * and 3 are added where additional granularity is needed. The number of points attained is divided by + * the maximum number of points attainable, and the result is returned as a percentage value. + * + * If no points can be attained (because no attributes which must match are supplied), the score is 0 + * for any item supplied. + * + * @param this_ The traffic point + * @param item The map item + * + * @return The score, as a percentage value + */ +static int traffic_point_match_attributes(struct traffic_point * this_, struct item *item) { + int score = 0; + int maxscore = 0; + struct attr attr; + + /* junction_ref */ + if (this_->junction_ref) { + maxscore += 400; + if (item_attr_get(item, attr_ref, &attr)) + score += (400 * (MAX_MISMATCH - compare_name_systematic(this_->junction_ref, attr.u.str))) / MAX_MISMATCH; + } + + /* junction_name */ + if (this_->junction_name) { + if (item_attr_get(item, attr_label, &attr)) { + maxscore += 400; + // TODO crude comparison in need of refinement + if (!strcmp(this_->junction_name, attr.u.str)) + score += 400; + } + } + + // TODO tmc_table, point->tmc_id + + if (!maxscore) + return 0; + return (score * 100) / maxscore; +} + +/** + * @brief Determines the degree to which the attributes of a point match those of the segments connecting to it. + * + * The result of this method is used to match a location to a map item. Its result is a score—the higher the score, the + * better the match. + * + * To calculate the score, this method iterates over all segments which begin or end at `p`. The `junction_name` + * member of the location is compared against the name of the segment, and the highest score for any segment is + * returned. Currently the name must match completely, resulting in a score of 100, while everything else is considered + * a mismatch (with a score of 0). Future versions may introduce support for partial matches, with the score indicating + * the quality of the match. + * + * Segments which are part of the route are treated in a different manner, as the direction in which the segment is + * traversed (not the direction of the segment itself) is taken into account: When evaluating the start point of the + * route, only the first point (whose `seg` member points to the segment) will match; the opposite is true when the end + * point of the route is evaluated. This ensures the matched segment ends up being part of the route. + * + * If no points can be attained (because no attributes which must match are supplied), the score is 0 for any point. + * + * @param this_ The traffic point + * @param p The point shared by all segments to examine + * @param start The first point of the path + * @param match_start True to evaluate for the start point of a route, false for the end point + * + * @return The score, as a percentage value + */ +static int traffic_point_match_segment_attributes(struct traffic_point * this_, struct route_graph_point *p, + struct route_graph_point * start, int match_start) { + + /* Iterator for route graph points */ + struct route_graph_point *p_iter = start; + + /* The predecessor pf `p`in the route graph */ + struct route_graph_point *p_prev = NULL; + + /* Whether we have a match for the start of a route segment, the end of a route segment or an off-route segment */ + int has_start_match = 0, has_end_match = 0, has_offroute_match = 0; + + /* The route segment being examined */ + struct route_graph_segment *s; + + /* Map rect for retrieving item data */ + struct map_rect *mr; + + /* The item being examined */ + struct item * item; + + /* The attribute being examined */ + struct attr attr; + + if (!this_->junction_name) + /* nothing to compare, score is 0 */ + return 0; + + /* find predecessor of p, if any */ + while (p_iter && (p_iter != p)) { + if (!p_iter->seg) { + p_prev = NULL; + break; + } + p_prev = p_iter; + if (p_iter == p_iter->seg->start) + p_iter = p_iter->seg->end; + else + p_iter = p_iter->seg->start; + } + + if (!p_prev && (p != start)) { + /* not a point on the route */ + return 0; + } + /* check if we have a match for the start of a route segment */ + if (p->seg) { + mr = map_rect_new(p->seg->data.item.map, NULL); + if ((item = map_rect_get_item_byid(mr, p->seg->data.item.id_hi, p->seg->data.item.id_lo)) + && item_attr_get(item, attr_street_name, &attr) + // TODO crude comparison in need of refinement + && !strcmp(this_->junction_name, attr.u.str)) + has_start_match = 1; + map_rect_destroy(mr); + } + + /* check if we have a match for the end of a route segment */ + if (p_prev && p_prev->seg) { + mr = map_rect_new(p_prev->seg->data.item.map, NULL); + if ((item = map_rect_get_item_byid(mr, p_prev->seg->data.item.id_hi, p_prev->seg->data.item.id_lo)) + && item_attr_get(item, attr_street_name, &attr) + // TODO crude comparison in need of refinement + && !strcmp(this_->junction_name, attr.u.str)) + has_end_match = 1; + map_rect_destroy(mr); + } + + /* we cannot have multiple matches in different categories */ + if (has_start_match && has_end_match) { + return 0; + } + + /* check if we have a match for an off-route segment */ + for (s = p->start; s && !has_offroute_match; s = s->start_next) { + if ((p->seg == s) || (p_prev && (p_prev->seg == s))) + /* segments is on the route, skip */ + continue; + mr = map_rect_new(s->data.item.map, NULL); + if ((item = map_rect_get_item_byid(mr, s->data.item.id_hi, s->data.item.id_lo)) + && item_attr_get(item, attr_street_name, &attr) + // TODO crude comparison in need of refinement + && !strcmp(this_->junction_name, attr.u.str)) + has_offroute_match = 1; + map_rect_destroy(mr); + } + + for (s = p->end; s && !has_offroute_match; s = s->end_next) { + if ((p->seg == s) || (p_prev && (p_prev->seg == s))) + /* segments is on the route, skip */ + continue; + mr = map_rect_new(s->data.item.map, NULL); + if ((item = map_rect_get_item_byid(mr, s->data.item.id_hi, s->data.item.id_lo)) + && item_attr_get(item, attr_street_name, &attr) + // TODO crude comparison in need of refinement + && !strcmp(this_->junction_name, attr.u.str)) + has_offroute_match = 1; + map_rect_destroy(mr); + } + + if (has_offroute_match) { + if (has_start_match || has_end_match) { + /* we cannot have multiple matches in different categories */ + return 0; + } + } else { + if ((match_start && !has_start_match) || (!match_start && !has_end_match)) { + /* no match in requested category */ + return 0; + } + } + + return 100; +} + +/** + * @brief Returns the cost of the segment in the given direction. + * + * The cost is calculated based on the length of the segment and a penalty which depends on the score. + * A segment with the maximum score of 100 is not penalized, i.e. its cost is equal to its length. A + * segment with a zero score is penalized with a factor of `PENALTY_OFFROAD`. For scores in between, a + * penalty factor between 1 and `PENALTY_OFFROAD` is applied. + * + * If the segment is impassable in the given direction, the cost is always `INT_MAX`. + * + * @param over The segment + * @param dir The direction (positive numbers indicate positive direction) + * + * @return The cost of the segment + */ +static int traffic_route_get_seg_cost(struct route_graph_segment *over, int dir) { + if (over->data.flags & (dir >= 0 ? AF_ONEWAYREV : AF_ONEWAY)) + return INT_MAX; + if (dir > 0 && (over->start->flags & RP_TURN_RESTRICTION)) + return INT_MAX; + if (dir < 0 && (over->end->flags & RP_TURN_RESTRICTION)) + return INT_MAX; + if ((over->data.item.type < route_item_first) || (over->data.item.type > route_item_last)) + return INT_MAX; + + return over->data.len * (100 - over->data.score) * (PENALTY_OFFROAD - 1) / 100 + over->data.len; +} + +/** + * @brief Determines the “point triple” for a traffic location. + * + * Each traffic location is defined by up to three points: + * \li a start and end point, and an optional auxiliary point in between + * \li a single point, with one or two auxiliary points (one before, one after) + * \li a start and end point, and a third point which is outside the location + * + * This method determines these three points, puts them in the order in which they are encountered and + * returns a bit field indicating the end points. If a point in the array is NULL or refers to an + * auxiliary point, its corresponding bit is not set. The following values are returned: + * \li 2: Point location, the middle point is the actual point + * \li 3: Point-to-point location from the first to the second point; the third point is an auxiliary + * point outside the location + * \li 5: Point-to-point location from the first to the last point; the second point (if not NULL) is an + * auxiliary point located in between + * \li 6: Point-to-point location from the second to the third point; the first point is an auxiliary + * point outside the location + * + * @param this_ The location + * @param coords Points to an array which will receive pointers to the coordinates. The array must be + * able to store three pointers. + * + * @return A bit field indicating the end points for the location + */ +static int traffic_location_get_point_triple(struct traffic_location * this_, struct coord_geo ** coords) { + /* Which members of coords are the end points */ + int ret = 0; + + /* Projected coordinates */ + struct coord c_from, c_to, c_not_via; + + if (this_->at) { + coords[0] = this_->from ? &this_->from->coord : NULL; + coords[1] = &this_->at->coord; + coords[2] = this_->to ? &this_->to->coord : NULL; + ret = 1 << 1; + } else if (this_->via) { + coords[0] = this_->from ? &this_->from->coord : NULL; + coords[1] = &this_->via->coord; + coords[2] = this_->to ? &this_->to->coord : NULL; + ret = (1 << 2) | (1 << 0); + } else if (this_->not_via) { + /* + * If not_via is set, we calculate a route either for not_via-from-to or for from-to-not_via, + * then trim the ends. The order of points is determined by the distance between not_via and the + * other two points. + */ + if (!this_->from || !this_->to) { + coords[0] = NULL; + coords[1] = NULL; + coords[2] = NULL; + return ret; + } + transform_from_geo(projection_mg, &this_->from->coord, &c_from); + transform_from_geo(projection_mg, &this_->to->coord, &c_to); + transform_from_geo(projection_mg, &this_->not_via->coord, &c_not_via); + if (transform_distance(projection_mg, &c_from, &c_not_via) + < transform_distance(projection_mg, &c_to, &c_not_via)) { + coords[0] = &this_->not_via->coord; + coords[1] = &this_->from->coord; + coords[2] = &this_->to->coord; + } else { + coords[0] = &this_->from->coord; + coords[1] = &this_->to->coord; + coords[2] = &this_->not_via->coord; + } + } else { + coords[0] = this_->from ? &this_->from->coord : NULL; + coords[1] = NULL; + coords[2] = this_->to ? &this_->to->coord : NULL; + ret = (1 << 2) | (1 << 0); + } + return ret; +} + +/** + * @brief Sets the rectangle enclosing all points of a location + * + * @param this_ The traffic location + * @param coords The point triple, can be NULL + */ +static void traffic_location_set_enclosing_rect(struct traffic_location * this_, struct coord_geo ** coords) { + struct coord_geo * sw; + struct coord_geo * ne; + struct coord_geo * int_coords[] = {NULL, NULL, NULL}; + int i; + + if (this_->priv->sw && this_->priv->ne) + return; + + if (!coords) { + coords = &int_coords[0]; + traffic_location_get_point_triple(this_, coords); + } + + if (!this_->priv->sw) { + sw = g_new0(struct coord_geo, 1); + sw->lat = INT_MAX; + sw->lng = INT_MAX; + for (i = 0; i < 3; i++) + if (coords[i]) { + if (coords[i]->lat < sw->lat) + sw->lat = coords[i]->lat; + if (coords[i]->lng < sw->lng) + sw->lng = coords[i]->lng; + } + this_->priv->sw = sw; + } + + if (!this_->priv->ne) { + ne = g_new0(struct coord_geo, 1); + ne->lat = -INT_MAX; + ne->lng = -INT_MAX; + for (i = 0; i < 3; i++) + if (coords[i]) { + if (coords[i]->lat > ne->lat) + ne->lat = coords[i]->lat; + if (coords[i]->lng > ne->lng) + ne->lng = coords[i]->lng; + } + this_->priv->ne = ne; + } +} + +/** + * @brief Opens a map rectangle around the end points of the traffic location. + * + * Prior to calling this function, the caller must ensure `rg->m` points to the map to be used, and the enclosing + * rectangle for the traffic location has been set (e.g. by calling `traffic_location_set_enclosing_rect()`). + * + * @param this_ The traffic location + * @param rg The route graph + * + * @return NULL on failure, the map selection on success + */ +static struct map_rect * traffic_location_open_map_rect(struct traffic_location * this_, struct route_graph * rg) { + /* Corners of the enclosing rectangle, in Mercator coordinates */ + struct coord c1, c2; + + transform_from_geo(map_projection(rg->m), this_->priv->sw, &c1); + transform_from_geo(map_projection(rg->m), this_->priv->ne, &c2); + + rg->sel = route_rect(ROUTE_ORDER, &c1, &c2, ROUTE_RECT_DIST_REL, ROUTE_RECT_DIST_ABS); + + if (!rg->sel) + return NULL; + rg->mr = map_rect_new(rg->m, rg->sel); + if (!rg->mr) { + map_selection_destroy(rg->sel); + rg->sel = NULL; + } + return rg->mr; +} + +/** + * @brief Populates a route graph. + * + * This adds all routable segments in the enclosing rectangle of the location (plus a safety margin) to + * the route graph. + * + * @param rg The route graph + * @param ms The mapset to read the ramps from + */ +static void traffic_location_populate_route_graph(struct traffic_location * this_, struct route_graph * rg, + struct mapset * ms) { + /* The item being processed */ + struct item *item; + + /* Mercator coordinates of current and previous point */ + struct coord c, l; + + /* Data for the route graph segment */ + struct route_graph_segment_data data; + + /* The length of the current segment */ +#ifdef AVOID_FLOAT + int len; +#else + double len; +#endif + + /* Whether the current item is segmented */ + int segmented; + + /* Default value assumed for access flags if we cannot get flags for the item, nor for the item type */ + int default_flags_value = AF_ALL; + + /* Default flags assumed for the current item type */ + int *default_flags; + + /* Holds an attribute retrieved from the current item */ + struct attr attr; + + /* Start and end point of the current way or segment */ + struct route_graph_point *s_pnt, *e_pnt; + + traffic_location_set_enclosing_rect(this_, NULL); + + rg->h = mapset_open(ms); + + while ((rg->m = mapset_next(rg->h, 2))) { + if (!traffic_location_open_map_rect(this_, rg)) + continue; + while ((item = map_rect_get_item(rg->mr))) { + if (item->type == type_street_turn_restriction_no || item->type == type_street_turn_restriction_only) + route_graph_add_turn_restriction(rg, item); + else if ((item->type < route_item_first) || (item->type > route_item_last)) + continue; + if (item_get_default_flags(item->type)) { + + item_coord_rewind(item); + if (item_coord_get(item, &l, 1)) { + data.score = traffic_location_match_attributes(this_, item); + data.flags=0; + data.offset=1; + data.maxspeed=-1; + data.item=item; + len = 0; + segmented = 0; + + if (!(default_flags = item_get_default_flags(item->type))) + default_flags = &default_flags_value; + if (item_attr_get(item, attr_flags, &attr)) { + data.flags = attr.u.num; + segmented = (data.flags & AF_SEGMENTED); + } else + data.flags = *default_flags; + + if ((data.flags & AF_SPEED_LIMIT) && (item_attr_get(item, attr_maxspeed, &attr))) + data.maxspeed = attr.u.num; + + /* clear flags we're not copying here */ + data.flags &= ~(AF_DANGEROUS_GOODS | AF_SIZE_OR_WEIGHT_LIMIT); + + s_pnt = route_graph_add_point(rg, &l); + + if (!segmented) { + while (item_coord_get(item, &c, 1)) { + len += transform_distance(map_projection(item->map), &l, &c); + l = c; + } + e_pnt = route_graph_add_point(rg, &l); + dbg_assert(len >= 0); + data.len = len; + if (!route_graph_segment_is_duplicate(s_pnt, &data)) + route_graph_add_segment(rg, s_pnt, e_pnt, &data); + } else { + int isseg, rc; + int sc = 0; + do { + isseg = item_coord_is_node(item); + rc = item_coord_get(item, &c, 1); + if (rc) { + len += transform_distance(map_projection(item->map), &l, &c); + l = c; + if (isseg) { + e_pnt = route_graph_add_point(rg, &l); + data.len = len; + if (!route_graph_segment_is_duplicate(s_pnt, &data)) + route_graph_add_segment(rg, s_pnt, e_pnt, &data); + data.offset++; + s_pnt = route_graph_add_point(rg, &l); + len = 0; + } + } + } while(rc); + e_pnt = route_graph_add_point(rg, &l); + dbg_assert(len >= 0); + sc++; + data.len = len; + if (!route_graph_segment_is_duplicate(s_pnt, &data)) + route_graph_add_segment(rg, s_pnt, e_pnt, &data); + } + } + } + } + map_selection_destroy(rg->sel); + rg->sel = NULL; + map_rect_destroy(rg->mr); + rg->mr = NULL; + } + route_graph_build_done(rg, 0); +} + +/** + * @brief Builds a new route graph for traffic location matching. + * + * Traffic location matching is done by using a modified routing algorithm to identify the segments + * affected by a traffic message. + * + * @param this_ The location to match to the map + * @param ms The mapset to use for the route graph + * + * @return A route graph. The caller is responsible for destroying the route graph and all related data + * when it is no longer needed. + */ +static struct route_graph * traffic_location_get_route_graph(struct traffic_location * this_, + struct mapset * ms) { + struct route_graph *rg; + + traffic_location_set_enclosing_rect(this_, NULL); + + rg = g_new0(struct route_graph, 1); + + rg->done_cb = NULL; + rg->busy = 1; + + /* build the route graph */ + traffic_location_populate_route_graph(this_, rg, ms); + + return rg; +} + +/** + * @brief Whether two traffic points are equal. + * + * Comparison is done solely on coordinates and requires a precise match. This can result in two points + * being reported as not equal, even though the locations using these points may translate to the same + * segments later. + * + * @return true if `l` and `r` are equal, false if not + */ +static int traffic_point_equals(struct traffic_point * l, struct traffic_point * r) { + if (l->coord.lat != r->coord.lat) + return 0; + if (l->coord.lng != r->coord.lng) + return 0; + return 1; +} + +/** + * @brief Whether two traffic locations are equal. + * + * Only directionality, the `ramps` member and reference points are considered for comparison; auxiliary + * data (such as road names, road types and additional TMC information) is ignored. + * + * When in doubt, this function errs on the side of inequality, i.e. when equivalence cannot be reliably + * determined, the locations will be reported as not equal, even though they may translate to the same + * segments later. + * + * @return true if `l` and `r` are equal, false if not + */ +static int traffic_location_equals(struct traffic_location * l, struct traffic_location * r) { + /* directionality and ramps must match for locations to be considered equal */ + if (l->directionality != r->directionality) + return 0; + if (l->ramps != r->ramps) + return 0; + + /* locations must have the same points set to be considered equal */ + if (!l->from != !r->from) + return 0; + if (!l->to != !r->to) + return 0; + if (!l->at != !r->at) + return 0; + if (!l->via != !r->via) + return 0; + if (!l->not_via != !r->not_via) + return 0; + + /* both locations have the same points set, compare them */ + if (l->from && !traffic_point_equals(l->from, r->from)) + return 0; + if (l->to && !traffic_point_equals(l->to, r->to)) + return 0; + if (l->at && !traffic_point_equals(l->at, r->at)) + return 0; + if (l->via && !traffic_point_equals(l->via, r->via)) + return 0; + if (l->not_via && !traffic_point_equals(l->not_via, r->not_via)) + return 0; + + /* No differences found, consider locations equal */ + return 1; +} + +/** + * @brief Determines the path between two reference points in a route graph. + * + * The reference points `from` and `to` are the beginning and end of the path and do not necessarily + * coincide with the `from` and `to` members of the location. For a point location with an auxiliary + * point, one will instead be the `at` member of the location; when examining the opposite direction of + * a bidirectional location, `from` and `to` will be swapped with respect to the location. + * + * The coordinates contained in the reference points are typically approximate, i.e. they do not + * precisely coincide with a point in the route graph. + * + * When this function returns, the route graph will be flooded, i.e. every point will have a cost + * assigned to it and the `seg` member for each point will be set, indicating the next segment on which + * to proceed in order to reach the destination. For the last point in the graph, `seg` will be `NULL`. + * Unlike in common routing, the last point will have a nonzero cost if `to` does not coincide with a + * point in the route graph. + * + * The cost of each node represents the cost to reach `to`. The cost is calculated in + * `traffic_route_get_seg_cost()` for actual segments, and distance (with a penalty factor) for the + * offroad connection from the last point in the graph to `to`. + * + * To obtain the path, start with the return value. Its `seg` member points to the next segment. Either + * the `start` or the `end` value of that segment will coincide with the point currently being examined; + * the other of the two is the point at the other end. Repeat this until you reach a point whose `seg` + * member is `NULL`. + * + * This function can be run multiple times against the same route graph but with different reference + * points. It is safe to call with `NULL` passed for one or both reference points, in which case `NULL` + * will be returned. + * + * The caller is responsible for freeing up the data structures passed to this function when they are no + * longer needed. + * + * @param rg The route graph + * @param c_start Start coordinates + * @param c_dst Destination coordinates + * @param start_existing Start point of an existing route (whose points will not be used) + * + * @return The point in the route graph at which the path begins, or `NULL` if no path was found. + */ +static struct route_graph_point * traffic_route_flood_graph(struct route_graph * rg, + struct coord * c_start, struct coord * c_dst, struct route_graph_point * start_existing) { + struct route_graph_point * ret; + + int i; + + GList * existing = NULL; + + /* This heap will hold all points with "temporarily" calculated costs */ + struct fibheap *heap; + + /* Cost of the start position */ + int start_value; + + /* The point currently being examined */ + struct route_graph_point *p; + + /* Cost of point being examined, other end of segment being examined, segment */ + int min, new, val; + + /* The segment currently being examined */ + struct route_graph_segment *s = NULL; + + if (!c_start || !c_dst) + return NULL; + + /* store points of existing route */ + if (start_existing) { + p = start_existing; + while (p) { + /* Do not exclude the last point (seg==NULL) from the heap as that may result in the existing route not + * being joined properly to the new one */ + if (p->seg) + existing = g_list_prepend(existing, p); + if (!p->seg) + p = NULL; + else if (p == p->seg->start) + p = p->seg->end; + else + p = p->seg->start; + } + } + + /* prime the route graph */ + heap = fh_makekeyheap(); + + start_value = PENALTY_OFFROAD * transform_distance(projection_mg, c_start, c_dst); + ret = NULL; + + dbg(lvl_debug, "start flooding route graph, start_value=%d", start_value); + + for (i = 0; i < HASH_SIZE; i++) { + p = rg->hash[i]; + while (p) { + if (!g_list_find(existing, p)) { + if (!(p->flags & RP_TURN_RESTRICTION)) { + p->value = PENALTY_OFFROAD * transform_distance(projection_mg, &p->c, c_dst); + p->el = fh_insertkey(heap, p->value, p); + } else { + /* ignore points which are part of turn restrictions */ + p->value = INT_MAX; + p->el = NULL; + } + p->seg = NULL; + } + p = p->hash_next; + } + } + + /* flood the route graph */ + for (;;) { + p = fh_extractmin(heap); /* Starting Dijkstra by selecting the point with the minimum costs on the heap */ + if (!p) /* There are no more points with temporarily calculated costs, Dijkstra has finished */ + break; + + dbg(lvl_debug, "p=%p, value=%d", p, p->value); + + min = p->value; + p->el = NULL; /* This point is permanently calculated now, we've taken it out of the heap */ + s = p->start; + while (s) { /* Iterating all the segments leading away from our point to update the points at their ends */ + val = traffic_route_get_seg_cost(s, -1); + + dbg(lvl_debug, " negative segment, val=%d", val); + + if (val != INT_MAX) { + new = min + val; + if (new < s->end->value) { /* We've found a less costly way to reach the end of s, update it */ + s->end->value = new; + s->end->seg = s; + if (!s->end->el) { + s->end->el = fh_insertkey(heap, new, s->end); + } else { + fh_replacekey(heap, s->end->el, new); + } + new += PENALTY_OFFROAD * transform_distance(projection_mg, &s->end->c, c_start); + if (new < start_value) { /* We've found a less costly way from the start point, update */ + start_value = new; + ret = s->end; + } + } + } + s = s->start_next; + } + s = p->end; + while (s) { /* Doing the same as above with the segments leading towards our point */ + val = traffic_route_get_seg_cost(s, 1); + + dbg(lvl_debug, " positive segment, val=%d", val); + + if (val != INT_MAX) { + new = min + val; + if (new < s->start->value) { + s->start->value = new; + s->start->seg = s; + if (!s->start->el) { + s->start->el = fh_insertkey(heap, new, s->start); + } else { + fh_replacekey(heap, s->start->el, new); + } + new += PENALTY_OFFROAD * transform_distance(projection_mg, &s->start->c, c_start); + if (new < start_value) { + start_value = new; + ret = s->start; + } + } + } + s = s->end_next; + } + } + + fh_deleteheap(heap); + g_list_free(existing); + return ret; +} + +/** + * @brief Extends the route beyond its end point. + * + * This function follows the road beginning at `end`, stopping at the next junction. It can be called + * again on the result, again extending it to the next junction. + * + * To follow the road, each segment is compared to `last` and the segment whose attributes match it is + * chosen, provided such a segment can be determined without ambiguity. + * + * When the function returns, all points added to the route will have their `seg` member set. To append + * the new stretch to the route, set the `seg` member of its last point to the return value. After that, + * the extended route can be walked in the usual manner. + * + * The value of each new point is the value of its predecessor on the route mins the length of the + * segment which links the two points. Point values thus continue to decrease along the route, allowing + * comparisons or difference calculations to be performed on the extended route. Note that this may + * result in points having negative values. + * + * @param rg The flooded route graph + * @param last The last segment in the current route graph (either the `start` or the `end` member of + * this segment must be equal to the `end` argument) + * @param end The last point of the current route graph (the `seg` member of this point must be NULL) + * + * @return The next segment in the route, or `NULL` if the route cannot be extended. + */ +static struct route_graph_segment * traffic_route_append(struct route_graph *rg, + struct route_graph_segment * last, struct route_graph_point * end) { + struct route_graph_segment * ret = NULL, * s = last, * s_cmp, * s_next; + struct route_graph_point * p = end; + int num_seg; + int id_match; + int is_ambiguous; + + if (!end) { + dbg(lvl_error, "end point cannot be NULL"); + return NULL; + } + if (end->seg) { + dbg(lvl_error, "end point cannot have a next segment"); + return NULL; + } + + if ((end != last->end) && (end != last->start)) { + dbg(lvl_error, "last segment must begin or end at end point"); + return NULL; + } + + while (1) { + num_seg = 0; + id_match = 0; + is_ambiguous = 0; + s_next = NULL; + for (s_cmp = p->start; s_cmp; s_cmp = s_cmp->start_next) { + num_seg++; + if ((s_cmp == s) || (s_cmp->data.flags & AF_ONEWAYREV) || (s_cmp->end->flags & RP_TURN_RESTRICTION)) + continue; + if (item_is_equal_id(s_cmp->data.item, s->data.item)) { + s_next = s_cmp; + id_match = 1; + } else if ((s_cmp->data.item.type == s->data.item.type) && !id_match && !is_ambiguous) { + if (s_next) { + s_next = NULL; + is_ambiguous = 1; + } else + s_next = s_cmp; + } + } + for (s_cmp = p->end; s_cmp; s_cmp = s_cmp->end_next) { + num_seg++; + if ((s_cmp == s) || (s_cmp->data.flags & AF_ONEWAY) || (s_cmp->end->flags & RP_TURN_RESTRICTION)) + continue; + if (item_is_equal_id(s_cmp->data.item, s->data.item)) { + s_next = s_cmp; + id_match = 1; + } else if ((s_cmp->data.item.type == s->data.item.type) && !id_match && !is_ambiguous) { + if (s_next) { + s_next = NULL; + is_ambiguous = 1; + } else + s_next = s_cmp; + } + } + + /* cancel if we are past end and have hit a junction */ + if ((p != end) && (num_seg > 2)) + break; + + /* update links and move one step further */ + if (p != end) + p->seg = s_next; + else + ret = s_next; + if (s_next) { + if (p == s_next->start) { + s_next->end->value = p->value - s_next->data.len; + p = s_next->end; + } else { + s_next->start->value = p->value - s_next->data.len; + p = s_next->start; + } + s = s_next; + } else + break; + } + p->seg = NULL; + dbg(lvl_debug, "return, last=%p, ret=%p", last, ret); + return ret; +} + +/** + * @brief Extends the route beyond its start point. + * + * This function follows the road leading towards `start` backwards, stopping at the next junction. It + * can be called again on the result, again extending it to the next junction. + * + * To follow the road, each segment is compared to `start->seg` and the segment whose attributes match + * it is chosen, provided such a segment can be determined without ambiguity. + * + * When the function returns, all points added to the route will have their `seg` member set so the + * extended route can be walked in the usual manner. + * + * @param rg The flooded route graph + * @param start The current start of the route + * + * @return The start of the extended route, or `NULL` if the route cannot be extended (in which case + * `start` continues to be the start of the route). + */ +static struct route_graph_point * traffic_route_prepend(struct route_graph * rg, + struct route_graph_point * start) { + struct route_graph_point * ret = start; + struct route_graph_segment * s = start->seg, * s_cmp, * s_prev = NULL; + int num_seg; + int id_match; + int is_ambiguous; + + dbg(lvl_debug, "At %p (%d), start", start, start ? start->value : -1); + if (!start) + return NULL; + + while (s) { + num_seg = 0; + id_match = 0; + is_ambiguous = 0; + for (s_cmp = ret->start; s_cmp; s_cmp = s_cmp->start_next) { + num_seg++; + if (s_cmp == s) + continue; + if (s_cmp->data.flags & AF_ONEWAY) + continue; + if (s_cmp->end->seg != s_cmp) + continue; + if (item_is_equal_id(s_cmp->data.item, s->data.item)) { + s_prev = s_cmp; + id_match = 1; + } else if ((s_cmp->data.item.type == s->data.item.type) && !id_match && !is_ambiguous) { + if (s_prev) { + s_prev = NULL; + is_ambiguous = 1; + } else + s_prev = s_cmp; + } + } + for (s_cmp = ret->end; s_cmp; s_cmp = s_cmp->end_next) { + num_seg++; + if (s_cmp == s) + continue; + if (s_cmp->data.flags & AF_ONEWAYREV) + continue; + if (s_cmp->start->seg != s_cmp) + continue; + if (item_is_equal_id(s_cmp->data.item, s->data.item)) { + s_prev = s_cmp; + id_match = 1; + } else if ((s_cmp->data.item.type == s->data.item.type) && !id_match && !is_ambiguous) { + if (s_prev) { + s_prev = NULL; + is_ambiguous = 1; + } else + s_prev = s_cmp; + } + } + + /* cancel if we are past start and ret is a junction */ + if ((ret != start) && (num_seg > 2)) + break; + + /* move s and ret one step further and update links */ + s = s_prev; + if (s) { + if (ret == s->start) { + ret = s->end; + dbg(lvl_debug, "At %p (%d -> %d)", ret, ret->value, s->start->value + s->data.len); + ret->value = s->start->value + s->data.len; + } else { + ret = s->start; + dbg(lvl_debug, "At %p (%d -> %d)", ret, ret->value, s->end->value + s->data.len); + ret->value = s->end->value + s->data.len; + } + ret->seg = s; + s_prev = NULL; + } + } + dbg(lvl_debug, "return, start=%p, ret=%p", start, ret); + return ret; +} + +/** + * @brief Returns one of the traffic location’s points. + * + * @param this_ The traffic location + * @param point The point of the traffic location to retrieve (0 = from, 1 = at, 2 = to, 16 = start, 17 = end) + * + * @return The matched points, or NULL if the requested point does not exist + */ +static struct traffic_point * traffic_location_get_point(struct traffic_location * this_, int point) { + /* The point from the location to match */ + struct traffic_point * trpoint = NULL; + + switch(point) { + case 0: + trpoint = this_->from; + break; + case 1: + trpoint = this_->at; + break; + case 2: + trpoint = this_->to; + break; + case 16: + trpoint = this_->from ? this_->from : this_->at; + break; + case 17: + trpoint = this_->to ? this_->to : this_->at; + break; + default: + break; + } + + return trpoint; +} + +/** + * @brief Compares a given point to the traffic location and returns a score. + * + * This method obtains all points at coordinates `c` from the map_rect used to build the route graph, compares their + * attributes to those supplied with the location, assigns a match score from 0 (no matching attributes) to 100 (all + * supplied attributes match) and returns the highest score obtained. If no matching point is found, 0 is returned. + * + * @param this_ The traffic location + * @param p The route graph point to examine for matches + * @param point The point of the traffic location to use for matching (0 = from, 1 = at, 2 = to, 16 = start, 17 = end) + * @param rg The route graph + * @param start The first point of the path + * @param match_start True to evaluate for the start point of a route, false for the end point + * @param ms The mapset to read the items from + * + * @return A score from 0 (worst) to 100 (best). + */ +static int traffic_location_get_point_match(struct traffic_location * this_, struct route_graph_point * p, int point, + struct route_graph * rg, struct route_graph_point * start, int match_start, struct mapset * ms) { + int ret = 0; + + /* The point from the location to match */ + struct traffic_point * trpoint = NULL; + + /* The attribute matching score for the current item */ + int score; + + trpoint = traffic_location_get_point(this_, point); + + if (!trpoint) + return 0; + + /* First examine route graph points and connected segments */ + score = traffic_point_match_segment_attributes(trpoint, p, start, match_start); + if (ret < score) + ret = score; + return ret; +} + +/** + * @brief Returns points from the route graph which match a traffic location. + * + * This method obtains point items from the map_rect from which the route graph was built and compares + * their attributes to those supplied with the location. Each point is assigned a match score, from 0 + * (no matching attributes) to 100 (all supplied attributes match), and a list of all points with a + * nonzero score is returned. + * + * Points which have no corresponding map item (i.e. points which have no additional attributes) are not included in + * the result and must be analyzed separately if needed. + * + * @param this_ The traffic location + * @param point The point of the traffic location to use for matching (0 = from, 1 = at, 2 = to, 16 = start, 17 = end) + * @param rg The route graph + * @param start The first point of the path + * @param match_start True to evaluate for the start point of a route, false for the end point + * @param ms The mapset to read the items from + * + * @return The matched points as a `GList`. The `data` member of each item points to a `struct point_data` for the point. + */ +static GList * traffic_location_get_matching_points(struct traffic_location * this_, int point, + struct route_graph * rg, struct route_graph_point * start, int match_start, struct mapset * ms) { + GList * ret = NULL; + + /* The point from the location to match */ + struct traffic_point * trpoint = NULL; + + /* The item being processed */ + struct item *item; + + /* Mercator coordinates of current and previous point */ + struct coord c; + + /* The corresponding point in the route graph */ + struct route_graph_point * p; + + /* The attribute matching score for the current item */ + int score; + + /* Data for the current point */ + struct point_data * data; + + trpoint = traffic_location_get_point(this_, point); + + if (!trpoint) + return NULL; + + traffic_location_set_enclosing_rect(this_, NULL); + + rg->h = mapset_open(ms); + + while ((rg->m = mapset_next(rg->h, 2))) { + if (!traffic_location_open_map_rect(this_, rg)) + continue; + while ((item = map_rect_get_item(rg->mr))) { + /* exclude non-point items */ + if ((item->type < type_town_label) || (item->type >= type_line)) + continue; + + /* exclude items from which we can't obtain a coordinate pair */ + if (!item_coord_get(item, &c, 1)) + continue; + + /* exclude items not in the route graph (points with turn restrictions are ignored) */ + p = route_graph_get_point(rg, &c); + while (p && (p->flags & RP_TURN_RESTRICTION)) + p = route_graph_get_point_next(rg, &c, p); + if (!p) + continue; + + /* determine score */ + score = traffic_point_match_attributes(trpoint, item); + + /* exclude items with a zero score */ + if (!score) + continue; + + dbg(lvl_debug, "adding item, score: %d", score); + + do { + if (!(p->flags & RP_TURN_RESTRICTION)) { + data = g_new0(struct point_data, 1); + data->score = score; + data->p = p; + + ret = g_list_append(ret, data); + } + } while ((p = route_graph_get_point_next(rg, &c, p))); + } + map_selection_destroy(rg->sel); + rg->sel = NULL; + map_rect_destroy(rg->mr); + rg->mr = NULL; + } + route_graph_build_done(rg, 1); + + return ret; +} + +/** + * @brief Whether the contents of a location are valid. + * + * This identifies any malformed locations in which mandatory members are not set. + * + * @return true if the locations is valid, false if it is malformed + */ +static int traffic_location_is_valid(struct traffic_location * this_) { + if (!this_->at && !(this_->from && this_->to)) + return 0; + return 1; +} + +/** + * @brief Whether the current point is a candidate for low-res endpoint matching. + * + * @param this_ The point to examine + * @param s_prev The route segment leading to `this_` (NULL for the start point) + */ +static int route_graph_point_is_endpoint_candidate(struct route_graph_point *this_, + struct route_graph_segment *s_prev) { + int ret; + + /* Whether we are at a junction of 3 or more segments */ + int is_junction; + + /* Segment used for comparison */ + struct route_graph_segment *s_cmp; + + /* Current segment */ + struct route_graph_segment *s = this_->seg; + + if (!s_prev || !s) + /* the first and last points are always candidates */ + ret = 1; + else + /* detect tunnel portals */ + ret = ((s->data.flags & AF_UNDERGROUND) != (s_prev->data.flags & AF_UNDERGROUND)); + if (!ret) { + /* detect junctions */ + is_junction = (s && s_prev) ? 0 : -1; + for (s_cmp = this_->start; s_cmp; s_cmp = s_cmp->start_next) { + if ((s_cmp != s) && (s_cmp != s_prev)) + is_junction += 1; + } + for (s_cmp = this_->end; s_cmp; s_cmp = s_cmp->end_next) { + if ((s_cmp != s) && (s_cmp != s_prev)) + is_junction += 1; + } + ret = (is_junction > 0); + } + return ret; +} + +/** + * @brief Generates segments affected by a traffic message. + * + * This translates the approximate coordinates in the `from`, `at`, `to`, `via` and `not_via` members of + * the location to one or more map segments, using both the raw coordinates and the auxiliary information + * contained in the location. Each segment is stored in the map, if not already present, and a link is + * stored with the message. + * + * @param this_ The traffic message + * @param ms The mapset to use for matching + * @param data Data for the segments added to the map + * @param map The traffic map + * @param route The route affected by the changes + * + * @return `true` if the locations were matched successfully, `false` if there was a failure. + */ +static int traffic_message_add_segments(struct traffic_message * this_, struct mapset * ms, struct seg_data * data, + struct map *map, struct route * route) { + int i; + + struct coord_geo * coords[] = {NULL, NULL, NULL}; + struct coord * pcoords[] = {NULL, NULL, NULL}; + + /* How many point pairs coords contains (number of members minus one) */ + int point_pairs = -1; + + /* Which members of coords are the end points */ + int endpoints = 0; + + /* The direction (positive or negative) */ + int dir = 1; + + /* Start point for the route path */ + struct route_graph_point * p_start = NULL; + + /* Current and previous segment */ + struct route_graph_segment *s = NULL; + struct route_graph_segment *s_prev; + + /* Iterator for the route path */ + struct route_graph_point *p_iter; + + /* route graph for simplified routing */ + struct route_graph *rg; + + /* Coordinate count for matched segment */ + int ccnt; + + /* Coordinates of matched segment and pointer into it, order as read from map */ + struct coord *c, ca[2048]; + + /* Coordinates of matched segment, sorted */ + struct coord *cd, *cs; + + /* Speed calculated in various ways */ + int maxspeed, speed, penalized_speed, factor_speed; + + /* Delay for the current segment */ + int delay; + + /* Number of new segments and existing segments */ + int count = 0, prev_count; + + /* Length of location */ + int len; + + /* The message's previous list of items */ + struct item ** prev_items; + + /* The next item in the message's list of items */ + struct item ** next_item; + + /* Flags for the next item to add */ + int flags; + + /* The last item added */ + struct item * item; + + /* Projected coordinates of start and end points of the actual location + * (if at is set, both point to the same coordinates) */ + struct coord * c_from, * c_to; + + /* Matched points */ + GList * points; + GList * points_iter; + + /* The corresponding point data */ + struct point_data * pd; + + /* The match score of the current point */ + int score; + + /* Current and minimum cost to reference point */ + int val, minval; + + /* Start of extended route */ + struct route_graph_point * start_new; + + /* Last segment of the route (before extension) */ + struct route_graph_segment * s_last = NULL; + + /* Aligned points */ + struct route_graph_point * p_from; + struct route_graph_point * p_to; + + dbg(lvl_debug, "*****checkpoint ADD-1"); + if (!data) { + dbg(lvl_error, "no data for segments, aborting"); + return 0; + } + + if (this_->location->ramps != location_ramps_none) + /* TODO Ramps, not supported yet */ + return 0; + + /* Main carriageway */ + + dbg(lvl_debug, "*****checkpoint ADD-2"); + /* get point triple and enclosing rectangle */ + endpoints = traffic_location_get_point_triple(this_->location, &coords[0]); + if (!endpoints) { + dbg(lvl_error, "invalid location (mandatory points missing)"); + return 0; + } + traffic_location_set_enclosing_rect(this_->location, &coords[0]); + for (i = 0; i < 3; i++) + if (coords[i]) { + pcoords[i] = g_new0(struct coord, 1); + transform_from_geo(projection_mg, coords[i], pcoords[i]); + point_pairs++; + } + + if (this_->location->at && !(this_->location->from || this_->location->to)) + /* TODO Point location with no auxiliary points, not supported yet */ + return 0; + + dbg(lvl_debug, "*****checkpoint ADD-3"); + rg = traffic_location_get_route_graph(this_->location, ms); + + /* transform coordinates */ + c_from = (endpoints & 4) ? pcoords[0] : pcoords[1]; + c_to = (endpoints & 1) ? pcoords[2] : pcoords[1]; + + /* determine segments */ + dbg(lvl_debug, "*****checkpoint ADD-4 (loop start)"); + while (1) { /* once for each direction (loop logic at the end) */ + dbg(lvl_debug, "*****checkpoint ADD-4.1"); + if (point_pairs == 1) { + if (dir > 0) + p_start = traffic_route_flood_graph(rg, + pcoords[0] ? pcoords[0] : pcoords[1], + pcoords[2] ? pcoords[2] : pcoords[1], NULL); + else + p_start = traffic_route_flood_graph(rg, + pcoords[2] ? pcoords[2] : pcoords[1], + pcoords[0] ? pcoords[0] : pcoords[1], NULL); + dbg(lvl_debug, "*****checkpoint ADD-4.1.1"); + } else if (point_pairs == 2) { + /* + * If we have more than two points, create the route in two stages (from the first to the second point, + * then from the second to the third point) and concatenate them. This could easily be extended to any + * number of points, provided they are spaced sufficiently far apart to calculate a route between each pair + * of subsequent points. + * This will create a kind of “Frankenstein route” in which the cost of points does not decrease + * continuously but has an upward leap as we pass the middle point. This is not an issue as long as we do + * not do any further processing based on point cost (which we currently don’t). + * If the route needs to be extended beyond the start point, this has to be done after the first stage, + * as doing so relies on the route graph for that stage. + */ + /* TODO handle cases in which the route goes through the "third" point + * (this should not happen; if it does, we need to detect and fix it) */ + if (dir > 0) + p_start = traffic_route_flood_graph(rg, pcoords[0], pcoords[1], NULL); + else + p_start = traffic_route_flood_graph(rg, pcoords[2], pcoords[1], NULL); + if ((this_->location->fuzziness == location_fuzziness_low_res) + || this_->location->at || this_->location->not_via) { + /* extend start to next junction */ + start_new = traffic_route_prepend(rg, p_start); + if (start_new) + p_start = start_new; + } + if (dir > 0) + traffic_route_flood_graph(rg, pcoords[1], pcoords[2], p_start); + else + traffic_route_flood_graph(rg, pcoords[1], pcoords[0], p_start); + dbg(lvl_debug, "*****checkpoint ADD-4.1.2"); + } + + dbg(lvl_debug, "*****checkpoint ADD-4.2"); + /* tweak ends (find the point where the ramp touches the main road) */ + if ((this_->location->fuzziness == location_fuzziness_low_res) + || this_->location->at || this_->location->not_via) { + dbg(lvl_debug, "*****checkpoint ADD-4.2.1"); + /* tweak end point */ + if (this_->location->at) + points = traffic_location_get_matching_points(this_->location, 1, rg, p_start, 0, ms); + else if (dir > 0) + points = traffic_location_get_matching_points(this_->location, 2, rg, p_start, 0, ms); + else + points = traffic_location_get_matching_points(this_->location, 0, rg, p_start, 0, ms); + if (!p_start) { + dbg(lvl_error, "end point not found on map"); + for (points_iter = points; points_iter; points_iter = g_list_next(points_iter)) + g_free(points_iter->data); + g_list_free(points); + route_graph_free_points(rg); + route_graph_free_segments(rg); + g_free(rg); + for (i = 0; i < 3; i++) + g_free(pcoords[i]); + return 0; + } + s = p_start ? p_start->seg : NULL; + p_iter = p_start; + + dbg(lvl_debug, "*****checkpoint ADD-4.2.2"); + /* extend end to next junction */ + for (s = p_start ? p_start->seg : NULL; s; s = p_iter->seg) { + dbg(lvl_debug, "*****checkpoint ADD-4.2.2.1, s=%p, p_iter=%p (%d)", s, p_iter, p_iter ? p_iter->value : INT_MAX); + s_last = s; + if (s->start == p_iter) + p_iter = s->end; + else + p_iter = s->start; + } + s = traffic_route_append(rg, s_last, p_iter); + p_iter->seg = s; + + s = p_start ? p_start->seg : NULL; + s_prev = NULL; + p_iter = p_start; + minval = INT_MAX; + p_to = NULL; + + dbg(lvl_debug, "*****checkpoint ADD-4.2.3"); + while (p_iter) { + if (route_graph_point_is_endpoint_candidate(p_iter, s_prev)) { + score = traffic_location_get_point_match(this_->location, p_iter, + this_->location->at ? 1 : (dir > 0) ? 2 : 0, + rg, p_start, 0, ms); + pd = NULL; + for (points_iter = points; points_iter && (score < 100); points_iter = g_list_next(points_iter)) { + pd = (struct point_data *) points_iter->data; + if ((pd->p == p_iter) && (pd->score > score)) + score = pd->score; + } + val = transform_distance(projection_mg, &p_iter->c, (dir > 0) ? c_to : c_from); + val += (val * (100 - score) * (PENALTY_POINT_MATCH) / 100); + if (val < minval) { + minval = val; + p_to = p_iter; + dbg(lvl_debug, "candidate end point found, point %p, value %d (score %d)", p_iter, val, score); + } + } + + if (!s) + p_iter = NULL; + else { + p_iter = (s->start == p_iter) ? s->end : s->start; + s_prev = s; + s = p_iter->seg; + } + } + + dbg(lvl_debug, "*****checkpoint ADD-4.2.4"); + for (points_iter = points; points_iter; points_iter = g_list_next(points_iter)) + g_free(points_iter->data); + g_list_free(points); + + dbg(lvl_debug, "*****checkpoint ADD-4.2.5"); + /* tweak start point */ + if (this_->location->at) + points = traffic_location_get_matching_points(this_->location, 1, rg, p_start, 1, ms); + else if (dir > 0) + points = traffic_location_get_matching_points(this_->location, 0, rg, p_start, 1, ms); + else + points = traffic_location_get_matching_points(this_->location, 2, rg, p_start, 1, ms); + s_prev = NULL; + minval = INT_MAX; + p_from = NULL; + + struct coord_geo wgs; + transform_to_geo(projection_mg, &(p_start->c), &wgs); + dbg(lvl_debug, "*****checkpoint ADD-4.2.6, p_start=%p\nhttps://www.openstreetmap.org?mlat=%f&mlon=%f/#map=13", + p_start, wgs.lat, wgs.lng); + if (point_pairs == 1) { + /* extend start to next junction (if we have more than two points, this has already been done) */ + start_new = traffic_route_prepend(rg, p_start); + if (start_new) + p_start = start_new; + } + + s = p_start ? p_start->seg : NULL; + p_iter = p_start; + dbg(lvl_debug, "*****checkpoint ADD-4.2.7"); + while (p_iter) { + transform_to_geo(projection_mg, &(p_iter->c), &wgs); + dbg(lvl_debug, "*****checkpoint ADD-4.2.7, p_iter=%p (value=%d)\nhttps://www.openstreetmap.org?mlat=%f&mlon=%f/#map=13", + p_iter, p_iter->value, wgs.lat, wgs.lng); + if (route_graph_point_is_endpoint_candidate(p_iter, s_prev)) { + score = traffic_location_get_point_match(this_->location, p_iter, + this_->location->at ? 1 : (dir > 0) ? 0 : 2, + rg, p_start, 1, ms); + pd = NULL; + for (points_iter = points; points_iter && (score < 100); points_iter = g_list_next(points_iter)) { + pd = (struct point_data *) points_iter->data; + if ((pd->p == p_iter) && (pd->score > score)) + score = pd->score; + } + val = transform_distance(projection_mg, &p_iter->c, (dir > 0) ? c_from : c_to); + /* TODO does attribute matching make sense for the start segment? */ + val += (val * (100 - score) * (PENALTY_POINT_MATCH) / 100); + if (val < minval) { + minval = val; + p_from = p_iter; + dbg(lvl_debug, "candidate start point found, point %p, value %d (score %d)", + p_iter, val, score); + } + } + + if (!s) + p_iter = NULL; + else { + p_iter = (s->start == p_iter) ? s->end : s->start; + s_prev = s; + s = p_iter->seg; + } + } + + dbg(lvl_debug, "*****checkpoint ADD-4.2.8"); + for (points_iter = points; points_iter; points_iter = g_list_next(points_iter)) + g_free(points_iter->data); + g_list_free(points); + + if (!p_from) + p_from = p_start; + + dbg(lvl_debug, "*****checkpoint ADD-4.2.9"); + /* ensure we have at least one segment */ + if ((p_from == p_to) || !p_from->seg) { + dbg(lvl_debug, "*****checkpoint ADD-4.2.9.1"); + p_iter = p_start; + dbg(lvl_debug, "*****checkpoint ADD-4.2.9.2"); + while (p_iter->seg) { + dbg(lvl_debug, "*****checkpoint ADD-4.2.9.2.1, p_iter=%p, p_iter->seg=%p", p_iter, p_iter ? p_iter->seg : NULL); + if (p_iter == p_iter->seg->start) { + dbg(lvl_debug, "*****checkpoint ADD-4.2.9.2.2 (p_iter == p_iter->seg->start)"); + /* compare to the last point: because p_to may be NULL here, we're comparing to + * p_from instead, which at this point is guaranteed to be non-NULL and either + * equal to p_to or without a successor, making it the designated end point. */ + if (p_iter->seg->end == p_from) + break; + dbg(lvl_debug, "*****checkpoint ADD-4.2.9.2.3"); + p_iter = p_iter->seg->end; + dbg(lvl_debug, "*****checkpoint ADD-4.2.9.2.4"); + } else { + dbg(lvl_debug, "*****checkpoint ADD-4.2.9.2.2 (p_iter != p_iter->seg->start)"); + if (p_iter->seg->start == p_from) + break; + dbg(lvl_debug, "*****checkpoint ADD-4.2.9.2.3"); + p_iter = p_iter->seg->start; + dbg(lvl_debug, "*****checkpoint ADD-4.2.9.2.4"); + } + } + if (p_from->seg) { + dbg(lvl_debug, "*****checkpoint ADD-4.2.9.3, p_from->seg is non-NULL"); + /* decide between predecessor and successor of the point, based on proximity */ + p_to = (p_from == p_from->seg->end) ? p_from->seg->start : p_from->seg->end; + if (transform_distance(projection_mg, &p_to->c, pcoords[1] ? pcoords[1] : pcoords[2]) + > transform_distance(projection_mg, &p_iter->c, pcoords[1] ? pcoords[1] : pcoords[2])) { + p_to = p_from; + p_from = p_iter; + } + } else { + dbg(lvl_debug, "*****checkpoint ADD-4.2.9.3, p_from->seg is NULL"); + /* p_from has no successor, the segment goes from its predecessor to p_from */ + p_to = p_from; + p_from = p_iter; + } + } + + dbg(lvl_debug, "*****checkpoint ADD-4.2.10"); + /* if we have identified a last point, drop everything after it from the path */ + if (p_to) + p_to->seg = NULL; + + /* set first point to be the start point */ + if (p_from != p_start) { + dbg(lvl_debug, "changing p_start from %p to %p", p_start, p_from); + } + p_start = p_from; + } + + dbg(lvl_debug, "*****checkpoint ADD-4.3"); + /* calculate route */ + s = p_start ? p_start->seg : NULL; + p_iter = p_start; + + if (!s) + dbg(lvl_error, "no segments"); + + /* count segments and calculate length */ + prev_count = count; + count = 0; + len = 0; + dbg(lvl_debug, "*****checkpoint ADD-4.4"); + while (s) { + dbg(lvl_debug, "*****checkpoint ADD-4.4.1 (#%d, p_iter=%p, s=%p, next %p)", + count, p_iter, s, (s->start == p_iter) ? s->end : s->start); + count++; + len += s->data.len; + if (s->start == p_iter) + p_iter = s->end; + else + p_iter = s->start; + s = p_iter->seg; + } + dbg(lvl_debug, "*****checkpoint ADD-4.5"); + + /* add segments */ + + s = p_start ? p_start->seg : NULL; + p_iter = p_start; + + if (this_->priv->items) { + prev_items = this_->priv->items; + this_->priv->items = g_new0(struct item *, count + prev_count + 1); + memcpy(this_->priv->items, prev_items, sizeof(struct item *) * prev_count); + next_item = this_->priv->items + prev_count; + g_free(prev_items); + } else { + this_->priv->items = g_new0(struct item *, count + 1); + next_item = this_->priv->items; + } + + dbg(lvl_debug, "*****checkpoint ADD-4.6 (loop start)"); + while (s) { + ccnt = item_coord_get_within_range(&s->data.item, ca, 2047, &s->start->c, &s->end->c); + c = ca; + cs = g_new0(struct coord, ccnt); + cd = cs; + + speed = data->speed; + if ((data->speed != INT_MAX) || data->speed_penalty || (data->speed_factor != 100)) { + if (s->data.flags & AF_SPEED_LIMIT) { + maxspeed = RSD_MAXSPEED(&s->data); + } else { + switch (s->data.item.type) { + case type_highway_land: + case type_street_n_lanes: + maxspeed = 100; + break; + case type_highway_city: + case type_street_4_land: + maxspeed = 80; + break; + case type_street_3_land: + maxspeed = 70; + break; + case type_street_2_land: + maxspeed = 65; + break; + case type_street_1_land: + maxspeed = 60; + break; + case type_street_4_city: + maxspeed = 50; + break; + case type_ramp: + case type_street_3_city: + case type_street_unkn: + maxspeed = 40; + break; + case type_street_2_city: + case type_track_paved: + maxspeed = 30; + break; + case type_track: + case type_cycleway: + maxspeed = 20; + break; + case type_roundabout: + case type_street_1_city: + case type_street_0: + case type_living_street: + case type_street_service: + case type_street_parking_lane: + case type_path: + case type_track_ground: + case type_track_gravelled: + case type_track_unpaved: + case type_track_grass: + case type_bridleway: + maxspeed = 10; + break; + case type_street_pedestrian: + case type_footway: + case type_steps: + maxspeed = 5; + break; + default: + maxspeed = 50; + } + } + penalized_speed = maxspeed - data->speed_penalty; + if (penalized_speed < 5) + penalized_speed = 5; + factor_speed = maxspeed * data->speed_factor / 100; + if (speed > penalized_speed) + speed = penalized_speed; + if (speed > factor_speed) + speed = factor_speed; + } + + if (data->delay) + delay = data->delay * s->data.len / len; + else + delay = data->delay; + + for (i = 0; i < ccnt; i++) { + *cd++ = *c++; + } + + if (s->start == p_iter) { + /* forward direction */ + p_iter = s->end; + flags = data->flags | (s->data.flags & AF_ONEWAYMASK) + | (data->dir == location_dir_one ? AF_ONEWAY : 0); + } else { + /* backward direction */ + p_iter = s->start; + flags = data->flags | (s->data.flags & AF_ONEWAYMASK) + | (data->dir == location_dir_one ? AF_ONEWAYREV : 0); + } + + + item = tm_add_item(map, type_traffic_distortion, s->data.item.id_hi, s->data.item.id_lo, flags, data->attrs, cs, ccnt, + this_->id); + + tm_item_add_message_data(item, this_->id, speed, delay, data->attrs, route); + + g_free(cs); + + *next_item = tm_item_ref(item); + next_item++; + + s = p_iter->seg; + } + + dbg(lvl_debug, "*****checkpoint ADD-4.7"); + if ((this_->location->directionality == location_dir_one) || (dir < 0)) + break; + + dir = -1; + } + + dbg(lvl_debug, "*****checkpoint ADD-5"); + route_graph_free_points(rg); + route_graph_free_segments(rg); + g_free(rg); + + for (i = 0; i < 3; i++) + g_free(pcoords[i]); + + dbg(lvl_debug, "*****checkpoint ADD-6"); + return 1; +} + +/** + * @brief Prints a dump of a message to debug output. + * + * @param this_ The message to dump + */ +static void traffic_message_dump_to_stderr(struct traffic_message * this_) { + int i, j; + char * point_names[5] = {"From", "At", "Via", "Not via", "To"}; + struct traffic_point * points[5]; + char * timestamp = NULL; + + if (!this_) { + dbg(lvl_debug, "(null)"); + return; + } + + if (this_->location) { + points[0] = this_->location->from; + points[1] = this_->location->at; + points[2] = this_->location->via; + points[3] = this_->location->not_via; + points[4] = this_->location->to; + } else + memset(&points, 0, sizeof(struct traffic_point *) * 5); + + dbg(lvl_debug, "id='%s', is_cancellation=%d, is_forecast=%d", + this_->id, this_->is_cancellation, this_->is_forecast); + if (this_->receive_time) { + timestamp = time_to_iso8601(this_->receive_time); + dbg(lvl_debug, " First received: %s (%ld)", timestamp, this_->receive_time); + g_free(timestamp); + } + if (this_->update_time) { + timestamp = time_to_iso8601(this_->update_time); + dbg(lvl_debug, " Last updated: %s (%ld)", timestamp, this_->update_time); + g_free(timestamp); + } + if (this_->start_time) { + timestamp = time_to_iso8601(this_->start_time); + dbg(lvl_debug, " Start time: %s (%ld)", timestamp, this_->start_time); + g_free(timestamp); + } + if (this_->end_time) { + timestamp = time_to_iso8601(this_->end_time); + dbg(lvl_debug, " End time: %s (%ld)", timestamp, this_->end_time); + g_free(timestamp); + } + if (this_->expiration_time) { + timestamp = time_to_iso8601(this_->expiration_time); + dbg(lvl_debug, " Expires: %s (%ld)", timestamp, this_->expiration_time); + g_free(timestamp); + } + + /* dump replaced message IDs */ + dbg(lvl_debug, " replaced_count=%d", + this_->replaced_count); + for (i = 0; i < this_->replaced_count; i++) { + dbg(lvl_debug, " Replaces: '%s'", this_->replaces[i]); + } + + /* dump location */ + if (this_->location) { + dbg(lvl_debug, " Location: road_type='%s', road_ref='%s', road_name='%s'", + item_to_name(this_->location->road_type), this_->location->road_ref, + this_->location->road_name); + dbg(lvl_debug, " directionality=%d, destination='%s', direction='%s'", + this_->location->directionality, this_->location->destination, this_->location->direction); + dbg(lvl_debug, " fuzziness=%s, ramps=%s, tmc_table='%s', tmc_direction=%+d", + location_fuzziness_to_string(this_->location->fuzziness), + location_ramps_to_string(this_->location->ramps), this_->location->tmc_table, + this_->location->tmc_direction); + for (i = 0; i < 5; i++) { + if (points[i]) { + dbg(lvl_debug, " %s: lat=%.5f, lng=%.5f", + point_names[i], points[i]->coord.lat, points[i]->coord.lng); + dbg(lvl_debug, " junction_name='%s', junction_ref='%s', tmc_id='%s'", + points[i]->junction_name, points[i]->junction_ref, points[i]->tmc_id); + } else { + dbg(lvl_debug, " %s: (null)", + point_names[i]); + } + } + } else { + dbg(lvl_debug, " Location: null"); + } + + /* dump events */ + dbg(lvl_debug, " event_count=%d", + this_->event_count); + for (i = 0; i < this_->event_count; i++) { + dbg(lvl_debug, " Event: event_class=%s, type=%s, length=%d m, speed=%d km/h", + event_class_to_string(this_->events[i]->event_class), + event_type_to_string(this_->events[i]->type), + this_->events[i]->length, this_->events[i]->speed); + /* TODO quantifier */ + + /* dump supplementary information */ + dbg(lvl_debug, " si_count=%d", + this_->events[i]->si_count); + for (j = 0; j < this_->events[i]->si_count; j++) { + dbg(lvl_debug, " Supplementary Information: si_class=%s, type=%s", + si_class_to_string(this_->events[i]->si[j]->si_class), + si_type_to_string(this_->events[i]->si[j]->type)); + /* TODO quantifier */ + } + } +} + +/** + * @brief Whether the contents of a message are valid. + * + * This identifies any malformed messages in which mandatory members are not set. + * + * @return true if the message is valid, false if it is malformed + */ +static int traffic_message_is_valid(struct traffic_message * this_) { + int i; + int has_valid_events = 0; + + if (!this_->id || !this_->id[0]) { + dbg(lvl_debug, "ID is NULL or empty"); + return 0; + } + if (!this_->receive_time || !this_->update_time) { + dbg(lvl_debug, "receive_time or update_time not supplied"); + return 0; + } + if (!this_->is_cancellation) { + if (!this_->expiration_time && !this_->end_time) { + dbg(lvl_debug, "not a cancellation, but neither expiration_time nor end_time supplied"); + return 0; + } + if (!this_->location) { + dbg(lvl_debug, "not a cancellation, but no location supplied"); + return 0; + } + if (!traffic_location_is_valid(this_->location)) { + dbg(lvl_debug, "not a cancellation, but location is invalid"); + return 0; + } + if (!this_->event_count || !this_->events) { + dbg(lvl_debug, "not a cancellation, but no events supplied"); + return 0; + } + for (i = 0; i < this_->event_count; i++) + if (this_->events[i]) + has_valid_events |= traffic_event_is_valid(this_->events[i]); + if (!has_valid_events) { + dbg(lvl_debug, "not a cancellation, but all events (%d in total) are invalid", this_->event_count); + return 0; + } + } + return 1; +} + +/** + * @brief Parses the events of a traffic message. + * + * @param message The message to parse + * + * @return A `struct seg_data`, or `NULL` if the message contains no usable information + */ +static struct seg_data * traffic_message_parse_events(struct traffic_message * this_) { + struct seg_data * ret = NULL; + + int i, j; + int has_flags = 0; + int flags = 0; + + /* Default assumptions, used only if no explicit values are given */ + int speed = INT_MAX; + int speed_penalty = 0; + int speed_factor = 100; + int delay = 0; + + for (i = 0; i < this_->event_count; i++) { + if (this_->events[i]->speed != INT_MAX) { + if (!ret) + ret = seg_data_new(); + if (ret->speed > this_->events[i]->speed) + ret->speed = this_->events[i]->speed; + } + if (this_->events[i]->event_class == event_class_congestion) { + switch (this_->events[i]->type) { + case event_congestion_heavy_traffic: + case event_congestion_traffic_building_up: + case event_congestion_traffic_heavier_than_normal: + case event_congestion_traffic_much_heavier_than_normal: + /* Heavy traffic: assume 10 km/h below the posted limit, unless explicitly specified */ + if ((this_->events[i]->speed == INT_MAX) && (speed_penalty < 10)) + speed_penalty = 10; + break; + case event_congestion_slow_traffic: + case event_congestion_traffic_congestion: + case event_congestion_traffic_problem: + /* Slow traffic or unspecified congestion: assume half the posted limit, unless explicitly specified */ + if ((this_->events[i]->speed == INT_MAX) && (speed_factor > 50)) + speed_factor = 50; + break; + case event_congestion_queue: + /* Queuing traffic: assume 20 km/h, unless explicitly specified */ + if ((this_->events[i]->speed == INT_MAX) && (speed > 20)) + speed = 20; + break; + case event_congestion_stationary_traffic: + case event_congestion_long_queue: + /* Stationary traffic or long queues: assume 5 km/h, unless explicitly specified */ + if ((this_->events[i]->speed == INT_MAX) && (speed > 5)) + speed = 5; + break; + default: + break; + } + } else if (this_->events[i]->event_class == event_class_delay) { + switch (this_->events[i]->type) { + case event_delay_delay: + case event_delay_long_delay: + /* Delay or long delay: assume 30 minutes, unless explicitly specified */ + if (this_->events[i]->quantifier) { + if (!ret) + ret = seg_data_new(); + if (ret->delay < this_->events[i]->quantifier->u.q_duration) + ret->delay = this_->events[i]->quantifier->u.q_duration; + } else if (delay < 18000) + delay = 18000; + break; + case event_delay_very_long_delay: + /* Very long delay: assume 1 hour, unless explicitly specified */ + if (this_->events[i]->quantifier) { + if (!ret) + ret = seg_data_new(); + if (ret->delay < this_->events[i]->quantifier->u.q_duration) + ret->delay = this_->events[i]->quantifier->u.q_duration; + } else if (delay < 36000) + delay = 36000; + break; + case event_delay_several_hours: + case event_delay_uncertain_duration: + /* Delay of several hours or uncertain duration: assume 3 hours */ + if (delay < 108000) + delay = 108000; + break; + default: + break; + } + } else if (this_->events[i]->event_class == event_class_restriction) { + switch (this_->events[i]->type) { + case event_restriction_blocked: + case event_restriction_blocked_ahead: + case event_restriction_carriageway_blocked: + case event_restriction_carriageway_closed: + case event_restriction_closed: + case event_restriction_closed_ahead: + if (!ret) + ret = seg_data_new(); + ret->speed = 0; + break; + case event_restriction_intermittent_closures: + case event_restriction_batch_service: + case event_restriction_single_alternate_line_traffic: + /* Assume 30% of the posted limit for all of these cases */ + if (speed_factor > 30) + speed_factor = 30; + break; + case event_restriction_lane_blocked: + case event_restriction_lane_closed: + case event_restriction_reduced_lanes: + /* Assume speed is reduced proportionally to number of lanes, and never higher than 80 */ + speed = 80; + /* TODO determine actual numbers of lanes */ + speed_factor = 67; + break; + case event_restriction_contraflow: + /* Contraflow: assume 80, unless explicitly specified */ + speed = 80; + break; + /* restriction_speed_limit is not in the list: either it comes with a maxspeed attribute, which gets + * evaluated regardless of the event it comes with, and if it doesn’t come with one, it carries no + * useful information. */ + default: + break; + } + } + + for (j = 0; j < this_->events[i]->si_count; j++) { + switch (this_->events[i]->si[j]->type) { + case si_vehicle_all: + /* For all vehicles */ + flags |= AF_ALL; + has_flags = 1; + break; + case si_vehicle_bus: + /* For buses only */ + /* TODO what about other (e.g. chartered) buses? */ + flags |= AF_PUBLIC_BUS; + has_flags = 1; + break; + case si_vehicle_car: + /* For cars only */ + flags |= AF_CAR; + has_flags = 1; + break; + case si_vehicle_car_with_caravan: + /* For cars with caravans only */ + /* TODO no matching flag */ + has_flags = 1; + break; + case si_vehicle_car_with_trailer: + /* For cars with trailers only */ + /* TODO no matching flag */ + has_flags = 1; + break; + case si_vehicle_hazmat: + /* For hazardous loads only */ + flags |= AF_DANGEROUS_GOODS; + has_flags = 1; + break; + case si_vehicle_hgv: + /* For heavy trucks only */ + flags |= AF_TRANSPORT_TRUCK | AF_DELIVERY_TRUCK; + has_flags = 1; + break; + case si_vehicle_motor: + /* For all motor vehicles */ + flags |= AF_MOTORIZED_FAST | AF_MOPED; + has_flags = 1; + break; + case si_vehicle_with_trailer: + /* For vehicles with trailers only */ + /* TODO no matching flag */ + has_flags = 1; + break; + default: + break; + } + } + } + + /* if no vehicle type is specified in supplementary information, assume all */ + if (!has_flags) + flags = AF_ALL; + + if (!ret) + ret = seg_data_new(); + + /* use implicit values if no explicit ones are given */ + if ((speed != INT_MAX) || speed_penalty || (speed_factor != 100) || delay) { + if (ret->speed == INT_MAX) { + ret->speed = speed; + ret->speed_penalty = speed_penalty; + ret->speed_factor = speed_factor; + } + if (!ret->delay) + ret->delay = delay; + } + + ret->dir = this_->location->directionality; + ret->flags = flags; + + return ret; +} + +/** + * @brief Removes message data from the items associated with a message. + * + * Removing message data also triggers an update of the affected items’ attributes. + * + * It is possible to skip items associated with a particular message from being removed by passing that + * message as the `new` argument. This is used for message updates, as this function is called after the + * items associated with both the old and the new message have already been updated. Skipping items + * referenced by `new` ensures that message data is only stripped from items which are no longer being + * referenced by the updated message. + * + * If the IDs of `old` and `new` differ, `new` is ignored. + * + * @param old The message whose data it so be removed from its associated items + * @param new If non-NULL, items referenced by this message will be skipped, see description + * @param route The route affected by the changes + */ +static void traffic_message_remove_item_data(struct traffic_message * old, struct traffic_message * new, + struct route * route) { + int i, j; + int skip; + struct item_priv * ip; + GList * msglist; + struct item_msg_priv * msgdata; + + if (new && strcmp(old->id, new->id)) + new = NULL; + + for (i = 0; old->priv->items && old->priv->items[i]; i++) { + skip = 0; + if (new) + for (j = 0; new->priv->items && new->priv->items[j] && !skip; j++) + skip |= (old->priv->items[i] == new->priv->items[j]); + if (!skip) { + ip = (struct item_priv *) old->priv->items[i]->priv_data; + for (msglist = ip->message_data; msglist; ) { + msgdata = (struct item_msg_priv *) msglist->data; + msglist = g_list_next(msglist); + if (!strcmp(msgdata->message_id, old->id)) { + ip->message_data = g_list_remove(ip->message_data, msgdata); + g_free(msgdata->message_id); + g_free(msgdata); + } + } + tm_item_update_attrs(old->priv->items[i], route); + } + } +} + +/** + * @brief Ensures the traffic instance points to valid shared data. + * + * This method first examines all registered traffic instances to see if one of them has the `shared` + * member set. If that is the case, the current instance copies the `shared` pointer of the other + * instance. Otherwise a new `struct traffic_shared_priv` is created and its address stored in `shared`. + * + * Calling this method on a traffic instance with a non-NULL `shared` member has no effect. + * + * @param this_ The traffic instance + */ +static void traffic_set_shared(struct traffic *this_) { + struct attr_iter *iter; + struct attr attr; + struct traffic * traffic; + + dbg(lvl_debug, "enter"); + + if (!this_->shared) { + iter = navit_attr_iter_new(); + while (navit_get_attr(this_->navit, attr_traffic, &attr, iter)) { + traffic = (struct traffic *) attr.u.navit_object; + if (traffic->shared) + this_->shared = traffic->shared; + } + navit_attr_iter_destroy(iter); + } + + if (!this_->shared) { + this_->shared = g_new0(struct traffic_shared_priv, 1); + } +} + +/** + * @brief Dumps all currently active traffic messages to an XML file. + */ +static void traffic_dump_messages_to_xml(struct traffic * this_) { + /* add the configuration directory to the name of the file to use */ + char *traffic_filename = g_strjoin(NULL, navit_get_user_data_directory(TRUE), + "/traffic.xml", NULL); + GList * msgiter; + struct traffic_message * message; + char * strval; + char * point_names[5] = {"from", "at", "via", "not_via", "to"}; + struct traffic_point * points[5]; + int i, j; + + if (traffic_filename) { + FILE *f = fopen(traffic_filename,"w"); + if (f) { + fprintf(f, "<navit_messages>\n"); + for (msgiter = this_->shared->messages; msgiter; msgiter = g_list_next(msgiter)) { + message = (struct traffic_message *) msgiter->data; + points[0] = message->location->from; + points[1] = message->location->at; + points[2] = message->location->via; + points[3] = message->location->not_via; + points[4] = message->location->to; + + strval = time_to_iso8601(message->receive_time); + fprintf(f, " <message id=\"%s\" receive_time=\"%s\"", message->id, strval); + g_free(strval); + strval = time_to_iso8601(message->update_time); + fprintf(f, " update_time=\"%s\"", strval); + g_free(strval); + if (message->start_time) { + strval = time_to_iso8601(message->start_time); + fprintf(f, " start_time=\"%s\"", strval); + g_free(strval); + } + if (message->end_time) { + strval = time_to_iso8601(message->end_time); + fprintf(f, " end_time=\"%s\"", strval); + g_free(strval); + } + if (message->expiration_time) { + strval = time_to_iso8601(message->expiration_time); + fprintf(f, " expiration_time=\"%s\"", strval); + g_free(strval); + } + if (message->is_forecast) + fprintf(f, " forecast=\"%d\"", message->is_forecast); + fprintf(f, ">\n"); + + fprintf(f, " <location directionality=\"%s\"", + message->location->directionality == location_dir_one ? "ONE_DIRECTION" : "BOTH_DIRECTIONS"); + if (message->location->fuzziness) + fprintf(f, " fuzziness=\"%s\"", location_fuzziness_to_string(message->location->fuzziness)); + if (message->location->ramps) + fprintf(f, " ramps=\"%s\"", location_ramps_to_string(message->location->ramps)); + if (message->location->road_type != type_line_unspecified) + fprintf(f, " road_type=\"%s\"", item_to_name(message->location->road_type)); + if (message->location->road_ref) + fprintf(f, " road_ref=\"%s\"", message->location->road_ref); + if (message->location->road_name) + fprintf(f, " road_name=\"%s\"", message->location->road_name); + if (message->location->destination) + fprintf(f, " destination=\"%s\"", message->location->destination); + if (message->location->direction) + fprintf(f, " direction=\"%s\"", message->location->direction); + if ((message->location->directionality == location_dir_one) + && message->location->tmc_direction) + fprintf(f, " tmc_direction=\"%+d\"", message->location->tmc_direction); + if (message->location->tmc_table) + fprintf(f, " tmc_table=\"%s\"", message->location->tmc_table); + fprintf(f, ">\n"); + + for (i = 0; i < 5; i++) + if (points[i]) { + fprintf(f, " <%s", point_names[i]); + if (points[i]->junction_name) + fprintf(f, " junction_name=\"%s\"", points[i]->junction_name); + if (points[i]->junction_ref) + fprintf(f, " junction_ref=\"%s\"", points[i]->junction_ref); + if (points[i]->tmc_id) + fprintf(f, " tmc_id=\"%s\"", points[i]->tmc_id); + fprintf(f, ">"); + fprintf(f, "%+f %+f", points[i]->coord.lat, points[i]->coord.lng); + fprintf(f, "</%s>\n", point_names[i]); + } + + fprintf(f, " </location>\n"); + + fprintf(f, " <events>\n"); + for (i = 0; i < message->event_count; i++) { + fprintf(f, " <event class=\"%s\" type=\"%s\"", + event_class_to_string(message->events[i]->event_class), + event_type_to_string(message->events[i]->type)); + if (message->events[i]->length >= 0) + fprintf(f, " length=\"%d\"", message->events[i]->length); + if (message->events[i]->speed != INT_MAX) + fprintf(f, " speed=\"%d\"", message->events[i]->speed); + /* TODO message->events[i]->quantifier */ + fprintf(f, ">\n"); + + for (j = 0; j < message->events[i]->si_count; j++) { + fprintf(f, " <supplementary_info class=\"%s\" type=\"%s\"", + si_class_to_string(message->events[i]->si[j]->si_class), + si_type_to_string(message->events[i]->si[j]->type)); + /* TODO message->events[i]->si[j]->quantifier */ + fprintf(f, "/>\n"); + } + + fprintf(f, " </event>\n"); + } + fprintf(f, " </events>\n"); + fprintf(f, " </message>\n"); + } + fprintf(f, "</navit_messages>\n"); + fclose(f); + } else { + dbg(lvl_error,"could not open file for traffic messages"); + + } /* else - if (f) */ + g_free(traffic_filename); /* free the file name */ + } /* if (traffic_filename) */ +} + +/** + * @brief Processes new traffic messages. + * + * This is the internal backend for `traffic_process_messages()`. It is also used internally. + * + * The behavior of this function can be controlled via flags. + * + * `PROCESS_MESSAGES_PURGE_EXPIRED` causes expired messages to be purged from the message store after + * new messages have been processed. It is intended to be used with timer-triggered calls. + * + * `PROCESS_MESSAGES_NO_DUMP_STORE` prevents saving of the message store to disk, intended to be used + * when reading stored message data on startup. + * + * Traffic messages are always read from `this->shared->message_queue`. It can be empty, which makes sense e.g. when + * the `PROCESS_MESSAGES_PURGE_EXPIRED` flag is used, to just purge expired messages. + * + * @param this_ The traffic instance + * @param flags Flags, see description + * + * @return A combination of flags, `MESSAGE_UPDATE_MESSAGES` indicating that new messages were processed + * and `MESSAGE_UPDATE_SEGMENTS` that segments were changed + */ +/* TODO what if the update for a still-valid message expires in the past? */ +static int traffic_process_messages_int(struct traffic * this_, int flags) { + /* Start and current time */ + struct timeval start, now; + + /* Current message */ + struct traffic_message * message; + + /* Return value */ + int ret = 0; + + /* Number of messages processed so far */ + int i = 0; + + /* Iterator over messages */ + GList * msg_iter; + + /* Stored message being compared */ + struct traffic_message * stored_msg; + + /* Messages to remove */ + GList * msgs_to_remove = NULL; + + /* Pointer into messages[i]->replaces */ + char ** replaces; + + /* Attributes for traffic distortions generated from the current traffic message */ + struct seg_data * data; + + /* Message replaced by the current one whose segments can be reused */ + struct traffic_message * swap_candidate; + + /* Temporary store for swapping locations and items */ + struct traffic_location * swap_location; + struct item ** swap_items; + + /* Time elapsed since start */ + double msec = 0; + + if (this_->shared->message_queue) + dbg(lvl_debug, "*****enter, %d messages in queue", g_list_length(this_->shared->message_queue)); + + gettimeofday(&start, NULL); + for (; this_->shared->message_queue && (msec < TIME_SLICE); + this_->shared->message_queue = g_list_remove(this_->shared->message_queue, message)) { + message = (struct traffic_message *) this_->shared->message_queue->data; + i++; + if (message->expiration_time < time(NULL)) { + dbg(lvl_debug, "message is no longer valid, ignoring"); + traffic_message_destroy(message); + } else { + dbg(lvl_debug, "*****checkpoint PROCESS-1, id='%s'", message->id); + ret |= MESSAGE_UPDATE_MESSAGES; + + for (msg_iter = this_->shared->messages; msg_iter; msg_iter = g_list_next(msg_iter)) { + stored_msg = (struct traffic_message *) msg_iter->data; + if (!strcmp(stored_msg->id, message->id)) + msgs_to_remove = g_list_append(msgs_to_remove, stored_msg); + else + for (replaces = ((struct traffic_message *) this_->shared->message_queue->data)->replaces; replaces; replaces++) + if (!strcmp(stored_msg->id, *replaces) && !g_list_find(msgs_to_remove, message)) + msgs_to_remove = g_list_append(msgs_to_remove, stored_msg); + } + + if (!message->is_cancellation) { + dbg(lvl_debug, "*****checkpoint PROCESS-2"); + /* if the message is not just a cancellation, store it and match it to the map */ + data = traffic_message_parse_events(message); + swap_candidate = NULL; + + dbg(lvl_debug, "*****checkpoint PROCESS-3"); + /* check if any of the replaced messages has the same location and segment data */ + for (msg_iter = msgs_to_remove; msg_iter && !swap_candidate; msg_iter = g_list_next(msg_iter)) { + stored_msg = (struct traffic_message *) msg_iter->data; + if (seg_data_equals(data, traffic_message_parse_events(stored_msg)) + && traffic_location_equals(message->location, stored_msg->location)) + swap_candidate = stored_msg; + } + + if (swap_candidate) { + dbg(lvl_debug, "*****checkpoint PROCESS-4, swap candidate found"); + /* reuse location and segments if we are replacing a matching message */ + swap_location = message->location; + swap_items = message->priv->items; + message->location = swap_candidate->location; + message->priv->items = swap_candidate->priv->items; + swap_candidate->location = swap_location; + swap_candidate->priv->items = swap_items; + } else { + dbg(lvl_debug, "*****checkpoint PROCESS-4, need to find matching segments"); + /* else find matching segments from scratch */ + traffic_message_add_segments(message, this_->ms, data, this_->map, this_->rt); + ret |= MESSAGE_UPDATE_SEGMENTS; + } + + g_free(data); + + /* store message */ + this_->shared->messages = g_list_append(this_->shared->messages, message); + dbg(lvl_debug, "*****checkpoint PROCESS-5"); + } + + /* delete replaced messages */ + if (msgs_to_remove) { + dbg(lvl_debug, "*****checkpoint PROCESS (messages to remove, start)"); + for (msg_iter = msgs_to_remove; msg_iter; msg_iter = g_list_next(msg_iter)) { + stored_msg = (struct traffic_message *) msg_iter->data; + if (stored_msg->priv->items) + ret |= MESSAGE_UPDATE_SEGMENTS; + this_->shared->messages = g_list_remove_all(this_->shared->messages, stored_msg); + traffic_message_remove_item_data(stored_msg, message, this_->rt); + traffic_message_destroy(stored_msg); + } + + g_list_free(msgs_to_remove); + msgs_to_remove = NULL; + dbg(lvl_debug, "*****checkpoint PROCESS (messages to remove, end)"); + } + + traffic_message_dump_to_stderr(message); + + if (message->is_cancellation) + traffic_message_destroy(message); + + dbg(lvl_debug, "*****checkpoint PROCESS-6"); + } + gettimeofday(&now, NULL); + msec = (now.tv_usec - start.tv_usec) / ((double)1000) + (now.tv_sec - start.tv_sec) * 1000; + } + + if (i) + dbg(lvl_debug, "processed %d message(s), %d still in queue", i, g_list_length(this_->shared->message_queue)); + + if (this_->shared->message_queue) { + /* if we're in the middle of the queue, trigger a redraw (if needed) and exit */ + if ((ret & MESSAGE_UPDATE_SEGMENTS) && (navit_get_ready(this_->navit) == 3)) + navit_draw_async(this_->navit, 1); + return ret; + } else { + /* last pass, remove our idle event and callback */ + if (this_->idle_ev) + event_remove_idle(this_->idle_ev); + if (this_->idle_cb) + callback_destroy(this_->idle_cb); + this_->idle_ev = NULL; + this_->idle_cb = NULL; + } + + if (flags & PROCESS_MESSAGES_PURGE_EXPIRED) { + /* find and remove expired messages */ + for (msg_iter = this_->shared->messages; msg_iter; msg_iter = g_list_next(msg_iter)) { + stored_msg = (struct traffic_message *) msg_iter->data; + if (stored_msg->expiration_time < time(NULL)) + msgs_to_remove = g_list_append(msgs_to_remove, stored_msg); + } + + if (msgs_to_remove) { + for (msg_iter = msgs_to_remove; msg_iter; msg_iter = g_list_next(msg_iter)) { + stored_msg = (struct traffic_message *) msg_iter->data; + if (stored_msg->priv->items) + ret |= MESSAGE_UPDATE_SEGMENTS; + this_->shared->messages = g_list_remove_all(this_->shared->messages, stored_msg); + traffic_message_remove_item_data(stored_msg, NULL, this_->rt); + traffic_message_destroy(stored_msg); + } + + dbg(lvl_debug, "%d message(s) expired", g_list_length(msgs_to_remove)); + + g_list_free(msgs_to_remove); + } + } + + if (ret && !(flags & PROCESS_MESSAGES_NO_DUMP_STORE)) { +#ifdef TRAFFIC_DEBUG + /* dump map if messages have been added, deleted or expired */ + tm_dump_to_textfile(this_->map); +#endif + + /* dump message store if new messages have been received */ + traffic_dump_messages_to_xml(this_); + } + + /* TODO see comment on route_recalculate_partial about thread-safety */ + route_recalculate_partial(this_->rt); + + /* trigger redraw if segments have changed */ + if ((ret & MESSAGE_UPDATE_SEGMENTS) && (navit_get_ready(this_->navit) == 3)) + navit_draw_async(this_->navit, 1); + + return ret; +} + +/** + * @brief The loop function for the traffic module. + * + * This function polls backends for new messages and processes them by inserting, removing or modifying + * traffic distortions and triggering route recalculations as needed. + */ +static void traffic_loop(struct traffic * this_) { + struct traffic_message ** messages; + struct traffic_message ** cur_msg; + + messages = this_->meth.get_messages(this_->priv); + for (cur_msg = messages; cur_msg && *cur_msg; cur_msg++) + this_->shared->message_queue = g_list_append(this_->shared->message_queue, *cur_msg); + g_free(messages); + + /* make sure traffic_process_messages_int runs at least once to ensure purging of expired messages */ + if (this_->shared->message_queue) { + if (this_->idle_ev) + event_remove_idle(this_->idle_ev); + if (this_->idle_cb) + callback_destroy(this_->idle_cb); + this_->idle_cb = callback_new_2(callback_cast(traffic_process_messages_int), + this_, PROCESS_MESSAGES_PURGE_EXPIRED); + this_->idle_ev = event_add_idle(50, this_->idle_cb); + } else + traffic_process_messages_int(this_, PROCESS_MESSAGES_PURGE_EXPIRED); +} + +/** + * @brief Instantiates the traffic plugin + * + * At a minimum, `attrs` must contain a `type` attribute matching one of the available traffic plugins. + * + * @param parent The parent, usually the Navit instance + * @param attrs The attributes for the plugin + * + * @return A `traffic` instance. + */ +static struct traffic * traffic_new(struct attr *parent, struct attr **attrs) { + struct traffic *this_; + struct traffic_priv *(*traffic_new)(struct navit *nav, struct traffic_methods *meth, + struct attr **attrs, struct callback_list *cbl); + struct attr *attr; + + attr = attr_search(attrs, NULL, attr_type); + if (!attr) { + dbg(lvl_error, "type missing"); + return NULL; + } + dbg(lvl_debug, "type='%s'", attr->u.str); + traffic_new = plugin_get_category_traffic(attr->u.str); + dbg(lvl_debug, "new=%p", traffic_new); + if (!traffic_new) { + dbg(lvl_error, "wrong type '%s'", attr->u.str); + return NULL; + } + this_ = (struct traffic *) navit_object_new(attrs, &traffic_func, sizeof(struct traffic)); + if (parent->type == attr_navit) + this_->navit = parent->u.navit; + else { + dbg(lvl_error, "wrong parent type '%s', only navit is permitted", attr_to_name(parent->type)); + navit_object_destroy((struct navit_object *) this_); + return NULL; + } + + this_->priv = traffic_new(parent->u.navit, &this_->meth, this_->attrs, NULL); + dbg(lvl_debug, "get_messages=%p", this_->meth.get_messages); + dbg(lvl_debug, "priv=%p", this_->priv); + if (!this_->priv) { + dbg(lvl_error, "plugin initialization failed"); + navit_object_destroy((struct navit_object *) this_); + return NULL; + } + navit_object_ref((struct navit_object *) this_); + dbg(lvl_debug,"return %p", this_); + + // TODO do this once and cycle through all plugins + this_->callback = callback_new_1(callback_cast(traffic_loop), this_); + this_->timeout = event_add_timeout(1000, 1, this_->callback); // TODO make interval configurable + + this_->map = NULL; + + if (!this_->shared) + traffic_set_shared(this_); + + return this_; +} + +/** + * @brief Creates a new XML element structure. + * + * Note that the structure of `names` and `values` may differ between XML libraries. Behavior is indicated by the + * `XML_ATTR_DISTANCE` constant. + * + * If `XML_ATTR_DISTANCE == 1`, `names` and `values` are two separate arrays, and `values[n]` is the value that + * corresponds to `names[n]`. + * + * If `XML_ATTR_DISTANCE == 2`, attribute names and values are kept in a single array in which names and values + * alternate, names first. In this case, `names` points to the array while `values` points to its second element, i.e. + * the first value. In this case, `value` is invalid for an empty array, and dereferencing it may segfault. + * + * @param tag_name The tag name + * @param names Attribute names + * @param values Attribute values + */ +static struct xml_element * traffic_xml_element_new(const char *tag_name, const char **names, + const char **values) { + struct xml_element * ret = g_new0(struct xml_element, 1); + const char ** in; + char ** out; + + ret->tag_name = g_strdup(tag_name); + if (names) { + ret->names = g_new0(char *, g_strv_length((gchar **) names) / XML_ATTR_DISTANCE + 1); + in = names; + out = ret->names; + while (*in) { + *out++ = g_strdup(*in); + in += XML_ATTR_DISTANCE; + } + } + /* extra check for mixed name-value array */ + if (names && *names && values) { +#if XML_ATTR_DISTANCE == 1 + ret->values = g_new0(char *, g_strv_length((gchar **) values) + 1); +#else + ret->values = g_new0(char *, g_strv_length((gchar **) values) / XML_ATTR_DISTANCE + 2); +#endif + in = values; + out = ret->values; + while (*in) { + *out++ = g_strdup(*in++); +#if XML_ATTR_DISTANCE > 1 + if (*in) + in++; +#endif + } + } + return ret; +} + +/** + * @brief Frees up an XML element structure. + * + * This will free up the memory used by the struct and all its members. + */ +static void traffic_xml_element_destroy(struct xml_element * this_) { + void ** iter; + + g_free(this_->tag_name); + if (this_->names) { + for (iter = (void **) this_->names; *iter; iter++) + g_free(*iter); + g_free(this_->names); + } + if (this_->values) { + for (iter = (void **) this_->values; *iter; iter++) + g_free(*iter); + g_free(this_->values); + } + g_free(this_->text); + g_free(this_); +} + +/** + * @brief Retrieves the value of an XML attribute. + * + * @param name The name of the attribute to retrieve + * @param names All attribute names + * @param values Attribute values (indices correspond to `names`) + * + * @return If `names` contains `name`, the corresponding value is returned, else NULL + */ +static char * traffic_xml_get_attr(const char * attr, char ** names, char ** values) { + int i; + for (i = 0; names[i] && values[i]; i++) { + if (!g_ascii_strcasecmp(attr, names[i])) + return values[i]; + } + return NULL; +} + +/** + * @brief Whether the tag stack represents a hierarchy of elements which is recognized. + * + * @param state The XML parser state + * + * @return True if the stack is valid, false if invalid. An empty stack is considered invalid. + */ +static int traffic_xml_is_tagstack_valid(struct xml_state * state) { + int ret = 0; + GList * tagiter; + struct xml_element * el, * el_parent; + + for (tagiter = g_list_last(state->tagstack); tagiter; tagiter = g_list_previous(tagiter)) { + el = (struct xml_element *) tagiter->data; + el_parent = tagiter->next ? tagiter->next->data : NULL; + + if (!g_ascii_strcasecmp(el->tag_name, "navit_messages") + || !g_ascii_strcasecmp(el->tag_name, "feed")) + ret = !tagiter->next; + else if (!g_ascii_strcasecmp((char *) el->tag_name, "message")) + ret = (!el_parent + || !g_ascii_strcasecmp(el_parent->tag_name, "navit_messages") + || !g_ascii_strcasecmp(el_parent->tag_name, "feed")); + else if (!g_ascii_strcasecmp(el->tag_name, "events") + || !g_ascii_strcasecmp(el->tag_name, "location") + || !g_ascii_strcasecmp(el->tag_name, "merge")) + ret = (el_parent && !g_ascii_strcasecmp(el_parent->tag_name, "message")); + else if (!g_ascii_strcasecmp(el->tag_name, "event")) + ret = (el_parent && !g_ascii_strcasecmp(el_parent->tag_name, "events")); + else if (!g_ascii_strcasecmp(el->tag_name, "from") + || !g_ascii_strcasecmp(el->tag_name, "to") + || !g_ascii_strcasecmp(el->tag_name, "at") + || !g_ascii_strcasecmp(el->tag_name, "via") + || !g_ascii_strcasecmp(el->tag_name, "not_via")) + ret = (el_parent && !g_ascii_strcasecmp(el_parent->tag_name, "location")); + else if (!g_ascii_strcasecmp(el->tag_name, "supplementary_info")) + ret = (el_parent && !g_ascii_strcasecmp(el_parent->tag_name, "event")); + else if (!g_ascii_strcasecmp(el->tag_name, "replaces")) + ret = (el_parent && !g_ascii_strcasecmp(el_parent->tag_name, "merge")); + else + ret = 0; + + if (!ret) + break; + } + + return ret; +} + +/** + * @brief Callback function which gets called when an opening tag is encountered. + * + * @param tag_name The tag name + * @param names Attribute names + * @param values Attribute values (indices correspond to `names`) + * @param data Points to a `struct xml_state` holding parser state + */ +static void traffic_xml_start(xml_context *dummy, const char *tag_name, const char **names, + const char **values, void *data, GError **error) { + struct xml_state * state = (struct xml_state *) data; + struct xml_element * el; + + el = traffic_xml_element_new(tag_name, names, values); + state->tagstack = g_list_prepend(state->tagstack, el); + state->is_opened = 1; + state->is_valid = traffic_xml_is_tagstack_valid(state); + if (!state->is_valid) + return; + + dbg(lvl_debug, "OPEN: %s", tag_name); + + if (!g_ascii_strcasecmp((char *) tag_name, "supplementary_info")) { + state->si = g_list_append(state->si, traffic_suppl_info_new( + si_class_new(traffic_xml_get_attr("class", el->names, el->values)), + si_type_new(traffic_xml_get_attr("type", el->names, el->values)), + /* TODO quantifier */ + NULL)); + } else if (!g_ascii_strcasecmp((char *) tag_name, "replaces")) { + /* TODO */ + } + + /* + * No handling necessary for: + * + * navit_messages: No attributes, everything handled in children's callbacks + * feed: No attributes, everything handled in children's callbacks + * message: Everything handled in end callback + * events: No attributes, everything handled in children's callbacks + * location: Everything handled in end callback + * event: Everything handled in end callback + * merge: No attributes, everything handled in children's callbacks + * from, to, at, via, not_via: Everything handled in end callback + */ +} + +/** + * @brief Callback function which gets called when a closing tag is encountered. + * + * @param tag_name The tag name + * @param data Points to a `struct xml_state` holding parser state + */ +static void traffic_xml_end(xml_context *dummy, const char *tag_name, void *data, GError **error) { + struct xml_state * state = (struct xml_state *) data; + struct xml_element * el = state->tagstack ? (struct xml_element *) state->tagstack->data : NULL; + struct traffic_message * message; + struct traffic_point ** point = NULL; + + /* Iterator and child element count */ + int i, count; + + /* Child elements */ + void ** children = NULL; + + /* Iterator for children in GList */ + GList * iter; + + /* Some elements we need to check for null */ + char * tmc_direction; + char * length; + char * speed; + + /* New traffic event */ + struct traffic_event * event = NULL; + + float lat, lon; + + if (state->is_valid) { + dbg(lvl_debug, " END: %s", tag_name); + + if (!g_ascii_strcasecmp((char *) tag_name, "message")) { + count = g_list_length(state->events); + if (count) { + children = (void **) g_new0(struct traffic_event *, count); + iter = state->events; + for (i = 0; iter && (i < count); i++) { + children[i] = iter->data; + iter = g_list_next(iter); + } + } + message = traffic_message_new(traffic_xml_get_attr("id", el->names, el->values), + time_new(traffic_xml_get_attr("receive_time", el->names, el->values)), + time_new(traffic_xml_get_attr("update_time", el->names, el->values)), + time_new(traffic_xml_get_attr("expiration_time", el->names, el->values)), + time_new(traffic_xml_get_attr("start_time", el->names, el->values)), + time_new(traffic_xml_get_attr("end_time", el->names, el->values)), + boolean_new(traffic_xml_get_attr("cancellation", el->names, el->values), 0), + boolean_new(traffic_xml_get_attr("forecast", el->names, el->values), 0), + /* TODO replaces */ + 0, NULL, + state->location, + count, + (struct traffic_event **) children); + if (!traffic_message_is_valid(message)) { + dbg(lvl_error, "malformed message detected, skipping"); + traffic_message_destroy(message); + } else + state->messages = g_list_append(state->messages, message); + g_free(children); + state->location = NULL; + g_list_free(state->events); + state->events = NULL; + /* TODO replaces */ + } else if (!g_ascii_strcasecmp((char *) tag_name, "location")) { + tmc_direction = traffic_xml_get_attr("tmc_direction", el->names, el->values); + state->location = traffic_location_new(state->at, state->from, + state->to, state->via, state->not_via, + traffic_xml_get_attr("destination", el->names, el->values), + traffic_xml_get_attr("direction", el->names, el->values), + location_dir_new(traffic_xml_get_attr("directionality", el->names, el->values)), + location_fuzziness_new(traffic_xml_get_attr("fuzziness", el->names, el->values)), + location_ramps_new(traffic_xml_get_attr("ramps", el->names, el->values)), + item_type_from_road_type(traffic_xml_get_attr("road_type", el->names, el->values), + /* TODO revisit default for road_is_urban */ + boolean_new(traffic_xml_get_attr("road_is_urban", el->names, el->values), 0)), + traffic_xml_get_attr("road_name", el->names, el->values), + traffic_xml_get_attr("road_ref", el->names, el->values), + traffic_xml_get_attr("tmc_table", el->names, el->values), + tmc_direction ? atoi(tmc_direction) : 0); + state->from = NULL; + state->to = NULL; + state->at = NULL; + state->via = NULL; + state->not_via = NULL; + } else if (!g_ascii_strcasecmp((char *) tag_name, "event")) { + count = g_list_length(state->si); + if (count) { + children = (void **) g_new0(struct traffic_suppl_info *, count); + iter = state->si; + for (i = 0; iter && (i < count); i++) { + children[i] = iter->data; + iter = g_list_next(iter); + } + } + length = traffic_xml_get_attr("length", el->names, el->values); + speed = traffic_xml_get_attr("speed", el->names, el->values); + event = traffic_event_new(event_class_new(traffic_xml_get_attr("class", el->names, el->values)), + event_type_new(traffic_xml_get_attr("type", el->names, el->values)), + length ? atoi(length) : -1, + speed ? atoi(speed) : INT_MAX, + /* TODO quantifier */ + NULL, + count, + (struct traffic_suppl_info **) children); + g_free(children); + g_list_free(state->si); + state->si = NULL; + /* TODO preserve unknown (and thus invalid) events if they have maxspeed set */ + if (!traffic_event_is_valid(event)) { + dbg(lvl_debug, "invalid or unknown event detected, skipping"); + traffic_event_destroy(event); + } else + state->events = g_list_append(state->events, event); + } else if (!g_ascii_strcasecmp((char *) tag_name, "from")) { + point = &state->from; + } else if (!g_ascii_strcasecmp((char *) tag_name, "to")) { + point = &state->to; + } else if (!g_ascii_strcasecmp((char *) tag_name, "at")) { + point = &state->at; + } else if (!g_ascii_strcasecmp((char *) tag_name, "via")) { + point = &state->via; + } else if (!g_ascii_strcasecmp((char *) tag_name, "not_via")) { + point = &state->not_via; + } + + /* + * No handling necessary for: + * + * navit_messages: No attributes, everything handled in children's callbacks + * feed: No attributes, everything handled in children's callbacks + * events: No attributes, everything handled in children's callbacks + * merge: No attributes, everything handled in children's callbacks + * replaces: Leaf node, handled in start callback + * supplementary_info: Leaf node, handled in start callback + */ + + if (point) { + /* we have a location point (from, at, to, via or not_via) to process */ + if (sscanf(el->text, "%f %f", &lat, &lon) == 2) { + *point = traffic_point_new(lon, lat, + traffic_xml_get_attr("junction_name", el->names, el->values), + traffic_xml_get_attr("junction_ref", el->names, el->values), + traffic_xml_get_attr("tmc_id", el->names, el->values)); + } else { + dbg(lvl_error, "%s has no valid lat/lon pair, skipping", tag_name); + } + } + } + + if (el && !g_ascii_strcasecmp(tag_name, el->tag_name)) { + traffic_xml_element_destroy(el); + state->tagstack = g_list_remove(state->tagstack, state->tagstack->data); + } + state->is_opened = 0; +} + +/** + * @brief Callback function which gets called when character data is encountered. + * + * @param text The character data (note that the data is not NULL-terminated!) + * @param len The number of characters in `text` + * @param data Points to a `struct xml_state` holding parser state + */ +static void traffic_xml_text(xml_context *dummy, const char *text, gsize len, void *data, GError **error) { + struct xml_state * state = (struct xml_state *) data; + char * text_sz = g_strndup(text, len); + struct xml_element * el = state->tagstack ? (struct xml_element *) state->tagstack->data : NULL; + + dbg(lvl_debug, " TEXT: '%s'", text_sz); + if (state->is_valid && state->is_opened) { + /* this will work only for leaf nodes, which is not an issue at the moment as the only nodes + * with actual text data are leaf nodes */ + el->text = g_strndup(text, len); + } + g_free(text_sz); +} + +enum event_class event_class_new(char * string) { + if (string) { + if (!g_ascii_strcasecmp(string, "CONGESTION")) + return event_class_congestion; + if (!g_ascii_strcasecmp(string, "DELAY")) + return event_class_delay; + if (!g_ascii_strcasecmp(string, "RESTRICTION")) + return event_class_restriction; + } + return event_class_invalid; +} + +const char * event_class_to_string(enum event_class this_) { + switch (this_) { + case event_class_congestion: + return "CONGESTION"; + case event_class_delay: + return "DELAY"; + case event_class_restriction: + return "RESTRICTION"; + default: + return "INVALID"; + } +} + +enum event_type event_type_new(char * string) { + if (string) { + if (!g_ascii_strcasecmp(string, "CONGESTION_CLEARED")) + return event_congestion_cleared; + if (!g_ascii_strcasecmp(string, "CONGESTION_FORECAST_WITHDRAWN")) + return event_congestion_forecast_withdrawn; + if (!g_ascii_strcasecmp(string, "CONGESTION_HEAVY_TRAFFIC")) + return event_congestion_heavy_traffic; + if (!g_ascii_strcasecmp(string, "CONGESTION_LONG_QUEUE")) + return event_congestion_long_queue; + if (!g_ascii_strcasecmp(string, "CONGESTION_NONE")) + return event_congestion_none; + if (!g_ascii_strcasecmp(string, "CONGESTION_NORMAL_TRAFFIC")) + return event_congestion_normal_traffic; + if (!g_ascii_strcasecmp(string, "CONGESTION_QUEUE")) + return event_congestion_queue; + if (!g_ascii_strcasecmp(string, "CONGESTION_QUEKE_LIKELY")) + return event_congestion_queue_likely; + if (!g_ascii_strcasecmp(string, "CONGESTION_SLOW_TRAFFIC")) + return event_congestion_slow_traffic; + if (!g_ascii_strcasecmp(string, "CONGESTION_STATIONARY_TRAFFIC")) + return event_congestion_stationary_traffic; + if (!g_ascii_strcasecmp(string, "CONGESTION_STATIONARY_TRAFFIC_LIKELY")) + return event_congestion_stationary_traffic_likely; + if (!g_ascii_strcasecmp(string, "CONGESTION_TRAFFIC_BUILDING_UP")) + return event_congestion_traffic_building_up; + if (!g_ascii_strcasecmp(string, "CONGESTION_TRAFFIC_CONGESTION")) + return event_congestion_traffic_congestion; + if (!g_ascii_strcasecmp(string, "CONGESTION_TRAFFIC_EASING")) + return event_congestion_traffic_easing; + if (!g_ascii_strcasecmp(string, "CONGESTION_TRAFFIC_FLOWING_FREELY")) + return event_congestion_traffic_flowing_freely; + if (!g_ascii_strcasecmp(string, "CONGESTION_TRAFFIC_HEAVIER_THAN_NORMAL")) + return event_congestion_traffic_heavier_than_normal; + if (!g_ascii_strcasecmp(string, "CONGESTION_TRAFFIC_LIGHTER_THAN_NORMAL")) + return event_congestion_traffic_lighter_than_normal; + if (!g_ascii_strcasecmp(string, "CONGESTION_TRAFFIC_MUCH_HEAVIER_THAN_NORMAL")) + return event_congestion_traffic_much_heavier_than_normal; + if (!g_ascii_strcasecmp(string, "CONGESTION_TRAFFIC_PROBLEM")) + return event_congestion_traffic_problem; + if (!g_ascii_strcasecmp(string, "DELAY_CLEARANCE")) + return event_delay_clearance; + if (!g_ascii_strcasecmp(string, "DELAY_DELAY")) + return event_delay_delay; + if (!g_ascii_strcasecmp(string, "DELAY_DELAY_POSSIBLE")) + return event_delay_delay_possible; + if (!g_ascii_strcasecmp(string, "DELAY_FORECAST_WITHDRAWN")) + return event_delay_forecast_withdrawn; + if (!g_ascii_strcasecmp(string, "DELAY_LONG_DELAY")) + return event_delay_long_delay; + if (!g_ascii_strcasecmp(string, "DELAY_SEVERAL_HOURS")) + return event_delay_several_hours; + if (!g_ascii_strcasecmp(string, "DELAY_UNCERTAIN_DURATION")) + return event_delay_uncertain_duration; + if (!g_ascii_strcasecmp(string, "DELAY_VERY_LONG_DELAY")) + return event_delay_very_long_delay; + if (!g_ascii_strcasecmp(string, "RESTRICTION_ACCESS_RESTRICTIONS_LIFTED")) + return event_restriction_access_restrictions_lifted; + if (!g_ascii_strcasecmp(string, "RESTRICTION_ALL_CARRIAGEWAYS_CLEARED")) + return event_restriction_all_carriageways_cleared; + if (!g_ascii_strcasecmp(string, "RESTRICTION_ALL_CARRIAGEWAYS_REOPENED")) + return event_restriction_all_carriageways_reopened; + if (!g_ascii_strcasecmp(string, "RESTRICTION_BATCH_SERVICE")) + return event_restriction_batch_service; + if (!g_ascii_strcasecmp(string, "RESTRICTION_BLOCKED")) + return event_restriction_blocked; + if (!g_ascii_strcasecmp(string, "RESTRICTION_BLOCKED_AHEAD")) + return event_restriction_blocked_ahead; + if (!g_ascii_strcasecmp(string, "RESTRICTION_CARRIAGEWAY_BLOCKED")) + return event_restriction_carriageway_blocked; + if (!g_ascii_strcasecmp(string, "RESTRICTION_CARRIAGEWAY_CLOSED")) + return event_restriction_carriageway_closed; + if (!g_ascii_strcasecmp(string, "RESTRICTION_CONTRAFLOW")) + return event_restriction_contraflow; + if (!g_ascii_strcasecmp(string, "RESTRICTION_CLOSED")) + return event_restriction_closed; + if (!g_ascii_strcasecmp(string, "RESTRICTION_CLOSED_AHEAD")) + return event_restriction_closed_ahead; + if (!g_ascii_strcasecmp(string, "RESTRICTION_ENTRY_BLOCKED")) + return event_restriction_entry_blocked; + if (!g_ascii_strcasecmp(string, "RESTRICTION_ENTRY_REOPENED")) + return event_restriction_entry_reopened; + if (!g_ascii_strcasecmp(string, "RESTRICTION_INTERMITTENT_CLOSURES")) + return event_restriction_intermittent_closures; + if (!g_ascii_strcasecmp(string, "RESTRICTION_LANE_BLOCKED")) + return event_restriction_lane_blocked; + if (!g_ascii_strcasecmp(string, "RESTRICTION_LANE_CLOSED")) + return event_restriction_lane_closed; + if (!g_ascii_strcasecmp(string, "RESTRICTION_OPEN")) + return event_restriction_open; + if (!g_ascii_strcasecmp(string, "RESTRICTION_RAMP_BLOCKED")) + return event_restriction_ramp_blocked; + if (!g_ascii_strcasecmp(string, "RESTRICTION_RAMP_CLOSED")) + return event_restriction_ramp_closed; + if (!g_ascii_strcasecmp(string, "RESTRICTION_RAMP_REOPENED")) + return event_restriction_ramp_reopened; + if (!g_ascii_strcasecmp(string, "RESTRICTION_REDUCED_LANES")) + return event_restriction_reduced_lanes; + if (!g_ascii_strcasecmp(string, "RESTRICTION_REOPENED")) + return event_restriction_reopened; + if (!g_ascii_strcasecmp(string, "RESTRICTION_ROAD_CLEARED")) + return event_restriction_road_cleared; + if (!g_ascii_strcasecmp(string, "RESTRICTION_SINGLE_ALTERNATE_LINE_TRAFFIC")) + return event_restriction_single_alternate_line_traffic; + if (!g_ascii_strcasecmp(string, "RESTRICTION_SPEED_LIMIT")) + return event_restriction_speed_limit; + if (!g_ascii_strcasecmp(string, "RESTRICTION_SPEED_LIMIT_LIFTED")) + return event_restriction_speed_limit_lifted; + } + return event_invalid; +} + +const char * event_type_to_string(enum event_type this_) { + switch (this_) { + case event_congestion_cleared: + return "CONGESTION_CLEARED"; + case event_congestion_forecast_withdrawn: + return "CONGESTION_FORECAST_WITHDRAWN"; + case event_congestion_heavy_traffic: + return "CONGESTION_HEAVY_TRAFFIC"; + case event_congestion_long_queue: + return "CONGESTION_LONG_QUEUE"; + case event_congestion_none: + return "CONGESTION_NONE"; + case event_congestion_normal_traffic: + return "CONGESTION_NORMAL_TRAFFIC"; + case event_congestion_queue: + return "CONGESTION_QUEUE"; + case event_congestion_queue_likely: + return "CONGESTION_QUEUE_LIKELY"; + case event_congestion_slow_traffic: + return "CONGESTION_SLOW_TRAFFIC"; + case event_congestion_stationary_traffic: + return "CONGESTION_STATIONARY_TRAFFIC"; + case event_congestion_stationary_traffic_likely: + return "CONGESTION_STATIONARY_TRAFFIC_LIKELY"; + case event_congestion_traffic_building_up: + return "CONGESTION_TRAFFIC_BUILDING_UP"; + case event_congestion_traffic_congestion: + return "CONGESTION_TRAFFIC_CONGESTION"; + case event_congestion_traffic_easing: + return "CONGESTION_TRAFFIC_EASING"; + case event_congestion_traffic_flowing_freely: + return "CONGESTION_TRAFFIC_FLOWING_FREELY"; + case event_congestion_traffic_heavier_than_normal: + return "CONGESTION_TRAFFIC_HEAVIER_THAN_NORMAL"; + case event_congestion_traffic_lighter_than_normal: + return "CONGESTION_TRAFFIC_LIGHTER_THAN_NORMAL"; + case event_congestion_traffic_much_heavier_than_normal: + return "CONGESTION_TRAFFIC_MUCH_HEAVIER_THAN_NORMAL"; + case event_congestion_traffic_problem: + return "CONGESTION_TRAFFIC_PROBLEM"; + case event_delay_clearance: + return "DELAY_CLEARANCE"; + case event_delay_delay: + return "DELAY_DELAY"; + case event_delay_delay_possible: + return "DELAY_DELAY_POSSIBLE"; + case event_delay_forecast_withdrawn: + return "DELAY_FORECAST_WITHDRAWN"; + case event_delay_long_delay: + return "DELAY_LONG_DELAY"; + case event_delay_several_hours: + return "DELAY_SEVERAL_HOURS"; + case event_delay_uncertain_duration: + return "DELAY_UNCERTAIN_DURATION"; + case event_delay_very_long_delay: + return "DELAY_VERY_LONG_DELAY"; + case event_restriction_access_restrictions_lifted: + return "RESTRICTION_ACCESS_RESTRICTIONS_LIFTED"; + case event_restriction_all_carriageways_cleared: + return "RESTRICTION_ALL_CARRIAGEWAYS_CLEARED"; + case event_restriction_all_carriageways_reopened: + return "RESTRICTION_ALL_CARRIAGEWAYS_REOPENED"; + case event_restriction_batch_service: + return "RESTRICTION_BATCH_SERVICE"; + case event_restriction_blocked: + return "RESTRICTION_BLOCKED"; + case event_restriction_blocked_ahead: + return "RESTRICTION_BLOCKED_AHEAD"; + case event_restriction_carriageway_blocked: + return "RESTRICTION_CARRIAGEWAY_BLOCKED"; + case event_restriction_carriageway_closed: + return "RESTRICTION_CARRIAGEWAY_CLOSED"; + case event_restriction_closed: + return "RESTRICTION_CLOSED"; + case event_restriction_closed_ahead: + return "RESTRICTION_CLOSED_AHEAD"; + case event_restriction_contraflow: + return "RESTRICTION_CONTRAFLOW"; + case event_restriction_entry_blocked: + return "RESTRICTION_ENTRY_BLOCKED"; + case event_restriction_entry_reopened: + return "RESTRICTION_ENTRY_REOPENED"; + case event_restriction_exit_blocked: + return "RESTRICTION_EXIT_BLOCKED"; + case event_restriction_exit_reopened: + return "RESTRICTION_EXIT_REOPENED"; + case event_restriction_intermittent_closures: + return "RESTRICTION_INTERMITTENT_CLOSURES"; + case event_restriction_lane_blocked: + return "RESTRICTION_LANE_BLOCKED"; + case event_restriction_lane_closed: + return "RESTRICTION_LANE_CLOSED"; + case event_restriction_open: + return "RESTRICTION_OPEN"; + case event_restriction_ramp_blocked: + return "RESTRICTION_RAMP_BLOCKED"; + case event_restriction_ramp_closed: + return "RESTRICTION_RAMP_CLOSED"; + case event_restriction_ramp_reopened: + return "RESTRICTION_RAMP_REOPENED"; + case event_restriction_reduced_lanes: + return "RESTRICTION_REDUCED_LANES"; + case event_restriction_reopened: + return "RESTRICTION_REOPENED"; + case event_restriction_road_cleared: + return "RESTRICTION_ROAD_CLEARED"; + case event_restriction_single_alternate_line_traffic: + return "RESTRICTION_SINGLE_ALTERNATE_LINE_TRAFFIC"; + case event_restriction_speed_limit: + return "RESTRICTION_SPEED_LIMIT"; + case event_restriction_speed_limit_lifted: + return "RESTRICTION_SPEED_LIMIT_LIFTED"; + default: + return "INVALID"; + } +} + +enum item_type item_type_from_road_type(char * string, int is_urban) { + enum item_type ret = type_line_unspecified; + + if (string) { + if (!g_ascii_strcasecmp(string, "MOTORWAY")) + return is_urban ? type_highway_city : type_highway_land; + if (!g_ascii_strcasecmp(string, "TRUNK")) + return type_street_n_lanes; + if (!g_ascii_strcasecmp(string, "PRIMARY")) + return is_urban ? type_street_4_city : type_street_4_land; + if (!g_ascii_strcasecmp(string, "SECONDARY")) + return is_urban ? type_street_3_city : type_street_3_land; + if (!g_ascii_strcasecmp(string, "TERTIARY")) + return is_urban ? type_street_2_city : type_street_2_land; + + ret = item_from_name(string); + } + if ((ret < route_item_first) || (ret > route_item_last)) + return type_line_unspecified; + return ret; +} + +enum location_dir location_dir_new(char * string) { + if (string && !g_ascii_strcasecmp(string, "ONE_DIRECTION")) + return location_dir_one; + return location_dir_both; +} + +enum location_fuzziness location_fuzziness_new(char * string) { + if (string) { + if (!g_ascii_strcasecmp(string, "LOW_RES")) + return location_fuzziness_low_res; + if (!g_ascii_strcasecmp(string, "END_UNKNOWN")) + return location_fuzziness_end_unknown; + if (!g_ascii_strcasecmp(string, "START_UNKNOWN")) + return location_fuzziness_start_unknown; + if (!g_ascii_strcasecmp(string, "EXTENT_UNKNOWN")) + return location_fuzziness_extent_unknown; + } + return location_fuzziness_none; +} + +const char * location_fuzziness_to_string(enum location_fuzziness this_) { + switch (this_) { + case location_fuzziness_low_res: + return "LOW_RES"; + case location_fuzziness_end_unknown: + return "END_UNKNOWN"; + case location_fuzziness_start_unknown: + return "START_UNKNOWN"; + case location_fuzziness_extent_unknown: + return "EXTENT_UNKNOWN"; + default: + return NULL; + } +} + +enum location_ramps location_ramps_new(char * string) { + if (string) { + if (!g_ascii_strcasecmp(string, "ALL_RAMPS")) + return location_ramps_all; + if (!g_ascii_strcasecmp(string, "ENTRY_RAMP")) + return location_ramps_entry; + if (!g_ascii_strcasecmp(string, "EXIT_RAMP")) + return location_ramps_exit; + } + return location_ramps_none; +} + +const char * location_ramps_to_string(enum location_ramps this_) { + switch (this_) { + case location_ramps_none: + return "NONE"; + case location_ramps_all: + return "ALL_RAMPS"; + case location_ramps_entry: + return "ENTRY_RAMP"; + case location_ramps_exit: + return "EXIT_RAMP"; + default: + return NULL; + } +} + +enum si_class si_class_new(char * string) { + if (string) { + if (!g_ascii_strcasecmp(string, "PLACE")) + return si_class_place; + if (!g_ascii_strcasecmp(string, "TENDENCY")) + return si_class_tendency; + if (!g_ascii_strcasecmp(string, "VEHICLE")) + return si_class_vehicle; + } + return si_class_invalid; +} + +const char * si_class_to_string(enum si_class this_) { + switch (this_) { + case si_class_place: + return "PLACE"; + case si_class_tendency: + return "TENDENCY"; + case si_class_vehicle: + return "VEHICLE"; + default: + return "INVALID"; + } +} + +enum si_type si_type_new(char * string) { + if (string) { + if (!g_ascii_strcasecmp(string, "S_PLACE_BRIDGE")) + return si_place_bridge; + if (!g_ascii_strcasecmp(string, "S_PLACE_RAMP")) + return si_place_ramp; + if (!g_ascii_strcasecmp(string, "S_PLACE_ROADWORKS")) + return si_place_roadworks; + if (!g_ascii_strcasecmp(string, "S_PLACE_TUNNEL")) + return si_place_tunnel; + if (!g_ascii_strcasecmp(string, "S_TENDENCY_QUEUE_DECREASING")) + return si_tendency_queue_decreasing; + if (!g_ascii_strcasecmp(string, "S_TENDENCY_QUEUE_INCREASING")) + return si_tendency_queue_increasing; + if (!g_ascii_strcasecmp(string, "S_VEHICLE_ALL")) + return si_vehicle_all; + if (!g_ascii_strcasecmp(string, "S_VEHICLE_BUS")) + return si_vehicle_bus; + if (!g_ascii_strcasecmp(string, "S_VEHICLE_CAR")) + return si_vehicle_car; + if (!g_ascii_strcasecmp(string, "S_VEHICLE_CAR_WITH_CARAVAN")) + return si_vehicle_car_with_caravan; + if (!g_ascii_strcasecmp(string, "S_VEHICLE_CAR_WITH_TRAILER")) + return si_vehicle_car_with_trailer; + if (!g_ascii_strcasecmp(string, "S_VEHICLE_HAZMAT")) + return si_vehicle_hazmat; + if (!g_ascii_strcasecmp(string, "S_VEHICLE_HGV")) + return si_vehicle_hgv; + if (!g_ascii_strcasecmp(string, "S_VEHICLE_MOTOR")) + return si_vehicle_motor; + if (!g_ascii_strcasecmp(string, "S_VEHICLE_WITH_TRAILER")) + return si_vehicle_with_trailer; + } + return si_invalid; +} + +const char * si_type_to_string(enum si_type this_) { + switch (this_) { + case si_place_bridge: + return "S_PLACE_BRIDGE"; + case si_place_ramp: + return "S_PLACE_RAMP"; + case si_place_roadworks: + return "S_PLACE_ROADWORKS"; + case si_place_tunnel: + return "S_PLACE_TUNNEL"; + case si_tendency_queue_decreasing: + return "S_TENDENCY_QUEUE_DECREASING"; + case si_tendency_queue_increasing: + return "S_TENDENCY_QUEUE_INCREASING"; + case si_vehicle_all: + return "S_VEHICLE_ALL"; + case si_vehicle_bus: + return "S_VEHICLE_BUS"; + case si_vehicle_car: + return "S_VEHICLE_CAR"; + case si_vehicle_car_with_caravan: + return "S_VEHICLE_CAR_WITH_CARAVAN"; + case si_vehicle_car_with_trailer: + return "S_VEHICLE_CAR_WITH_TRAILER"; + case si_vehicle_hazmat: + return "S_VEHICLE_HAZMAT"; + case si_vehicle_hgv: + return "S_VEHICLE_HGV"; + case si_vehicle_motor: + return "S_VEHICLE_MOTOR"; + case si_vehicle_with_trailer: + return "S_VEHICLE_WITH_TRAILER"; + default: + return "INVALID"; + } +} + +struct traffic_point * traffic_point_new(float lon, float lat, char * junction_name, char * junction_ref, + char * tmc_id) { + struct traffic_point * ret; + + ret = g_new0(struct traffic_point, 1); + ret->coord.lat = lat; + ret->coord.lng = lon; + ret->junction_name = junction_name ? g_strdup(junction_name) : NULL; + ret->junction_ref = junction_ref ? g_strdup(junction_ref) : NULL; + ret->tmc_id = tmc_id ? g_strdup(tmc_id) : NULL; + return ret; +} + +struct traffic_point * traffic_point_new_short(float lon, float lat) { + return traffic_point_new(lon, lat, NULL, NULL, NULL); +} + +void traffic_point_destroy(struct traffic_point * this_) { + if (this_->junction_name) + g_free(this_->junction_name); + if (this_->junction_ref) + g_free(this_->junction_ref); + if (this_->tmc_id) + g_free(this_->tmc_id); + g_free(this_); +} + +// TODO split CID/LTN? +struct traffic_location * traffic_location_new(struct traffic_point * at, struct traffic_point * from, + struct traffic_point * to, struct traffic_point * via, struct traffic_point * not_via, + char * destination, char * direction, enum location_dir directionality, + enum location_fuzziness fuzziness, enum location_ramps ramps, enum item_type road_type, + char * road_name, char * road_ref, char * tmc_table, int tmc_direction) { + struct traffic_location * ret; + + ret = g_new0(struct traffic_location, 1); + ret->at = at; + ret->from = from; + ret->to = to; + ret->via = via; + ret->not_via = not_via; + ret->destination = destination ? g_strdup(destination) : NULL; + ret->direction = direction ? g_strdup(direction) : NULL; + ret->directionality = directionality; + ret->fuzziness = fuzziness; + ret->ramps = ramps; + ret->road_type = road_type; + ret->road_name = road_name ? g_strdup(road_name) : NULL; + ret->road_ref = road_ref ? g_strdup(road_ref) : NULL; + ret->tmc_table = tmc_table ? g_strdup(tmc_table) : NULL; + ret->tmc_direction = tmc_direction; + ret->priv = g_new0(struct traffic_location_priv, 1); + ret->priv->sw = NULL; + ret->priv->ne = NULL; + return ret; +} + +struct traffic_location * traffic_location_new_short(struct traffic_point * at, struct traffic_point * from, + struct traffic_point * to, struct traffic_point * via, struct traffic_point * not_via, + enum location_dir directionality, enum location_fuzziness fuzziness) { + return traffic_location_new(at, from, to, via, not_via, NULL, NULL, directionality, fuzziness, + location_ramps_none, type_line_unspecified, NULL, NULL, NULL, 0); +} + +void traffic_location_destroy(struct traffic_location * this_) { + if (this_->at) + traffic_point_destroy(this_->at); + if (this_->from) + traffic_point_destroy(this_->from); + if (this_->to) + traffic_point_destroy(this_->to); + if (this_->via) + traffic_point_destroy(this_->via); + if (this_->not_via) + traffic_point_destroy(this_->not_via); + if (this_->destination) + g_free(this_->destination); + if (this_->direction) + g_free(this_->direction); + if (this_->road_name) + g_free(this_->road_name); + if (this_->road_ref) + g_free(this_->road_ref); + if (this_->tmc_table) + g_free(this_->tmc_table); + if (this_->priv->sw) + g_free(this_->priv->sw); + if (this_->priv->ne) + g_free(this_->priv->ne); + g_free(this_->priv); + g_free(this_); +} + +struct traffic_suppl_info * traffic_suppl_info_new(enum si_class si_class, enum si_type type, + struct quantifier * quantifier) { + struct traffic_suppl_info * ret; + ret = g_new0(struct traffic_suppl_info, 1); + ret->si_class = si_class; + ret->type = type; + ret->quantifier = quantifier ? g_memdup(quantifier, sizeof(struct quantifier)) : NULL; + return ret; +} + +void traffic_suppl_info_destroy(struct traffic_suppl_info * this_) { + if (this_->quantifier) + g_free(this_->quantifier); + g_free(this_); +} + +struct traffic_event * traffic_event_new(enum event_class event_class, enum event_type type, + int length, int speed, struct quantifier * quantifier, int si_count, struct traffic_suppl_info ** si) { + struct traffic_event * ret; + + ret = g_new0(struct traffic_event, 1); + ret->event_class = event_class; + ret->type = type; + ret->length = length; + ret->speed = speed; + ret->quantifier = quantifier ? g_memdup(quantifier, sizeof(struct quantifier)) : NULL; + if (si_count && si) { + ret->si_count = si_count; + ret->si = g_memdup(si, sizeof(struct traffic_suppl_info *) * si_count); + } else { + ret->si_count = 0; + ret->si = NULL; + } + return ret; +} + +struct traffic_event * traffic_event_new_short(enum event_class event_class, enum event_type type) { + return traffic_event_new(event_class, type, -1, INT_MAX, NULL, 0, NULL); +} + +void traffic_event_destroy(struct traffic_event * this_) { + int i; + + if (this_->quantifier) + g_free(this_->quantifier); + if (this_->si && this_->si_count) { + for (i = 0; i < this_->si_count; i++) + traffic_suppl_info_destroy(this_->si[i]); + g_free(this_->si); + } + g_free(this_); +} + +void traffic_event_add_suppl_info(struct traffic_event * this_, struct traffic_suppl_info * si) { + struct traffic_suppl_info ** si_new; + + if (this_->si_count && this_->si) { + si_new = g_new0(struct traffic_suppl_info *, this_->si_count + 1); + memcpy(si_new, this_->si, sizeof(struct traffic_suppl_info *) * this_->si_count); + si_new[this_->si_count] = si; + g_free(this_->si); + this_->si = si_new; + this_->si_count++; + } else { + this_->si = g_new0(struct traffic_suppl_info *, 1); + this_->si[0] = si; + this_->si_count = 1; + } +} + +struct traffic_suppl_info * traffic_event_get_suppl_info(struct traffic_event * this_, int index) { + if (this_->si && (index < this_->si_count)) + return this_->si[index]; + else + return NULL; +} + +struct traffic_message * traffic_message_new(char * id, time_t receive_time, time_t update_time, + time_t expiration_time, time_t start_time, time_t end_time, int is_cancellation, int is_forecast, + int replaced_count, char ** replaces, struct traffic_location * location, int event_count, + struct traffic_event ** events) { + struct traffic_message * ret; + + ret = g_new0(struct traffic_message, 1); + ret->id = g_strdup(id); + ret->receive_time = receive_time; + ret->update_time = update_time; + ret->expiration_time = expiration_time; + ret->start_time = start_time; + ret->end_time = end_time; + ret->is_cancellation = is_cancellation; + ret->is_forecast = is_forecast; + if (replaced_count && replaces) { + ret->replaced_count = replaced_count; + ret->replaces = g_memdup(replaces, sizeof(char *) * replaced_count); + } else { + ret->replaced_count = 0; + ret->replaces = NULL; + } + ret->location = location; + if (event_count && events) { + ret->event_count = event_count; + ret->events = g_memdup(events, sizeof(struct traffic_event *) * event_count); + } + ret->priv = g_new0(struct traffic_message_priv, 1); + ret->priv->items = NULL; + return ret; +} + +struct traffic_message * traffic_message_new_short(char * id, time_t receive_time, time_t update_time, + time_t expiration_time, int is_forecast, struct traffic_location * location, + int event_count, struct traffic_event ** events) { + return traffic_message_new(id, receive_time, update_time, expiration_time, 0, 0, 0, + is_forecast, 0, NULL, location, event_count, events); +} + +struct traffic_message * traffic_message_new_single_event(char * id, time_t receive_time, time_t update_time, + time_t expiration_time, int is_forecast, struct traffic_location * location, + enum event_class event_class, enum event_type type) { + struct traffic_event * event; + struct traffic_event ** events; + + event = traffic_event_new_short(event_class, type); + events = g_new0(struct traffic_event *, 1); + events[0] = event; + return traffic_message_new_short(id, receive_time, update_time, expiration_time, is_forecast, + location, 1, events); + g_free(events); +} + +struct traffic_message * traffic_message_new_cancellation(char * id, time_t receive_time, time_t update_time, + time_t expiration_time, struct traffic_location * location) { + return traffic_message_new(id, receive_time, update_time, expiration_time, 0, 0, 1, + 0, 0, NULL, location, 0, NULL); +} + +void traffic_message_destroy(struct traffic_message * this_) { + int i; + struct item ** items; + + g_free(this_->id); + if (this_->replaces) { + for (i = 0; i < this_->replaced_count; i++) + g_free(this_->replaces[i]); + g_free(this_->replaces); + } + if (this_->location) + traffic_location_destroy(this_->location); + if (this_->events && this_->event_count) { + for (i = 0; i < this_->event_count; i++) + traffic_event_destroy(this_->events[i]); + g_free(this_->events); + } + if (this_->priv->items) { + for (items = this_->priv->items; *items; items++) + *items = tm_item_unref(*items); + g_free(this_->priv->items); + } + g_free(this_->priv); + g_free(this_); +} + +void traffic_message_add_event(struct traffic_message * this_, struct traffic_event * event) { + struct traffic_event ** events_new; + + events_new = g_new0(struct traffic_event *, this_->event_count + 1); + memcpy(events_new, this_->events, sizeof(struct traffic_event *) * this_->event_count); + events_new[this_->event_count] = event; + g_free(this_->events); + this_->events = events_new; + this_->event_count++; +} + +struct traffic_event * traffic_message_get_event(struct traffic_message * this_, int index) { + if (this_->events && (index < this_->event_count)) + return this_->events[index]; + else + return NULL; +} + +struct item ** traffic_message_get_items(struct traffic_message * this_) { + struct item ** ret; + struct item ** in; + int i; + if (!this_->priv->items) { + ret = g_new0(struct item *, 1); + return ret; + } + in = this_->priv->items; + for (i = 1; *in; i++) + in++; + ret = g_new0(struct item *, i); + memcpy(ret, this_->priv->items, sizeof(struct item *) * i); + return ret; +} + +/** + * @brief Registers a new traffic map plugin + * + * @param meth Receives the map methods + * @param attrs The attributes for the map + * @param cbl + * + * @return A pointer to a `map_priv` structure for the map + */ +static struct map_priv * traffic_map_new(struct map_methods *meth, struct attr **attrs, struct callback_list *cbl) { + struct map_priv *ret; + + ret = g_new0(struct map_priv, 1); + *meth = traffic_map_meth; + + return ret; +} + +void traffic_init(void) { + dbg(lvl_debug, "enter"); + plugin_register_category_map("traffic", traffic_map_new); +} + +struct map * traffic_get_map(struct traffic *this_) { + struct attr_iter *iter; + struct attr *attr; + struct traffic * traffic; + char * filename; + struct traffic_message ** messages; + struct traffic_message ** cur_msg; + + if (!this_->map) { + /* see if any of the other instances has already created a map */ + attr = g_new0(struct attr, 1); + iter = navit_attr_iter_new(); + while (navit_get_attr(this_->navit, attr_traffic, attr, iter)) { + traffic = (struct traffic *) attr->u.navit_object; + if (traffic->map) + this_->map = traffic->map; + } + navit_attr_iter_destroy(iter); + g_free(attr); + } + + if (!this_->map) { + /* no map yet, create a new one */ + struct attr *attrs[4]; + struct attr a_type,data,a_description; + a_type.type = attr_type; + a_type.u.str = "traffic"; + data.type = attr_data; + data.u.str = ""; + a_description.type = attr_description; + a_description.u.str = "Traffic"; + + attrs[0] = &a_type; + attrs[1] = &data; + attrs[2] = &a_description; + attrs[3] = NULL; + + this_->map = map_new(NULL, attrs); + navit_object_ref((struct navit_object *) this_->map); + + /* populate map with previously stored messages */ + filename = g_strjoin(NULL, navit_get_user_data_directory(TRUE), "/traffic.xml", NULL); + messages = traffic_get_messages_from_xml_file(this_, filename); + g_free(filename); + + if (messages) { + for (cur_msg = messages; *cur_msg; cur_msg++) + this_->shared->message_queue = g_list_append(this_->shared->message_queue, *cur_msg); + g_free(messages); + if (this_->shared->message_queue) { + if (!this_->idle_cb) + this_->idle_cb = callback_new_2(callback_cast(traffic_process_messages_int), + this_, PROCESS_MESSAGES_NO_DUMP_STORE); + if (!this_->idle_ev) + this_->idle_ev = event_add_idle(50, this_->idle_cb); + } + } + } + + return this_->map; +} + +/** + * @brief Reads previously stored traffic messages from parsed XML data. + * + * @param state The XML parser state after parsing the XML data + * + * @return A `NULL`-terminated pointer array. Each element points to one `struct traffic_message`. + * `NULL` is returned (rather than an empty pointer array) if there are no messages to report. + */ +static struct traffic_message ** traffic_get_messages_from_parsed_xml(struct xml_state * state) { + struct traffic_message ** ret = NULL; + int i, count; + GList * msg_iter; + + count = g_list_length(state->messages); + if (count) + ret = g_new0(struct traffic_message *, count + 1); + msg_iter = state->messages; + for (i = 0; i < count; i++) { + ret[i] = (struct traffic_message *) msg_iter->data; + msg_iter = g_list_next(msg_iter); + } + g_list_free(state->messages); + return ret; +} + +struct traffic_message ** traffic_get_messages_from_xml_file(struct traffic * this_, char * filename) { + struct traffic_message ** ret = NULL; + struct xml_state state; + int read_success = 0; + + if (filename) { + memset(&state, 0, sizeof(struct xml_state)); + read_success = xml_parse_file(filename, &state, traffic_xml_start, traffic_xml_end, traffic_xml_text); + if (read_success) { + ret = traffic_get_messages_from_parsed_xml(&state); + } else { + dbg(lvl_error,"could not retrieve stored traffic messages"); + } + } /* if (traffic_filename) */ + return ret; +} + +struct traffic_message ** traffic_get_messages_from_xml_string(struct traffic * this_, char * xml) { + struct traffic_message ** ret = NULL; + struct xml_state state; + int read_success = 0; + + if (xml) { + memset(&state, 0, sizeof(struct xml_state)); + read_success = xml_parse_text(xml, &state, traffic_xml_start, traffic_xml_end, traffic_xml_text); + if (read_success) { + ret = traffic_get_messages_from_parsed_xml(&state); + } else { + dbg(lvl_error,"no data supplied"); + } + } /* if (xml) */ + return ret; +} + +struct traffic_message ** traffic_get_stored_messages(struct traffic *this_) { + struct traffic_message ** ret = g_new0(struct traffic_message *, g_list_length(this_->shared->messages) + 1); + struct traffic_message ** out = ret; + GList * in = this_->shared->messages; + + while (in) { + *out = (struct traffic_message *) in->data; + in = g_list_next(in); + out++; + } + + return ret; +} + +void traffic_process_messages(struct traffic * this_, struct traffic_message ** messages) { + struct traffic_message ** cur_msg; + + for (cur_msg = messages; cur_msg && *cur_msg; cur_msg++) + this_->shared->message_queue = g_list_append(this_->shared->message_queue, *cur_msg); + if (this_->shared->message_queue) { + if (this_->idle_ev) + event_remove_idle(this_->idle_ev); + if (this_->idle_cb) + callback_destroy(this_->idle_cb); + this_->idle_cb = callback_new_2(callback_cast(traffic_process_messages_int), this_, 0); + this_->idle_ev = event_add_idle(50, this_->idle_cb); + } +} + +void traffic_set_mapset(struct traffic *this_, struct mapset *ms) { + this_->ms = ms; +} + +void traffic_set_route(struct traffic *this_, struct route *rt) { + this_->rt = rt; +} + +struct object_func traffic_func = { + attr_traffic, + (object_func_new)traffic_new, + (object_func_get_attr)navit_object_get_attr, + (object_func_iter_new)navit_object_attr_iter_new, + (object_func_iter_destroy)navit_object_attr_iter_destroy, + (object_func_set_attr)navit_object_set_attr, + (object_func_add_attr)navit_object_add_attr, + (object_func_remove_attr)navit_object_remove_attr, + (object_func_init)NULL, + (object_func_destroy)navit_object_destroy, + (object_func_dup)NULL, + (object_func_ref)navit_object_ref, + (object_func_unref)navit_object_unref, +}; diff --git a/navit/traffic.h b/navit/traffic.h new file mode 100644 index 000000000..f1c8f8b34 --- /dev/null +++ b/navit/traffic.h @@ -0,0 +1,996 @@ +/** + * Navit, a modular navigation system. + * Copyright (C) 2005-2017 Navit Team + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public License + * version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +/** @file + * + * @brief Contains exported code for traffic.c, the traffic module + * + * This file contains types and function prototypes exported from the traffic module, which enables + * Navit to route around traffic problems. + * + * The traffic module consists of two parts: + * + * The traffic core interacts with the Navit core and converts traffic messages into traffic + * distortions (future versions may add support for other traffic information). + * + * The traffic backends obtain traffic information from a source of their choice (e.g. from a TMC + * receiver or a network service), translate them into Navit data structures and report them to the + * traffic plugin. + * + * Traffic messages and related structures are considered immutable once created (when information + * changes, the old message is replaced with a new one). For this reason, there are very few data + * manipulation methods. Those that exist are intended for the creation of new messages rather than + * for extensive manipulation. + * + * As a rule, responsibility for freeing up any `traffic_*` instances normally lies with the + * traffic plugin, which frees messages as they expire or are replaced. Since this also frees all child + * data structures, traffic backends will seldom need to call any of the destructors. The only case in + * which this would be necessary is if a backend has instantiated an object which is not going to be + * used (i.e. attached to a parent object or, in the case of `traffic_message`, reported to the + * traffic plugin: these need to be freed up manually by calling the destructor of the topmost object in + * the hierarchy. + * + * Any other references passed in functions (including pointer arrays and `quantifier` instances) + * must be freed up by the caller. This is safe to do as soon as the function returns. + */ + +#ifndef NAVIT_TRAFFIC_H +#define NAVIT_TRAFFIC_H + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Classes for events. + */ +/* If additional event classes are introduced, traffic_event_is_valid() must be adapted to recognize them. */ +enum event_class { + event_class_invalid = 0, /*!< Invalid event which should be ignored */ + event_class_congestion, /*!< Traffic congestion, typically indicating the approximate speed */ + event_class_delay, /*!< Delays, typically indicating the amount of extra waiting time */ + event_class_restriction, /*!< Temporary traffic restrictions, such as road or lane closures or size, + * weight or access restrictions */ +}; + +/** + * @brief Event types. + */ +/* If additional events are introduced, remember to do the following: + * - If the events belong to an existing class, insert them right after the last existing event for that class. + * - If the events belong to a new class, insert them at the end of the list. + * - Always keep events of the same class together. + * - After adding events (of any class) at the end of the list, adapt traffic_event_is_valid() to recognize them. */ +enum event_type { + event_invalid = 0, /*!< Invalid event which should be ignored */ + event_congestion_cleared, /*!< Traffic congestion cleared */ + event_congestion_forecast_withdrawn, /*!< Traffic congestion forecast withdrawn */ + event_congestion_heavy_traffic, /*!< Heavy traffic with average speeds of `speed` */ + event_congestion_long_queue, /*!< Long queues with average speeds of `speed` */ + event_congestion_none, /*!< No problems to report */ + event_congestion_normal_traffic, /*!< Traffic has returned to normal */ + event_congestion_queue, /*!< Queuing traffic with average speeds of `speed` */ + event_congestion_queue_likely, /*!< Danger of queuing traffic with average speeds + * of `speed` */ + event_congestion_slow_traffic, /*!< Slow traffic with average speeds of `speed` */ + event_congestion_stationary_traffic, /*!< Stationary traffic (frequent standstills) */ + event_congestion_stationary_traffic_likely, /*!< Danger of stationary traffic */ + event_congestion_traffic_building_up, /*!< Traffic building up with average speeds of + * `speed` */ + event_congestion_traffic_congestion, /*!< Traffic congestion with average speeds of + * `speed` */ + event_congestion_traffic_easing, /*!< Traffic easing */ + event_congestion_traffic_flowing_freely, /*!< Traffic flowing freely with average speeds + * of `speed` */ + event_congestion_traffic_heavier_than_normal, /*!< Traffic heavier than normal with average + * speeds of `speed` */ + event_congestion_traffic_lighter_than_normal, /*!< Traffic lighter than normal with average + * speeds of `speed` */ + event_congestion_traffic_much_heavier_than_normal, /*!< Traffic very much heavier than normal with + * average speeds of `speed` (increased density + * but no significant decrease in speed) */ + event_congestion_traffic_problem, /*!< Traffic problem */ + event_delay_clearance, /*!< Delays cleared */ + event_delay_delay, /*!< Delays up to `q_timespan` */ + event_delay_delay_possible, /*!< Delays up to `q_timespan` possible */ + event_delay_forecast_withdrawn, /*!< Delay forecast withdrawn */ + event_delay_long_delay, /*!< Long delays up to `q_timespan` */ + event_delay_several_hours, /*!< Delays of several hours */ + event_delay_uncertain_duration, /*!< Delays of uncertain duration */ + event_delay_very_long_delay, /*!< Very long delays up to `q_timespan` */ + event_restriction_access_restrictions_lifted, /*!< Traffic restrictions lifted: reopened for all + * traffic, other restrictions (overtaking etc.) + * remain in place */ + event_restriction_all_carriageways_cleared, /*!< All carriageways cleared */ + event_restriction_all_carriageways_reopened, /*!< All carriageways reopened */ + event_restriction_batch_service, /*!< Batch service (to limit the amount of traffic + * passing through a section, unlike single + * alternate line traffic) */ + event_restriction_blocked, /*!< Blocked (refers to the entire road; separate + * codes exist for blockages of individual lanes + * or carriageways) */ + event_restriction_blocked_ahead, /*!< Blocked ahead (at a point beyond the + * indicated location) */ + event_restriction_carriageway_blocked, /*!< Carriageway blocked (main carriageway, unless + * otherwise indicated in supplementary information) */ + event_restriction_carriageway_closed, /*!< Carriageway closed (main carriageway, unless + * otherwise indicated in supplementary information) */ + event_restriction_contraflow, /*!< Contraflow */ + event_restriction_closed, /*!< Closed until `q_time` (refers to the entire + * road; separate codes exist for closures of + * individual lanes or carriageways) */ + event_restriction_closed_ahead, /*!< Closed ahead (at a point beyond the indicated + * location) */ + event_restriction_entry_blocked, /*!< `q_int` th entry slip road blocked */ + event_restriction_entry_reopened, /*!< Entry reopened */ + event_restriction_exit_blocked, /*!< `q_int` th exit slip road blocked */ + event_restriction_exit_reopened, /*!< Exit reopened */ + event_restriction_intermittent_closures, /*!< Intermittent short term closures */ + event_restriction_lane_blocked, /*!< `q:int` lanes blocked */ + event_restriction_lane_closed, /*!< `q:int` lanes closed */ + event_restriction_open, /*!< Open */ + event_restriction_ramp_blocked, /*!< Ramps blocked */ + event_restriction_ramp_closed, /*!< Ramps closed */ + event_restriction_ramp_reopened, /*!< Ramps reopened */ + event_restriction_reduced_lanes, /*!< Carriageway reduced from `q_ints[1]` lanes to `q_int[0]` + * lanes (quantifiers are currently not implemented for this + * event type) */ + event_restriction_reopened, /*!< Reopened */ + event_restriction_road_cleared, /*!< Road cleared */ + event_restriction_single_alternate_line_traffic, /*!< Single alternate line traffic (because the + * affected stretch of road can only be used in + * one direction at a time, different from batch + * service) */ + event_restriction_speed_limit, /*!< Speed limit `speed` in force */ + event_restriction_speed_limit_lifted, /*!< Speed limit lifted */ +}; + +/** + * @brief The directionality of a location. + */ +enum location_dir { + location_dir_one = 1, /*!< Indicates a unidirectional location. */ + location_dir_both = 2, /*!< Indicates a bidirectional location. */ +}; + +/** + * @brief The fuzziness of a location. + */ +enum location_fuzziness { + location_fuzziness_none = 0, /*!< No fuzziness information is given. */ + location_fuzziness_low_res, /*!< Locations are constrained to a predefined table; the actual + * extent of the condition may be shorter than indicated. */ + location_fuzziness_end_unknown, /*!< The end is unknown, e.g. a traffic jam reported by a driver + * who has just entered it. */ + location_fuzziness_start_unknown, /*!< The start is unknown, e.g. a traffic jam reported by a driver + who has just passed the obstruction which caused it. */ + location_fuzziness_extent_unknown, /*!< Start and end are unknown, e.g. a traffic jam reported by a + driver who is in the middle of it. */ +}; + +/** + * @brief Whether a location refers to the main carriageway or the ramps. + */ +enum location_ramps { + location_ramps_none = 0, /*!< The location refers to the carriageways of the main road. */ + location_ramps_all, /*!< The location refers to the entry and exit ramps, not the main carriageway. */ + location_ramps_entry, /*!< The location refers to the entry ramps only, not the main carriageway. */ + location_ramps_exit, /*!< The location refers to the exit ramps only, not the main carriageway. */ +}; + +/** + * @brief Classes for supplementary information items. + */ +enum si_class { + si_class_invalid = 0, /*!< Invalid supplementary information item which should be ignored */ + si_class_place, /*!< Qualifiers specifying the place(s) to which the event refers */ + si_class_tendency, /*!< Traffic density development */ + si_class_vehicle, /*!< Specifies categories of vehicles to which the event applies */ +}; + +/** + * @brief Supplementary information types. + */ +enum si_type { + si_invalid = 0, /*!< Invalid supplementary information item which should be ignored */ + si_place_bridge, /*!< On bridges */ + si_place_ramp, /*!< On ramps (entry/exit) */ + si_place_roadworks, /*!< In the roadworks area */ + si_place_tunnel, /*!< In tunnels */ + si_tendency_queue_decreasing, /*!< Traffic queue length decreasing (average rate in optional `q_speed`) */ + si_tendency_queue_increasing, /*!< Traffic queue length increasing (average rate in optional `q_speed`) */ + si_vehicle_all, /*!< For all vehicles */ + si_vehicle_bus, /*!< For buses only (TODO currently supported for public buses only) */ + si_vehicle_car, /*!< For cars only */ + si_vehicle_car_with_caravan, /*!< For cars with caravans only (TODO currently not supported) */ + si_vehicle_car_with_trailer, /*!< For cars with trailers only (TODO currently not supported) */ + si_vehicle_hazmat, /*!< For hazardous loads only */ + si_vehicle_hgv, /*!< For heavy trucks only */ + si_vehicle_motor, /*!< For all motor vehicles */ + si_vehicle_with_trailer, /*!< For vehicles with trailers only (TODO currently not supported) */ +}; + +struct traffic_priv; +struct traffic_location_priv; +struct traffic_message_priv; + +/** + * @brief Holds all functions a traffic plugin has to implement to be usable + * + * This structure holds pointers to a traffic plugin's functions which navit's core will call + * to communicate with the plugin. + */ +struct traffic_methods { + struct traffic_message **(* get_messages)(struct traffic_priv * this_); /**< Retrieves new messages from the traffic plugin */ +}; + +/** + * @brief A point on the road. + * + * This can either be a point location or an endpoint of a linear location. It specifies a coordinate + * pair and can optionally be supplemented with a junction name and/or number where applicable. + */ +struct traffic_point { + struct coord_geo coord; /*!< The coordinates of this point, as supplied by the source. These may + * deviate somewhat from the coordinates on the map. */ + char * junction_name; /*!< The name of the motorway junction this point refers to. */ + char * junction_ref; /*!< The reference number of the motorway junction this point refers to. */ + char * tmc_id; /*!< The TMC identifier of the point, if the location was obtained via TMC. + * This can be an LCID (12345) or a combination of an LCID and an offset + * (12345+2, i.e. an offset of 2 points in positive direction from 12345). + * The offset is typically used with the secondary location in TMC. */ +}; + +/** + * @brief Location data for a traffic message. + * + * Locations can be either point or linear locations. + * + * Linear locations are indicated by a pair of points and refer to a stretch of road. The entire + * location must be part of the same road, i.e. either the road name or the road reference must be the + * same for all affected segments, or all segments must be of the same type and be of a higher order + * than any road connecting to them directly. + * + * Point locations are indicated by a single point, as well as one or two auxiliary points to indicate + * direction. Auxiliary points can be omitted if `tmc_table`, `tmc_direction` and + * `at->tmc_id` are supplied. However, this will only work if the map has accurate TMC data for + * the location, thus it is recommended to supply an auxiliary point nonetheless. + * + * The order of points is as a driver would encounter them, i.e. first `from`, then `at`, + * finally `to`. + */ +struct traffic_location { + struct traffic_point * at; /*!< The point for a point location, NULL for linear locations. */ + struct traffic_point * from; /*!< The start of a linear location, or a point before `at`. */ + struct traffic_point * to; /*!< The end of a linear location, or a point after `at`. */ + struct traffic_point * via; /*!< A point between `from` and `to`. Required on ring roads + * unless `not_via` is used; cannot be used together with `at`. */ + struct traffic_point * not_via; /*!< A point NOT between `from` and `to`. Required on ring roads + * unless `via` is used; cannot be used together with `at`. */ + char * destination; /*!< A destination, preferably the one given on road signs, + * indicating that the message applies only to traffic going in + * that direction. Do not use for bidirectional locations. */ + char * direction; /*!< A compass direction indicating the direction of travel which + * this location refers to. Do not use where ambiguous. */ + enum location_dir directionality; /*!< Indicates whether the message refers to one or both directions + * of travel. */ + enum location_fuzziness fuzziness; /*!< Indicates how precisely the end points are known. */ + enum location_ramps ramps; /*!< Any value other than `location_ramps_none` implies + * that only the specified ramps are affected while the main + * road is not. In that case, the `road*` fields refer to + * the main road served by the ramp, not the ramp itself. This + * is mainly intended for compatibility with TMC, where + * junctions with all their ramps are represented by a single + * point. Other sources should use coordinate pairs instead. */ + enum item_type road_type; /*!< The importance of the road within the road network, must be a + * road item type. Use `line_unspecified` if not known or + * not consistent. */ + char * road_name; /*!< A road name, if consistent throughout the location. */ + char * road_ref; /*!< A road number, if consistent throughout the location. */ + char * tmc_table; /*!< For messages received via TMC, the country identifier (CID) + * and location table number (LTN or TABCD) for the location + * table to be used for location lookup. The CID is the decimal + * number stored in the COUNTRIES and LOCATIONDATASETS tables, + * not the hexadecimal code from the PI (known as CCD in TMC). */ + int tmc_direction; /*!< For messages received via TMC, the direction of the road to + * which this message applies (positive or negative). Ignored + * for bidirectional messages. */ + struct traffic_location_priv * priv; /*!< Internal data, not exposed via the API */ +}; + +/** + * @brief A quantifier, which can be used with events and supplementary information. + */ +/* + * For now, these are various integer types, but other types may be added in the future. + */ +struct quantifier { + union { + int q_duration; /*!< A duration in 1/10 of a second. */ + int q_int; /*!< An integer. */ + int q_speed; /*!< A speed in km/h. */ + unsigned int q_time; /*!< A timestamp in epoch time (seconds elapsed since Jan 1, 1970, 00:00 UTC). */ + } u; +}; + +/** + * @brief Extra information supplied with a traffic event. + */ +struct traffic_suppl_info { + enum si_class si_class; /*!< The supplementary information class (generic category). */ + enum si_type type; /*!< The supplementary information type, which can be mapped to a + * string to be displayed to the user. */ + struct quantifier * quantifier; /*!< Additional quantifier for supplementary information types + * allowing this. Data type and meaning depends on the event type. */ +}; + +/** + * @brief A traffic event. + * + * An event refers to a condition, its cause or its effect. + */ +struct traffic_event { + enum event_class event_class; /*!< The event class (generic category). */ + enum event_type type; /*!< The event type, which can be mapped to a string to be displayed + * to the user. */ + int length; /*!< The length of the affected route in meters. */ + int speed; /*!< The speed in km/h at which vehicles can expect to pass through the + * affected stretch of road (either a temporary speed limit or + * average speed in practice, whichever is less), `INT_MAX` if + * not set or unknown. */ + struct quantifier * quantifier; /*!< Additional quantifier for events allowing this. Data type and + * meaning depends on the event type. */ + int si_count; /*!< Number of supplementary information items in `si_count`. */ + struct traffic_suppl_info ** si; /*!< Points to an array of pointers to supplementary information items. */ +}; + +/** + * @brief A traffic message. + * + * A message is the atomic element of traffic information, referring to a particular condition at a + * given location. + * + * If no updates are received for a message, it should be discarded after both `expiration_time` + * and `end_time` (if specified) have elapsed. + */ +struct traffic_message { + char * id; /*!< An identifier, which remains stable over the entire lifecycle of the + * message. The colon (:) is a reserved character to separate different + * levels of source identifiers from each other and from the local + * message identifier. */ + time_t receive_time; /*!< When the message was first received by the source, should be kept + * stable across all updates. */ + time_t update_time; /*!< When the last update to this message was received by the source. */ + time_t expiration_time; /*!< How long the message should be considered valid.*/ + time_t start_time; /*!< When the condition is expected to begin (optional, 0 if not set). */ + time_t end_time; /*!< How long the condition is expected to last (optional, 0 if not set). */ + int is_cancellation; /*!< If true, this message is a cancellation message, indicating that + * existing messages with the same ID should be deleted or no longer + * considered current. All other attributes of a cancellation message + * should be ignored. */ + int is_forecast; /*!< If false, the message describes a current situation. If true, it + * describes an expected situation in the future. */ + int replaced_count; /*!< The number of entries in `replaces`. */ + char ** replaces; /*!< Points to an array of identifiers of messages which the current + * message replaces. */ + struct traffic_location * location; /*!< The location to which this message refers. */ + int event_count; /*!< The number of events in `events`. */ + struct traffic_event ** events; /*!< Points to an array of pointers to the events for this message. */ + struct traffic_message_priv * priv; /*!< Internal data, not exposed via the API */ +}; + +struct map; +struct mapset; +struct traffic; + +/** + * @brief Creates an event class from its string representation. + * + * @param string The string representation (case is ignored) + * + * @return The corresponding `enum event_class`, or `event_class_invalid` if `string` does not match a + * known identifier + */ +enum event_class event_class_new(char * string); + +/** + * @brief Translates an event class to its string representation. + * + * @return The string representation of the event class + */ +const char * event_class_to_string(enum event_class this_); + +/** + * @brief Creates an event type from its string representation. + * + * @param string The string representation (case is ignored) + * + * @return The corresponding `enum event_type`, or `event_invalid` if `string` does not match a known + * identifier + */ +enum event_type event_type_new(char * string); + +/** + * @brief Translates an event type to its string representation. + * + * @return The string representation of the event type + */ +const char * event_type_to_string(enum event_type this_); + +/** + * @brief Creates an item type from a road type. + * + * This is guaranteed to return either a routable type (i.e. `route_item_first <= type <= route_item_last`) + * or `type_line_unspecified`. The latter is also returned if `string` refers to a Navit item type which + * is not routable. + * + * @param string A TraFF road type or the string representation of a Navit item type + * @param is_urban Whether the road is in a built-up area (ignored if `string` is a Navit item type) + * + * @return The corresponding `enum item_type`, or `type_line_unspecified` if `string` does not match a + * known and routable identifier + */ +enum item_type item_type_from_road_type(char * string, int is_urban); + +/** + * @brief Creates a location directionality from its string representation. + * + * @param string The string representation (case is ignored) + * + * @return The corresponding `enum location_dir`, or `location_dir_both` if `string` does + * not match a known identifier + */ +enum location_dir location_dir_new(char * string); + +/** + * @brief Creates a location fuzziness from its string representation. + * + * @param string The string representation (case is ignored) + * + * @return The corresponding `enum location_fuzziness`, or `location_fuzziness_none` if `string` does + * not match a known identifier + */ +enum location_fuzziness location_fuzziness_new(char * string); + +/** + * @brief Translates location fuzziness to its string representation. + * + * @return The string representation of the location fuzziness, or NULL for `location_fuzziness_none` + */ +const char * location_fuzziness_to_string(enum location_fuzziness this_); + +/** + * @brief Creates an `enum location_ramps` from its string representation. + * + * @param string The string representation (case is ignored) + * + * @return The corresponding `enum location_ramps`, or `location_ramps_none` if `string` does + * not match a known identifier + */ +enum location_ramps location_ramps_new(char * string); + +/** + * @brief Translates an `enum location_ramps` to its string representation. + * + * @return The string representation + */ +const char * location_ramps_to_string(enum location_ramps this_); + +/** + * @brief Creates a supplementary information class from its string representation. + * + * @param string The string representation (case is ignored) + * + * @return The corresponding `enum si_class`, or `si_class_invalid` if `string` does not match a + * known identifier + */ +enum si_class si_class_new(char * string); + +/** + * @brief Translates a supplementary information class to its string representation. + * + * @return The string representation of the supplementary information class + */ +const char * si_class_to_string(enum si_class this_); + +/** + * @brief Creates a supplementary information type from its string representation. + * + * @param string The string representation (case is ignored) + * + * @return The corresponding `enum si_type`, or `si_invalid` if `string` does not match a known + * identifier + */ +enum si_type si_type_new(char * string); + +/** + * @brief Translates a supplementary information type to its string representation. + * + * @return The string representation of the supplementary information type + */ +const char * si_type_to_string(enum si_type this_); + +/** + * @brief Creates a new `traffic_point`. + * + * It is the responsibility of the caller to destroy all references passed to this function. This can be + * done immediately after the function returns. + * + * @param lon The longitude, as reported by the source, in GPS coordinates + * @param lat The latitude, as reported by the source, in GPS coordinates + * @param junction_name The name of the motorway junction this point refers to, NULL if not applicable + * @param junction_ref The reference number of the motorway junction this point refers to, NULL if not applicable + * @param tmc_id The TMC identifier of the point, if the location was obtained via TMC, or NULL if not applicable + */ +struct traffic_point * traffic_point_new(float lon, float lat, char * junction_name, char * junction_ref, + char * tmc_id); + +/** + * @brief Creates a new `traffic_point`. + * + * This is the short version of the constructor, which sets only mandatory members. Other members can be + * set after the instance is created. + * + * @param lon The longitude, as reported by the source, in GPS coordinates + * @param lat The latitude, as reported by the source, in GPS coordinates + */ +struct traffic_point * traffic_point_new_short(float lon, float lat); + +/** + * @brief Destroys a `traffic_point`. + * + * This will release the memory used by the `traffic_point` and all related data. + * + * A `traffic_point` is usually destroyed together with its parent `traffic_location`, thus + * it is usually not necessary to call this destructor directly. + * + * @param this_ The point + */ +void traffic_point_destroy(struct traffic_point * this_); + +/** + * @brief Creates a new `traffic_location`. + * + * The `traffic_point` instances are destroyed when the `traffic_location` is destroyed, and + * therefore cannot be shared between multiple `traffic_location` instances. + * + * It is the responsibility of the caller to destroy all other references passed to this function. This + * can be done immediately after the function returns. + * + * If `at` is non-NULL, the location is a point location, and `from` and `to` are + * interpreted as auxiliary locations. + * + * Of `from` and `to`, one is mandatory for a unidirectional point location; both are + * mandatory for a linear location. + * + * `ramps` is mainly intended for compatibility with TMC, where junctions with all their ramps are + * represented by a single point. Other sources should use coordinate pairs instead. + * + * @param at The coordinates for a point location, NULL for a linear location + * @param from The start of a linear location, or a point before `at` + * @param to The end of a linear location, or a point after `at` + * @param via A point between `from` and `to`, needed only on ring roads + * @param not_via A point not between `from` and `to`, needed only on ring roads + * @param destination A destination, preferably the one given on road signs, indicating that the message + * applies only to traffic going in that direction; can be NULL, do not use for bidirectional locations + * @param direction A compass direction indicating the direction of travel which this location refers to; + * can be NULL, do not use where ambiguous + * @param directionality Whether the location is unidirectional or bidirectional + * @param fuzziness A precision indicator for `from` and `to` + * @param ramps Whether the main carriageway or the ramps are affected + * @param road_type The importance of the road within the road network, must be a road item type, + * `type_line_unspecified` if not known or not consistent + * @param road_name A road name, if consistent throughout the location; NULL if not known or inconsistent + * @param road_ref A road number, if consistent throughout the location; NULL if not known or inconsistent + * @param tmc_table For messages received via TMC, the CID and LTN; NULL otherwise + * @param tmc_direction For messages received via TMC, the direction of the road; ignored for + * bidirectional or non-TMC messages + */ +// TODO split CID/LTN? +struct traffic_location * traffic_location_new(struct traffic_point * at, struct traffic_point * from, + struct traffic_point * to, struct traffic_point * via, struct traffic_point * not_via, + char * destination, char * direction, enum location_dir directionality, + enum location_fuzziness fuzziness, enum location_ramps ramps, enum item_type road_type, + char * road_name, char * road_ref, char * tmc_table, int tmc_direction); + +/** + * @brief Creates a new `traffic_location`. + * + * This is the short version of the constructor, which sets only mandatory members. Other members can be + * set after the instance is created. + * + * The `traffic_point` instances are destroyed when the `traffic_location` is destroyed, and + * therefore cannot be shared between multiple `traffic_location` instances. + * + * If `at` is non-NULL, the location is a point location, and `from` and `to` are + * interpreted as auxiliary locations. + * + * Of `from` and `to`, one is mandatory for a unidirectional point location; both are + * mandatory for a linear location. + * + * @param at The coordinates for a point location, NULL for a linear location + * @param from The start of a linear location, or a point before `at` + * @param to The end of a linear location, or a point after `at` + * @param via A point between `from` and `to`, needed only on ring roads + * @param not_via A point not between `from` and `to`, needed only on ring roads + * @param directionality Whether the location is unidirectional or bidirectional + * @param fuzziness A precision indicator for `from` and `to` + */ +struct traffic_location * traffic_location_new_short(struct traffic_point * at, struct traffic_point * from, + struct traffic_point * to, struct traffic_point * via, struct traffic_point * not_via, + enum location_dir directionality, enum location_fuzziness fuzziness); + +/** + * @brief Destroys a `traffic_location`. + * + * This will release the memory used by the `traffic_location` and all related data. + * + * A `traffic_location` is usually destroyed together with its parent `traffic_message`, thus + * it is usually not necessary to call this destructor directly. + * + * @param this_ The location + */ +void traffic_location_destroy(struct traffic_location * this_); + +/** + * @brief Creates a new `traffic_suppl_info`. + * + * It is the responsibility of the caller to destroy all references passed to this function. This can be + * done immediately after the function returns. + * + * @param si_class The supplementary information class (generic category) + * @param type The supplementary information type, which can be mapped to a string to be displayed to + * the user + * @param quantifier Additional quantifier for supplementary information types allowing this, or NULL + */ +struct traffic_suppl_info * traffic_suppl_info_new(enum si_class si_class, enum si_type type, + struct quantifier * quantifier); + +/** + * @brief Destroys a `traffic_suppl_info`. + * + * This will release the memory used by the `traffic_suppl_info` and all related data. + * + * A `traffic_suppl_info` is usually destroyed together with its parent `traffic_event`, thus + * it is usually not necessary to call this destructor directly. + * + * @param this_ The supplementary information item + */ +void traffic_suppl_info_destroy(struct traffic_suppl_info * this_); + +/** + * @brief Creates a new `traffic_event`. + * + * The `traffic_suppl_info` instances are destroyed when the `traffic_event` is destroyed, and + * therefore cannot be shared between multiple `traffic_event` instances. + * + * It is the responsibility of the caller to destroy all other references passed to this function + * (including the `si` buffer but not the `traffic_suppl_info` instances). This can be done + * immediately after the function returns. + * + * @param event_class The event class (generic category) + * @param type The event type, which can be mapped to a string to be displayed to the user + * @param length The length of the affected route in meters, -1 if not known + * @param speed The speed in km/h at which vehicles can expect to pass through the affected stretch of + * road (either a temporary speed limit or average speed in practice, whichever is less); INT_MAX if unknown + * @param quantifier Additional quantifier for supplementary information types allowing this, or NULL + * @param si_count Number of supplementary information items in `si_count` + * @param si Points to an array of pointers to supplementary information items + */ +struct traffic_event * traffic_event_new(enum event_class event_class, enum event_type type, + int length, int speed, struct quantifier * quantifier, int si_count, struct traffic_suppl_info ** si); + +/** + * @brief Creates a new `traffic_event`. + * + * This is the short version of the constructor, which sets only mandatory members. Other members can be + * set after the instance is created. + * + * @param event_class The event class (generic category) + * @param type The event type, which can be mapped to a string to be displayed to the user + */ +struct traffic_event * traffic_event_new_short(enum event_class event_class, enum event_type type); + +/** + * @brief Destroys a `traffic_event`. + * + * This will release the memory used by the `traffic_event` and all related data. + * + * A `traffic_event` is usually destroyed together with its parent `traffic_message`, thus + * it is usually not necessary to call this destructor directly. + * + * @param this_ The event + */ +void traffic_event_destroy(struct traffic_event * this_); + +/** + * @brief Adds a supplementary information item to an event. + * + * The `traffic_suppl_info` instance is destroyed when the `traffic_event` is destroyed, and + * therefore cannot be shared between multiple `traffic_event` instances. + * + * @param this_ The event + * @param si The supplementary information item + */ +void traffic_event_add_suppl_info(struct traffic_event * this_, struct traffic_suppl_info * si); + +/** + * @brief Retrieves a supplementary information item associated with an event. + * + * @param this_ The event + * @param index The index of the supplementary information item, zero-based + * @return The supplementary information item at the specified position, or NULL if out of bounds + */ +struct traffic_suppl_info * traffic_event_get_suppl_info(struct traffic_event * this_, int index); + +/** + * @brief Creates a new `traffic_message`. + * + * The `traffic_event` and `traffic_location` instances are destroyed when the + * `traffic_message` is destroyed, and therefore cannot be shared between multiple + * `traffic_message` instances. + * + * It is the responsibility of the caller to destroy all other references passed to this function + * (including the `events` buffer but not the `traffic_event` instances). This can be done + * immediately after the function returns. + * + * @param id The message identifier; existing messages with the same identifier will be replaced by the + * new message + * @param receive_time When the message was first received by the source, should be kept stable across + * all updates + * @param update_time When the last update to this message was received by the source + * @param expiration_time How long the message should be considered valid + * @param start_time When the condition is expected to begin (optional, 0 if not set) + * @param end_time How long the condition is expected to last (optional, 0 if not set) + * @param isCancellation If true, create a cancellation message (existing messages with the same ID + * should be deleted or no longer considered current, and all other attributes ignored) + * @param isForecast If false, the message describes a current situation; if true, it describes an + * expected situation in the future + * @param replaced_count The number of entries in `replaces` + * @param replaces Points to an array of identifiers of messages which the current message replaces + * @param location The location to which this message refers + * @param event_count The number of events in `events` + * @param events Points to an array of pointers to the events for this message + */ +struct traffic_message * traffic_message_new(char * id, time_t receive_time, time_t update_time, + time_t expiration_time, time_t start_time, time_t end_time, int is_cancellation, int is_Forecast, + int replaced_count, char ** replaces, struct traffic_location * location, int event_count, + struct traffic_event ** events); + +/** + * @brief Creates a new `traffic_message`. + * + * This is the short version of the constructor, which sets only mandatory members. Other members can be + * set after the instance is created. + * + * The `traffic_event` and `traffic_location` instances are destroyed when the + * `traffic_message` is destroyed, and therefore cannot be shared between multiple + * `traffic_message` instances. + * + * It is the responsibility of the caller to destroy all other references passed to this function + * (including the `events` buffer but not the `traffic_event` instances). This can be done + * immediately after the function returns. + * + * @param id The message identifier; existing messages with the same identifier will be replaced by the + * new message + * @param receive_time When the message was first received by the source, should be kept stable across + * all updates + * @param update_time When the last update to this message was received by the source + * @param expiration_time How long the message should be considered valid + * @param is_forecast If false, the message describes a current situation; if true, it describes an + * expected situation in the future + * @param location The location to which this message refers + * @param event_count The number of events in `events` + * @param events Points to an array of pointers to the events for this message + */ +struct traffic_message * traffic_message_new_short(char * id, time_t receive_time, time_t update_time, + time_t expiration_time, int is_forecast, struct traffic_location * location, + int event_count, struct traffic_event ** events); + +/** + * @brief Creates a new single-event `traffic_message`. + * + * This is a convenience constructor, which sets only mandatory members. Other members can be + * set after the instance is created. + * + * The `traffic_location` instances are destroyed when the `traffic_message` is destroyed, + * and therefore cannot be shared between multiple `traffic_message` instances. + * + * It is the responsibility of the caller to destroy all other references passed to this function. This + * can be done immediately after the function returns. + * + * @param id The message identifier; existing messages with the same identifier will be replaced by the + * new message + * @param receive_time When the message was first received by the source, should be kept stable across + * all updates + * @param update_time When the last update to this message was received by the source + * @param expiration_time How long the message should be considered valid + * @param is_forecast If false, the message describes a current situation; if true, it describes an + * expected situation in the future + * @param location The location to which this message refers + * @param event_class The event class (generic category) + * @param type The event type, which can be mapped to a string to be displayed to the user + */ +struct traffic_message * traffic_message_new_single_event(char * id, time_t receive_time, time_t update_time, + time_t expiration_time, int is_forecast, struct traffic_location * location, + enum event_class event_class, enum event_type type); + +/** + * @brief Creates a new cancellation `traffic_message`. + * + * This is a convenience constructor, which creates a cancellation message, without the need to supply + * members which are not required for cancellation messages. Upon receiving a cancellation message, + * existing messages with the same ID should be deleted or no longer considered current, and all other + * attributes ignored. + * + * The `traffic_location` instances are destroyed when the `traffic_message` is destroyed, + * and therefore cannot be shared between multiple `traffic_message` instances. + * + * It is the responsibility of the caller to destroy all other references passed to this function. This + * can be done immediately after the function returns. + * + * @param id The message identifier; existing messages with the same identifier will be replaced by the + * new message + * @param receive_time When the message was first received by the source, should be kept stable across + * all updates + * @param update_time When the last update to this message was received by the source + * @param expiration_time How long the message should be considered valid + * @param location The location to which this message refers + */ +struct traffic_message * traffic_message_new_cancellation(char * id, time_t receive_time, time_t update_time, + time_t expiration_time, struct traffic_location * location); + +/** + * @brief Destroys a `traffic_message`. + * + * This will release the memory used by the `traffic_message` and all related data. + * + * A `traffic_message` is usually destroyed by the traffic plugin, thus it is usually not + * necessary to call this destructor directly. + * + * @param this_ The message + */ +void traffic_message_destroy(struct traffic_message * this_); + +/** + * @brief Adds an event to a message. + * + * The `traffic_event` instance is destroyed when the `traffic_message` is destroyed, and + * therefore cannot be shared between multiple `traffic_message` instances. + * + * @param this_ The message + * @param event The event to add to this message + */ +void traffic_message_add_event(struct traffic_message * this_, struct traffic_event * event); + +/** + * @brief Retrieves an event associated with a message. + * + * @param this_ The message + * @param index The index of the event, zero-based + * @return The event at the specified position, or NULL if out of bounds + */ +struct traffic_event * traffic_message_get_event(struct traffic_message * this_, int index); + +/** + * @brief Returns the items associated with a message. + * + * Note that no map rectangle is required to obtain traffic items. This behavior is particular to traffic items, which + * do not rely on a map rectangle. Items obtained from other maps may behave differently. + * + * @param this_ The message + * + * @return Items as a NULL-terminated array. The caller is responsible for freeing the array (not its elements) when it + * is no longer needed. This method will always return a valid pointer—if no items are associated with the message, an + * empty array (with just one single NULL element) will be returned. No particular order is guaranteed for the items. + */ +struct item ** traffic_message_get_items(struct traffic_message * this_); + +/** + * @brief Initializes the traffic plugin. + * + * This function is called once on startup. + */ +void traffic_init(void); + +/** + * @brief Reads previously stored traffic messages from an XML file. + * + * @param this_ The traffic instance + * @param filename The full path to the XML file to parse + * + * @return A `NULL`-terminated pointer array. Each element points to one `struct traffic_message`. + * `NULL` is returned (rather than an empty pointer array) if there are no messages to report. + */ +struct traffic_message ** traffic_get_messages_from_xml_file(struct traffic * this_, char * filename); + +/** + * @brief Reads traffic messages from an XML string. + * + * @param this_ The traffic instance + * @param filename The XML document to parse, as a string + * + * @return A `NULL`-terminated pointer array. Each element points to one `struct traffic_message`. + * `NULL` is returned (rather than an empty pointer array) if there are no messages to report. + */ +struct traffic_message ** traffic_get_messages_from_xml_string(struct traffic * this_, char * xml); + +/** + * @brief Returns the map for the traffic plugin. + * + * The map is created by the first traffic plugin loaded. If multiple traffic plugin instances are + * active at the same time, they share the map created by the first instance. + * + * @param this_ The traffic plugin instance + * + * @return The traffic map + */ +struct map * traffic_get_map(struct traffic *this_); + +/** + * @brief Returns currently active traffic messages. + * + * If multiple plugin instances are active, this will give the same result for any plugin, as traffic messages are + * shared between instances. + * + * @param this_ The traffic plugin instance + * + * @return A null-terminated array of traffic messages. The caller is responsible for freeing the array (not its + * elements) when it is no longer needed. This method will always return a valid pointer—if the message store is empty, + * an empty array (with just one single NULL element) will be returned. + */ +struct traffic_message ** traffic_get_stored_messages(struct traffic *this_); + +/** + * @brief Processes new traffic messages. + * + * Calling this method delivers new messages in a “push” manner (as opposed to the “pull” fashion of + * calling a plugin method). + * + * Messages which are past their expiration timestamp are skipped, and the flags in the return value + * are set only if at least one valid message is found. + * + * @param this_ The traffic instance + * @param messages The new messages + */ +void traffic_process_messages(struct traffic * this_, struct traffic_message ** messages); + +/** + * @brief Sets the mapset for the traffic plugin. + * + * This sets the mapset from which the segments affected by a traffic report will be retrieved. + * + * @param this_ The traffic plugin instance + * @param ms The mapset + */ +void traffic_set_mapset(struct traffic *this_, struct mapset *ms); + +/** + * @brief Sets the route for the traffic plugin. + * + * This sets the route which may get notified by the traffic plugin if traffic distortions change. + */ +void traffic_set_route(struct traffic *this_, struct route *rt); + +/* end of prototypes */ +#ifdef __cplusplus +} +#endif + +#endif diff --git a/navit/traffic/dummy/CMakeLists.txt b/navit/traffic/dummy/CMakeLists.txt new file mode 100644 index 000000000..83df03b51 --- /dev/null +++ b/navit/traffic/dummy/CMakeLists.txt @@ -0,0 +1 @@ +module_add_library(traffic_dummy traffic_dummy.c) diff --git a/navit/traffic/dummy/traffic_dummy.c b/navit/traffic/dummy/traffic_dummy.c new file mode 100644 index 000000000..b838752dc --- /dev/null +++ b/navit/traffic/dummy/traffic_dummy.c @@ -0,0 +1,190 @@ +/** + * Navit, a modular navigation system. + * Copyright (C) 2005-2017 Navit Team + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +/** + * @file traffic_dummy.c + * + * @brief A dummy traffic plugin. + * + * This is a dummy plugin to test the traffic framework. + */ + +#include <string.h> +#include <time.h> + +#ifdef _POSIX_C_SOURCE +#include <sys/types.h> +#endif +#include "glib_slice.h" +#include "config.h" +#include "coord.h" +#include "item.h" +#include "xmlconfig.h" +#include "traffic.h" +#include "plugin.h" +#include "debug.h" + +/** + * @brief Stores information about the plugin instance. + */ +struct traffic_priv { + struct navit * nav; /*!< The navit instance */ + int reports_requested; /*!< How many reports have been requested */ +}; + +struct traffic_message ** traffic_dummy_get_messages(struct traffic_priv * this_); + +/** + * @brief Returns a dummy traffic report. + * + * This method will report two messages when first called: The messages indicate queuing traffic on the + * A9 Munich–Nuremberg between Neufahrn and Allershausen, and slow traffic on the A96 Lindau–Munich + * between Gräfelfing and München-Laim. + * + * The 10th call will report an update message for the A9 (with a recent timestamp but otherwise the same + * data) and a cancellation message for the A96. + * + * They mimic TMC messages in that coordinates are approximate, TMC identifiers are supplied for the + * locations and extra data fields which can be inferred from the TMC location table are filled. The + * timestamps indicate a message that has just been received for the first time, i.e. its “first + * received” and “last updated” timestamps match and are recent. Expiration is after 20 seconds for + * messages in the first feed and 10 seconds for messages in the first feed (far below the lowest + * expiration timespan permitted in TMC). + * + * All other calls to this method will return `NULL`, indicating that there are no messages to report. + * + * @return A `NULL`-terminated pointer array. Each element points to one `struct traffic_message`. + * `NULL` is returned (rather than an empty pointer array) if there are no messages to report. + */ +struct traffic_message ** traffic_dummy_get_messages(struct traffic_priv * this_) { + struct traffic_message ** messages; + struct traffic_point * from; + struct traffic_point * to; + struct traffic_point * at; + struct traffic_point * via; + struct traffic_location * location; + + this_->reports_requested++; + + switch (this_->reports_requested) { + case 10: + messages = g_new0(struct traffic_message *, 6); + + from = traffic_point_new(11.6208, 48.3164, "Neufahrn", "68", "12732-4"); + to = traffic_point_new(11.5893, 48.429, "Allershausen", "67", "12732"); + location = traffic_location_new(NULL, from, to, NULL, NULL, "Nürnberg", NULL, location_dir_one, + location_fuzziness_low_res, location_ramps_none, type_highway_land, NULL, "A9", "58:1", -1); + messages[0] = traffic_message_new_single_event("dummy:A9-68-67", time(NULL), time(NULL), + time(NULL) + 86400, 0, location, event_class_congestion, event_congestion_queue); + + from = traffic_point_new(11.4481, 48.1266, "Gräfelfing", "36b", "12961-2"); + to = traffic_point_new(11.5028, 48.1258, "München-Laim", "38", "12961"); + location = traffic_location_new(NULL, from, to, NULL, NULL, "München", NULL, location_dir_one, + location_fuzziness_low_res, location_ramps_none, type_highway_land, NULL, "A96", "58:1", -1); + messages[1] = traffic_message_new_single_event("dummy:A96-36b-38", time(NULL), time(NULL), + time(NULL) + 86400, 0, location, event_class_congestion, event_congestion_slow_traffic); + + from = traffic_point_new(11.6143, 48.15255, "Effnertunnel", NULL, "60922"); + to = traffic_point_new(11.53225, 48.13255, "Trappentreutunnel", NULL, "35333"); + via = traffic_point_new(11.5728, 48.178, "Petueltunnel", NULL, "29829"); + location = traffic_location_new(NULL, from, to, via, NULL, NULL, NULL, location_dir_one, + location_fuzziness_low_res, location_ramps_none, type_line_unspecified, NULL, "B2R", "58:1", 1); + messages[2] = traffic_message_new_single_event("dummy:B2R-N", time(NULL), time(NULL), + time(NULL) + 86400, 0, location, event_class_congestion, event_congestion_slow_traffic); + + from = traffic_point_new(11.6143, 48.15255, "Effnertunnel", NULL, "60922"); + to = traffic_point_new(11.53225, 48.13255, "Trappentreutunnel", NULL, "35333"); + via = traffic_point_new(11.55085, 48.11225, "Brudermühltunnel", NULL, "35329"); + location = traffic_location_new(NULL, from, to, via, NULL, NULL, NULL, location_dir_one, + location_fuzziness_low_res, location_ramps_none, type_line_unspecified, NULL, "B2R", "58:1", -1); + messages[3] = traffic_message_new_single_event("dummy:B2R-S", time(NULL), time(NULL), + time(NULL) + 86400, 0, location, event_class_congestion, event_congestion_slow_traffic); + + from = traffic_point_new(11.6208, 48.3164, "Neufahrn", "68", "12727+5"); + at = traffic_point_new(11.6405, 48.2435, "Garching-Süd", "71", "12727"); + location = traffic_location_new(at, from, NULL, NULL, NULL, NULL, NULL, location_dir_one, + location_fuzziness_low_res, location_ramps_none, type_highway_land, NULL, "A9", "58:1", 1); + messages[4] = traffic_message_new_single_event("dummy:A9-71-S", time(NULL), time(NULL), + time(NULL) + 86400, 0, location, event_class_congestion, event_congestion_slow_traffic); + break; + + case 20: + messages = g_new0(struct traffic_message *, 4); + + from = traffic_point_new(11.6208, 48.3164, "Neufahrn", "68", "12732-4"); + to = traffic_point_new(11.5893, 48.429, "Allershausen", "67", "12732"); + location = traffic_location_new(NULL, from, to, NULL, NULL, "Nürnberg", NULL, location_dir_one, + location_fuzziness_low_res, location_ramps_none, type_highway_land, NULL, "A9", "58:1", -1); + messages[0] = traffic_message_new_single_event("dummy:A9-68-67", time(NULL) - 10, time(NULL), + time(NULL) + 10, 0, location, event_class_congestion, event_congestion_queue); + + from = traffic_point_new(11.4481, 48.1266, "Gräfelfing", "36b", "12961-2"); + to = traffic_point_new(11.5028, 48.1258, "München-Laim", "38", "12961"); + location = traffic_location_new(NULL, from, to, NULL, NULL, "München", NULL, location_dir_one, + location_fuzziness_low_res, location_ramps_none, type_highway_land, NULL, "A96", "58:1", -1); + messages[1] = traffic_message_new_cancellation("dummy:A96-36b-38", time(NULL) - 10, time(NULL), + time(NULL) + 10, location); + break; + + default: + return NULL; + } + + return messages; +} + +/** + * @brief The methods implemented by this plugin + */ +static struct traffic_methods traffic_dummy_meth = { + traffic_dummy_get_messages, +}; + +/** + * @brief Registers a new dummy traffic plugin + * + * @param nav The navit instance + * @param meth Receives the traffic methods + * @param attrs The attributes for the map + * @param cbl + * + * @return A pointer to a `traffic_priv` structure for the plugin instance + */ +static struct traffic_priv * traffic_dummy_new(struct navit *nav, struct traffic_methods *meth, + struct attr **attrs, struct callback_list *cbl) { + struct traffic_priv *ret; + + dbg(lvl_debug, "enter"); + + ret = g_new0(struct traffic_priv, 1); + *meth = traffic_dummy_meth; + + return ret; +} + +/** + * @brief Initializes the traffic plugin. + * + * This function is called once on startup. + */ +void plugin_init(void) { + dbg(lvl_debug, "enter"); + + plugin_register_category_traffic("dummy", traffic_dummy_new); +} diff --git a/navit/traffic/null/CMakeLists.txt b/navit/traffic/null/CMakeLists.txt new file mode 100644 index 000000000..c5edbe691 --- /dev/null +++ b/navit/traffic/null/CMakeLists.txt @@ -0,0 +1 @@ +module_add_library(traffic_null traffic_null.c) diff --git a/navit/traffic/null/traffic_null.c b/navit/traffic/null/traffic_null.c new file mode 100644 index 000000000..94546a666 --- /dev/null +++ b/navit/traffic/null/traffic_null.c @@ -0,0 +1,101 @@ +/** + * Navit, a modular navigation system. + * Copyright (C) 2005-2017 Navit Team + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +/** + * @file traffic_null.c + * + * @brief A null traffic plugin. + * + * This plugin was mainly designed to test the traffic framework. It acts like a traffic plugin but will + * never report any messages. This allows us to have the full traffic functionality without having an + * actual source for traffic messages; useful for injecting messages via DBus. + */ + +#include <string.h> +#include <time.h> + +#ifdef _POSIX_C_SOURCE +#include <sys/types.h> +#endif +#include "glib_slice.h" +#include "config.h" +#include "coord.h" +#include "item.h" +#include "xmlconfig.h" +#include "traffic.h" +#include "plugin.h" +#include "debug.h" + +/** + * @brief Stores information about the plugin instance. + */ +struct traffic_priv { + struct navit * nav; /*!< The navit instance */ +}; + +struct traffic_message ** traffic_null_get_messages(struct traffic_priv * this_); + +/** + * @brief Returns an empty traffic report. + * + * @return Always `NULL` + */ +struct traffic_message ** traffic_null_get_messages(struct traffic_priv * this_) { + return NULL; +} + +/** + * @brief The methods implemented by this plugin + */ +static struct traffic_methods traffic_null_meth = { + traffic_null_get_messages, +}; + +/** + * @brief Registers a new null traffic plugin + * + * @param nav The navit instance + * @param meth Receives the traffic methods + * @param attrs The attributes for the map + * @param cbl + * + * @return A pointer to a `traffic_priv` structure for the plugin instance + */ +static struct traffic_priv * traffic_null_new(struct navit *nav, struct traffic_methods *meth, + struct attr **attrs, struct callback_list *cbl) { + struct traffic_priv *ret; + + dbg(lvl_debug, "enter"); + + ret = g_new0(struct traffic_priv, 1); + *meth = traffic_null_meth; + + return ret; +} + +/** + * @brief Initializes the traffic plugin. + * + * This function is called once on startup. + */ +void plugin_init(void) { + dbg(lvl_debug, "enter"); + + plugin_register_category_traffic("null", traffic_null_new); +} diff --git a/navit/traffic/traff_android/CMakeLists.txt b/navit/traffic/traff_android/CMakeLists.txt new file mode 100644 index 000000000..5e5f06df1 --- /dev/null +++ b/navit/traffic/traff_android/CMakeLists.txt @@ -0,0 +1 @@ +module_add_library(traffic_traff_android traffic_traff_android.c) diff --git a/navit/traffic/traff_android/traffic_traff_android.c b/navit/traffic/traff_android/traffic_traff_android.c new file mode 100644 index 000000000..0bc07ad7f --- /dev/null +++ b/navit/traffic/traff_android/traffic_traff_android.c @@ -0,0 +1,173 @@ +/** + * Navit, a modular navigation system. + * Copyright (C) 2005-2018 Navit Team + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +/** + * @file traffic_traff_android.c + * + * @brief The TraFF plugin for Android + * + * This plugin receives TraFF feeds via Android broadcasts. + */ + +#include <string.h> +#include <time.h> + +#ifdef _POSIX_C_SOURCE +#include <sys/types.h> +#endif +#include "glib_slice.h" +#include "config.h" +#include "item.h" +#include "attr.h" +#include "coord.h" +#include "xmlconfig.h" +#include "android.h" +#include "traffic.h" +#include "plugin.h" +#include "callback.h" +#include "debug.h" + +/** + * @brief Stores information about the plugin instance. + */ +struct traffic_priv { + struct navit * nav; /**< The navit instance */ + struct callback * cbid; /**< The callback function for TraFF feeds **/ + jclass NavitTraffClass; /**< The `NavitTraff` class */ + jobject NavitTraff; /**< An instance of `NavitTraff` */ +}; + +struct traffic_message ** traffic_traff_android_get_messages(struct traffic_priv * this_); + +/** + * @brief Returns an empty traffic report. + * + * @return Always `NULL` + */ +struct traffic_message ** traffic_traff_android_get_messages(struct traffic_priv * this_) { + return NULL; +} + +/** + * @brief The methods implemented by this plugin + */ +static struct traffic_methods traffic_traff_android_meth = { + traffic_traff_android_get_messages, +}; + + +/** + * @brief Called when a new TraFF feed is received. + * + * @param this_ Private data for the module instance + * @param feed Feed data in string form + */ +static void traffic_traff_android_on_feed_received(struct traffic_priv * this_, char * feed) { + struct attr * attr; + struct attr_iter * a_iter; + struct traffic * traffic = NULL; + struct traffic_message ** messages; + + dbg(lvl_debug, "enter"); + attr = g_new0(struct attr, 1); + a_iter = navit_attr_iter_new(); + if (navit_get_attr(this_->nav, attr_traffic, attr, a_iter)) + traffic = (struct traffic *) attr->u.navit_object; + navit_attr_iter_destroy(a_iter); + g_free(attr); + + if (!traffic) { + dbg(lvl_error, "failed to obtain traffic instance"); + return; + } + + dbg(lvl_debug, "processing traffic feed:\n%s", feed); + messages = traffic_get_messages_from_xml_string(traffic, feed); + if (messages) { + dbg(lvl_debug, "got messages from feed, processing"); + traffic_process_messages(traffic, messages); + g_free(messages); + } +} + + +/** + * @brief Initializes a traff_android plugin + * + * @return True on success, false on failure + */ +static int traffic_traff_android_init(struct traffic_priv * this_) { + jmethodID cid; + + if (!android_find_class_global("org/navitproject/navit/NavitTraff", &this_->NavitTraffClass)) + return 0; + cid = (*jnienv)->GetMethodID(jnienv, this_->NavitTraffClass, "<init>", "(Landroid/content/Context;I)V"); + if (cid == NULL) { + dbg(lvl_error,"no method found"); + return 0; /* exception thrown */ + } + this_->NavitTraff=(*jnienv)->NewObject(jnienv, this_->NavitTraffClass, cid, android_activity, + (int) this_->cbid); + dbg(lvl_debug,"result=%p", this_->NavitTraff); + if (!this_->NavitTraff) + return 0; + if (this_->NavitTraff) + this_->NavitTraff = (*jnienv)->NewGlobalRef(jnienv, this_->NavitTraff); + + return 1; +} + + +/** + * @brief Registers a new traff_android traffic plugin + * + * @param nav The navit instance + * @param meth Receives the traffic methods + * @param attrs The attributes for the map + * @param cbl + * + * @return A pointer to a `traffic_priv` structure for the plugin instance + */ +static struct traffic_priv * traffic_traff_android_new(struct navit *nav, struct traffic_methods *meth, + struct attr **attrs, struct callback_list *cbl) { + struct traffic_priv *ret; + + dbg(lvl_debug, "enter"); + + ret = g_new0(struct traffic_priv, 1); + ret->nav = nav; + ret->cbid = callback_new_1(callback_cast(traffic_traff_android_on_feed_received), ret); + /* TODO populate members, if any */ + *meth = traffic_traff_android_meth; + + traffic_traff_android_init(ret); + + return ret; +} + +/** + * @brief Initializes the traffic plugin. + * + * This function is called once on startup. + */ +void plugin_init(void) { + dbg(lvl_debug, "enter"); + + plugin_register_category_traffic("traff_android", traffic_traff_android_new); +} diff --git a/navit/util.c b/navit/util.c index 51bb4db8d..9398e316c 100644 --- a/navit/util.c +++ b/navit/util.c @@ -93,6 +93,245 @@ int navit_utf8_strcasecmp(const char *s1, const char *s2) { return cmpres; } +/** + * @brief Trims all leading and trailing whitespace characters from a string. + * + * Whitespace characters are all up to and including 0x20. + * + * This function operates in-place, i.e. `s` will be modified. + * + * @param s The string to trim + */ +static void strtrim(char *s) { + char *tmp = g_strdup(s); + char *in = tmp; + while (strlen(in) && (in[0] <= 0x20)) + in++; + while (strlen(in) && (in[strlen(in) - 1] <= 0x20)) + in[strlen(in) - 1] = 0; + strcpy(s, in); + g_free(tmp); +} + +/** + * @brief Parser states for `parse_for_systematic_comparison()`. + */ +enum parse_state { + parse_state_whitespace, + parse_state_numeric, + parse_state_alpha, +}; + +/** + * @brief Parses a string for systematic comparison. + * + * This is a helper function for `compare_name_systematic()`. + * + * The string is broken down into numeric and non-numeric parts. Whitespace characters are discarded + * unless they are surrounded by string characters, in which case the whole unit is treated as one + * string part. All strings are converted to lowercase and leading zeroes stripped from numbers. + * + * @param s The string to parse + * + * @return A buffer containing the parsed string, parts delimited by a null character, the last part + * followed by a double null character. + */ +static char * parse_for_systematic_comparison(const char *s) { + char *ret = g_malloc0(strlen(s) * 2 + 1); + const char *in = s; + char *out = ret; + char *part; + enum parse_state state = parse_state_whitespace; + int i = 0; + char c; + + dbg(lvl_debug, "enter\n"); + + while (i < strlen(in)) { + c = in[i]; + if ((c <= 0x20) || (c == ',') || (c == '-') || (c == '.') || (c == '/')) { + /* whitespace */ + if (state == parse_state_numeric) { + part = g_malloc0(i + 1); + strncpy(part, in, i); + sprintf(part, "%d", atoi(part)); + strcpy(out, part); + out += strlen(part) + 1; + dbg(lvl_debug, "part='%s'\n", part); + g_free(part); + in += i; + i = 1; + state = parse_state_whitespace; + } else + i++; + } else if ((c >= '0') && (c <= '9')) { + /* numeric */ + if (state == parse_state_alpha) { + part = g_malloc0(i + 1); + strncpy(part, in, i); + strtrim(part); + strcpy(out, part); + out += strlen(part) + 1; + dbg(lvl_debug, "part='%s'\n", part); + g_free(part); + in += i; + i = 1; + } else + i++; + state = parse_state_numeric; + } else { + /* alpha */ + if (state == parse_state_numeric) { + part = g_malloc0(i + 1); + strncpy(part, in, i); + sprintf(part, "%d", atoi(part)); + strcpy(out, part); + out += strlen(part) + 1; + dbg(lvl_debug, "part='%s'\n", part); + g_free(part); + in += i; + i = 1; + } else + i++; + state = parse_state_alpha; + } + } + + if (strlen(in) > 0) { + if (state == parse_state_numeric) { + part = g_malloc0(strlen(in) + 1); + strcpy(part, in); + sprintf(part, "%d", atoi(part)); + strcpy(out, part); + dbg(lvl_debug, "part='%s'\n", part); + g_free(part); + } else if (state == parse_state_alpha) { + part = g_malloc0(strlen(in) + 1); + strcpy(part, in); + strtrim(part); + strcpy(out, part); + dbg(lvl_debug, "part='%s'\n", part); + g_free(part); + } + } + + return ret; +} + +/** + * @brief Compares two name_systematic strings. + * + * A name_systematic string is typically used for road reference numbers (A 4, I-51, SP526). This + * function performs a fuzzy comparison: Each string is broken down into numeric and non-numeric parts. + * Then both strings are compared part by part. The following rules apply: + * + * \li Semicolons denote sequences of strings, and the best match between any pair of strings from `s1` and `s2` is + * returned. + * \li Whitespace bordering on a number is discarded. + * \li Whitespace surrounded by string characters is treated as one string with the surrounding characters. + * \li If one string has more parts than the other, the shorter string is padded with null parts. + * \li null equals null. + * \li null does not equal non-null. + * \li Numeric parts are compared as integers, hence `'042'` equals `'42'`. + * \li Comparison of string parts is case-insensitive. + * + * Partial matches are currently determined by determining each part of one string with each part of the other. Each + * part of one string that is matched by at least one part of the other increases the score. Order is currently not + * taken into account, i.e. `'42A'` and `'A-42A'` are both considered full (not partial) matches for `'A42'`. Future + * versions may change this. + * + * @param s1 The first string + * @param s2 The second string + * + * @return 0 if both strings match, nonzero if they do not. `MAX_MISMATCH` indicates a complete mismatch; values in + * between indicate partial matches (lower values correspond to better matches). + */ +int compare_name_systematic(const char *s1, const char *s2) { + int ret = MAX_MISMATCH; + int tmp; + int elements = 0, matches = 0; + char *l = NULL, *r = NULL, *l0, *r0; + + if (!s1 || !s1[0]) { + if (!s2 || !s2[0]) + return 0; + else + return MAX_MISMATCH; + } else if (!s2 || !s2[0]) + return MAX_MISMATCH; + + /* break up strings at semicolons and parse each separately, return 0 if any two match */ + if (strchr(s1, ';')) { + l = g_strdup(s1); + for (l0 = strtok(l, ";"); l0; l0 = strtok(NULL, ";")) { + tmp = compare_name_systematic(l0, s2); + if (tmp < ret) + ret = tmp; + if (!ret) + break; + } + g_free(l); + return ret; + } else if (strchr(s2, ';')) { + r = g_strdup(s2); + for (r0 = strtok(r, ";"); r0; r0 = strtok(NULL, ";")) { + tmp = compare_name_systematic(s1, r0); + if (tmp < ret) + ret = tmp; + if (!ret) + break; + } + g_free(r); + return ret; + } + + /* s1 and s2 are single strings (no semicolons) */ + l0 = parse_for_systematic_comparison(s1); + r0 = parse_for_systematic_comparison(s2); + + /* count left-hand elements and all left-hand elements matched by a right-hand element */ + for (l = l0; l[0]; l += strlen(l) + 1) { + elements++; + for (r = r0; r[0]; r += strlen(r) + 1) { + if (atoi(l) || (l[0] == '0')) { + if ((atoi(r) || (r[0] == '0')) && (atoi(l) == atoi(r))) { + matches++; + break; + } + } else if (!strcasecmp(l, r)) { + matches++; + break; + } + } + } + + /* same in the opposite direction */ + for (r = r0; r[0]; r += strlen(r) + 1) { + elements++; + for (l = l0; l[0]; l += strlen(l) + 1) { + if (atoi(l) || (l[0] == '0')) { + if ((atoi(r) || (r[0] == '0')) && (atoi(l) == atoi(r))) { + matches++; + break; + } + } else if (!strcasecmp(l, r)) { + matches++; + break; + } + } + } + + g_free(l0); + g_free(r0); + + ret = ((elements - matches) * MAX_MISMATCH) / elements; + + dbg(lvl_debug, "'%s' %s '%s', ret=%d", + s1, ret ? (ret == MAX_MISMATCH ? "does NOT match" : "PARTIALLY matches") : "matches", s2, ret); + + return ret; +} + static void hash_callback(gpointer key, gpointer value, gpointer user_data) { GList **l=user_data; *l=g_list_prepend(*l, value); @@ -338,28 +577,152 @@ unsigned int iso8601_to_secs(char *iso8601) { } /** + * @brief Converts a `tm` structure to `time_t` + * + * Returns the value of type `time_t` that represents the UTC time described by the `tm` structure + * pointed to by `pt` (which may be modified). + * + * This function performs the reverse translation that `gmtime()` does. As this functionality is absent + * in the standard library, it is emulated by calling `mktime()`, converting its output into both GMT + * and local time, comparing the results and calling `mktime()` again with an input adjusted for the + * offset in the opposite direction. This ensures maximum portability. + * + * The values of the `tm_wday` and `tm_yday` members of `pt` are ignored, and the values of the other + * members are interpreted even if out of their valid ranges (see `struct tm`). For example, `tm_mday` + * may contain values above 31, which are interpreted accordingly as the days that follow the last day + * of the selected month. + * + * A call to this function automatically adjusts the values of the members of `pt` if they are off-range + * or—in the case of `tm_wday` and `tm_yday`—if their values are inconsistent with the other members. + * + */ +time_t mkgmtime(struct tm * pt) { + time_t ret; + + /* Input, GMT and local time */ + struct tm * pti, * pgt, * plt; + + pti = g_memdup(pt, sizeof(struct tm)); + + ret = mktime(pti); + + pgt = g_memdup(gmtime(&ret), sizeof(struct tm)); + plt = g_memdup(localtime(&ret), sizeof(struct tm)); + + pti->tm_year = pt->tm_year - pgt->tm_year + plt->tm_year; + pti->tm_mon = pt->tm_mon - pgt->tm_mon + plt->tm_mon; + pti->tm_mday = pt->tm_mday - pgt->tm_mday + plt->tm_mday; + pti->tm_hour = pt->tm_hour - pgt->tm_hour + plt->tm_hour; + pti->tm_min = pt->tm_min - pgt->tm_min + plt->tm_min; + pti->tm_sec = pt->tm_sec - pgt->tm_sec + plt->tm_sec; + + ret = mktime(pti); + + dbg(lvl_debug, "time %ld (%02d-%02d-%02d %02d:%02d:%02d)\n", ret, pti->tm_year, pti->tm_mon, pti->tm_mday, + pti->tm_hour, pti->tm_min, pti->tm_sec); + + g_free(pti); + g_free(pgt); + g_free(plt); + + return ret; +} + +/** + * @brief Converts an ISO 8601-style time string into `time_t`. + */ +time_t iso8601_to_time(char * iso8601) { + /* Date/time fields (YYYY-MM-DD-hh-mm-ss) */ + int val[8]; + + int i = 0; + + /* Start of next integer portion and current position */ + char *start = iso8601, *pos = iso8601; + + /* Time struct */ + struct tm tm; + + memset(&tm, 0, sizeof(struct tm)); + + while (*pos && i < 6) { + if (*pos < '0' || *pos > '9') { + val[i++] = atoi(start); + if (i == 6) + break; + pos++; + start = pos; + } + if (*pos) + pos++; + } + val[6] = 0; + val[7] = 0; + if (*pos && i == 6) { + if (pos[1] && pos[2] && (!pos[3] || pos[3] == ':')) { + val[6] = atoi(pos); + if (pos[3] == ':') { + pos += 3; + val[7] = (val[6] < 0) ? -atoi(pos) : atoi(pos); + } + } else if (pos[1] && pos[2] && pos[3] && pos[4]) { + val[6] = atoi(pos) / 100; + val[7] = atoi(pos) % 100; + } + } + + tm.tm_year = val[0] - 1900; + tm.tm_mon = val[1] - 1; + tm.tm_mday = val[2]; + tm.tm_hour = val[3] - val[6]; + tm.tm_min = val[4] - val[7]; + tm.tm_sec = val[5]; + + dbg(lvl_debug, "time %s (%02d-%02d-%02d %02d:%02d:%02d)\n", iso8601, tm.tm_year, tm.tm_mon, tm.tm_mday, + tm.tm_hour, tm.tm_min, tm.tm_sec); + + return mkgmtime(&tm); +} + +/** + * @brief Converts time to ISO8601 format. + * + * The caller is responsible for freeing the return value of this function when it is no longer needed. + * + * @param time The time, as returned by `time()` and related functions + * + * @return Time in ISO8601 format + */ +char * time_to_iso8601(time_t time) { + char *timep=NULL; + char buffer[32]; + struct tm *tm; + + tm = gmtime(&time); + if (tm) { + strftime(buffer, sizeof(buffer), "%Y-%m-%dT%TZ", tm); + timep=g_strdup(buffer); + } + return timep; +} + +/** * @brief Outputs local system time in ISO 8601 format. * * @return Time in ISO 8601 format */ char *current_to_iso8601(void) { - char *timep=NULL; #ifdef HAVE_API_WIN32_BASE + char *timep=NULL; SYSTEMTIME ST; GetSystemTime(&ST); timep=g_strdup_printf("%d-%02d-%02dT%02d:%02d:%02dZ",ST.wYear,ST.wMonth,ST.wDay,ST.wHour,ST.wMinute,ST.wSecond); + return timep; #else - char buffer[32]; time_t tnow; - struct tm *tm; tnow = time(0); - tm = gmtime(&tnow); - if (tm) { - strftime(buffer, sizeof(buffer), "%Y-%m-%dT%TZ", tm); - timep=g_strdup(buffer); - } + return time_to_iso8601(tnow); #endif - return timep; } diff --git a/navit/util.h b/navit/util.h index 7aa6449e6..131173ff6 100644 --- a/navit/util.h +++ b/navit/util.h @@ -21,12 +21,16 @@ #define NAVIT_types_H #include <ctype.h> +#include <time.h> #include "config.h" +#define MAX_MISMATCH 100 + void strtoupper(char *dest, const char *src); void strtolower(char *dest, const char *src); unsigned int uint_sqrt(unsigned int n); int navit_utf8_strcasecmp(const char *s1, const char *s2); +int compare_name_systematic(const char *s1, const char *s2); GList * g_hash_to_list(GHashTable *h); GList * g_hash_to_list_keys(GHashTable *h); gchar * g_strconcat_printf(gchar *buffer, gchar *fmt, ...); @@ -38,6 +42,9 @@ char * newSysString(const char *toconvert); #endif #endif unsigned int iso8601_to_secs(char *iso8601); +time_t mkgmtime(struct tm * pt); +time_t iso8601_to_time(char * iso8601); +char * time_to_iso8601(time_t time); char * current_to_iso8601(void); #if defined(_MSC_VER) || (!defined(HAVE_GETTIMEOFDAY) && defined(HAVE_API_WIN32_BASE)) diff --git a/navit/vehicle/webos/bluetooth.c b/navit/vehicle/webos/bluetooth.c index 9bb94364c..d51ec450b 100644 --- a/navit/vehicle/webos/bluetooth.c +++ b/navit/vehicle/webos/bluetooth.c @@ -8,7 +8,7 @@ #include <errno.h> #include <sys/time.h> #include <PDL.h> -#include <SDL.h> +#include "SDL.h" #include "debug.h" #include "callback.h" #include "event.h" @@ -583,4 +583,3 @@ void vehicle_webos_bt_close(struct vehicle_priv *priv) { // g_free(priv->nmea_data_buf); // priv->nmea_data_buf = NULL; } - diff --git a/navit/vehicle/webos/vehicle_webos.c b/navit/vehicle/webos/vehicle_webos.c index 04dc90ae2..c81b6342b 100644 --- a/navit/vehicle/webos/vehicle_webos.c +++ b/navit/vehicle/webos/vehicle_webos.c @@ -26,7 +26,7 @@ #include <errno.h> #include <sys/time.h> #include <PDL.h> -#include <SDL.h> +#include "SDL.h" #include "debug.h" #include "callback.h" #include "plugin.h" @@ -366,4 +366,3 @@ void plugin_init(void) { dbg(lvl_debug, "enter"); plugin_register_category_vehicle("webos", vehicle_webos_new); } - diff --git a/navit/xmlconfig.c b/navit/xmlconfig.c index 69a4209e5..451a308e2 100644 --- a/navit/xmlconfig.c +++ b/navit/xmlconfig.c @@ -279,6 +279,8 @@ object_func_lookup(enum attr_type type) { return &tracking_func; case attr_speech: return &speech_func; + case attr_traffic: + return &traffic_func; case attr_vehicle: return &vehicle_func; case attr_vehicleprofile: @@ -332,7 +334,7 @@ static char *element_fixmes[]= { }; static void initStatic(void) { - elements=g_new0(struct element_func,44); //43 is a number of elements + ending NULL element + elements=g_new0(struct element_func, 45); //44 is a number of elements + ending NULL element elements[0].name="config"; elements[0].parent=NULL; @@ -547,6 +549,11 @@ static void initStatic(void) { elements[42].parent="navit"; elements[42].func=NULL; elements[42].type=attr_script; + + elements[43].name="traffic"; + elements[43].parent="navit"; + elements[43].func=NULL; + elements[43].type=attr_traffic; } /** @@ -1009,35 +1016,96 @@ static void parse_node_text(ezxml_t node, void *data, void (*start)(void *, cons } #endif -void xml_parse_text(const char *document, void *data, - void (*start)(xml_context *, const char *, const char **, const char **, void *, GError **), - void (*end)(xml_context *, const char *, void *, GError **), - void (*text)(xml_context *, const char *, gsize, void *, GError **)) { +/** + * @brief Parses an XML file. + * + * @param filename The XML file to parse + * @param data Points to a user-defined data structure which will be passed to each of the callbacks + * passed in the following arguments + * @param start Callback which will be called when an open tag is encountered + * @param end Callback which will be called when a close tag is encountered + * @param text Callback which will be called when character data is encountered + * + * @return True on success, false on failure. + */ +int xml_parse_file(char *filename, void *data, + void (*start)(xml_context *, const char *, const char **, const char **, void *, GError **), + void (*end)(xml_context *, const char *, void *, GError **), + void (*text)(xml_context *, const char *, gsize, void *, GError **)) { + int ret = 0; +#if !USE_EZXML + gchar *contents; + gsize len; + + if (g_file_get_contents(filename, &contents, &len, NULL)) { + dbg(lvl_debug, "XML data:\n%s\n", contents); + ret = xml_parse_text(contents, data, start, end, text); + g_free(contents); + } else { + dbg(lvl_error,"could not open XML file"); + } +#else + FILE *f; + ezxml_t root; + + f = fopen(filename,"rb"); + if (f) { + root = ezxml_parse_fp(f); + fclose(f); + if (root) { + parse_node_text(root, data, start, end, text); + ezxml_free(root); + ret = 1; + } + } else { + dbg(lvl_error,"could not open XML file"); + } +#endif + return ret; +} + +/** + * @brief Parses XML text. + * + * @param document The XML data to parse + * @param data Points to a user-defined data structure which will be passed to each of the callbacks + * passed in the following arguments + * @param start Callback which will be called when an open tag is encountered + * @param end Callback which will be called when a close tag is encountered + * @param text Callback which will be called when character data is encountered + * + * @return True on success, false on failure. + */ +int xml_parse_text(const char *document, void *data, + void (*start)(xml_context *, const char *, const char **, const char **, void *, GError **), + void (*end)(xml_context *, const char *, void *, GError **), + void (*text)(xml_context *, const char *, gsize, void *, GError **)) { #if !USE_EZXML GMarkupParser parser = { start, end, text, NULL, NULL}; xml_context *context; gboolean result; - context = g_markup_parse_context_new (&parser, 0, data, NULL); if (!document) { - dbg(lvl_error, "FATAL: No XML data supplied (looks like incorrect configuration for internal GUI)."); - exit(1); + dbg(lvl_error, "FATAL: No XML data supplied."); + return 0; } + context = g_markup_parse_context_new (&parser, 0, data, NULL); result = g_markup_parse_context_parse (context, document, strlen(document), NULL); + g_markup_parse_context_free (context); if (!result) { dbg(lvl_error, "FATAL: Cannot parse data as XML: '%s'", document); - exit(1); + return 0; } - g_markup_parse_context_free (context); #else char *str=g_strdup(document); ezxml_t root = ezxml_parse_str(str, strlen(str)); if (!root) - return; + return 0; parse_node_text(root, data, start, end, text); ezxml_free(root); g_free(str); #endif + return 1; } diff --git a/navit/xmlconfig.h b/navit/xmlconfig.h index 483f215d0..56f118eb2 100644 --- a/navit/xmlconfig.h +++ b/navit/xmlconfig.h @@ -112,7 +112,7 @@ struct object_func { * default behavior, can be NULL for some object types */ }; -extern struct object_func map_func, mapset_func, navit_func, osd_func, tracking_func, vehicle_func, maps_func, layout_func, roadprofile_func, vehicleprofile_func, layer_func, config_func, profile_option_func, script_func, log_func, speech_func, navigation_func, route_func; +extern struct object_func map_func, mapset_func, navit_func, osd_func, tracking_func, vehicle_func, maps_func, layout_func, roadprofile_func, vehicleprofile_func, layer_func, config_func, profile_option_func, script_func, log_func, speech_func, navigation_func, route_func, traffic_func; #define HAS_OBJECT_FUNC(x) ((x) == attr_map || (x) == attr_mapset || (x) == attr_navit || (x) == attr_osd || (x) == attr_trackingo || (x) == attr_vehicle || (x) == attr_maps || (x) == attr_layout || (x) == attr_roadprofile || (x) == attr_vehicleprofile || (x) == attr_layer || (x) == attr_config || (x) == attr_profile_option || (x) == attr_script || (x) == attr_log || (x) == attr_speech || (x) == attr_navigation || (x) == attr_route) @@ -139,7 +139,11 @@ typedef GError xmlerror; /* prototypes */ enum attr_type; struct object_func *object_func_lookup(enum attr_type type); -void xml_parse_text(const char *document, void *data, void (*start)(xml_context *, const char *, const char **, const char **, void *, GError **), void (*end)(xml_context *, const char *, void *, GError **), void (*text)(xml_context*, const char *, gsize, void *, GError **)); +int xml_parse_file(char *filename, void *data, + void (*start)(xml_context *, const char *, const char **, const char **, void *, GError **), + void (*end)(xml_context *, const char *, void *, GError **), + void (*text)(xml_context *, const char *, gsize, void *, GError **)); +int xml_parse_text(const char *document, void *data, void (*start)(xml_context *, const char *, const char **, const char **, void *, GError **), void (*end)(xml_context *, const char *, void *, GError **), void (*text)(xml_context*, const char *, gsize, void *, GError **)); gboolean config_load(const char *filename, xmlerror **error); //static void xinclude(GMarkupParseContext *context, const gchar **attribute_names, const gchar **attribute_values, struct xmldocument *doc_old, xmlerror **error); diff --git a/po/af.po.in b/po/af.po.in index f966374b3..fbfdf7413 100644 --- a/po/af.po.in +++ b/po/af.po.in @@ -1,5 +1,5 @@ # Afrikaans translations for navit -# Copyright (C) 2006-2016 The Navit Team +# Copyright (C) 2006-2018 The Navit Team # This file is distributed under the same license as the navit package. # Many thanks to the contributors of this translation: # Andre Hugo https://launchpad.net/~cortexhugo @@ -12,7 +12,7 @@ msgid "" msgstr "" -"Project-Id-Version: navit 0.5.0\n" +"Project-Id-Version: navit 0.5.1\n" "Report-Msgid-Bugs-To: \n" "PO-Revision-Date: 2015-07-19 03:57+0000\n" "Last-Translator: Michael von Glasow <Unknown>\n" @@ -156,7 +156,6 @@ msgstr "" msgid "%1$sonto %2$s|neuter form" msgstr "" -#. TRANSLATORS: motorway ramp refers to the slip road for entering a motorway. msgid "onto the motorway ramp" msgstr "" @@ -369,7 +368,6 @@ msgstr "dan het jy jou bestemming bereik." msgid "You have reached your destination %s" msgstr "Jy het jou bestemming bereik %s" -#. TRANSLATORS: Exit as a noun, as in "Exit 43 Greenmound-East" msgid "Interchange" msgstr "" @@ -386,9 +384,15 @@ msgstr "Bevel" msgid "Length" msgstr "Lengte" +msgid "mi" +msgstr "" + msgid "km" msgstr "kilometer" +msgid "feet" +msgstr "" + msgid "m" msgstr "meter" @@ -449,6 +453,7 @@ msgid "Anguilla" msgstr "Anguilla" #. 008 +#. Android resource: @strings/albania msgid "Albania" msgstr "Albanië" @@ -461,6 +466,7 @@ msgid "Netherlands Antilles" msgstr "Nederland Antille" #. 024 +#. Android resource: @strings/angola msgid "Angola" msgstr "Angola" @@ -469,6 +475,7 @@ msgid "Antarctica" msgstr "Antarktika" #. 032 +#. Android resource: @strings/argentina msgid "Argentina" msgstr "Argentinië" @@ -477,10 +484,12 @@ msgid "American Samoa" msgstr "Amerikaanse Samoa" #. 040 +#. Android resource: @strings/austria msgid "Austria" msgstr "Oostenryk" #. 036 +#. Android resource: @strings/australia msgid "Australia" msgstr "Australië" @@ -493,10 +502,12 @@ msgid "Aland Islands" msgstr "Aland Eiland" #. 031 +#. Android resource: @strings/azerbaijan msgid "Azerbaijan" msgstr "Azerbaidjan" #. 070 +#. Android resource: @strings/bosnia_and_herzegovina msgid "Bosnia and Herzegovina" msgstr "Bosnië en Herzegowina" @@ -509,6 +520,7 @@ msgid "Bangladesh" msgstr "Bangladesj" #. 056 +#. Android resource: @strings/belgium msgid "Belgium" msgstr "België" @@ -517,6 +529,7 @@ msgid "Burkina Faso" msgstr "Boerkina Fasso" #. 100 +#. Android resource: @strings/bulgaria msgid "Bulgaria" msgstr "Bulgarye" @@ -525,6 +538,7 @@ msgid "Bahrain" msgstr "Bahrein" #. 108 +#. Android resource: @strings/burundi msgid "Burundi" msgstr "Boeroendi" @@ -545,6 +559,7 @@ msgid "Brunei Darussalam" msgstr "Broenei" #. 068 +#. Android resource: @strings/bolivia msgid "Bolivia" msgstr "Bolivië" @@ -553,6 +568,7 @@ msgid "Bonaire, Sint Eustatius and Saba" msgstr "" #. 076 +#. Android resource: @strings/brazil msgid "Brazil" msgstr "Brasilië" @@ -569,10 +585,12 @@ msgid "Bouvet Island" msgstr "Bouveteiland" #. 072 +#. Android resource: @strings/botswana msgid "Botswana" msgstr "Botswana" #. 112 +#. Android resource: @strings/belarus msgid "Belarus" msgstr "Wit-Rusland" @@ -581,6 +599,7 @@ msgid "Belize" msgstr "Belize" #. 124 +#. Android resource: @strings/canada msgid "Canada" msgstr "Kanada" @@ -589,6 +608,7 @@ msgid "Cocos (Keeling) Islands" msgstr "Cocos- (Keeling) eilande" #. 180 +#. Android resource: @strings/congo msgid "Congo, Democratic Republic of the" msgstr "Kongo, Demokratiese Republiek van die" @@ -601,10 +621,12 @@ msgid "Congo" msgstr "Kongo" #. 756 +#. Android resource: @strings/switzerland msgid "Switzerland" msgstr "Switserland" #. 384 +#. Android resource: @strings/cotedivoire msgid "Cote d'Ivoire" msgstr "Ivoorkus" @@ -613,6 +635,7 @@ msgid "Cook Islands" msgstr "Cookeilande" #. 152 +#. Android resource: @strings/chile msgid "Chile" msgstr "Chili" @@ -621,10 +644,12 @@ msgid "Cameroon" msgstr "Kameroen" #. 156 +#. Android resource: @strings/china msgid "China" msgstr "Sjina" #. 170 +#. Android resource: @strings/colombia msgid "Colombia" msgstr "Kolombië" @@ -633,6 +658,7 @@ msgid "Costa Rica" msgstr "Costa Rica" #. 192 +#. Android resource: @strings/cuba msgid "Cuba" msgstr "Kuba" @@ -649,14 +675,17 @@ msgid "Christmas Island" msgstr "Kerseiland" #. 196 +#. Android resource: @strings/cyprus msgid "Cyprus" msgstr "Siprus" #. 203 +#. Android resource: @strings/czech_republic msgid "Czech Republic" msgstr "Tjeggiese Republiek" #. 276 +#. Android resource: @strings/germany msgid "Germany" msgstr "Duitsland" @@ -665,6 +694,7 @@ msgid "Djibouti" msgstr "Djiboeti" #. 208 +#. Android resource: @strings/denmark msgid "Denmark" msgstr "Denemarke" @@ -673,6 +703,7 @@ msgid "Dominica" msgstr "Dominika" #. 214 +#. Android resource: @strings/dominican_republic msgid "Dominican Republic" msgstr "Dominikaanse Republiek" @@ -681,10 +712,12 @@ msgid "Algeria" msgstr "Algerië" #. 218 +#. Android resource: @strings/ecuador msgid "Ecuador" msgstr "Ecuador" #. 233 +#. Android resource: @strings/estonia msgid "Estonia" msgstr "Esland" @@ -701,14 +734,17 @@ msgid "Eritrea" msgstr "Eritrea" #. 724 +#. Android resource: @strings/spain msgid "Spain" msgstr "Spanje" #. 231 +#. Android resource: @strings/ethiopia msgid "Ethiopia" msgstr "Etiopië" #. 246 +#. Android resource: @strings/finland msgid "Finland" msgstr "Finland" @@ -725,10 +761,12 @@ msgid "Micronesia, Federated States of" msgstr "Mikronesia, Federale state van" #. 234 +#. Android resource: @strings/faroe_islands msgid "Faroe Islands" msgstr "Faroëreilande" #. 250 +#. Android resource: @strings/france msgid "France" msgstr "Frankryk" @@ -737,6 +775,7 @@ msgid "Gabon" msgstr "Gaboen" #. 826 +#. Android resource: @strings/united_kingdom msgid "United Kingdom" msgstr "Verenigde Koninkryk" @@ -773,6 +812,7 @@ msgid "Gambia" msgstr "Gambië" #. 324 +#. Android resource: @strings/guinea msgid "Guinea" msgstr "Guinië" @@ -785,6 +825,7 @@ msgid "Equatorial Guinea" msgstr "Ekwatoriaal-Guinee" #. 300 +#. Android resource: @strings/greece msgid "Greece" msgstr "Griekeland" @@ -805,6 +846,7 @@ msgid "Guinea-Bissau" msgstr "Guinee-Bissau" #. 328 +#. Android resource: @strings/guyana msgid "Guyana" msgstr "Guyana" @@ -821,26 +863,32 @@ msgid "Honduras" msgstr "Honduras" #. 191 +#. Android resource: @strings/croatia msgid "Croatia" msgstr "Kroasië" #. 332 +#. Android resource: @strings/haiti msgid "Haiti" msgstr "Haïti" #. 348 +#. Android resource: @strings/hungary msgid "Hungary" msgstr "Hongarye" #. 360 +#. Android resource: @strings/indonesia msgid "Indonesia" msgstr "Indonesië" #. 372 +#. Android resource: @strings/ireland msgid "Ireland" msgstr "Ierland" #. 376 +#. Android resource: @strings/israel msgid "Israel" msgstr "Israel" @@ -849,6 +897,7 @@ msgid "Isle of Man" msgstr "Man eiland" #. 356 +#. Android resource: @strings/india msgid "India" msgstr "Indië" @@ -857,18 +906,22 @@ msgid "British Indian Ocean Territory" msgstr "Brits Indiese oseaan gebiede" #. 368 +#. Android resource: @strings/iraq msgid "Iraq" msgstr "Irak" #. 364 +#. Android resource: @strings/iran msgid "Iran, Islamic Republic of" msgstr "Iran" #. 352 +#. Android resource: @strings/iceland msgid "Iceland" msgstr "Ysland" #. 380 +#. Android resource: @strings/italy msgid "Italy" msgstr "Italië" @@ -877,6 +930,7 @@ msgid "Jersey" msgstr "Jersey" #. 388 +#. Android resource: @strings/jamaica msgid "Jamaica" msgstr "Jamaika" @@ -885,14 +939,17 @@ msgid "Jordan" msgstr "Jordanië" #. 392 +#. Android resource: @strings/japan msgid "Japan" msgstr "Japan" #. 404 +#. Android resource: @strings/kenya msgid "Kenya" msgstr "Kenia" #. 417 +#. Android resource: @strings/kyrgyzsyan msgid "Kyrgyzstan" msgstr "Kyrgyzstan" @@ -929,6 +986,7 @@ msgid "Cayman Islands" msgstr "Kaaimanseilande" #. 398 +#. Android resource: @strings/kazakhstan msgid "Kazakhstan" msgstr "Kazakstan" @@ -953,26 +1011,32 @@ msgid "Sri Lanka" msgstr "Sri Lanka" #. 430 +#. Android resource: @strings/liberia msgid "Liberia" msgstr "Liberië" #. 426 +#. Android resource: @strings/lesotho msgid "Lesotho" msgstr "Lesotho" #. 440 +#. Android resource: @strings/lithuania msgid "Lithuania" msgstr "Litoue" #. 442 +#. Android resource: @strings/luxembourg msgid "Luxembourg" msgstr "Luxenburg" #. 428 +#. Android resource: @strings/latvia msgid "Latvia" msgstr "Letland" #. 434 +#. Android resource: @strings/libya msgid "Libya" msgstr "" @@ -997,6 +1061,7 @@ msgid "Saint Martin (French part)" msgstr "St. Martin" #. 450 +#. Android resource: @strings/madagascar msgid "Madagascar" msgstr "Madagaskar" @@ -1017,6 +1082,7 @@ msgid "Myanmar" msgstr "Mianmar" #. 496 +#. Android resource: @strings/mongolia msgid "Mongolia" msgstr "Mongolië" @@ -1057,10 +1123,12 @@ msgid "Malawi" msgstr "Malawi" #. 484 +#. Android resource: @strings/mexico msgid "Mexico" msgstr "Meksiko" #. 458 +#. Android resource: @strings/malaysia msgid "Malaysia" msgstr "Maleisië" @@ -1069,10 +1137,12 @@ msgid "Mozambique" msgstr "Mosambiek" #. 516 +#. Android resource: @strings/namibia msgid "Namibia" msgstr "Namibië" #. 540 +#. Android resource: @strings/new_caledonia msgid "New Caledonia" msgstr "Nieu-Kaledonië" @@ -1093,6 +1163,7 @@ msgid "Nicaragua" msgstr "Nikaragua" #. 528 +#. Android resource: @strings/netherlands msgid "Netherlands" msgstr "Nederland" @@ -1101,6 +1172,7 @@ msgid "Norway" msgstr "Noorweë" #. 524 +#. Android resource: @strings/nepal msgid "Nepal" msgstr "Nepal" @@ -1113,6 +1185,7 @@ msgid "Niue" msgstr "Niue" #. 554 +#. Android resource: @strings/newzealand msgid "New Zealand" msgstr "Nieu-Seeland" @@ -1125,6 +1198,7 @@ msgid "Panama" msgstr "Panama" #. 604 +#. Android resource: @strings/peru msgid "Peru" msgstr "Peru" @@ -1137,14 +1211,17 @@ msgid "Papua New Guinea" msgstr "Papoea Nieu-Guinee" #. 608 +#. Android resource: @strings/philippines msgid "Philippines" msgstr "Filippyne" #. 586 +#. Android resource: @strings/pakistan msgid "Pakistan" msgstr "Pakistan" #. 616 +#. Android resource: @strings/poland msgid "Poland" msgstr "Pole" @@ -1165,6 +1242,7 @@ msgid "Palestinian Territory, Occupied" msgstr "Palestynse Gebied, Besette" #. 620 +#. Android resource: @strings/portugal msgid "Portugal" msgstr "Portugal" @@ -1173,6 +1251,7 @@ msgid "Palau" msgstr "Palau" #. 600 +#. Android resource: @strings/paraguay msgid "Paraguay" msgstr "Paraguaai" @@ -1181,10 +1260,12 @@ msgid "Qatar" msgstr "Katar" #. 638 +#. Android resource: @strings/reunion msgid "Reunion" msgstr "Réunion" #. 642 +#. Android resource: @strings/romania msgid "Romania" msgstr "Roemenië" @@ -1193,14 +1274,17 @@ msgid "Serbia" msgstr "Serwië" #. 643 +#. Android resource: @strings/russian_federation msgid "Russian Federation" msgstr "Rusland" #. 646 +#. Android resource: @strings/rwanda msgid "Rwanda" msgstr "Rwanda" #. 682 +#. Android resource: @strings/saudi_arabia msgid "Saudi Arabia" msgstr "Saoedi-Arabië" @@ -1221,6 +1305,7 @@ msgid "Sweden" msgstr "Swede" #. 702 +#. Android resource: @strings/singapore msgid "Singapore" msgstr "Singapoer" @@ -1237,6 +1322,7 @@ msgid "Svalbard and Jan Mayen" msgstr "Svalbard en Jan Mayen" #. 703 +#. Android resource: @strings/slovakia msgid "Slovakia" msgstr "Slowakye" @@ -1257,6 +1343,7 @@ msgid "Somalia" msgstr "Somalië" #. 740 +#. Android resource: @strings/suriname msgid "Suriname" msgstr "Suriname" @@ -1301,6 +1388,7 @@ msgid "Togo" msgstr "Togo" #. 764 +#. Android resource: @strings/thailand msgid "Thailand" msgstr "Thailand" @@ -1317,6 +1405,7 @@ msgid "Timor-Leste" msgstr "Oos-Timor" #. 795 +#. Android resource: @strings/turkmenistan msgid "Turkmenistan" msgstr "Turkmenistan" @@ -1329,6 +1418,7 @@ msgid "Tonga" msgstr "Tonga" #. 792 +#. Android resource: @strings/turkey msgid "Turkey" msgstr "Turkye" @@ -1345,14 +1435,17 @@ msgid "Taiwan, Province of China" msgstr "Taiwan" #. 834 +#. Android resource: @strings/tanzania msgid "Tanzania, United Republic of" msgstr "Tanzanië" #. 804 +#. Android resource: @strings/ukraine msgid "Ukraine" msgstr "Oekraïne" #. 800 +#. Android resource: @strings/uganda msgid "Uganda" msgstr "Oeganda" @@ -1365,6 +1458,7 @@ msgid "United States" msgstr "Vereenigde State" #. 858 +#. Android resource: @strings/uruguay msgid "Uruguay" msgstr "Uruguay" @@ -1381,6 +1475,7 @@ msgid "Saint Vincent and the Grenadines" msgstr "St. Vincent en die Grenadine" #. 862 +#. Android resource: @strings/venezuela msgid "Venezuela" msgstr "Venezuela" @@ -1417,6 +1512,7 @@ msgid "Mayotte" msgstr "Mayotte" #. 710 +#. Android resource: @strings/south_africa msgid "South Africa" msgstr "Suid-Afrika" @@ -1444,23 +1540,23 @@ msgid "" msgstr "" #. We have not found an existing config file from all possibilities -msgid "No config file navit.xml, navit.xml.local found\n" +msgid "No config file navit.xml, navit.xml.local found" msgstr "" #, c-format -msgid "Error parsing config file '%s': %s\n" +msgid "Error parsing config file '%s': %s" msgstr "" #, c-format -msgid "Using config file '%s'\n" +msgid "Using config file '%s'" msgstr "" #, c-format -msgid "Error: No configuration found in config file '%s'\n" +msgid "Error: No configuration found in config file '%s'" msgstr "" msgid "" -"Internal initialization failed, exiting. Check previous error messages.\n" +"Internal initialization failed, exiting. Check previous error messages." msgstr "" msgid "unknown street" @@ -1601,6 +1697,9 @@ msgstr "" msgid "_Lock on Road" msgstr "Koppel aan Pad" +msgid "_Follow Vehicle" +msgstr "" + msgid "_Keep orientation to the North" msgstr "" @@ -1670,7 +1769,12 @@ msgstr "" msgid "Shopping" msgstr "" -msgid "Select a search radius from screen center" +#. Input is in kilometers +msgid "Select a search radius from screen center in km" +msgstr "" + +#. Input is in miles. +msgid "Select a search radius from screen center in miles" msgstr "" #, c-format @@ -1678,15 +1782,15 @@ msgid "POI %s. %s" msgstr "" #, c-format -msgid "Set destination to %ld, %ld \n" +msgid "Set destination to %ld, %ld " msgstr "" #, c-format -msgid "Set map to %ld, %ld \n" +msgid "Set map to %ld, %ld " msgstr "" #, c-format -msgid "Set next visit to %ld, %ld \n" +msgid "Set next visit to %ld, %ld " msgstr "" msgid "POI search" @@ -1695,9 +1799,6 @@ msgstr "" msgid "Select a category" msgstr "" -msgid "Select a distance to look for (km)" -msgstr "" - msgid "Select a POI" msgstr "" @@ -1710,7 +1811,7 @@ msgstr "" msgid "Direction" msgstr "" -msgid "Distance(m)" +msgid "Distance" msgstr "" msgid "Name" @@ -1757,8 +1858,8 @@ msgid "OT" msgstr "OT" #, c-format -msgid "Route %4.0fkm %02d:%02d ETA" -msgstr "Roete %4.0fkm %02d:%02d aankomstyd" +msgid "Route %4.1f%s %02d:%02d ETA" +msgstr "" msgid "Route 0000km 0+00:00 ETA" msgstr "Roete 0000km 0+00:00 aankomstyd" @@ -1980,6 +2081,9 @@ msgstr "Roete Beskrywing" msgid "Show Locale" msgstr "Toon Lokalisering" +msgid "Network info" +msgstr "" + msgid "Former Destinations" msgstr "Voorige bestemmings" @@ -2018,737 +2122,873 @@ msgstr "" msgid "Please decrease your speed" msgstr "" -msgid "partial match" -msgstr "" +msgid "Vehicle Position" +msgstr "Voertuig posisie" -#. Android resource: @strings/address_search_button -msgid "Search" -msgstr "" +msgid "Main menu" +msgstr "Hoofkieslys" -#. Android resource: @strings/address_search_towns -msgid "Towns" +msgid "" +"Show\n" +"Map" msgstr "" +"Wys\n" +"Kaart" -msgid "Map data (c) OpenStreetMap contributors, ODBL" -msgstr "" +msgid "Settings" +msgstr "Instellings" + +msgid "Tools" +msgstr "Gereedskap" + +msgid "Route" +msgstr "Roete" + +msgid "About" +msgstr "Rakende" + +msgid "Quit" +msgstr "Verlaat" + +msgid "Actions" +msgstr "Aksies" msgid "" -"Current map location %s is not available\n" -"Please restart Navit after you attach an SD card or select a different map " -"location." +"Former\n" +"Destinations" msgstr "" -msgid "Downloaded maps" +msgid "Coordinates" msgstr "" msgid "" -"Sorry, we currently do not support maps above 3.8G on Android, please select " -"a smaller one." +"Stop\n" +"Navigation" msgstr "" +"Stop\n" +"Navigasie" -#. Android resource: @strings/position_popup_drive_here -msgid "Route to here" -msgstr "" +msgid "Display" +msgstr "Skerm" -msgid "Cancel" -msgstr "" +msgid "Fullscreen" +msgstr "Volskerm" -msgid "filenamePath" -msgstr "" +msgid "Window Mode" +msgstr "Venster Modus" -msgid "" -"New location set to %s\n" -"Restart Navit to apply the changes." +msgid "Auto zoom" msgstr "" -msgid "Whole Planet" +msgid "Manual zoom" msgstr "" -msgid "Africa" +msgid "Layers" msgstr "" -msgid "Canary Islands" +msgid "Zoom to route" msgstr "" -msgid "Asia" -msgstr "" +msgid "Description" +msgstr "Beskrywing" -msgid "Korea" +msgid "" +"Drop last\n" +"Waypoint" msgstr "" -msgid "Taiwan" +msgid "" +"Drop next\n" +"Waypoint" msgstr "" -msgid "UAE+Other" +msgid "Satellite Status" msgstr "" -msgid "Oceania" +msgid "NMEA Data" msgstr "" -msgid "Tasmania" +msgid "car_shortest" msgstr "" -msgid "Victoria" +msgid "car_avoid_tolls" msgstr "" -msgid "New South Wales" +msgid "car_pedantic" msgstr "" -msgid "Europe" -msgstr "" +msgid "horse" +msgstr "perd" -msgid "Western Europe" +msgid "Truck" msgstr "" -msgid "Azores" +#. Strings from android/res/values/strings.xml +#. Android resource: @strings/yes +msgid "Yes" msgstr "" -msgid "BeNeLux" +#. Android resource: @strings/cancel +msgid "Cancel" msgstr "" -msgid "Alsace" +#. Android resource: @strings/notification_ticker +msgid "Navit started" msgstr "" -msgid "Aquitaine" +#. Android resource: @strings/notification_event_default +msgid "Navit running" msgstr "" -msgid "Auvergne" +#. Android resource: @strings/initial_info_box_title +msgid "Welcome to Navit" msgstr "" -msgid "Basse-Normandie" +#. Android resource: @strings/initial_info_box_message +msgid "" +"Thank you for installing Navit!\n" +"\n" +"To start, select \"Download maps\" from the menu to download a map. Note: " +"The map filesize may be large (>50MB) - a wifi connection is recommended.\n" +"\n" +"Mapdata: (c) OpenStreetMap contributors\n" +"\n" +"Enjoy Navit!" msgstr "" -msgid "Bourgogne" +#. Android resource: @strings/initial_info_box_OK +msgid "OK" msgstr "" -msgid "Bretagne" +#. Android resource: @strings/initial_info_box_more_info +msgid "More info" msgstr "" -msgid "Centre" +#. Android resource: @strings/optionsmenu_zoom_in +msgid "Zoom in" msgstr "" -msgid "Champagne-Ardenne" +#. Android resource: @strings/optionsmenu_zoom_out +msgid "Zoom out" msgstr "" -msgid "Corse" +#. Android resource: @strings/optionsmenu_download_maps +msgid "Download maps" msgstr "" -msgid "Franche-Comte" +#. Android resource: @strings/optionsmenu_toggle_poi +msgid "Toggle POIs" msgstr "" -msgid "Haute-Normandie" +#. Android resource: @strings/optionsmenu_exit_navit +msgid "Exit Navit" msgstr "" -msgid "Ile-de-France" +#. Android resource: @strings/optionsmenu_backup_restore +msgid "Backup / Restore" msgstr "" -msgid "Languedoc-Roussillon" +#. Android resource: @strings/optionsmenu_set_map_location +msgid "Set map location" msgstr "" -msgid "Limousin" +#. Android resource: @strings/position_popup_drive_here +msgid "Route to here" msgstr "" -msgid "Lorraine" +#. Android resource: @strings/map_delete +msgid "Delete this map?" msgstr "" -msgid "Midi-Pyrenees" +#. Android resource: @strings/map_download_title +msgid "Map download" msgstr "" -msgid "Nord-pas-de-Calais" +#. Android resource: @strings/map_download_downloading +msgid "Downloading:" msgstr "" -msgid "Pays-de-la-Loire" +#. Android resource: @strings/map_download_eta +msgid "ETA" msgstr "" -msgid "Picardie" +#. Android resource: @strings/map_download_ready +msgid "ready" msgstr "" -msgid "Poitou-Charentes" +#. Android resource: @strings/map_download_download_error +msgid "Error downloading map." msgstr "" -msgid "Provence-Alpes-Cote-d-Azur" +#. Android resource: @strings/map_download_download_aborted +msgid "Map download aborted" msgstr "" -msgid "Rhone-Alpes" +#. Android resource: @strings/map_download_not_enough_free_space +msgid "Not enough free space" msgstr "" -msgid "Baden-Wuerttemberg" +#. Android resource: @strings/map_download_oversize +msgid "" +"Sorry, we currently do not support maps above 3.8G on Android, please select " +"a smaller one." msgstr "" -msgid "Bayern" +#. Android resource: @strings/map_no_fix +msgid "No location. Reopen after location fix." msgstr "" -msgid "Mittelfranken" +#. Android resource: @strings/maps_for_current_location +msgid "Maps containing current location" msgstr "" -msgid "Niederbayern" +#. Android resource: @strings/maps_installed +msgid "Installed maps" msgstr "" -msgid "Oberbayern" +#. Android resource: @strings/map_downloading +msgid "downloading" msgstr "" -msgid "Oberfranken" +#. Android resource: @strings/map_download_medium_unavailable +msgid "Media selected for map storage is not available" msgstr "" -msgid "Oberpfalz" +#. Android resource: @strings/map_download_error_writing_map +msgid "Error writing map!" msgstr "" -msgid "Schwaben" +#. Android resource: @strings/map_location_changed +#, c-format +msgid "New location set to %s Restart Navit to apply the changes." msgstr "" -msgid "Unterfranken" +#. Android resource: @strings/map_location_unavailable +#, c-format +msgid "" +"Current map location %s is not available Please restart Navit after you " +"attach an SD card or select a different map location." msgstr "" -msgid "Berlin" +#. Android resource: @strings/address_search_title +msgid "Address search" msgstr "" -msgid "Brandenburg" +#. Android resource: @strings/address_enter_destination +msgid "Enter destination" msgstr "" -msgid "Bremen" +#. Android resource: @strings/address_partial_match +msgid "Match partial address" msgstr "" -msgid "Hamburg" +#. Android resource: @strings/address_search_button +msgid "Search" msgstr "" -msgid "Hessen" +#. Android resource: @strings/address_search_searching +msgid "Searching..." msgstr "" -msgid "Mecklenburg-Vorpommern" +#. Android resource: @strings/address_search_not_found +msgid "Address not found" msgstr "" -msgid "Niedersachsen" +#. Android resource: @strings/address_search_getting_results +msgid "Getting search results" msgstr "" -msgid "Nordrhein-westfalen" +#. Android resource: @strings/address_search_loading_results +msgid "Loading search results" msgstr "" -msgid "Rheinland-Pfalz" +#. Android resource: @strings/address_search_no_results +msgid "No results found" msgstr "" -msgid "Saarland" +#. Android resource: @strings/address_search_no_text_entered +msgid "No text entered" msgstr "" -msgid "Sachsen-Anhalt" +#. Android resource: @strings/address_search_set_destination +msgid "Setting destination to:" msgstr "" -msgid "Sachsen" +#. Android resource: @strings/address_search_towns +msgid "Towns" msgstr "" -msgid "Schleswig-Holstein" +#. Android resource: @strings/choose_an_action +msgid "Choose an action" msgstr "" -msgid "Thueringen" +#. Android resource: @strings/please_insert_an_sd_card +msgid "Please insert an SD Card" msgstr "" -msgid "Mallorca" +#. Android resource: @strings/backing_up +msgid "Backing up..." msgstr "" -msgid "Galicia" +#. Android resource: @strings/restoring +msgid "Restoring..." msgstr "" -msgid "Scandinavia" +#. Android resource: @strings/failed_to_create_backup_directory +msgid "Failed to create backup directory" msgstr "" -msgid "England" +#. Android resource: @strings/backup_failed +msgid "Backup failed" msgstr "" -msgid "Buckinghamshire" +#. Android resource: @strings/no_backup_found +msgid "No backup found" msgstr "" -msgid "Cambridgeshire" +#. Android resource: @strings/failed_to_restore +msgid "Failed to restore" msgstr "" -msgid "Cumbria" +#. Android resource: @strings/backup_successful +msgid "Backup successful" msgstr "" -msgid "East yorkshire with hull" +#. Android resource: @strings/restore_successful_please_restart_navit +msgid "" +"Restore Successful\n" +"Please restart Navit" msgstr "" -msgid "Essex" +#. Android resource: @strings/backup_not_found +msgid "Backup not found" msgstr "" -msgid "Herefordshire" +#. Android resource: @strings/restore_failed +msgid "Restore failed" msgstr "" -msgid "Kent" +#. Android resource: @strings/select_backup +msgid "Select backup" msgstr "" -msgid "Lancashire" +#. Android resource: @strings/backup +msgid "Backup" msgstr "" -msgid "Leicestershire" +#. Android resource: @strings/restore +msgid "Restore" msgstr "" -msgid "Norfolk" +#. Android resource: @strings/TTS_title_data_missing +msgid "System text to speech engine data is missing" msgstr "" -msgid "Nottinghamshire" +#. Android resource: @strings/TTS_qery_install_data +msgid "" +"Navit can use any text to speech engine installed on your device. The " +"currently selected engine reports it is unable to speak in your language. " +"Should we ask the system to show voice download dialog?" msgstr "" -msgid "Oxfordshire" +#. Android resource: @strings/permissions_not_granted +msgid "" +"Navit needs permission to access GPS and read the map.\n" +"If you change your mind please restart Navit and grant the permissions" msgstr "" -msgid "Shropshire" +#. Android resource: @strings/permissions_info_box_title +msgid "One or more ungranted permissions" msgstr "" -msgid "Somerset" +#. Android resource: @strings/whole_planet +msgid "Whole Planet" msgstr "" -msgid "South yorkshire" +#. Android resource: @strings/africa +msgid "Africa" msgstr "" -msgid "Suffolk" +#. Android resource: @strings/canary_islands +msgid "Canary Islands" msgstr "" -msgid "Surrey" +#. Android resource: @strings/asia +msgid "Asia" msgstr "" -msgid "Wiltshire" +#. Android resource: @strings/taiwan +msgid "Taiwan" msgstr "" -msgid "Scotland" +#. Android resource: @strings/korea +msgid "Korea" msgstr "" -msgid "Wales" +#. Android resource: @strings/uae_other +msgid "UAE+Other" msgstr "" -msgid "Crete" +#. Android resource: @strings/oceania +msgid "Oceania" msgstr "" -msgid "North America" +#. Android resource: @strings/tasmania +msgid "Tasmania" msgstr "" -msgid "Alaska" +#. Android resource: @strings/victoria +msgid "Victoria" msgstr "" -msgid "Hawaii" +#. Android resource: @strings/new_south_wales +msgid "New South Wales" msgstr "" -msgid "USA" +#. Android resource: @strings/europe +msgid "Europe" msgstr "" -msgid " (except Alaska and Hawaii)" +#. Android resource: @strings/western_europe +msgid "Western Europe" msgstr "" -msgid "Midwest" +#. Android resource: @strings/azores +msgid "Azores" msgstr "" -msgid "Michigan" +#. Android resource: @strings/benelux +msgid "BeNeLux" msgstr "" -msgid "Ohio" +#. Android resource: @strings/alsace +msgid "Alsace" msgstr "" -msgid "Northeast" +#. Android resource: @strings/aquitaine +msgid "Aquitaine" msgstr "" -msgid "Massachusetts" +#. Android resource: @strings/auvergne +msgid "Auvergne" msgstr "" -msgid "Vermont" +#. Android resource: @strings/centre +msgid "Centre" msgstr "" -msgid "Pacific" +#. Android resource: @strings/bretagne +msgid "Bretagne" msgstr "" -msgid "South" +#. Android resource: @strings/bourgogne +msgid "Bourgogne" msgstr "" -msgid "Arkansas" +#. Android resource: @strings/basse_normandie +msgid "Basse-Normandie" msgstr "" -msgid "District of Columbia" +#. Android resource: @strings/champagne_ardenne +msgid "Champagne-Ardenne" msgstr "" -msgid "Florida" +#. Android resource: @strings/corse +msgid "Corse" msgstr "" -msgid "Louisiana" +#. Android resource: @strings/franche_comte +msgid "Franche-Comte" msgstr "" -msgid "Maryland" +#. Android resource: @strings/haute_normandie +msgid "Haute-Normandie" msgstr "" -msgid "Mississippi" +#. Android resource: @strings/ile_de_france +msgid "Ile-de-France" msgstr "" -msgid "Oklahoma" +#. Android resource: @strings/languedoc_roussillon +msgid "Languedoc-Roussillon" msgstr "" -msgid "Texas" +#. Android resource: @strings/limousin +msgid "Limousin" msgstr "" -msgid "Virginia" +#. Android resource: @strings/lorraine +msgid "Lorraine" msgstr "" -msgid "West Virginia" +#. Android resource: @strings/midi_pyrenees +msgid "Midi-Pyrenees" msgstr "" -msgid "West" +#. Android resource: @strings/nord_pas_de_calais +msgid "Nord-pas-de-Calais" msgstr "" -msgid "Arizona" +#. Android resource: @strings/pays_de_la_loire +msgid "Pays-de-la-Loire" msgstr "" -msgid "California" +#. Android resource: @strings/picardie +msgid "Picardie" msgstr "" -msgid "Colorado" +#. Android resource: @strings/poitou_charentes +msgid "Poitou-Charentes" msgstr "" -msgid "Idaho" +#. Android resource: @strings/provence_alpes_cote_d_azur +msgid "Provence-Alpes-Cote-d-Azur" msgstr "" -msgid "Montana" +#. Android resource: @strings/rhone_alpes +msgid "Rhone-Alpes" msgstr "" -msgid "New Mexico" +#. Android resource: @strings/baden_wuerttemberg +msgid "Baden-Wuerttemberg" msgstr "" -msgid "Nevada" +#. Android resource: @strings/bayern +msgid "Bayern" msgstr "" -msgid "Oregon" +#. Android resource: @strings/mittelfranken +msgid "Mittelfranken" msgstr "" -msgid "Utah" +#. Android resource: @strings/niederbayern +msgid "Niederbayern" msgstr "" -msgid "Washington State" +#. Android resource: @strings/oberbayern +msgid "Oberbayern" msgstr "" -msgid "South+Middle America" +#. Android resource: @strings/oberfranken +msgid "Oberfranken" msgstr "" -msgid "Guyane Francaise" +#. Android resource: @strings/oberpfalz +msgid "Oberpfalz" msgstr "" -msgid "downloading" +#. Android resource: @strings/schwaben +msgid "Schwaben" msgstr "" -#. Android resource: @strings/map_download_ready -msgid "ready" +#. Android resource: @strings/unterfranken +msgid "Unterfranken" msgstr "" -msgid "Media selected for map storage is not available" +#. Android resource: @strings/berlin +msgid "Berlin" msgstr "" -#. Android resource: @strings/map_download_not_enough_free_space -msgid "Not enough free space" +#. Android resource: @strings/brandenburg +msgid "Brandenburg" msgstr "" -msgid "Error downloading map!" +#. Android resource: @strings/bremen +msgid "Bremen" msgstr "" -msgid "Error writing map!" +#. Android resource: @strings/hamburg +msgid "Hamburg" msgstr "" -msgid "Map download aborted!" +#. Android resource: @strings/hessen +msgid "Hessen" msgstr "" -#. Android resource: @strings/map_download_eta -msgid "ETA" +#. Android resource: @strings/mecklenburg_vorpommern +msgid "Mecklenburg-Vorpommern" msgstr "" -#. Android resource: @strings/map_download_title -msgid "Map download" +#. Android resource: @strings/niedersachsen +msgid "Niedersachsen" msgstr "" -msgid "Vehicle Position" -msgstr "Voertuig posisie" - -msgid "Main menu" -msgstr "Hoofkieslys" - -msgid "" -"Show\n" -"Map" +#. Android resource: @strings/nordrhein_westfalen +msgid "Nordrhein-westfalen" msgstr "" -"Wys\n" -"Kaart" - -msgid "Settings" -msgstr "Instellings" - -msgid "Tools" -msgstr "Gereedskap" - -msgid "Route" -msgstr "Roete" -msgid "About" -msgstr "Rakende" +#. Android resource: @strings/rheinland_pfalz +msgid "Rheinland-Pfalz" +msgstr "" -msgid "Quit" -msgstr "Verlaat" +#. Android resource: @strings/saarland +msgid "Saarland" +msgstr "" -msgid "Actions" -msgstr "Aksies" +#. Android resource: @strings/sachsen_anhalt +msgid "Sachsen-Anhalt" +msgstr "" -msgid "" -"Former\n" -"Destinations" +#. Android resource: @strings/sachsen +msgid "Sachsen" msgstr "" -msgid "Coordinates" +#. Android resource: @strings/schleswig_holstein +msgid "Schleswig-Holstein" msgstr "" -msgid "" -"Stop\n" -"Navigation" +#. Android resource: @strings/thueringen +msgid "Thueringen" msgstr "" -"Stop\n" -"Navigasie" -msgid "Display" -msgstr "Skerm" +#. Android resource: @strings/mallorca +msgid "Mallorca" +msgstr "" -msgid "Fullscreen" -msgstr "Volskerm" +#. Android resource: @strings/galicia +msgid "Galicia" +msgstr "" -msgid "Window Mode" -msgstr "Venster Modus" +#. Android resource: @strings/scandinavia +msgid "Scandinavia" +msgstr "" -msgid "Layers" +#. Android resource: @strings/england +msgid "England" msgstr "" -msgid "Description" -msgstr "Beskrywing" +#. Android resource: @strings/buckinghamshire +msgid "Buckinghamshire" +msgstr "" -msgid "" -"Drop last \n" -"Waypoint" +#. Android resource: @strings/cambridgeshire +msgid "Cambridgeshire" msgstr "" -msgid "" -"Drop next \n" -"Waypoint" +#. Android resource: @strings/cumbria +msgid "Cumbria" msgstr "" -msgid "Satellite Status" +#. Android resource: @strings/east_yorkshire_with_hull +msgid "East yorkshire with hull" msgstr "" -msgid "NMEA Data" +#. Android resource: @strings/essex +msgid "Essex" msgstr "" -msgid "car_shortest" +#. Android resource: @strings/herefordshire +msgid "Herefordshire" msgstr "" -msgid "car_avoid_tolls" +#. Android resource: @strings/kent +msgid "Kent" msgstr "" -msgid "car_pedantic" +#. Android resource: @strings/lancashire +msgid "Lancashire" msgstr "" -msgid "horse" -msgstr "perd" +#. Android resource: @strings/leicestershire +msgid "Leicestershire" +msgstr "" -msgid "Truck" +#. Android resource: @strings/norfolk +msgid "Norfolk" msgstr "" -#. Strings from android/res/values/strings.xml -#. Android resource: @strings/yes -msgid "Yes" +#. Android resource: @strings/nottinghamshire +msgid "Nottinghamshire" msgstr "" -#. Android resource: @strings/notification_ticker -msgid "Navit started" +#. Android resource: @strings/oxfordshire +msgid "Oxfordshire" msgstr "" -#. Android resource: @strings/notification_event_default -msgid "Navit running" +#. Android resource: @strings/shropshire +msgid "Shropshire" msgstr "" -#. Android resource: @strings/initial_info_box_title -msgid "Welcome to Navit" +#. Android resource: @strings/somerset +msgid "Somerset" msgstr "" -#. Android resource: @strings/initial_info_box_message -msgid "" -"Thank you for installing Navit!\n" -"\n" -"To start, select \"Download maps\" from the menu to download a map. Note: " -"The map filesize may be large (>50MB) - a wifi connection is recommended.\n" -"\n" -"Mapdata: (c) OpenStreetMap contributors\n" -"\n" -"Enjoy Navit!" +#. Android resource: @strings/south_yorkshire +msgid "South yorkshire" msgstr "" -#. Android resource: @strings/initial_info_box_OK -msgid "OK" +#. Android resource: @strings/suffolk +msgid "Suffolk" msgstr "" -#. Android resource: @strings/initial_info_box_more_info -msgid "More info" +#. Android resource: @strings/surrey +msgid "Surrey" msgstr "" -#. Android resource: @strings/optionsmenu_zoom_in -msgid "Zoom in" +#. Android resource: @strings/wiltshire +msgid "Wiltshire" msgstr "" -#. Android resource: @strings/optionsmenu_zoom_out -msgid "Zoom out" +#. Android resource: @strings/scotland +msgid "Scotland" msgstr "" -#. Android resource: @strings/optionsmenu_download_maps -msgid "Download maps" +#. Android resource: @strings/wales +msgid "Wales" msgstr "" -#. Android resource: @strings/optionsmenu_toggle_poi -msgid "Toggle POIs" +#. Android resource: @strings/crete +msgid "Crete" msgstr "" -#. Android resource: @strings/optionsmenu_exit_navit -msgid "Exit Navit" +#. Android resource: @strings/north_america +msgid "North America" msgstr "" -#. Android resource: @strings/optionsmenu_backup_restore -msgid "Backup / Restore" +#. Android resource: @strings/alaska +msgid "Alaska" msgstr "" -#. Android resource: @strings/optionsmenu_set_map_location -msgid "Set map location" +#. Android resource: @strings/hawaii +msgid "Hawaii" msgstr "" -#. Android resource: @strings/map_delete -msgid "Delete this map?" +#. Android resource: @strings/usa +msgid "USA" msgstr "" -#. Android resource: @strings/map_download_downloading -msgid "Downloading:" +#. Android resource: @strings/except_alaska_and_hawaii +msgid "(except Alaska and Hawaii)" msgstr "" -#. Android resource: @strings/map_download_download_error -msgid "Error downloading map." +#. Android resource: @strings/midwest +msgid "Midwest" msgstr "" -#. Android resource: @strings/map_download_download_aborted -msgid "Map download aborted" +#. Android resource: @strings/michigan +msgid "Michigan" msgstr "" -#. Android resource: @strings/map_no_fix -msgid "No location. Reopen after location fix." +#. Android resource: @strings/ohio +msgid "Ohio" msgstr "" -#. Android resource: @strings/maps_for_current_location -msgid "Maps containing current location" +#. Android resource: @strings/northeast +msgid "Northeast" msgstr "" -#. Android resource: @strings/address_search_title -msgid "Address search" +#. Android resource: @strings/massachusetts +msgid "Massachusetts" msgstr "" -#. Android resource: @strings/address_enter_destination -msgid "Enter destination" +#. Android resource: @strings/vermont +msgid "Vermont" msgstr "" -#. Android resource: @strings/address_partial_match -msgid "Match partial address" +#. Android resource: @strings/pacific +msgid "Pacific" msgstr "" -#. Android resource: @strings/address_search_searching -msgid "Searching..." +#. Android resource: @strings/south +msgid "South" msgstr "" -#. Android resource: @strings/address_search_not_found -msgid "Address not found" +#. Android resource: @strings/arkansas +msgid "Arkansas" msgstr "" -#. Android resource: @strings/address_search_getting_results -msgid "Getting search results" +#. Android resource: @strings/district_of_columbia +msgid "District of Columbia" msgstr "" -#. Android resource: @strings/address_search_loading_results -msgid "Loading search results" +#. Android resource: @strings/florida +msgid "Florida" msgstr "" -#. Android resource: @strings/address_search_no_results -msgid "No results found" +#. Android resource: @strings/louisiana +msgid "Louisiana" msgstr "" -#. Android resource: @strings/address_search_no_text_entered -msgid "No text entered" +#. Android resource: @strings/maryland +msgid "Maryland" msgstr "" -#. Android resource: @strings/address_search_set_destination -msgid "Setting destination to:" +#. Android resource: @strings/mississippi +msgid "Mississippi" msgstr "" -#. Android resource: @strings/choose_an_action -msgid "Choose an action" +#. Android resource: @strings/oklahoma +msgid "Oklahoma" msgstr "" -#. Android resource: @strings/please_insert_an_sd_card -msgid "Please insert an SD Card" +#. Android resource: @strings/texas +msgid "Texas" msgstr "" -#. Android resource: @strings/backing_up -msgid "Backing up..." +#. Android resource: @strings/virginia +msgid "Virginia" msgstr "" -#. Android resource: @strings/restoring -msgid "Restoring..." +#. Android resource: @strings/west_virginia +msgid "West Virginia" msgstr "" -#. Android resource: @strings/failed_to_create_backup_directory -msgid "Failed to create backup directory" +#. Android resource: @strings/west +msgid "West" msgstr "" -#. Android resource: @strings/backup_failed -msgid "Backup failed" +#. Android resource: @strings/arizona +msgid "Arizona" msgstr "" -#. Android resource: @strings/no_backup_found -msgid "No backup found" +#. Android resource: @strings/california +msgid "California" msgstr "" -#. Android resource: @strings/failed_to_restore -msgid "Failed to restore" +#. Android resource: @strings/colorado +msgid "Colorado" msgstr "" -#. Android resource: @strings/backup_successful -msgid "Backup successful" +#. Android resource: @strings/idaho +msgid "Idaho" msgstr "" -#. Android resource: @strings/restore_successful_please_restart_navit -msgid "" -"Restore Successful\n" -"Please restart Navit" +#. Android resource: @strings/montana +msgid "Montana" msgstr "" -#. Android resource: @strings/backup_not_found -msgid "Backup not found" +#. Android resource: @strings/new_mexico +msgid "New Mexico" msgstr "" -#. Android resource: @strings/restore_failed -msgid "Restore failed" +#. Android resource: @strings/nevada +msgid "Nevada" msgstr "" -#. Android resource: @strings/select_backup -msgid "Select backup" +#. Android resource: @strings/oregon +msgid "Oregon" msgstr "" -#. Android resource: @strings/backup -msgid "Backup" +#. Android resource: @strings/utah +msgid "Utah" msgstr "" -#. Android resource: @strings/restore -msgid "Restore" +#. Android resource: @strings/washington_state +msgid "Washington State" msgstr "" -#. Android resource: @strings/TTS_title_data_missing -msgid "System text to speech engine data is missing" +#. Android resource: @strings/south_middle_america +msgid "South+Middle America" msgstr "" -#. Android resource: @strings/TTS_qery_install_data -msgid "" -"Navit can use any text to speech engine installed on your device. The " -"currently selected engine reports it is unable to speak in your language. " -"Should we ask the system to show voice download dialog?" +#. Android resource: @strings/guyane_francaise +msgid "Guyane Francaise" msgstr "" #, c-format +#~ msgid "Route %4.0fkm %02d:%02d ETA" +#~ msgstr "Roete %4.0fkm %02d:%02d aankomstyd" + +#, c-format #~ msgid "then leave the roundabout at the %1$s %2$s" #~ msgstr "verlaat dan die sirkel by die %1$s %2$s" diff --git a/po/ar.po.in b/po/ar.po.in index 3a8af7491..0fc2f2957 100644 --- a/po/ar.po.in +++ b/po/ar.po.in @@ -11,7 +11,7 @@ msgid "" msgstr "" -"Project-Id-Version: navit 0.5.0\n" +"Project-Id-Version: navit 0.5.1\n" "Report-Msgid-Bugs-To: \n" "PO-Revision-Date: 2018-02-05 13:00+0000\n" "Last-Translator: abed alkareem alnatsheh <Unknown>\n" @@ -172,7 +172,6 @@ msgstr "" msgid "%1$sonto %2$s|neuter form" msgstr "" -#. TRANSLATORS: motorway ramp refers to the slip road for entering a motorway. msgid "onto the motorway ramp" msgstr "على الطريق السريع المنحدر" @@ -385,7 +384,6 @@ msgstr "و بعدها تكون قد وصلت إلى هدفك" msgid "You have reached your destination %s" msgstr "لقد وصلت إلى هدفك %s" -#. TRANSLATORS: Exit as a noun, as in "Exit 43 Greenmound-East" msgid "Interchange" msgstr "" @@ -471,6 +469,7 @@ msgid "Anguilla" msgstr "أنغويلا" #. 008 +#. Android resource: @strings/albania msgid "Albania" msgstr "ألبانيا" @@ -483,6 +482,7 @@ msgid "Netherlands Antilles" msgstr "الأنتيل الهولندية" #. 024 +#. Android resource: @strings/angola msgid "Angola" msgstr "أنغولا" @@ -491,6 +491,7 @@ msgid "Antarctica" msgstr "أنتاركتيكا" #. 032 +#. Android resource: @strings/argentina msgid "Argentina" msgstr "الأرجنتين" @@ -499,10 +500,12 @@ msgid "American Samoa" msgstr "ساموا الأميركية" #. 040 +#. Android resource: @strings/austria msgid "Austria" msgstr "النمسا" #. 036 +#. Android resource: @strings/australia msgid "Australia" msgstr "أستراليا" @@ -515,10 +518,12 @@ msgid "Aland Islands" msgstr "جزر أولان" #. 031 +#. Android resource: @strings/azerbaijan msgid "Azerbaijan" msgstr "أذربيجان" #. 070 +#. Android resource: @strings/bosnia_and_herzegovina msgid "Bosnia and Herzegovina" msgstr "البوسنة والهرسك" @@ -531,6 +536,7 @@ msgid "Bangladesh" msgstr "بنغلادش" #. 056 +#. Android resource: @strings/belgium msgid "Belgium" msgstr "بلجيكا" @@ -539,6 +545,7 @@ msgid "Burkina Faso" msgstr "بوركينا فاسو" #. 100 +#. Android resource: @strings/bulgaria msgid "Bulgaria" msgstr "بلغاريا" @@ -547,6 +554,7 @@ msgid "Bahrain" msgstr "البحرين" #. 108 +#. Android resource: @strings/burundi msgid "Burundi" msgstr "بوروندي" @@ -567,6 +575,7 @@ msgid "Brunei Darussalam" msgstr "بروناي دار السّلام" #. 068 +#. Android resource: @strings/bolivia msgid "Bolivia" msgstr "بوليفيا" @@ -575,6 +584,7 @@ msgid "Bonaire, Sint Eustatius and Saba" msgstr "" #. 076 +#. Android resource: @strings/brazil msgid "Brazil" msgstr "البرازيل" @@ -591,10 +601,12 @@ msgid "Bouvet Island" msgstr "جزيرة بوفيت" #. 072 +#. Android resource: @strings/botswana msgid "Botswana" msgstr "بوتسوانا" #. 112 +#. Android resource: @strings/belarus msgid "Belarus" msgstr "روسيا البيضاء \\ بيلاروس" @@ -603,6 +615,7 @@ msgid "Belize" msgstr "بيليز" #. 124 +#. Android resource: @strings/canada msgid "Canada" msgstr "كندا" @@ -611,6 +624,7 @@ msgid "Cocos (Keeling) Islands" msgstr "جزر الكوكوس (كيلنك)" #. 180 +#. Android resource: @strings/congo msgid "Congo, Democratic Republic of the" msgstr "جمهورية الكونغو الديمقراطيه" @@ -623,10 +637,12 @@ msgid "Congo" msgstr "الكونغو" #. 756 +#. Android resource: @strings/switzerland msgid "Switzerland" msgstr "سويسرا" #. 384 +#. Android resource: @strings/cotedivoire msgid "Cote d'Ivoire" msgstr "ساحل العاج" @@ -635,6 +651,7 @@ msgid "Cook Islands" msgstr "جزر كوك" #. 152 +#. Android resource: @strings/chile msgid "Chile" msgstr "تشيلي" @@ -643,10 +660,12 @@ msgid "Cameroon" msgstr "الكامرون" #. 156 +#. Android resource: @strings/china msgid "China" msgstr "الصين" #. 170 +#. Android resource: @strings/colombia msgid "Colombia" msgstr "كولومبيا" @@ -655,6 +674,7 @@ msgid "Costa Rica" msgstr "كوستاريكا" #. 192 +#. Android resource: @strings/cuba msgid "Cuba" msgstr "كوبا" @@ -671,14 +691,17 @@ msgid "Christmas Island" msgstr "جزر الكريسماس" #. 196 +#. Android resource: @strings/cyprus msgid "Cyprus" msgstr "قبرص" #. 203 +#. Android resource: @strings/czech_republic msgid "Czech Republic" msgstr "جمهورية التشيك" #. 276 +#. Android resource: @strings/germany msgid "Germany" msgstr "ألمانيا" @@ -687,6 +710,7 @@ msgid "Djibouti" msgstr "جيبوتي" #. 208 +#. Android resource: @strings/denmark msgid "Denmark" msgstr "الدنمارك" @@ -695,6 +719,7 @@ msgid "Dominica" msgstr "الدّومينيكا" #. 214 +#. Android resource: @strings/dominican_republic msgid "Dominican Republic" msgstr "جمهورية الدومينيكان" @@ -703,10 +728,12 @@ msgid "Algeria" msgstr "الجزائر" #. 218 +#. Android resource: @strings/ecuador msgid "Ecuador" msgstr "الإكوادور" #. 233 +#. Android resource: @strings/estonia msgid "Estonia" msgstr "أستونيا" @@ -723,14 +750,17 @@ msgid "Eritrea" msgstr "أريتريا" #. 724 +#. Android resource: @strings/spain msgid "Spain" msgstr "إسبانيا" #. 231 +#. Android resource: @strings/ethiopia msgid "Ethiopia" msgstr "الحبشة" #. 246 +#. Android resource: @strings/finland msgid "Finland" msgstr "فنلندا" @@ -747,10 +777,12 @@ msgid "Micronesia, Federated States of" msgstr "ميكرونيزيا، ولايات ميكرونيزيا الفدرالية" #. 234 +#. Android resource: @strings/faroe_islands msgid "Faroe Islands" msgstr "جزر الفارو" #. 250 +#. Android resource: @strings/france msgid "France" msgstr "فرنسا" @@ -759,6 +791,7 @@ msgid "Gabon" msgstr "الغابون" #. 826 +#. Android resource: @strings/united_kingdom msgid "United Kingdom" msgstr "المملكة المتّحدة" @@ -795,6 +828,7 @@ msgid "Gambia" msgstr "غامبيا" #. 324 +#. Android resource: @strings/guinea msgid "Guinea" msgstr "غينيا" @@ -807,6 +841,7 @@ msgid "Equatorial Guinea" msgstr "غينيا الاستوائيه" #. 300 +#. Android resource: @strings/greece msgid "Greece" msgstr "اليونان" @@ -827,6 +862,7 @@ msgid "Guinea-Bissau" msgstr "غينيا بيساو" #. 328 +#. Android resource: @strings/guyana msgid "Guyana" msgstr "غيانا" @@ -843,26 +879,32 @@ msgid "Honduras" msgstr "الهوندوراس" #. 191 +#. Android resource: @strings/croatia msgid "Croatia" msgstr "كرواتيا" #. 332 +#. Android resource: @strings/haiti msgid "Haiti" msgstr "هايتي" #. 348 +#. Android resource: @strings/hungary msgid "Hungary" msgstr "المجر (هنغاريا)" #. 360 +#. Android resource: @strings/indonesia msgid "Indonesia" msgstr "إندونيسيا" #. 372 +#. Android resource: @strings/ireland msgid "Ireland" msgstr "إيرلندا" #. 376 +#. Android resource: @strings/israel msgid "Israel" msgstr "فلسطين المحتلة" @@ -871,6 +913,7 @@ msgid "Isle of Man" msgstr "جزيرة مان" #. 356 +#. Android resource: @strings/india msgid "India" msgstr "الهند" @@ -879,18 +922,22 @@ msgid "British Indian Ocean Territory" msgstr "مقاطعة المحيط الهندي البريطانيّة" #. 368 +#. Android resource: @strings/iraq msgid "Iraq" msgstr "العراق" #. 364 +#. Android resource: @strings/iran msgid "Iran, Islamic Republic of" msgstr "إيران، الجمهوريّة الإسلاميّة الإيرانيّة" #. 352 +#. Android resource: @strings/iceland msgid "Iceland" msgstr "آيسلندا" #. 380 +#. Android resource: @strings/italy msgid "Italy" msgstr "إيطاليا" @@ -899,6 +946,7 @@ msgid "Jersey" msgstr "جيرسي" #. 388 +#. Android resource: @strings/jamaica msgid "Jamaica" msgstr "جامايكا" @@ -907,14 +955,17 @@ msgid "Jordan" msgstr "الأردن" #. 392 +#. Android resource: @strings/japan msgid "Japan" msgstr "اليابان" #. 404 +#. Android resource: @strings/kenya msgid "Kenya" msgstr "كينيا" #. 417 +#. Android resource: @strings/kyrgyzsyan msgid "Kyrgyzstan" msgstr "قرغيزستان" @@ -951,6 +1002,7 @@ msgid "Cayman Islands" msgstr "جزر الكايمان" #. 398 +#. Android resource: @strings/kazakhstan msgid "Kazakhstan" msgstr "كازاخستان" @@ -975,26 +1027,32 @@ msgid "Sri Lanka" msgstr "سريلانكا" #. 430 +#. Android resource: @strings/liberia msgid "Liberia" msgstr "ليبريا" #. 426 +#. Android resource: @strings/lesotho msgid "Lesotho" msgstr "ليسوتو" #. 440 +#. Android resource: @strings/lithuania msgid "Lithuania" msgstr "ليثوانيا" #. 442 +#. Android resource: @strings/luxembourg msgid "Luxembourg" msgstr "اللكسمبورغ" #. 428 +#. Android resource: @strings/latvia msgid "Latvia" msgstr "لاتفيا" #. 434 +#. Android resource: @strings/libya msgid "Libya" msgstr "ليبيا" @@ -1019,6 +1077,7 @@ msgid "Saint Martin (French part)" msgstr "سانت مارتين (القطاع الفرنسي)" #. 450 +#. Android resource: @strings/madagascar msgid "Madagascar" msgstr "مدغشقر" @@ -1039,6 +1098,7 @@ msgid "Myanmar" msgstr "مينامار" #. 496 +#. Android resource: @strings/mongolia msgid "Mongolia" msgstr "منغوليا" @@ -1079,10 +1139,12 @@ msgid "Malawi" msgstr "مالاوي" #. 484 +#. Android resource: @strings/mexico msgid "Mexico" msgstr "المكسيك" #. 458 +#. Android resource: @strings/malaysia msgid "Malaysia" msgstr "ماليزيا" @@ -1091,10 +1153,12 @@ msgid "Mozambique" msgstr "الموزمبيق" #. 516 +#. Android resource: @strings/namibia msgid "Namibia" msgstr "ناميبيا" #. 540 +#. Android resource: @strings/new_caledonia msgid "New Caledonia" msgstr "قلدونيا الجديدة" @@ -1115,6 +1179,7 @@ msgid "Nicaragua" msgstr "نيكاراغوا" #. 528 +#. Android resource: @strings/netherlands msgid "Netherlands" msgstr "هولندا" @@ -1123,6 +1188,7 @@ msgid "Norway" msgstr "النروج" #. 524 +#. Android resource: @strings/nepal msgid "Nepal" msgstr "نيبال" @@ -1135,6 +1201,7 @@ msgid "Niue" msgstr "نيوي" #. 554 +#. Android resource: @strings/newzealand msgid "New Zealand" msgstr "نيوزيلاندا" @@ -1147,6 +1214,7 @@ msgid "Panama" msgstr "باناما" #. 604 +#. Android resource: @strings/peru msgid "Peru" msgstr "البيرو" @@ -1159,14 +1227,17 @@ msgid "Papua New Guinea" msgstr "بابوا غينيا الجديدة" #. 608 +#. Android resource: @strings/philippines msgid "Philippines" msgstr "الفلبّين" #. 586 +#. Android resource: @strings/pakistan msgid "Pakistan" msgstr "باكستان" #. 616 +#. Android resource: @strings/poland msgid "Poland" msgstr "بولونيا" @@ -1187,6 +1258,7 @@ msgid "Palestinian Territory, Occupied" msgstr "فلسطين المحتلّة، الأراضي الفلسطينيّة المحتلّة" #. 620 +#. Android resource: @strings/portugal msgid "Portugal" msgstr "البرتغال" @@ -1195,6 +1267,7 @@ msgid "Palau" msgstr "بالاو" #. 600 +#. Android resource: @strings/paraguay msgid "Paraguay" msgstr "الباراغواي" @@ -1203,10 +1276,12 @@ msgid "Qatar" msgstr "قطر" #. 638 +#. Android resource: @strings/reunion msgid "Reunion" msgstr "ريونيون" #. 642 +#. Android resource: @strings/romania msgid "Romania" msgstr "رومانيا" @@ -1215,14 +1290,17 @@ msgid "Serbia" msgstr "صربيا" #. 643 +#. Android resource: @strings/russian_federation msgid "Russian Federation" msgstr "الإتّحاد الروسي" #. 646 +#. Android resource: @strings/rwanda msgid "Rwanda" msgstr "رواندا" #. 682 +#. Android resource: @strings/saudi_arabia msgid "Saudi Arabia" msgstr "المملكة العربيّة السّعوديّة" @@ -1243,6 +1321,7 @@ msgid "Sweden" msgstr "السّويد" #. 702 +#. Android resource: @strings/singapore msgid "Singapore" msgstr "سنغفورة" @@ -1259,6 +1338,7 @@ msgid "Svalbard and Jan Mayen" msgstr "سفالبارد وجان مايان" #. 703 +#. Android resource: @strings/slovakia msgid "Slovakia" msgstr "سلوفاكيا" @@ -1279,6 +1359,7 @@ msgid "Somalia" msgstr "الصّومال" #. 740 +#. Android resource: @strings/suriname msgid "Suriname" msgstr "سورينام" @@ -1323,6 +1404,7 @@ msgid "Togo" msgstr "توغو" #. 764 +#. Android resource: @strings/thailand msgid "Thailand" msgstr "تايلندا" @@ -1339,6 +1421,7 @@ msgid "Timor-Leste" msgstr "تيمور الشرقية" #. 795 +#. Android resource: @strings/turkmenistan msgid "Turkmenistan" msgstr "تركمانستان" @@ -1351,6 +1434,7 @@ msgid "Tonga" msgstr "تونجا" #. 792 +#. Android resource: @strings/turkey msgid "Turkey" msgstr "تركيا" @@ -1367,14 +1451,17 @@ msgid "Taiwan, Province of China" msgstr "تايوان، محافظة صينية" #. 834 +#. Android resource: @strings/tanzania msgid "Tanzania, United Republic of" msgstr "تنزانيا، جمهوريّة تنزانيا المتّحدة" #. 804 +#. Android resource: @strings/ukraine msgid "Ukraine" msgstr "أوكرانيا" #. 800 +#. Android resource: @strings/uganda msgid "Uganda" msgstr "اوغندا" @@ -1387,6 +1474,7 @@ msgid "United States" msgstr "الولايات المتّحدة الأمريكية" #. 858 +#. Android resource: @strings/uruguay msgid "Uruguay" msgstr "الأوروغواي" @@ -1403,6 +1491,7 @@ msgid "Saint Vincent and the Grenadines" msgstr "سانت فنسنت والجرينادينز" #. 862 +#. Android resource: @strings/venezuela msgid "Venezuela" msgstr "فنزويلا" @@ -1439,6 +1528,7 @@ msgid "Mayotte" msgstr "مايوت" #. 710 +#. Android resource: @strings/south_africa msgid "South Africa" msgstr "جنوب إفريقيا" @@ -1466,23 +1556,23 @@ msgid "" msgstr "" #. We have not found an existing config file from all possibilities -msgid "No config file navit.xml, navit.xml.local found\n" +msgid "No config file navit.xml, navit.xml.local found" msgstr "" #, c-format -msgid "Error parsing config file '%s': %s\n" +msgid "Error parsing config file '%s': %s" msgstr "" #, c-format -msgid "Using config file '%s'\n" +msgid "Using config file '%s'" msgstr "" #, c-format -msgid "Error: No configuration found in config file '%s'\n" +msgid "Error: No configuration found in config file '%s'" msgstr "" msgid "" -"Internal initialization failed, exiting. Check previous error messages.\n" +"Internal initialization failed, exiting. Check previous error messages." msgstr "" msgid "unknown street" @@ -1695,7 +1785,12 @@ msgstr "" msgid "Shopping" msgstr "" -msgid "Select a search radius from screen center" +#. Input is in kilometers +msgid "Select a search radius from screen center in km" +msgstr "" + +#. Input is in miles. +msgid "Select a search radius from screen center in miles" msgstr "" #, c-format @@ -1703,15 +1798,15 @@ msgid "POI %s. %s" msgstr "" #, c-format -msgid "Set destination to %ld, %ld \n" +msgid "Set destination to %ld, %ld " msgstr "" #, c-format -msgid "Set map to %ld, %ld \n" +msgid "Set map to %ld, %ld " msgstr "" #, c-format -msgid "Set next visit to %ld, %ld \n" +msgid "Set next visit to %ld, %ld " msgstr "" msgid "POI search" @@ -1720,9 +1815,6 @@ msgstr "" msgid "Select a category" msgstr "" -msgid "Select a distance to look for (km)" -msgstr "" - msgid "Select a POI" msgstr "" @@ -1735,7 +1827,7 @@ msgstr "" msgid "Direction" msgstr "" -msgid "Distance(m)" +msgid "Distance" msgstr "" msgid "Name" @@ -2046,9 +2138,6 @@ msgstr "إنتبه ! آلة تصوير" msgid "Please decrease your speed" msgstr "ألرجاء خفض سرعتك" -msgid "filenamePath" -msgstr "" - msgid "Vehicle Position" msgstr "موقع وسيلة التنقل" @@ -2120,12 +2209,12 @@ msgid "Description" msgstr "الوصف" msgid "" -"Drop last \n" +"Drop last\n" "Waypoint" msgstr "" msgid "" -"Drop next \n" +"Drop next\n" "Waypoint" msgstr "" @@ -2155,6 +2244,10 @@ msgstr "" msgid "Yes" msgstr "نعم" +#. Android resource: @strings/cancel +msgid "Cancel" +msgstr "إلغاء" + #. Android resource: @strings/notification_ticker msgid "Navit started" msgstr "نافيت بدء التشغيل" @@ -2251,6 +2344,12 @@ msgstr "تم إجهاض عملية تنزيل الخريطة" msgid "Not enough free space" msgstr "لا يوجد مجال فارغ كافي" +#. Android resource: @strings/map_download_oversize +msgid "" +"Sorry, we currently do not support maps above 3.8G on Android, please select " +"a smaller one." +msgstr "" + #. Android resource: @strings/map_no_fix msgid "No location. Reopen after location fix." msgstr "" @@ -2259,6 +2358,34 @@ msgstr "" msgid "Maps containing current location" msgstr "الخرائط المحتوية على الموقع الحالي" +#. Android resource: @strings/maps_installed +msgid "Installed maps" +msgstr "" + +#. Android resource: @strings/map_downloading +msgid "downloading" +msgstr "يُنزّل" + +#. Android resource: @strings/map_download_medium_unavailable +msgid "Media selected for map storage is not available" +msgstr "" + +#. Android resource: @strings/map_download_error_writing_map +msgid "Error writing map!" +msgstr "خطأ عند كتابة الخريطة!" + +#. Android resource: @strings/map_location_changed +#, c-format +msgid "New location set to %s Restart Navit to apply the changes." +msgstr "" + +#. Android resource: @strings/map_location_unavailable +#, c-format +msgid "" +"Current map location %s is not available Please restart Navit after you " +"attach an SD card or select a different map location." +msgstr "" + #. Android resource: @strings/address_search_title msgid "Address search" msgstr "البحث عن عنوان" @@ -2390,342 +2517,508 @@ msgstr "" msgid "One or more ungranted permissions" msgstr "" -#, c-format -#~ msgid "Route %4.0fkm %02d:%02d ETA" -#~ msgstr "Route %4.0fكلم %02d:%02d ETA" +#. Android resource: @strings/whole_planet +msgid "Whole Planet" +msgstr "كامل القرة الأرضية" -#~ msgid "Downloaded maps" -#~ msgstr "الخرائط المنزلة" +#. Android resource: @strings/africa +msgid "Africa" +msgstr "إفريقيا" -#~ msgid "partial match" -#~ msgstr "تطابق جزئي" +#. Android resource: @strings/canary_islands +msgid "Canary Islands" +msgstr "جزر الكناري" + +#. Android resource: @strings/asia +msgid "Asia" +msgstr "آسيا" + +#. Android resource: @strings/taiwan +msgid "Taiwan" +msgstr "تايوان" + +#. Android resource: @strings/korea +msgid "Korea" +msgstr "كوريا" + +#. Android resource: @strings/uae_other +msgid "UAE+Other" +msgstr "الإمارت العرية المتحدة و أخرى" + +#. Android resource: @strings/oceania +msgid "Oceania" +msgstr "أوقيانيا" + +#. Android resource: @strings/tasmania +msgid "Tasmania" +msgstr "تسمانيا" + +#. Android resource: @strings/victoria +msgid "Victoria" +msgstr "فيكتوريا" + +#. Android resource: @strings/new_south_wales +msgid "New South Wales" +msgstr "نيو ساوث ويلز" + +#. Android resource: @strings/europe +msgid "Europe" +msgstr "أوروبا" + +#. Android resource: @strings/western_europe +msgid "Western Europe" +msgstr "أوروبا الغربية" + +#. Android resource: @strings/azores +msgid "Azores" +msgstr "جزر الأزور" -#~ msgid "Taiwan" -#~ msgstr "تايوان" +#. Android resource: @strings/benelux +msgid "BeNeLux" +msgstr "بلجيكا هولاندة اللكسمبرغ" -#~ msgid "Asia" -#~ msgstr "آسيا" +#. Android resource: @strings/alsace +msgid "Alsace" +msgstr "الألزاس" -#~ msgid "Canary Islands" -#~ msgstr "جزر الكناري" +#. Android resource: @strings/aquitaine +msgid "Aquitaine" +msgstr "" -#~ msgid "Africa" -#~ msgstr "إفريقيا" +#. Android resource: @strings/auvergne +msgid "Auvergne" +msgstr "" -#~ msgid "Korea" -#~ msgstr "كوريا" +#. Android resource: @strings/centre +msgid "Centre" +msgstr "الوسط" -#~ msgid "BeNeLux" -#~ msgstr "بلجيكا هولاندة اللكسمبرغ" +#. Android resource: @strings/bretagne +msgid "Bretagne" +msgstr "" -#~ msgid "Alsace" -#~ msgstr "الألزاس" +#. Android resource: @strings/bourgogne +msgid "Bourgogne" +msgstr "" -#~ msgid "Tasmania" -#~ msgstr "تسمانيا" +#. Android resource: @strings/basse_normandie +msgid "Basse-Normandie" +msgstr "" -#~ msgid "Victoria" -#~ msgstr "فيكتوريا" +#. Android resource: @strings/champagne_ardenne +msgid "Champagne-Ardenne" +msgstr "" -#~ msgid "UAE+Other" -#~ msgstr "الإمارت العرية المتحدة و أخرى" +#. Android resource: @strings/corse +msgid "Corse" +msgstr "كورسيكا" -#~ msgid "Oceania" -#~ msgstr "أوقيانيا" +#. Android resource: @strings/franche_comte +msgid "Franche-Comte" +msgstr "" -#~ msgid "Western Europe" -#~ msgstr "أوروبا الغربية" +#. Android resource: @strings/haute_normandie +msgid "Haute-Normandie" +msgstr "" -#~ msgid "New South Wales" -#~ msgstr "نيو ساوث ويلز" +#. Android resource: @strings/ile_de_france +msgid "Ile-de-France" +msgstr "عاصمة فرنسا و ضواحيها" -#~ msgid "Europe" -#~ msgstr "أوروبا" +#. Android resource: @strings/languedoc_roussillon +msgid "Languedoc-Roussillon" +msgstr "" -#~ msgid "Corse" -#~ msgstr "كورسيكا" +#. Android resource: @strings/limousin +msgid "Limousin" +msgstr "" -#~ msgid "Ile-de-France" -#~ msgstr "عاصمة فرنسا و ضواحيها" +#. Android resource: @strings/lorraine +msgid "Lorraine" +msgstr "" -#~ msgid "Bayern" -#~ msgstr "بافاريا" +#. Android resource: @strings/midi_pyrenees +msgid "Midi-Pyrenees" +msgstr "" -#~ msgid "Oberbayern" -#~ msgstr "بافاريا العليا" +#. Android resource: @strings/nord_pas_de_calais +msgid "Nord-pas-de-Calais" +msgstr "" -#~ msgid "Niederbayern" -#~ msgstr "بافاريا السفلى" +#. Android resource: @strings/pays_de_la_loire +msgid "Pays-de-la-Loire" +msgstr "" -#~ msgid "Bremen" -#~ msgstr "بريمن" +#. Android resource: @strings/picardie +msgid "Picardie" +msgstr "بيكاردي" -#~ msgid "Hamburg" -#~ msgstr "هامبرغ" +#. Android resource: @strings/poitou_charentes +msgid "Poitou-Charentes" +msgstr "بواتو شارانت" -#~ msgid "Berlin" -#~ msgstr "برلين" +#. Android resource: @strings/provence_alpes_cote_d_azur +msgid "Provence-Alpes-Cote-d-Azur" +msgstr "" -#~ msgid "Sachsen" -#~ msgstr "ساكسونيا" +#. Android resource: @strings/rhone_alpes +msgid "Rhone-Alpes" +msgstr "رون-جبال الألب" -#~ msgid "England" -#~ msgstr "بريطانيا" +#. Android resource: @strings/baden_wuerttemberg +msgid "Baden-Wuerttemberg" +msgstr "بادن فورتمبيرغ" -#~ msgid "Scandinavia" -#~ msgstr "سكندينافيا" +#. Android resource: @strings/bayern +msgid "Bayern" +msgstr "بافاريا" -#~ msgid "Oxfordshire" -#~ msgstr "أوكسفوردشاير" +#. Android resource: @strings/mittelfranken +msgid "Mittelfranken" +msgstr "فرانكن الوسطى" -#~ msgid "Norfolk" -#~ msgstr "نورفولك" +#. Android resource: @strings/niederbayern +msgid "Niederbayern" +msgstr "بافاريا السفلى" -#~ msgid "Crete" -#~ msgstr "كريتا" +#. Android resource: @strings/oberbayern +msgid "Oberbayern" +msgstr "بافاريا العليا" -#~ msgid "North America" -#~ msgstr "أمريكا الشمالية" +#. Android resource: @strings/oberfranken +msgid "Oberfranken" +msgstr "فرانكن العليا" -#~ msgid "South yorkshire" -#~ msgstr "يوركشاير الجنوبية" +#. Android resource: @strings/oberpfalz +msgid "Oberpfalz" +msgstr "بفالز العليا" -#~ msgid "Suffolk" -#~ msgstr "سوفولك" +#. Android resource: @strings/schwaben +msgid "Schwaben" +msgstr "شفابن" -#~ msgid "Shropshire" -#~ msgstr "شروبشاير" +#. Android resource: @strings/unterfranken +msgid "Unterfranken" +msgstr "فرانكن السفلى" -#~ msgid "Somerset" -#~ msgstr "سومرست" +#. Android resource: @strings/berlin +msgid "Berlin" +msgstr "برلين" -#~ msgid "Ohio" -#~ msgstr "أوهايو" +#. Android resource: @strings/brandenburg +msgid "Brandenburg" +msgstr "براندنبورغ" -#~ msgid " (except Alaska and Hawaii)" -#~ msgstr " (بدون ألاسكا و هاواي)" +#. Android resource: @strings/bremen +msgid "Bremen" +msgstr "بريمن" -#~ msgid "USA" -#~ msgstr "الوﻻيات المتحدة الامريكية" +#. Android resource: @strings/hamburg +msgid "Hamburg" +msgstr "هامبرغ" -#~ msgid "Hawaii" -#~ msgstr "هاواي" +#. Android resource: @strings/hessen +msgid "Hessen" +msgstr "هسن" -#~ msgid "Alaska" -#~ msgstr "ألاسكا" +#. Android resource: @strings/mecklenburg_vorpommern +msgid "Mecklenburg-Vorpommern" +msgstr "مكليمبورغ-فوربومرن" -#~ msgid "Northeast" -#~ msgstr "الشمال الشرقي" +#. Android resource: @strings/niedersachsen +msgid "Niedersachsen" +msgstr "نيدرزاكسن" -#~ msgid "Michigan" -#~ msgstr "ميشيغان" +#. Android resource: @strings/nordrhein_westfalen +msgid "Nordrhein-westfalen" +msgstr "نوردراين-فيستفالن" -#~ msgid "Midwest" -#~ msgstr "وسط الغرب" +#. Android resource: @strings/rheinland_pfalz +msgid "Rheinland-Pfalz" +msgstr "راينلاند-بفالز" -#~ msgid "Vermont" -#~ msgstr "فيرمونت" +#. Android resource: @strings/saarland +msgid "Saarland" +msgstr "زارلاند" -#~ msgid "Massachusetts" -#~ msgstr "ماساتشوستس" +#. Android resource: @strings/sachsen_anhalt +msgid "Sachsen-Anhalt" +msgstr "زاكسن-أنهلت" -#~ msgid "Pacific" -#~ msgstr "المحيط الهادئ" +#. Android resource: @strings/sachsen +msgid "Sachsen" +msgstr "ساكسونيا" -#~ msgid "South" -#~ msgstr "الجنوب" +#. Android resource: @strings/schleswig_holstein +msgid "Schleswig-Holstein" +msgstr "شليسفيغ - هولشتاين" -#~ msgid "Arkansas" -#~ msgstr "أركنساس" +#. Android resource: @strings/thueringen +msgid "Thueringen" +msgstr "تورينغن" -#~ msgid "District of Columbia" -#~ msgstr "مقاطعة كولومبيا" +#. Android resource: @strings/mallorca +msgid "Mallorca" +msgstr "مايوركا" -#~ msgid "Florida" -#~ msgstr "فلوريدا" +#. Android resource: @strings/galicia +msgid "Galicia" +msgstr "غاليسيا" -#~ msgid "Maryland" -#~ msgstr "ميريلاند" +#. Android resource: @strings/scandinavia +msgid "Scandinavia" +msgstr "سكندينافيا" -#~ msgid "Oklahoma" -#~ msgstr "أوكلاهوما" +#. Android resource: @strings/england +msgid "England" +msgstr "بريطانيا" -#~ msgid "Louisiana" -#~ msgstr "لويزيانا" +#. Android resource: @strings/buckinghamshire +msgid "Buckinghamshire" +msgstr "باكينجهامشير" -#~ msgid "Mississippi" -#~ msgstr "ميسيسيبي" +#. Android resource: @strings/cambridgeshire +msgid "Cambridgeshire" +msgstr "كامبريدجشاير" -#~ msgid "Texas" -#~ msgstr "تكساس" +#. Android resource: @strings/cumbria +msgid "Cumbria" +msgstr "كمبريا" -#~ msgid "Nevada" -#~ msgstr "نيفادا" +#. Android resource: @strings/east_yorkshire_with_hull +msgid "East yorkshire with hull" +msgstr "" -#~ msgid "New Mexico" -#~ msgstr "نيو مكسيكو" +#. Android resource: @strings/essex +msgid "Essex" +msgstr "" -#~ msgid "West Virginia" -#~ msgstr "غرب فيرجينيا" +#. Android resource: @strings/herefordshire +msgid "Herefordshire" +msgstr "هيريفوردشاير" -#~ msgid "Virginia" -#~ msgstr "فرجينيا" +#. Android resource: @strings/kent +msgid "Kent" +msgstr "كنت" -#~ msgid "Arizona" -#~ msgstr "أريزونا" +#. Android resource: @strings/lancashire +msgid "Lancashire" +msgstr "لانكشاير" -#~ msgid "West" -#~ msgstr "الغرب" +#. Android resource: @strings/leicestershire +msgid "Leicestershire" +msgstr "لايسسترشاير" -#~ msgid "California" -#~ msgstr "كاليفورنيا" +#. Android resource: @strings/norfolk +msgid "Norfolk" +msgstr "نورفولك" -#~ msgid "Montana" -#~ msgstr "مونتانا" +#. Android resource: @strings/nottinghamshire +msgid "Nottinghamshire" +msgstr "نوتينغمشاير" -#~ msgid "Idaho" -#~ msgstr "إداهو" +#. Android resource: @strings/oxfordshire +msgid "Oxfordshire" +msgstr "أوكسفوردشاير" -#~ msgid "Colorado" -#~ msgstr "كولورادو" +#. Android resource: @strings/shropshire +msgid "Shropshire" +msgstr "شروبشاير" -#~ msgid "Error downloading map!" -#~ msgstr "خطأ أثناء تنزيل الخريطة!" +#. Android resource: @strings/somerset +msgid "Somerset" +msgstr "سومرست" -#~ msgid "downloading" -#~ msgstr "يُنزّل" +#. Android resource: @strings/south_yorkshire +msgid "South yorkshire" +msgstr "يوركشاير الجنوبية" -#~ msgid "Washington State" -#~ msgstr "ولاية واشنطن" +#. Android resource: @strings/suffolk +msgid "Suffolk" +msgstr "سوفولك" -#~ msgid "South+Middle America" -#~ msgstr "جنوب و وسط امريكا" +#. Android resource: @strings/surrey +msgid "Surrey" +msgstr "سورّي" -#~ msgid "Oregon" -#~ msgstr "أوريغون" +#. Android resource: @strings/wiltshire +msgid "Wiltshire" +msgstr "ويلتشايرر" -#~ msgid "Utah" -#~ msgstr "يوتاه" +#. Android resource: @strings/scotland +msgid "Scotland" +msgstr "أسكتلندا" -#~ msgid "Error writing map!" -#~ msgstr "خطأ عند كتابة الخريطة!" +#. Android resource: @strings/wales +msgid "Wales" +msgstr "ويلز" -#~ msgid "Map download aborted!" -#~ msgstr "تم إجهاض عملية التنزيل للخريطة !" +#. Android resource: @strings/crete +msgid "Crete" +msgstr "كريتا" + +#. Android resource: @strings/north_america +msgid "North America" +msgstr "أمريكا الشمالية" + +#. Android resource: @strings/alaska +msgid "Alaska" +msgstr "ألاسكا" + +#. Android resource: @strings/hawaii +msgid "Hawaii" +msgstr "هاواي" -#~ msgid "Whole Planet" -#~ msgstr "كامل القرة الأرضية" +#. Android resource: @strings/usa +msgid "USA" +msgstr "الوﻻيات المتحدة الامريكية" -#~ msgid "Azores" -#~ msgstr "جزر الأزور" +#. Android resource: @strings/except_alaska_and_hawaii +msgid "(except Alaska and Hawaii)" +msgstr "" + +#. Android resource: @strings/midwest +msgid "Midwest" +msgstr "وسط الغرب" -#~ msgid "Cancel" -#~ msgstr "إلغاء" +#. Android resource: @strings/michigan +msgid "Michigan" +msgstr "ميشيغان" -#~ msgid "Centre" -#~ msgstr "الوسط" +#. Android resource: @strings/ohio +msgid "Ohio" +msgstr "أوهايو" -#~ msgid "Mittelfranken" -#~ msgstr "فرانكن الوسطى" +#. Android resource: @strings/northeast +msgid "Northeast" +msgstr "الشمال الشرقي" -#~ msgid "Baden-Wuerttemberg" -#~ msgstr "بادن فورتمبيرغ" +#. Android resource: @strings/massachusetts +msgid "Massachusetts" +msgstr "ماساتشوستس" -#~ msgid "Rhone-Alpes" -#~ msgstr "رون-جبال الألب" +#. Android resource: @strings/vermont +msgid "Vermont" +msgstr "فيرمونت" -#~ msgid "Oberpfalz" -#~ msgstr "بفالز العليا" +#. Android resource: @strings/pacific +msgid "Pacific" +msgstr "المحيط الهادئ" -#~ msgid "Oberfranken" -#~ msgstr "فرانكن العليا" +#. Android resource: @strings/south +msgid "South" +msgstr "الجنوب" -#~ msgid "Picardie" -#~ msgstr "بيكاردي" +#. Android resource: @strings/arkansas +msgid "Arkansas" +msgstr "أركنساس" -#~ msgid "Poitou-Charentes" -#~ msgstr "بواتو شارانت" +#. Android resource: @strings/district_of_columbia +msgid "District of Columbia" +msgstr "مقاطعة كولومبيا" -#~ msgid "Unterfranken" -#~ msgstr "فرانكن السفلى" +#. Android resource: @strings/florida +msgid "Florida" +msgstr "فلوريدا" -#~ msgid "Schwaben" -#~ msgstr "شفابن" +#. Android resource: @strings/louisiana +msgid "Louisiana" +msgstr "لويزيانا" -#~ msgid "Niedersachsen" -#~ msgstr "نيدرزاكسن" +#. Android resource: @strings/maryland +msgid "Maryland" +msgstr "ميريلاند" -#~ msgid "Nordrhein-westfalen" -#~ msgstr "نوردراين-فيستفالن" +#. Android resource: @strings/mississippi +msgid "Mississippi" +msgstr "ميسيسيبي" -#~ msgid "Hessen" -#~ msgstr "هسن" +#. Android resource: @strings/oklahoma +msgid "Oklahoma" +msgstr "أوكلاهوما" -#~ msgid "Mecklenburg-Vorpommern" -#~ msgstr "مكليمبورغ-فوربومرن" +#. Android resource: @strings/texas +msgid "Texas" +msgstr "تكساس" -#~ msgid "Brandenburg" -#~ msgstr "براندنبورغ" +#. Android resource: @strings/virginia +msgid "Virginia" +msgstr "فرجينيا" -#~ msgid "Rheinland-Pfalz" -#~ msgstr "راينلاند-بفالز" +#. Android resource: @strings/west_virginia +msgid "West Virginia" +msgstr "غرب فيرجينيا" -#~ msgid "Saarland" -#~ msgstr "زارلاند" +#. Android resource: @strings/west +msgid "West" +msgstr "الغرب" -#~ msgid "Sachsen-Anhalt" -#~ msgstr "زاكسن-أنهلت" +#. Android resource: @strings/arizona +msgid "Arizona" +msgstr "أريزونا" -#~ msgid "Cumbria" -#~ msgstr "كمبريا" +#. Android resource: @strings/california +msgid "California" +msgstr "كاليفورنيا" -#~ msgid "Herefordshire" -#~ msgstr "هيريفوردشاير" +#. Android resource: @strings/colorado +msgid "Colorado" +msgstr "كولورادو" -#~ msgid "Thueringen" -#~ msgstr "تورينغن" +#. Android resource: @strings/idaho +msgid "Idaho" +msgstr "إداهو" -#~ msgid "Schleswig-Holstein" -#~ msgstr "شليسفيغ - هولشتاين" +#. Android resource: @strings/montana +msgid "Montana" +msgstr "مونتانا" -#~ msgid "Galicia" -#~ msgstr "غاليسيا" +#. Android resource: @strings/new_mexico +msgid "New Mexico" +msgstr "نيو مكسيكو" -#~ msgid "Mallorca" -#~ msgstr "مايوركا" +#. Android resource: @strings/nevada +msgid "Nevada" +msgstr "نيفادا" -#~ msgid "Cambridgeshire" -#~ msgstr "كامبريدجشاير" +#. Android resource: @strings/oregon +msgid "Oregon" +msgstr "أوريغون" -#~ msgid "Buckinghamshire" -#~ msgstr "باكينجهامشير" +#. Android resource: @strings/utah +msgid "Utah" +msgstr "يوتاه" -#~ msgid "Guyane Francaise" -#~ msgstr "غويانا الفرنسية" +#. Android resource: @strings/washington_state +msgid "Washington State" +msgstr "ولاية واشنطن" -#~ msgid "Nottinghamshire" -#~ msgstr "نوتينغمشاير" +#. Android resource: @strings/south_middle_america +msgid "South+Middle America" +msgstr "جنوب و وسط امريكا" -#~ msgid "Lancashire" -#~ msgstr "لانكشاير" +#. Android resource: @strings/guyane_francaise +msgid "Guyane Francaise" +msgstr "غويانا الفرنسية" -#~ msgid "Kent" -#~ msgstr "كنت" +#, c-format +#~ msgid "Route %4.0fkm %02d:%02d ETA" +#~ msgstr "Route %4.0fكلم %02d:%02d ETA" -#~ msgid "Leicestershire" -#~ msgstr "لايسسترشاير" +#~ msgid "Downloaded maps" +#~ msgstr "الخرائط المنزلة" -#~ msgid "Scotland" -#~ msgstr "أسكتلندا" +#~ msgid "partial match" +#~ msgstr "تطابق جزئي" -#~ msgid "Wales" -#~ msgstr "ويلز" +#~ msgid " (except Alaska and Hawaii)" +#~ msgstr " (بدون ألاسكا و هاواي)" -#~ msgid "Surrey" -#~ msgstr "سورّي" +#~ msgid "Error downloading map!" +#~ msgstr "خطأ أثناء تنزيل الخريطة!" -#~ msgid "Wiltshire" -#~ msgstr "ويلتشايرر" +#~ msgid "Map download aborted!" +#~ msgstr "تم إجهاض عملية التنزيل للخريطة !" #, c-format #~ msgid "then leave the roundabout at the %1$s %2$s" diff --git a/po/ast.po.in b/po/ast.po.in index 57704bb4b..30c8fbcc1 100644 --- a/po/ast.po.in +++ b/po/ast.po.in @@ -1,12 +1,12 @@ # Asturian translations for navit -# Copyright (C) 2006-2016 The Navit Team +# Copyright (C) 2006-2018 The Navit Team # This file is distributed under the same license as the navit package. # Many thanks to the contributors of this translation: # Xuacu Saturio https://launchpad.net/~xuacusk8 msgid "" msgstr "" -"Project-Id-Version: navit 0.5.0\n" +"Project-Id-Version: navit 0.5.1\n" "Report-Msgid-Bugs-To: \n" "PO-Revision-Date: 2015-07-19 03:57+0000\n" "Last-Translator: Xuacu Saturio <xuacusk8@gmail.com>\n" @@ -150,7 +150,6 @@ msgstr "" msgid "%1$sonto %2$s|neuter form" msgstr "" -#. TRANSLATORS: motorway ramp refers to the slip road for entering a motorway. msgid "onto the motorway ramp" msgstr "pal enllaz" @@ -363,7 +362,6 @@ msgstr "entós llegará al destín." msgid "You have reached your destination %s" msgstr "Llegó al destín %s" -#. TRANSLATORS: Exit as a noun, as in "Exit 43 Greenmound-East" msgid "Interchange" msgstr "" @@ -380,9 +378,15 @@ msgstr "Comandu" msgid "Length" msgstr "Llonxitú" +msgid "mi" +msgstr "" + msgid "km" msgstr "km" +msgid "feet" +msgstr "" + msgid "m" msgstr "m" @@ -443,6 +447,7 @@ msgid "Anguilla" msgstr "Anguila" #. 008 +#. Android resource: @strings/albania msgid "Albania" msgstr "Albania" @@ -455,6 +460,7 @@ msgid "Netherlands Antilles" msgstr "Antilles Holandeses" #. 024 +#. Android resource: @strings/angola msgid "Angola" msgstr "Angola" @@ -463,6 +469,7 @@ msgid "Antarctica" msgstr "Antártida" #. 032 +#. Android resource: @strings/argentina msgid "Argentina" msgstr "Argentina" @@ -471,10 +478,12 @@ msgid "American Samoa" msgstr "Samoa Americana" #. 040 +#. Android resource: @strings/austria msgid "Austria" msgstr "Austria" #. 036 +#. Android resource: @strings/australia msgid "Australia" msgstr "Australia" @@ -487,10 +496,12 @@ msgid "Aland Islands" msgstr "Islles Aland" #. 031 +#. Android resource: @strings/azerbaijan msgid "Azerbaijan" msgstr "Azerbaiyán" #. 070 +#. Android resource: @strings/bosnia_and_herzegovina msgid "Bosnia and Herzegovina" msgstr "Bosnia Herzegovina" @@ -503,6 +514,7 @@ msgid "Bangladesh" msgstr "Bangladesh" #. 056 +#. Android resource: @strings/belgium msgid "Belgium" msgstr "Bélgica" @@ -511,6 +523,7 @@ msgid "Burkina Faso" msgstr "Burkina Faso" #. 100 +#. Android resource: @strings/bulgaria msgid "Bulgaria" msgstr "Bulgaria" @@ -519,6 +532,7 @@ msgid "Bahrain" msgstr "Bahrein" #. 108 +#. Android resource: @strings/burundi msgid "Burundi" msgstr "Burundi" @@ -539,6 +553,7 @@ msgid "Brunei Darussalam" msgstr "Brunei Darussalam" #. 068 +#. Android resource: @strings/bolivia msgid "Bolivia" msgstr "Bolivia" @@ -547,6 +562,7 @@ msgid "Bonaire, Sint Eustatius and Saba" msgstr "" #. 076 +#. Android resource: @strings/brazil msgid "Brazil" msgstr "Brasil" @@ -563,10 +579,12 @@ msgid "Bouvet Island" msgstr "Islla Bouvet" #. 072 +#. Android resource: @strings/botswana msgid "Botswana" msgstr "Botswana" #. 112 +#. Android resource: @strings/belarus msgid "Belarus" msgstr "Bielorrusia" @@ -575,6 +593,7 @@ msgid "Belize" msgstr "Belice" #. 124 +#. Android resource: @strings/canada msgid "Canada" msgstr "Canadá" @@ -583,6 +602,7 @@ msgid "Cocos (Keeling) Islands" msgstr "Islles Cocos (Keeling)" #. 180 +#. Android resource: @strings/congo msgid "Congo, Democratic Republic of the" msgstr "Congo, República Democrática del" @@ -595,10 +615,12 @@ msgid "Congo" msgstr "Congo" #. 756 +#. Android resource: @strings/switzerland msgid "Switzerland" msgstr "Suiza" #. 384 +#. Android resource: @strings/cotedivoire msgid "Cote d'Ivoire" msgstr "Costa de Marfil" @@ -607,6 +629,7 @@ msgid "Cook Islands" msgstr "Islles Cook" #. 152 +#. Android resource: @strings/chile msgid "Chile" msgstr "Chile" @@ -615,10 +638,12 @@ msgid "Cameroon" msgstr "Camerún" #. 156 +#. Android resource: @strings/china msgid "China" msgstr "China" #. 170 +#. Android resource: @strings/colombia msgid "Colombia" msgstr "Colombia" @@ -627,6 +652,7 @@ msgid "Costa Rica" msgstr "Costa Rica" #. 192 +#. Android resource: @strings/cuba msgid "Cuba" msgstr "Cuba" @@ -643,14 +669,17 @@ msgid "Christmas Island" msgstr "Islla Christmas" #. 196 +#. Android resource: @strings/cyprus msgid "Cyprus" msgstr "Chipre" #. 203 +#. Android resource: @strings/czech_republic msgid "Czech Republic" msgstr "República Checa" #. 276 +#. Android resource: @strings/germany msgid "Germany" msgstr "Alemania" @@ -659,6 +688,7 @@ msgid "Djibouti" msgstr "Djibouti" #. 208 +#. Android resource: @strings/denmark msgid "Denmark" msgstr "Dinamarca" @@ -667,6 +697,7 @@ msgid "Dominica" msgstr "Dominica" #. 214 +#. Android resource: @strings/dominican_republic msgid "Dominican Republic" msgstr "República Dominicana" @@ -675,10 +706,12 @@ msgid "Algeria" msgstr "Argelia" #. 218 +#. Android resource: @strings/ecuador msgid "Ecuador" msgstr "Ecuador" #. 233 +#. Android resource: @strings/estonia msgid "Estonia" msgstr "Estonia" @@ -695,14 +728,17 @@ msgid "Eritrea" msgstr "Eritrea" #. 724 +#. Android resource: @strings/spain msgid "Spain" msgstr "España" #. 231 +#. Android resource: @strings/ethiopia msgid "Ethiopia" msgstr "Etiopía" #. 246 +#. Android resource: @strings/finland msgid "Finland" msgstr "Finlandia" @@ -719,10 +755,12 @@ msgid "Micronesia, Federated States of" msgstr "Micronesia, Estaos Federaos de" #. 234 +#. Android resource: @strings/faroe_islands msgid "Faroe Islands" msgstr "Islles Feroe" #. 250 +#. Android resource: @strings/france msgid "France" msgstr "Francia" @@ -731,6 +769,7 @@ msgid "Gabon" msgstr "Gabón" #. 826 +#. Android resource: @strings/united_kingdom msgid "United Kingdom" msgstr "Reinu Xuníu" @@ -767,6 +806,7 @@ msgid "Gambia" msgstr "Gambia" #. 324 +#. Android resource: @strings/guinea msgid "Guinea" msgstr "Guinea" @@ -779,6 +819,7 @@ msgid "Equatorial Guinea" msgstr "Guinea Ecuatorial" #. 300 +#. Android resource: @strings/greece msgid "Greece" msgstr "Grecia" @@ -799,6 +840,7 @@ msgid "Guinea-Bissau" msgstr "Guinea-Bissau" #. 328 +#. Android resource: @strings/guyana msgid "Guyana" msgstr "Guyana" @@ -815,26 +857,32 @@ msgid "Honduras" msgstr "Honduras" #. 191 +#. Android resource: @strings/croatia msgid "Croatia" msgstr "Croacia" #. 332 +#. Android resource: @strings/haiti msgid "Haiti" msgstr "Haití" #. 348 +#. Android resource: @strings/hungary msgid "Hungary" msgstr "Hungría" #. 360 +#. Android resource: @strings/indonesia msgid "Indonesia" msgstr "Indonesia" #. 372 +#. Android resource: @strings/ireland msgid "Ireland" msgstr "Irlanda" #. 376 +#. Android resource: @strings/israel msgid "Israel" msgstr "Israel" @@ -843,6 +891,7 @@ msgid "Isle of Man" msgstr "Islla de Man" #. 356 +#. Android resource: @strings/india msgid "India" msgstr "India" @@ -851,18 +900,22 @@ msgid "British Indian Ocean Territory" msgstr "Territoriu Oceánicu de la India Británica" #. 368 +#. Android resource: @strings/iraq msgid "Iraq" msgstr "Iraq" #. 364 +#. Android resource: @strings/iran msgid "Iran, Islamic Republic of" msgstr "Irán, República Islámica de" #. 352 +#. Android resource: @strings/iceland msgid "Iceland" msgstr "Islandia" #. 380 +#. Android resource: @strings/italy msgid "Italy" msgstr "Italia" @@ -871,6 +924,7 @@ msgid "Jersey" msgstr "Jersey" #. 388 +#. Android resource: @strings/jamaica msgid "Jamaica" msgstr "Jamaica" @@ -879,14 +933,17 @@ msgid "Jordan" msgstr "Xordania" #. 392 +#. Android resource: @strings/japan msgid "Japan" msgstr "Xapón" #. 404 +#. Android resource: @strings/kenya msgid "Kenya" msgstr "Kenia" #. 417 +#. Android resource: @strings/kyrgyzsyan msgid "Kyrgyzstan" msgstr "Kirguistán" @@ -923,6 +980,7 @@ msgid "Cayman Islands" msgstr "Islles Caimán" #. 398 +#. Android resource: @strings/kazakhstan msgid "Kazakhstan" msgstr "Kazakhstán" @@ -947,26 +1005,32 @@ msgid "Sri Lanka" msgstr "Sri Lanka" #. 430 +#. Android resource: @strings/liberia msgid "Liberia" msgstr "Liberia" #. 426 +#. Android resource: @strings/lesotho msgid "Lesotho" msgstr "Lesotho" #. 440 +#. Android resource: @strings/lithuania msgid "Lithuania" msgstr "Lituania" #. 442 +#. Android resource: @strings/luxembourg msgid "Luxembourg" msgstr "Luxemburgo" #. 428 +#. Android resource: @strings/latvia msgid "Latvia" msgstr "Letonia" #. 434 +#. Android resource: @strings/libya msgid "Libya" msgstr "" @@ -991,6 +1055,7 @@ msgid "Saint Martin (French part)" msgstr "Saint Martin (Parte Francesa)" #. 450 +#. Android resource: @strings/madagascar msgid "Madagascar" msgstr "Madagascar" @@ -1011,6 +1076,7 @@ msgid "Myanmar" msgstr "Myanmar" #. 496 +#. Android resource: @strings/mongolia msgid "Mongolia" msgstr "Mongolia" @@ -1051,10 +1117,12 @@ msgid "Malawi" msgstr "Malawi" #. 484 +#. Android resource: @strings/mexico msgid "Mexico" msgstr "México" #. 458 +#. Android resource: @strings/malaysia msgid "Malaysia" msgstr "Malasia" @@ -1063,10 +1131,12 @@ msgid "Mozambique" msgstr "Mozambique" #. 516 +#. Android resource: @strings/namibia msgid "Namibia" msgstr "Namibia" #. 540 +#. Android resource: @strings/new_caledonia msgid "New Caledonia" msgstr "Nueva Caledonia" @@ -1087,6 +1157,7 @@ msgid "Nicaragua" msgstr "Nicaragua" #. 528 +#. Android resource: @strings/netherlands msgid "Netherlands" msgstr "Holanda" @@ -1095,6 +1166,7 @@ msgid "Norway" msgstr "Noruega" #. 524 +#. Android resource: @strings/nepal msgid "Nepal" msgstr "Nepal" @@ -1107,6 +1179,7 @@ msgid "Niue" msgstr "Niue" #. 554 +#. Android resource: @strings/newzealand msgid "New Zealand" msgstr "Nueva Zelanda" @@ -1119,6 +1192,7 @@ msgid "Panama" msgstr "Panamá" #. 604 +#. Android resource: @strings/peru msgid "Peru" msgstr "Perú" @@ -1131,14 +1205,17 @@ msgid "Papua New Guinea" msgstr "Papúa Nueva Guinea" #. 608 +#. Android resource: @strings/philippines msgid "Philippines" msgstr "Filipines" #. 586 +#. Android resource: @strings/pakistan msgid "Pakistan" msgstr "Paquistán" #. 616 +#. Android resource: @strings/poland msgid "Poland" msgstr "Polonia" @@ -1159,6 +1236,7 @@ msgid "Palestinian Territory, Occupied" msgstr "Palestina, Territoriu Ocupáu" #. 620 +#. Android resource: @strings/portugal msgid "Portugal" msgstr "Portugal" @@ -1167,6 +1245,7 @@ msgid "Palau" msgstr "Palau" #. 600 +#. Android resource: @strings/paraguay msgid "Paraguay" msgstr "Paraguay" @@ -1175,10 +1254,12 @@ msgid "Qatar" msgstr "Qatar" #. 638 +#. Android resource: @strings/reunion msgid "Reunion" msgstr "Reunión" #. 642 +#. Android resource: @strings/romania msgid "Romania" msgstr "Rumanía" @@ -1187,14 +1268,17 @@ msgid "Serbia" msgstr "Serbia" #. 643 +#. Android resource: @strings/russian_federation msgid "Russian Federation" msgstr "Federación Rusa" #. 646 +#. Android resource: @strings/rwanda msgid "Rwanda" msgstr "Ruanda" #. 682 +#. Android resource: @strings/saudi_arabia msgid "Saudi Arabia" msgstr "Arabia Saudí" @@ -1215,6 +1299,7 @@ msgid "Sweden" msgstr "Suecia" #. 702 +#. Android resource: @strings/singapore msgid "Singapore" msgstr "Singapur" @@ -1231,6 +1316,7 @@ msgid "Svalbard and Jan Mayen" msgstr "Svalbard y Jan Mayen" #. 703 +#. Android resource: @strings/slovakia msgid "Slovakia" msgstr "Eslovaquia" @@ -1251,6 +1337,7 @@ msgid "Somalia" msgstr "Somalia" #. 740 +#. Android resource: @strings/suriname msgid "Suriname" msgstr "Surinam" @@ -1295,6 +1382,7 @@ msgid "Togo" msgstr "Togo" #. 764 +#. Android resource: @strings/thailand msgid "Thailand" msgstr "Tailandia" @@ -1311,6 +1399,7 @@ msgid "Timor-Leste" msgstr "Timor Oriental" #. 795 +#. Android resource: @strings/turkmenistan msgid "Turkmenistan" msgstr "Turkmenistán" @@ -1323,6 +1412,7 @@ msgid "Tonga" msgstr "Tonga" #. 792 +#. Android resource: @strings/turkey msgid "Turkey" msgstr "Turquía" @@ -1339,14 +1429,17 @@ msgid "Taiwan, Province of China" msgstr "Taiwan, Provincia de China" #. 834 +#. Android resource: @strings/tanzania msgid "Tanzania, United Republic of" msgstr "Tanzania, República Xunía de" #. 804 +#. Android resource: @strings/ukraine msgid "Ukraine" msgstr "Ucrania" #. 800 +#. Android resource: @strings/uganda msgid "Uganda" msgstr "Uganda" @@ -1359,6 +1452,7 @@ msgid "United States" msgstr "Estaos Xuníos" #. 858 +#. Android resource: @strings/uruguay msgid "Uruguay" msgstr "Uruguay" @@ -1375,6 +1469,7 @@ msgid "Saint Vincent and the Grenadines" msgstr "San Vicente y les Granadines" #. 862 +#. Android resource: @strings/venezuela msgid "Venezuela" msgstr "Venezuela" @@ -1411,6 +1506,7 @@ msgid "Mayotte" msgstr "Mayotte" #. 710 +#. Android resource: @strings/south_africa msgid "South Africa" msgstr "Sudáfrica" @@ -1438,23 +1534,23 @@ msgid "" msgstr "" #. We have not found an existing config file from all possibilities -msgid "No config file navit.xml, navit.xml.local found\n" +msgid "No config file navit.xml, navit.xml.local found" msgstr "" #, c-format -msgid "Error parsing config file '%s': %s\n" +msgid "Error parsing config file '%s': %s" msgstr "" #, c-format -msgid "Using config file '%s'\n" +msgid "Using config file '%s'" msgstr "" #, c-format -msgid "Error: No configuration found in config file '%s'\n" +msgid "Error: No configuration found in config file '%s'" msgstr "" msgid "" -"Internal initialization failed, exiting. Check previous error messages.\n" +"Internal initialization failed, exiting. Check previous error messages." msgstr "" msgid "unknown street" @@ -1595,6 +1691,9 @@ msgstr "" msgid "_Lock on Road" msgstr "Arcoxar carretera" +msgid "_Follow Vehicle" +msgstr "" + msgid "_Keep orientation to the North" msgstr "" @@ -1664,7 +1763,12 @@ msgstr "" msgid "Shopping" msgstr "" -msgid "Select a search radius from screen center" +#. Input is in kilometers +msgid "Select a search radius from screen center in km" +msgstr "" + +#. Input is in miles. +msgid "Select a search radius from screen center in miles" msgstr "" #, c-format @@ -1672,15 +1776,15 @@ msgid "POI %s. %s" msgstr "" #, c-format -msgid "Set destination to %ld, %ld \n" +msgid "Set destination to %ld, %ld " msgstr "" #, c-format -msgid "Set map to %ld, %ld \n" +msgid "Set map to %ld, %ld " msgstr "" #, c-format -msgid "Set next visit to %ld, %ld \n" +msgid "Set next visit to %ld, %ld " msgstr "" msgid "POI search" @@ -1689,9 +1793,6 @@ msgstr "" msgid "Select a category" msgstr "" -msgid "Select a distance to look for (km)" -msgstr "" - msgid "Select a POI" msgstr "" @@ -1704,7 +1805,7 @@ msgstr "" msgid "Direction" msgstr "" -msgid "Distance(m)" +msgid "Distance" msgstr "" msgid "Name" @@ -1751,8 +1852,8 @@ msgid "OT" msgstr "OT" #, c-format -msgid "Route %4.0fkm %02d:%02d ETA" -msgstr "Ruta %4.0fkm %02d:%02d TED" +msgid "Route %4.1f%s %02d:%02d ETA" +msgstr "" msgid "Route 0000km 0+00:00 ETA" msgstr "Ruta 0000km 0+00:00 TED" @@ -1974,6 +2075,9 @@ msgstr "Descripción de ruta" msgid "Show Locale" msgstr "Amosar local" +msgid "Network info" +msgstr "" + msgid "Former Destinations" msgstr "Destinos anteriores" @@ -2012,737 +2116,873 @@ msgstr "" msgid "Please decrease your speed" msgstr "" -msgid "partial match" -msgstr "" +msgid "Vehicle Position" +msgstr "Posición del vehículu" -#. Android resource: @strings/address_search_button -msgid "Search" -msgstr "" +msgid "Main menu" +msgstr "Menú principal" -#. Android resource: @strings/address_search_towns -msgid "Towns" +msgid "" +"Show\n" +"Map" msgstr "" +"Ver\n" +"Mapa" -msgid "Map data (c) OpenStreetMap contributors, ODBL" -msgstr "" +msgid "Settings" +msgstr "Axustes" + +msgid "Tools" +msgstr "Ferramientes" + +msgid "Route" +msgstr "Ruta" + +msgid "About" +msgstr "Tocante a" + +msgid "Quit" +msgstr "Colar" + +msgid "Actions" +msgstr "Aiciones" msgid "" -"Current map location %s is not available\n" -"Please restart Navit after you attach an SD card or select a different map " -"location." +"Former\n" +"Destinations" msgstr "" -msgid "Downloaded maps" +msgid "Coordinates" msgstr "" msgid "" -"Sorry, we currently do not support maps above 3.8G on Android, please select " -"a smaller one." +"Stop\n" +"Navigation" msgstr "" +"Parar\n" +"Navegación" -#. Android resource: @strings/position_popup_drive_here -msgid "Route to here" -msgstr "" +msgid "Display" +msgstr "Amosar" -msgid "Cancel" -msgstr "" +msgid "Fullscreen" +msgstr "Pantalla completa" -msgid "filenamePath" -msgstr "" +msgid "Window Mode" +msgstr "Mou ventana" -msgid "" -"New location set to %s\n" -"Restart Navit to apply the changes." +msgid "Auto zoom" msgstr "" -msgid "Whole Planet" +msgid "Manual zoom" msgstr "" -msgid "Africa" +msgid "Layers" msgstr "" -msgid "Canary Islands" +msgid "Zoom to route" msgstr "" -msgid "Asia" -msgstr "" +msgid "Description" +msgstr "Descripción" -msgid "Korea" +msgid "" +"Drop last\n" +"Waypoint" msgstr "" -msgid "Taiwan" +msgid "" +"Drop next\n" +"Waypoint" msgstr "" -msgid "UAE+Other" +msgid "Satellite Status" msgstr "" -msgid "Oceania" +msgid "NMEA Data" msgstr "" -msgid "Tasmania" +msgid "car_shortest" msgstr "" -msgid "Victoria" +msgid "car_avoid_tolls" msgstr "" -msgid "New South Wales" +msgid "car_pedantic" msgstr "" -msgid "Europe" -msgstr "" +msgid "horse" +msgstr "caballu" -msgid "Western Europe" +msgid "Truck" msgstr "" -msgid "Azores" +#. Strings from android/res/values/strings.xml +#. Android resource: @strings/yes +msgid "Yes" msgstr "" -msgid "BeNeLux" +#. Android resource: @strings/cancel +msgid "Cancel" msgstr "" -msgid "Alsace" +#. Android resource: @strings/notification_ticker +msgid "Navit started" msgstr "" -msgid "Aquitaine" +#. Android resource: @strings/notification_event_default +msgid "Navit running" msgstr "" -msgid "Auvergne" +#. Android resource: @strings/initial_info_box_title +msgid "Welcome to Navit" msgstr "" -msgid "Basse-Normandie" +#. Android resource: @strings/initial_info_box_message +msgid "" +"Thank you for installing Navit!\n" +"\n" +"To start, select \"Download maps\" from the menu to download a map. Note: " +"The map filesize may be large (>50MB) - a wifi connection is recommended.\n" +"\n" +"Mapdata: (c) OpenStreetMap contributors\n" +"\n" +"Enjoy Navit!" msgstr "" -msgid "Bourgogne" +#. Android resource: @strings/initial_info_box_OK +msgid "OK" msgstr "" -msgid "Bretagne" +#. Android resource: @strings/initial_info_box_more_info +msgid "More info" msgstr "" -msgid "Centre" +#. Android resource: @strings/optionsmenu_zoom_in +msgid "Zoom in" msgstr "" -msgid "Champagne-Ardenne" +#. Android resource: @strings/optionsmenu_zoom_out +msgid "Zoom out" msgstr "" -msgid "Corse" +#. Android resource: @strings/optionsmenu_download_maps +msgid "Download maps" msgstr "" -msgid "Franche-Comte" +#. Android resource: @strings/optionsmenu_toggle_poi +msgid "Toggle POIs" msgstr "" -msgid "Haute-Normandie" +#. Android resource: @strings/optionsmenu_exit_navit +msgid "Exit Navit" msgstr "" -msgid "Ile-de-France" +#. Android resource: @strings/optionsmenu_backup_restore +msgid "Backup / Restore" msgstr "" -msgid "Languedoc-Roussillon" +#. Android resource: @strings/optionsmenu_set_map_location +msgid "Set map location" msgstr "" -msgid "Limousin" +#. Android resource: @strings/position_popup_drive_here +msgid "Route to here" msgstr "" -msgid "Lorraine" +#. Android resource: @strings/map_delete +msgid "Delete this map?" msgstr "" -msgid "Midi-Pyrenees" +#. Android resource: @strings/map_download_title +msgid "Map download" msgstr "" -msgid "Nord-pas-de-Calais" +#. Android resource: @strings/map_download_downloading +msgid "Downloading:" msgstr "" -msgid "Pays-de-la-Loire" +#. Android resource: @strings/map_download_eta +msgid "ETA" msgstr "" -msgid "Picardie" +#. Android resource: @strings/map_download_ready +msgid "ready" msgstr "" -msgid "Poitou-Charentes" +#. Android resource: @strings/map_download_download_error +msgid "Error downloading map." msgstr "" -msgid "Provence-Alpes-Cote-d-Azur" +#. Android resource: @strings/map_download_download_aborted +msgid "Map download aborted" msgstr "" -msgid "Rhone-Alpes" +#. Android resource: @strings/map_download_not_enough_free_space +msgid "Not enough free space" msgstr "" -msgid "Baden-Wuerttemberg" +#. Android resource: @strings/map_download_oversize +msgid "" +"Sorry, we currently do not support maps above 3.8G on Android, please select " +"a smaller one." msgstr "" -msgid "Bayern" +#. Android resource: @strings/map_no_fix +msgid "No location. Reopen after location fix." msgstr "" -msgid "Mittelfranken" +#. Android resource: @strings/maps_for_current_location +msgid "Maps containing current location" msgstr "" -msgid "Niederbayern" +#. Android resource: @strings/maps_installed +msgid "Installed maps" msgstr "" -msgid "Oberbayern" +#. Android resource: @strings/map_downloading +msgid "downloading" msgstr "" -msgid "Oberfranken" +#. Android resource: @strings/map_download_medium_unavailable +msgid "Media selected for map storage is not available" msgstr "" -msgid "Oberpfalz" +#. Android resource: @strings/map_download_error_writing_map +msgid "Error writing map!" msgstr "" -msgid "Schwaben" +#. Android resource: @strings/map_location_changed +#, c-format +msgid "New location set to %s Restart Navit to apply the changes." msgstr "" -msgid "Unterfranken" +#. Android resource: @strings/map_location_unavailable +#, c-format +msgid "" +"Current map location %s is not available Please restart Navit after you " +"attach an SD card or select a different map location." msgstr "" -msgid "Berlin" +#. Android resource: @strings/address_search_title +msgid "Address search" msgstr "" -msgid "Brandenburg" +#. Android resource: @strings/address_enter_destination +msgid "Enter destination" msgstr "" -msgid "Bremen" +#. Android resource: @strings/address_partial_match +msgid "Match partial address" msgstr "" -msgid "Hamburg" +#. Android resource: @strings/address_search_button +msgid "Search" msgstr "" -msgid "Hessen" +#. Android resource: @strings/address_search_searching +msgid "Searching..." msgstr "" -msgid "Mecklenburg-Vorpommern" +#. Android resource: @strings/address_search_not_found +msgid "Address not found" msgstr "" -msgid "Niedersachsen" +#. Android resource: @strings/address_search_getting_results +msgid "Getting search results" msgstr "" -msgid "Nordrhein-westfalen" +#. Android resource: @strings/address_search_loading_results +msgid "Loading search results" msgstr "" -msgid "Rheinland-Pfalz" +#. Android resource: @strings/address_search_no_results +msgid "No results found" msgstr "" -msgid "Saarland" +#. Android resource: @strings/address_search_no_text_entered +msgid "No text entered" msgstr "" -msgid "Sachsen-Anhalt" +#. Android resource: @strings/address_search_set_destination +msgid "Setting destination to:" msgstr "" -msgid "Sachsen" +#. Android resource: @strings/address_search_towns +msgid "Towns" msgstr "" -msgid "Schleswig-Holstein" +#. Android resource: @strings/choose_an_action +msgid "Choose an action" msgstr "" -msgid "Thueringen" +#. Android resource: @strings/please_insert_an_sd_card +msgid "Please insert an SD Card" msgstr "" -msgid "Mallorca" +#. Android resource: @strings/backing_up +msgid "Backing up..." msgstr "" -msgid "Galicia" +#. Android resource: @strings/restoring +msgid "Restoring..." msgstr "" -msgid "Scandinavia" +#. Android resource: @strings/failed_to_create_backup_directory +msgid "Failed to create backup directory" msgstr "" -msgid "England" +#. Android resource: @strings/backup_failed +msgid "Backup failed" msgstr "" -msgid "Buckinghamshire" +#. Android resource: @strings/no_backup_found +msgid "No backup found" msgstr "" -msgid "Cambridgeshire" +#. Android resource: @strings/failed_to_restore +msgid "Failed to restore" msgstr "" -msgid "Cumbria" +#. Android resource: @strings/backup_successful +msgid "Backup successful" msgstr "" -msgid "East yorkshire with hull" +#. Android resource: @strings/restore_successful_please_restart_navit +msgid "" +"Restore Successful\n" +"Please restart Navit" msgstr "" -msgid "Essex" +#. Android resource: @strings/backup_not_found +msgid "Backup not found" msgstr "" -msgid "Herefordshire" +#. Android resource: @strings/restore_failed +msgid "Restore failed" msgstr "" -msgid "Kent" +#. Android resource: @strings/select_backup +msgid "Select backup" msgstr "" -msgid "Lancashire" +#. Android resource: @strings/backup +msgid "Backup" msgstr "" -msgid "Leicestershire" +#. Android resource: @strings/restore +msgid "Restore" msgstr "" -msgid "Norfolk" +#. Android resource: @strings/TTS_title_data_missing +msgid "System text to speech engine data is missing" msgstr "" -msgid "Nottinghamshire" +#. Android resource: @strings/TTS_qery_install_data +msgid "" +"Navit can use any text to speech engine installed on your device. The " +"currently selected engine reports it is unable to speak in your language. " +"Should we ask the system to show voice download dialog?" msgstr "" -msgid "Oxfordshire" +#. Android resource: @strings/permissions_not_granted +msgid "" +"Navit needs permission to access GPS and read the map.\n" +"If you change your mind please restart Navit and grant the permissions" msgstr "" -msgid "Shropshire" +#. Android resource: @strings/permissions_info_box_title +msgid "One or more ungranted permissions" msgstr "" -msgid "Somerset" +#. Android resource: @strings/whole_planet +msgid "Whole Planet" msgstr "" -msgid "South yorkshire" +#. Android resource: @strings/africa +msgid "Africa" msgstr "" -msgid "Suffolk" +#. Android resource: @strings/canary_islands +msgid "Canary Islands" msgstr "" -msgid "Surrey" +#. Android resource: @strings/asia +msgid "Asia" msgstr "" -msgid "Wiltshire" +#. Android resource: @strings/taiwan +msgid "Taiwan" msgstr "" -msgid "Scotland" +#. Android resource: @strings/korea +msgid "Korea" msgstr "" -msgid "Wales" +#. Android resource: @strings/uae_other +msgid "UAE+Other" msgstr "" -msgid "Crete" +#. Android resource: @strings/oceania +msgid "Oceania" msgstr "" -msgid "North America" +#. Android resource: @strings/tasmania +msgid "Tasmania" msgstr "" -msgid "Alaska" +#. Android resource: @strings/victoria +msgid "Victoria" msgstr "" -msgid "Hawaii" +#. Android resource: @strings/new_south_wales +msgid "New South Wales" msgstr "" -msgid "USA" +#. Android resource: @strings/europe +msgid "Europe" msgstr "" -msgid " (except Alaska and Hawaii)" +#. Android resource: @strings/western_europe +msgid "Western Europe" msgstr "" -msgid "Midwest" +#. Android resource: @strings/azores +msgid "Azores" msgstr "" -msgid "Michigan" +#. Android resource: @strings/benelux +msgid "BeNeLux" msgstr "" -msgid "Ohio" +#. Android resource: @strings/alsace +msgid "Alsace" msgstr "" -msgid "Northeast" +#. Android resource: @strings/aquitaine +msgid "Aquitaine" msgstr "" -msgid "Massachusetts" +#. Android resource: @strings/auvergne +msgid "Auvergne" msgstr "" -msgid "Vermont" +#. Android resource: @strings/centre +msgid "Centre" msgstr "" -msgid "Pacific" +#. Android resource: @strings/bretagne +msgid "Bretagne" msgstr "" -msgid "South" +#. Android resource: @strings/bourgogne +msgid "Bourgogne" msgstr "" -msgid "Arkansas" +#. Android resource: @strings/basse_normandie +msgid "Basse-Normandie" msgstr "" -msgid "District of Columbia" +#. Android resource: @strings/champagne_ardenne +msgid "Champagne-Ardenne" msgstr "" -msgid "Florida" +#. Android resource: @strings/corse +msgid "Corse" msgstr "" -msgid "Louisiana" +#. Android resource: @strings/franche_comte +msgid "Franche-Comte" msgstr "" -msgid "Maryland" +#. Android resource: @strings/haute_normandie +msgid "Haute-Normandie" msgstr "" -msgid "Mississippi" +#. Android resource: @strings/ile_de_france +msgid "Ile-de-France" msgstr "" -msgid "Oklahoma" +#. Android resource: @strings/languedoc_roussillon +msgid "Languedoc-Roussillon" msgstr "" -msgid "Texas" +#. Android resource: @strings/limousin +msgid "Limousin" msgstr "" -msgid "Virginia" +#. Android resource: @strings/lorraine +msgid "Lorraine" msgstr "" -msgid "West Virginia" +#. Android resource: @strings/midi_pyrenees +msgid "Midi-Pyrenees" msgstr "" -msgid "West" +#. Android resource: @strings/nord_pas_de_calais +msgid "Nord-pas-de-Calais" msgstr "" -msgid "Arizona" +#. Android resource: @strings/pays_de_la_loire +msgid "Pays-de-la-Loire" msgstr "" -msgid "California" +#. Android resource: @strings/picardie +msgid "Picardie" msgstr "" -msgid "Colorado" +#. Android resource: @strings/poitou_charentes +msgid "Poitou-Charentes" msgstr "" -msgid "Idaho" +#. Android resource: @strings/provence_alpes_cote_d_azur +msgid "Provence-Alpes-Cote-d-Azur" msgstr "" -msgid "Montana" +#. Android resource: @strings/rhone_alpes +msgid "Rhone-Alpes" msgstr "" -msgid "New Mexico" +#. Android resource: @strings/baden_wuerttemberg +msgid "Baden-Wuerttemberg" msgstr "" -msgid "Nevada" +#. Android resource: @strings/bayern +msgid "Bayern" msgstr "" -msgid "Oregon" +#. Android resource: @strings/mittelfranken +msgid "Mittelfranken" msgstr "" -msgid "Utah" +#. Android resource: @strings/niederbayern +msgid "Niederbayern" msgstr "" -msgid "Washington State" +#. Android resource: @strings/oberbayern +msgid "Oberbayern" msgstr "" -msgid "South+Middle America" +#. Android resource: @strings/oberfranken +msgid "Oberfranken" msgstr "" -msgid "Guyane Francaise" +#. Android resource: @strings/oberpfalz +msgid "Oberpfalz" msgstr "" -msgid "downloading" +#. Android resource: @strings/schwaben +msgid "Schwaben" msgstr "" -#. Android resource: @strings/map_download_ready -msgid "ready" +#. Android resource: @strings/unterfranken +msgid "Unterfranken" msgstr "" -msgid "Media selected for map storage is not available" +#. Android resource: @strings/berlin +msgid "Berlin" msgstr "" -#. Android resource: @strings/map_download_not_enough_free_space -msgid "Not enough free space" +#. Android resource: @strings/brandenburg +msgid "Brandenburg" msgstr "" -msgid "Error downloading map!" +#. Android resource: @strings/bremen +msgid "Bremen" msgstr "" -msgid "Error writing map!" +#. Android resource: @strings/hamburg +msgid "Hamburg" msgstr "" -msgid "Map download aborted!" +#. Android resource: @strings/hessen +msgid "Hessen" msgstr "" -#. Android resource: @strings/map_download_eta -msgid "ETA" +#. Android resource: @strings/mecklenburg_vorpommern +msgid "Mecklenburg-Vorpommern" msgstr "" -#. Android resource: @strings/map_download_title -msgid "Map download" +#. Android resource: @strings/niedersachsen +msgid "Niedersachsen" msgstr "" -msgid "Vehicle Position" -msgstr "Posición del vehículu" - -msgid "Main menu" -msgstr "Menú principal" - -msgid "" -"Show\n" -"Map" +#. Android resource: @strings/nordrhein_westfalen +msgid "Nordrhein-westfalen" msgstr "" -"Ver\n" -"Mapa" - -msgid "Settings" -msgstr "Axustes" - -msgid "Tools" -msgstr "Ferramientes" - -msgid "Route" -msgstr "Ruta" -msgid "About" -msgstr "Tocante a" +#. Android resource: @strings/rheinland_pfalz +msgid "Rheinland-Pfalz" +msgstr "" -msgid "Quit" -msgstr "Colar" +#. Android resource: @strings/saarland +msgid "Saarland" +msgstr "" -msgid "Actions" -msgstr "Aiciones" +#. Android resource: @strings/sachsen_anhalt +msgid "Sachsen-Anhalt" +msgstr "" -msgid "" -"Former\n" -"Destinations" +#. Android resource: @strings/sachsen +msgid "Sachsen" msgstr "" -msgid "Coordinates" +#. Android resource: @strings/schleswig_holstein +msgid "Schleswig-Holstein" msgstr "" -msgid "" -"Stop\n" -"Navigation" +#. Android resource: @strings/thueringen +msgid "Thueringen" msgstr "" -"Parar\n" -"Navegación" -msgid "Display" -msgstr "Amosar" +#. Android resource: @strings/mallorca +msgid "Mallorca" +msgstr "" -msgid "Fullscreen" -msgstr "Pantalla completa" +#. Android resource: @strings/galicia +msgid "Galicia" +msgstr "" -msgid "Window Mode" -msgstr "Mou ventana" +#. Android resource: @strings/scandinavia +msgid "Scandinavia" +msgstr "" -msgid "Layers" +#. Android resource: @strings/england +msgid "England" msgstr "" -msgid "Description" -msgstr "Descripción" +#. Android resource: @strings/buckinghamshire +msgid "Buckinghamshire" +msgstr "" -msgid "" -"Drop last \n" -"Waypoint" +#. Android resource: @strings/cambridgeshire +msgid "Cambridgeshire" msgstr "" -msgid "" -"Drop next \n" -"Waypoint" +#. Android resource: @strings/cumbria +msgid "Cumbria" msgstr "" -msgid "Satellite Status" +#. Android resource: @strings/east_yorkshire_with_hull +msgid "East yorkshire with hull" msgstr "" -msgid "NMEA Data" +#. Android resource: @strings/essex +msgid "Essex" msgstr "" -msgid "car_shortest" +#. Android resource: @strings/herefordshire +msgid "Herefordshire" msgstr "" -msgid "car_avoid_tolls" +#. Android resource: @strings/kent +msgid "Kent" msgstr "" -msgid "car_pedantic" +#. Android resource: @strings/lancashire +msgid "Lancashire" msgstr "" -msgid "horse" -msgstr "caballu" +#. Android resource: @strings/leicestershire +msgid "Leicestershire" +msgstr "" -msgid "Truck" +#. Android resource: @strings/norfolk +msgid "Norfolk" msgstr "" -#. Strings from android/res/values/strings.xml -#. Android resource: @strings/yes -msgid "Yes" +#. Android resource: @strings/nottinghamshire +msgid "Nottinghamshire" msgstr "" -#. Android resource: @strings/notification_ticker -msgid "Navit started" +#. Android resource: @strings/oxfordshire +msgid "Oxfordshire" msgstr "" -#. Android resource: @strings/notification_event_default -msgid "Navit running" +#. Android resource: @strings/shropshire +msgid "Shropshire" msgstr "" -#. Android resource: @strings/initial_info_box_title -msgid "Welcome to Navit" +#. Android resource: @strings/somerset +msgid "Somerset" msgstr "" -#. Android resource: @strings/initial_info_box_message -msgid "" -"Thank you for installing Navit!\n" -"\n" -"To start, select \"Download maps\" from the menu to download a map. Note: " -"The map filesize may be large (>50MB) - a wifi connection is recommended.\n" -"\n" -"Mapdata: (c) OpenStreetMap contributors\n" -"\n" -"Enjoy Navit!" +#. Android resource: @strings/south_yorkshire +msgid "South yorkshire" msgstr "" -#. Android resource: @strings/initial_info_box_OK -msgid "OK" +#. Android resource: @strings/suffolk +msgid "Suffolk" msgstr "" -#. Android resource: @strings/initial_info_box_more_info -msgid "More info" +#. Android resource: @strings/surrey +msgid "Surrey" msgstr "" -#. Android resource: @strings/optionsmenu_zoom_in -msgid "Zoom in" +#. Android resource: @strings/wiltshire +msgid "Wiltshire" msgstr "" -#. Android resource: @strings/optionsmenu_zoom_out -msgid "Zoom out" +#. Android resource: @strings/scotland +msgid "Scotland" msgstr "" -#. Android resource: @strings/optionsmenu_download_maps -msgid "Download maps" +#. Android resource: @strings/wales +msgid "Wales" msgstr "" -#. Android resource: @strings/optionsmenu_toggle_poi -msgid "Toggle POIs" +#. Android resource: @strings/crete +msgid "Crete" msgstr "" -#. Android resource: @strings/optionsmenu_exit_navit -msgid "Exit Navit" +#. Android resource: @strings/north_america +msgid "North America" msgstr "" -#. Android resource: @strings/optionsmenu_backup_restore -msgid "Backup / Restore" +#. Android resource: @strings/alaska +msgid "Alaska" msgstr "" -#. Android resource: @strings/optionsmenu_set_map_location -msgid "Set map location" +#. Android resource: @strings/hawaii +msgid "Hawaii" msgstr "" -#. Android resource: @strings/map_delete -msgid "Delete this map?" +#. Android resource: @strings/usa +msgid "USA" msgstr "" -#. Android resource: @strings/map_download_downloading -msgid "Downloading:" +#. Android resource: @strings/except_alaska_and_hawaii +msgid "(except Alaska and Hawaii)" msgstr "" -#. Android resource: @strings/map_download_download_error -msgid "Error downloading map." +#. Android resource: @strings/midwest +msgid "Midwest" msgstr "" -#. Android resource: @strings/map_download_download_aborted -msgid "Map download aborted" +#. Android resource: @strings/michigan +msgid "Michigan" msgstr "" -#. Android resource: @strings/map_no_fix -msgid "No location. Reopen after location fix." +#. Android resource: @strings/ohio +msgid "Ohio" msgstr "" -#. Android resource: @strings/maps_for_current_location -msgid "Maps containing current location" +#. Android resource: @strings/northeast +msgid "Northeast" msgstr "" -#. Android resource: @strings/address_search_title -msgid "Address search" +#. Android resource: @strings/massachusetts +msgid "Massachusetts" msgstr "" -#. Android resource: @strings/address_enter_destination -msgid "Enter destination" +#. Android resource: @strings/vermont +msgid "Vermont" msgstr "" -#. Android resource: @strings/address_partial_match -msgid "Match partial address" +#. Android resource: @strings/pacific +msgid "Pacific" msgstr "" -#. Android resource: @strings/address_search_searching -msgid "Searching..." +#. Android resource: @strings/south +msgid "South" msgstr "" -#. Android resource: @strings/address_search_not_found -msgid "Address not found" +#. Android resource: @strings/arkansas +msgid "Arkansas" msgstr "" -#. Android resource: @strings/address_search_getting_results -msgid "Getting search results" +#. Android resource: @strings/district_of_columbia +msgid "District of Columbia" msgstr "" -#. Android resource: @strings/address_search_loading_results -msgid "Loading search results" +#. Android resource: @strings/florida +msgid "Florida" msgstr "" -#. Android resource: @strings/address_search_no_results -msgid "No results found" +#. Android resource: @strings/louisiana +msgid "Louisiana" msgstr "" -#. Android resource: @strings/address_search_no_text_entered -msgid "No text entered" +#. Android resource: @strings/maryland +msgid "Maryland" msgstr "" -#. Android resource: @strings/address_search_set_destination -msgid "Setting destination to:" +#. Android resource: @strings/mississippi +msgid "Mississippi" msgstr "" -#. Android resource: @strings/choose_an_action -msgid "Choose an action" +#. Android resource: @strings/oklahoma +msgid "Oklahoma" msgstr "" -#. Android resource: @strings/please_insert_an_sd_card -msgid "Please insert an SD Card" +#. Android resource: @strings/texas +msgid "Texas" msgstr "" -#. Android resource: @strings/backing_up -msgid "Backing up..." +#. Android resource: @strings/virginia +msgid "Virginia" msgstr "" -#. Android resource: @strings/restoring -msgid "Restoring..." +#. Android resource: @strings/west_virginia +msgid "West Virginia" msgstr "" -#. Android resource: @strings/failed_to_create_backup_directory -msgid "Failed to create backup directory" +#. Android resource: @strings/west +msgid "West" msgstr "" -#. Android resource: @strings/backup_failed -msgid "Backup failed" +#. Android resource: @strings/arizona +msgid "Arizona" msgstr "" -#. Android resource: @strings/no_backup_found -msgid "No backup found" +#. Android resource: @strings/california +msgid "California" msgstr "" -#. Android resource: @strings/failed_to_restore -msgid "Failed to restore" +#. Android resource: @strings/colorado +msgid "Colorado" msgstr "" -#. Android resource: @strings/backup_successful -msgid "Backup successful" +#. Android resource: @strings/idaho +msgid "Idaho" msgstr "" -#. Android resource: @strings/restore_successful_please_restart_navit -msgid "" -"Restore Successful\n" -"Please restart Navit" +#. Android resource: @strings/montana +msgid "Montana" msgstr "" -#. Android resource: @strings/backup_not_found -msgid "Backup not found" +#. Android resource: @strings/new_mexico +msgid "New Mexico" msgstr "" -#. Android resource: @strings/restore_failed -msgid "Restore failed" +#. Android resource: @strings/nevada +msgid "Nevada" msgstr "" -#. Android resource: @strings/select_backup -msgid "Select backup" +#. Android resource: @strings/oregon +msgid "Oregon" msgstr "" -#. Android resource: @strings/backup -msgid "Backup" +#. Android resource: @strings/utah +msgid "Utah" msgstr "" -#. Android resource: @strings/restore -msgid "Restore" +#. Android resource: @strings/washington_state +msgid "Washington State" msgstr "" -#. Android resource: @strings/TTS_title_data_missing -msgid "System text to speech engine data is missing" +#. Android resource: @strings/south_middle_america +msgid "South+Middle America" msgstr "" -#. Android resource: @strings/TTS_qery_install_data -msgid "" -"Navit can use any text to speech engine installed on your device. The " -"currently selected engine reports it is unable to speak in your language. " -"Should we ask the system to show voice download dialog?" +#. Android resource: @strings/guyane_francaise +msgid "Guyane Francaise" msgstr "" #, c-format +#~ msgid "Route %4.0fkm %02d:%02d ETA" +#~ msgstr "Ruta %4.0fkm %02d:%02d TED" + +#, c-format #~ msgid "then leave the roundabout at the %1$s %2$s" #~ msgstr "llueu dexe la rotonda pola %1$s %2$s" diff --git a/po/be.po.in b/po/be.po.in index d8b680519..43365f0a2 100644 --- a/po/be.po.in +++ b/po/be.po.in @@ -1,5 +1,5 @@ # Belarusian translations for navit -# Copyright (C) 2006-2016 The Navit Team +# Copyright (C) 2006-2018 The Navit Team # This file is distributed under the same license as the navit package. # Many thanks to the contributors of this translation: # Anatoli Putseyeu https://launchpad.net/~st-shadow-by @@ -8,7 +8,7 @@ msgid "" msgstr "" -"Project-Id-Version: navit 0.5.0\n" +"Project-Id-Version: navit 0.5.1\n" "Report-Msgid-Bugs-To: \n" "PO-Revision-Date: 2015-07-19 03:57+0000\n" "Last-Translator: Michael von Glasow <Unknown>\n" @@ -153,7 +153,6 @@ msgstr "" msgid "%1$sonto %2$s|neuter form" msgstr "" -#. TRANSLATORS: motorway ramp refers to the slip road for entering a motorway. msgid "onto the motorway ramp" msgstr "" @@ -366,7 +365,6 @@ msgstr "" msgid "You have reached your destination %s" msgstr "" -#. TRANSLATORS: Exit as a noun, as in "Exit 43 Greenmound-East" msgid "Interchange" msgstr "" @@ -383,9 +381,15 @@ msgstr "" msgid "Length" msgstr "Працягласць" +msgid "mi" +msgstr "" + msgid "km" msgstr "км" +msgid "feet" +msgstr "" + msgid "m" msgstr "м" @@ -446,6 +450,7 @@ msgid "Anguilla" msgstr "Ангілья" #. 008 +#. Android resource: @strings/albania msgid "Albania" msgstr "Албанія" @@ -458,6 +463,7 @@ msgid "Netherlands Antilles" msgstr "Нідэрландскія Антыльскія астравы" #. 024 +#. Android resource: @strings/angola msgid "Angola" msgstr "Ангола" @@ -466,6 +472,7 @@ msgid "Antarctica" msgstr "Антарктыда" #. 032 +#. Android resource: @strings/argentina msgid "Argentina" msgstr "Аргенціна" @@ -474,10 +481,12 @@ msgid "American Samoa" msgstr "Усходняе Самоа" #. 040 +#. Android resource: @strings/austria msgid "Austria" msgstr "Аўстрыя" #. 036 +#. Android resource: @strings/australia msgid "Australia" msgstr "Аўстралія" @@ -490,10 +499,12 @@ msgid "Aland Islands" msgstr "Аландскія астравы" #. 031 +#. Android resource: @strings/azerbaijan msgid "Azerbaijan" msgstr "Азербайджан" #. 070 +#. Android resource: @strings/bosnia_and_herzegovina msgid "Bosnia and Herzegovina" msgstr "Боснія і Герцагавіна" @@ -506,6 +517,7 @@ msgid "Bangladesh" msgstr "Бангладэш" #. 056 +#. Android resource: @strings/belgium msgid "Belgium" msgstr "Бельгія" @@ -514,6 +526,7 @@ msgid "Burkina Faso" msgstr "Буркіна Фасо" #. 100 +#. Android resource: @strings/bulgaria msgid "Bulgaria" msgstr "Балгарыя" @@ -522,6 +535,7 @@ msgid "Bahrain" msgstr "Бахрэйн" #. 108 +#. Android resource: @strings/burundi msgid "Burundi" msgstr "Бурундзі" @@ -542,6 +556,7 @@ msgid "Brunei Darussalam" msgstr "Брунэй Даруссалам" #. 068 +#. Android resource: @strings/bolivia msgid "Bolivia" msgstr "Балівія" @@ -550,6 +565,7 @@ msgid "Bonaire, Sint Eustatius and Saba" msgstr "" #. 076 +#. Android resource: @strings/brazil msgid "Brazil" msgstr "Бразілія" @@ -566,10 +582,12 @@ msgid "Bouvet Island" msgstr "Востраў Буве" #. 072 +#. Android resource: @strings/botswana msgid "Botswana" msgstr "Батсвана" #. 112 +#. Android resource: @strings/belarus msgid "Belarus" msgstr "Беларусь" @@ -578,6 +596,7 @@ msgid "Belize" msgstr "Бэліз" #. 124 +#. Android resource: @strings/canada msgid "Canada" msgstr "Канада" @@ -586,6 +605,7 @@ msgid "Cocos (Keeling) Islands" msgstr "Какосавыя (Кілінг) астравы" #. 180 +#. Android resource: @strings/congo msgid "Congo, Democratic Republic of the" msgstr "Дэмакратычная Рэспубліка Конга" @@ -598,10 +618,12 @@ msgid "Congo" msgstr "Конга" #. 756 +#. Android resource: @strings/switzerland msgid "Switzerland" msgstr "Швейцарыя" #. 384 +#. Android resource: @strings/cotedivoire msgid "Cote d'Ivoire" msgstr "Кот д'Івуар" @@ -610,6 +632,7 @@ msgid "Cook Islands" msgstr "Астравы Кука" #. 152 +#. Android resource: @strings/chile msgid "Chile" msgstr "Чылі" @@ -618,10 +641,12 @@ msgid "Cameroon" msgstr "Камерун" #. 156 +#. Android resource: @strings/china msgid "China" msgstr "Кітай" #. 170 +#. Android resource: @strings/colombia msgid "Colombia" msgstr "Калумбія" @@ -630,6 +655,7 @@ msgid "Costa Rica" msgstr "Коста Рыка" #. 192 +#. Android resource: @strings/cuba msgid "Cuba" msgstr "Куба" @@ -646,14 +672,17 @@ msgid "Christmas Island" msgstr "Востраў Раства" #. 196 +#. Android resource: @strings/cyprus msgid "Cyprus" msgstr "Кіпр" #. 203 +#. Android resource: @strings/czech_republic msgid "Czech Republic" msgstr "Чэшская рэспубліка" #. 276 +#. Android resource: @strings/germany msgid "Germany" msgstr "Германія" @@ -662,6 +691,7 @@ msgid "Djibouti" msgstr "Джыбуці" #. 208 +#. Android resource: @strings/denmark msgid "Denmark" msgstr "Данія" @@ -670,6 +700,7 @@ msgid "Dominica" msgstr "Дамініка" #. 214 +#. Android resource: @strings/dominican_republic msgid "Dominican Republic" msgstr "Дамініканская Рэспубліка" @@ -678,10 +709,12 @@ msgid "Algeria" msgstr "Алжыр" #. 218 +#. Android resource: @strings/ecuador msgid "Ecuador" msgstr "Эквадор" #. 233 +#. Android resource: @strings/estonia msgid "Estonia" msgstr "Эстонія" @@ -698,14 +731,17 @@ msgid "Eritrea" msgstr "Эрытрэя" #. 724 +#. Android resource: @strings/spain msgid "Spain" msgstr "Іспанія" #. 231 +#. Android resource: @strings/ethiopia msgid "Ethiopia" msgstr "Эфіопія" #. 246 +#. Android resource: @strings/finland msgid "Finland" msgstr "Фінляндыя" @@ -722,10 +758,12 @@ msgid "Micronesia, Federated States of" msgstr "Фэдэратыўныя Штаты Мікранэзіі" #. 234 +#. Android resource: @strings/faroe_islands msgid "Faroe Islands" msgstr "Фарэрскія астравы" #. 250 +#. Android resource: @strings/france msgid "France" msgstr "Францыя" @@ -734,6 +772,7 @@ msgid "Gabon" msgstr "Габон" #. 826 +#. Android resource: @strings/united_kingdom msgid "United Kingdom" msgstr "Вялікабрытанія" @@ -770,6 +809,7 @@ msgid "Gambia" msgstr "Гамбія" #. 324 +#. Android resource: @strings/guinea msgid "Guinea" msgstr "Гвінея" @@ -782,6 +822,7 @@ msgid "Equatorial Guinea" msgstr "Экватарыяльная Гвінея" #. 300 +#. Android resource: @strings/greece msgid "Greece" msgstr "Грэцыя" @@ -802,6 +843,7 @@ msgid "Guinea-Bissau" msgstr "Гвінея-Бісаў" #. 328 +#. Android resource: @strings/guyana msgid "Guyana" msgstr "Гаяна" @@ -818,26 +860,32 @@ msgid "Honduras" msgstr "Гандурас" #. 191 +#. Android resource: @strings/croatia msgid "Croatia" msgstr "Харватыя" #. 332 +#. Android resource: @strings/haiti msgid "Haiti" msgstr "Гаіці" #. 348 +#. Android resource: @strings/hungary msgid "Hungary" msgstr "Венгрыя" #. 360 +#. Android resource: @strings/indonesia msgid "Indonesia" msgstr "Інданэзія" #. 372 +#. Android resource: @strings/ireland msgid "Ireland" msgstr "Ірландыя" #. 376 +#. Android resource: @strings/israel msgid "Israel" msgstr "Ізраіль" @@ -846,6 +894,7 @@ msgid "Isle of Man" msgstr "Востраў Мэн" #. 356 +#. Android resource: @strings/india msgid "India" msgstr "Індыя" @@ -854,18 +903,22 @@ msgid "British Indian Ocean Territory" msgstr "Брытанская тэрыторыя ў Індыйскім акіяне" #. 368 +#. Android resource: @strings/iraq msgid "Iraq" msgstr "Ірак" #. 364 +#. Android resource: @strings/iran msgid "Iran, Islamic Republic of" msgstr "Ісламская Рэспубліка Іран" #. 352 +#. Android resource: @strings/iceland msgid "Iceland" msgstr "Ісландыя" #. 380 +#. Android resource: @strings/italy msgid "Italy" msgstr "Італія" @@ -874,6 +927,7 @@ msgid "Jersey" msgstr "Джэрсі" #. 388 +#. Android resource: @strings/jamaica msgid "Jamaica" msgstr "Ямайка" @@ -882,14 +936,17 @@ msgid "Jordan" msgstr "Іарданія" #. 392 +#. Android resource: @strings/japan msgid "Japan" msgstr "Японія" #. 404 +#. Android resource: @strings/kenya msgid "Kenya" msgstr "Кенія" #. 417 +#. Android resource: @strings/kyrgyzsyan msgid "Kyrgyzstan" msgstr "Кыргыстан" @@ -926,6 +983,7 @@ msgid "Cayman Islands" msgstr "Кайманавы астравы" #. 398 +#. Android resource: @strings/kazakhstan msgid "Kazakhstan" msgstr "Казахстан" @@ -950,26 +1008,32 @@ msgid "Sri Lanka" msgstr "Шры-Ланка" #. 430 +#. Android resource: @strings/liberia msgid "Liberia" msgstr "Ліберыя" #. 426 +#. Android resource: @strings/lesotho msgid "Lesotho" msgstr "Лесота" #. 440 +#. Android resource: @strings/lithuania msgid "Lithuania" msgstr "Літва" #. 442 +#. Android resource: @strings/luxembourg msgid "Luxembourg" msgstr "Люксембург" #. 428 +#. Android resource: @strings/latvia msgid "Latvia" msgstr "Латвія" #. 434 +#. Android resource: @strings/libya msgid "Libya" msgstr "" @@ -994,6 +1058,7 @@ msgid "Saint Martin (French part)" msgstr "Сэнт-Марцін (французская частка)" #. 450 +#. Android resource: @strings/madagascar msgid "Madagascar" msgstr "Мадагаскар" @@ -1014,6 +1079,7 @@ msgid "Myanmar" msgstr "М'янма" #. 496 +#. Android resource: @strings/mongolia msgid "Mongolia" msgstr "Манголія" @@ -1054,10 +1120,12 @@ msgid "Malawi" msgstr "Малаві" #. 484 +#. Android resource: @strings/mexico msgid "Mexico" msgstr "Мексіка" #. 458 +#. Android resource: @strings/malaysia msgid "Malaysia" msgstr "Малайзія" @@ -1066,10 +1134,12 @@ msgid "Mozambique" msgstr "Мазамбік" #. 516 +#. Android resource: @strings/namibia msgid "Namibia" msgstr "Намібія" #. 540 +#. Android resource: @strings/new_caledonia msgid "New Caledonia" msgstr "Новая Каледонія" @@ -1090,6 +1160,7 @@ msgid "Nicaragua" msgstr "Нікарагуа" #. 528 +#. Android resource: @strings/netherlands msgid "Netherlands" msgstr "Нідэрланды" @@ -1098,6 +1169,7 @@ msgid "Norway" msgstr "Нарвегія" #. 524 +#. Android resource: @strings/nepal msgid "Nepal" msgstr "Нэпал" @@ -1110,6 +1182,7 @@ msgid "Niue" msgstr "Ніуе" #. 554 +#. Android resource: @strings/newzealand msgid "New Zealand" msgstr "Новая Зеландыя" @@ -1122,6 +1195,7 @@ msgid "Panama" msgstr "Панама" #. 604 +#. Android resource: @strings/peru msgid "Peru" msgstr "Перу" @@ -1134,14 +1208,17 @@ msgid "Papua New Guinea" msgstr "Папуа–Новая Гвінэя" #. 608 +#. Android resource: @strings/philippines msgid "Philippines" msgstr "Філіпіны" #. 586 +#. Android resource: @strings/pakistan msgid "Pakistan" msgstr "Пакістан" #. 616 +#. Android resource: @strings/poland msgid "Poland" msgstr "Польшча" @@ -1162,6 +1239,7 @@ msgid "Palestinian Territory, Occupied" msgstr "Палестынская тэрыторыя, акупаваная" #. 620 +#. Android resource: @strings/portugal msgid "Portugal" msgstr "Партугалія" @@ -1170,6 +1248,7 @@ msgid "Palau" msgstr "Палау" #. 600 +#. Android resource: @strings/paraguay msgid "Paraguay" msgstr "Парагвай" @@ -1178,10 +1257,12 @@ msgid "Qatar" msgstr "Катар" #. 638 +#. Android resource: @strings/reunion msgid "Reunion" msgstr "Рэюньён" #. 642 +#. Android resource: @strings/romania msgid "Romania" msgstr "Румынія" @@ -1190,14 +1271,17 @@ msgid "Serbia" msgstr "Сербія" #. 643 +#. Android resource: @strings/russian_federation msgid "Russian Federation" msgstr "Расійская Федэрацыя" #. 646 +#. Android resource: @strings/rwanda msgid "Rwanda" msgstr "Руанда" #. 682 +#. Android resource: @strings/saudi_arabia msgid "Saudi Arabia" msgstr "Саудаўская Аравія" @@ -1218,6 +1302,7 @@ msgid "Sweden" msgstr "Швецыя" #. 702 +#. Android resource: @strings/singapore msgid "Singapore" msgstr "Сінгапур" @@ -1234,6 +1319,7 @@ msgid "Svalbard and Jan Mayen" msgstr "Шпіцбэрген і Ян-Майен" #. 703 +#. Android resource: @strings/slovakia msgid "Slovakia" msgstr "Славакія" @@ -1254,6 +1340,7 @@ msgid "Somalia" msgstr "Самалі" #. 740 +#. Android resource: @strings/suriname msgid "Suriname" msgstr "Сурынам" @@ -1298,6 +1385,7 @@ msgid "Togo" msgstr "Тога" #. 764 +#. Android resource: @strings/thailand msgid "Thailand" msgstr "Тайланд" @@ -1314,6 +1402,7 @@ msgid "Timor-Leste" msgstr "Тымор-Лестэ" #. 795 +#. Android resource: @strings/turkmenistan msgid "Turkmenistan" msgstr "Туркменістан" @@ -1326,6 +1415,7 @@ msgid "Tonga" msgstr "Тонга" #. 792 +#. Android resource: @strings/turkey msgid "Turkey" msgstr "Турцыя" @@ -1342,14 +1432,17 @@ msgid "Taiwan, Province of China" msgstr "Кітайская правінцыя Тайвань" #. 834 +#. Android resource: @strings/tanzania msgid "Tanzania, United Republic of" msgstr "Злучаная Рэспубліка Танзанія" #. 804 +#. Android resource: @strings/ukraine msgid "Ukraine" msgstr "Украіна" #. 800 +#. Android resource: @strings/uganda msgid "Uganda" msgstr "Уганда" @@ -1362,6 +1455,7 @@ msgid "United States" msgstr "Злучаныя Штаты Амерыкі" #. 858 +#. Android resource: @strings/uruguay msgid "Uruguay" msgstr "Уругвай" @@ -1378,6 +1472,7 @@ msgid "Saint Vincent and the Grenadines" msgstr "Сэнт-Вінсэнт і Грэнадзіны" #. 862 +#. Android resource: @strings/venezuela msgid "Venezuela" msgstr "Венесуэла" @@ -1414,6 +1509,7 @@ msgid "Mayotte" msgstr "Маёта" #. 710 +#. Android resource: @strings/south_africa msgid "South Africa" msgstr "Паўднёва-Афрыканская Рэспубліка" @@ -1441,23 +1537,23 @@ msgid "" msgstr "" #. We have not found an existing config file from all possibilities -msgid "No config file navit.xml, navit.xml.local found\n" +msgid "No config file navit.xml, navit.xml.local found" msgstr "" #, c-format -msgid "Error parsing config file '%s': %s\n" +msgid "Error parsing config file '%s': %s" msgstr "" #, c-format -msgid "Using config file '%s'\n" +msgid "Using config file '%s'" msgstr "" #, c-format -msgid "Error: No configuration found in config file '%s'\n" +msgid "Error: No configuration found in config file '%s'" msgstr "" msgid "" -"Internal initialization failed, exiting. Check previous error messages.\n" +"Internal initialization failed, exiting. Check previous error messages." msgstr "" msgid "unknown street" @@ -1598,6 +1694,9 @@ msgstr "" msgid "_Lock on Road" msgstr "" +msgid "_Follow Vehicle" +msgstr "" + msgid "_Keep orientation to the North" msgstr "" @@ -1667,7 +1766,12 @@ msgstr "" msgid "Shopping" msgstr "" -msgid "Select a search radius from screen center" +#. Input is in kilometers +msgid "Select a search radius from screen center in km" +msgstr "" + +#. Input is in miles. +msgid "Select a search radius from screen center in miles" msgstr "" #, c-format @@ -1675,15 +1779,15 @@ msgid "POI %s. %s" msgstr "" #, c-format -msgid "Set destination to %ld, %ld \n" +msgid "Set destination to %ld, %ld " msgstr "" #, c-format -msgid "Set map to %ld, %ld \n" +msgid "Set map to %ld, %ld " msgstr "" #, c-format -msgid "Set next visit to %ld, %ld \n" +msgid "Set next visit to %ld, %ld " msgstr "" msgid "POI search" @@ -1692,9 +1796,6 @@ msgstr "" msgid "Select a category" msgstr "" -msgid "Select a distance to look for (km)" -msgstr "" - msgid "Select a POI" msgstr "" @@ -1707,7 +1808,7 @@ msgstr "" msgid "Direction" msgstr "" -msgid "Distance(m)" +msgid "Distance" msgstr "" msgid "Name" @@ -1754,7 +1855,7 @@ msgid "OT" msgstr "" #, c-format -msgid "Route %4.0fkm %02d:%02d ETA" +msgid "Route %4.1f%s %02d:%02d ETA" msgstr "" msgid "Route 0000km 0+00:00 ETA" @@ -1977,6 +2078,9 @@ msgstr "" msgid "Show Locale" msgstr "" +msgid "Network info" +msgstr "" + msgid "Former Destinations" msgstr "" @@ -2015,729 +2119,861 @@ msgstr "" msgid "Please decrease your speed" msgstr "" -msgid "partial match" +msgid "Vehicle Position" msgstr "" -#. Android resource: @strings/address_search_button -msgid "Search" +msgid "Main menu" msgstr "" -#. Android resource: @strings/address_search_towns -msgid "Towns" +msgid "" +"Show\n" +"Map" msgstr "" -msgid "Map data (c) OpenStreetMap contributors, ODBL" -msgstr "" +msgid "Settings" +msgstr "Налады" + +msgid "Tools" +msgstr "Інструменты" + +msgid "Route" +msgstr "Шлях" + +msgid "About" +msgstr "Аб праграме" + +msgid "Quit" +msgstr "Выйсці" + +msgid "Actions" +msgstr "Дзеянні" msgid "" -"Current map location %s is not available\n" -"Please restart Navit after you attach an SD card or select a different map " -"location." +"Former\n" +"Destinations" msgstr "" -msgid "Downloaded maps" +msgid "Coordinates" msgstr "" msgid "" -"Sorry, we currently do not support maps above 3.8G on Android, please select " -"a smaller one." +"Stop\n" +"Navigation" msgstr "" -#. Android resource: @strings/position_popup_drive_here -msgid "Route to here" +msgid "Display" msgstr "" -msgid "Cancel" -msgstr "" +msgid "Fullscreen" +msgstr "Поўнаэкранны рэжым" -msgid "filenamePath" +msgid "Window Mode" msgstr "" -msgid "" -"New location set to %s\n" -"Restart Navit to apply the changes." +msgid "Auto zoom" msgstr "" -msgid "Whole Planet" +msgid "Manual zoom" msgstr "" -msgid "Africa" +msgid "Layers" msgstr "" -msgid "Canary Islands" +msgid "Zoom to route" msgstr "" -msgid "Asia" -msgstr "" +msgid "Description" +msgstr "Апісанне" -msgid "Korea" +msgid "" +"Drop last\n" +"Waypoint" msgstr "" -msgid "Taiwan" +msgid "" +"Drop next\n" +"Waypoint" msgstr "" -msgid "UAE+Other" +msgid "Satellite Status" msgstr "" -msgid "Oceania" +msgid "NMEA Data" msgstr "" -msgid "Tasmania" +msgid "car_shortest" msgstr "" -msgid "Victoria" +msgid "car_avoid_tolls" msgstr "" -msgid "New South Wales" +msgid "car_pedantic" msgstr "" -msgid "Europe" +msgid "horse" msgstr "" -msgid "Western Europe" +msgid "Truck" msgstr "" -msgid "Azores" +#. Strings from android/res/values/strings.xml +#. Android resource: @strings/yes +msgid "Yes" msgstr "" -msgid "BeNeLux" +#. Android resource: @strings/cancel +msgid "Cancel" msgstr "" -msgid "Alsace" +#. Android resource: @strings/notification_ticker +msgid "Navit started" msgstr "" -msgid "Aquitaine" +#. Android resource: @strings/notification_event_default +msgid "Navit running" msgstr "" -msgid "Auvergne" +#. Android resource: @strings/initial_info_box_title +msgid "Welcome to Navit" msgstr "" -msgid "Basse-Normandie" +#. Android resource: @strings/initial_info_box_message +msgid "" +"Thank you for installing Navit!\n" +"\n" +"To start, select \"Download maps\" from the menu to download a map. Note: " +"The map filesize may be large (>50MB) - a wifi connection is recommended.\n" +"\n" +"Mapdata: (c) OpenStreetMap contributors\n" +"\n" +"Enjoy Navit!" msgstr "" -msgid "Bourgogne" +#. Android resource: @strings/initial_info_box_OK +msgid "OK" msgstr "" -msgid "Bretagne" +#. Android resource: @strings/initial_info_box_more_info +msgid "More info" msgstr "" -msgid "Centre" +#. Android resource: @strings/optionsmenu_zoom_in +msgid "Zoom in" msgstr "" -msgid "Champagne-Ardenne" +#. Android resource: @strings/optionsmenu_zoom_out +msgid "Zoom out" msgstr "" -msgid "Corse" +#. Android resource: @strings/optionsmenu_download_maps +msgid "Download maps" msgstr "" -msgid "Franche-Comte" +#. Android resource: @strings/optionsmenu_toggle_poi +msgid "Toggle POIs" msgstr "" -msgid "Haute-Normandie" +#. Android resource: @strings/optionsmenu_exit_navit +msgid "Exit Navit" msgstr "" -msgid "Ile-de-France" +#. Android resource: @strings/optionsmenu_backup_restore +msgid "Backup / Restore" msgstr "" -msgid "Languedoc-Roussillon" +#. Android resource: @strings/optionsmenu_set_map_location +msgid "Set map location" msgstr "" -msgid "Limousin" +#. Android resource: @strings/position_popup_drive_here +msgid "Route to here" msgstr "" -msgid "Lorraine" +#. Android resource: @strings/map_delete +msgid "Delete this map?" msgstr "" -msgid "Midi-Pyrenees" +#. Android resource: @strings/map_download_title +msgid "Map download" msgstr "" -msgid "Nord-pas-de-Calais" +#. Android resource: @strings/map_download_downloading +msgid "Downloading:" msgstr "" -msgid "Pays-de-la-Loire" +#. Android resource: @strings/map_download_eta +msgid "ETA" msgstr "" -msgid "Picardie" +#. Android resource: @strings/map_download_ready +msgid "ready" msgstr "" -msgid "Poitou-Charentes" +#. Android resource: @strings/map_download_download_error +msgid "Error downloading map." msgstr "" -msgid "Provence-Alpes-Cote-d-Azur" +#. Android resource: @strings/map_download_download_aborted +msgid "Map download aborted" msgstr "" -msgid "Rhone-Alpes" +#. Android resource: @strings/map_download_not_enough_free_space +msgid "Not enough free space" msgstr "" -msgid "Baden-Wuerttemberg" +#. Android resource: @strings/map_download_oversize +msgid "" +"Sorry, we currently do not support maps above 3.8G on Android, please select " +"a smaller one." msgstr "" -msgid "Bayern" +#. Android resource: @strings/map_no_fix +msgid "No location. Reopen after location fix." msgstr "" -msgid "Mittelfranken" +#. Android resource: @strings/maps_for_current_location +msgid "Maps containing current location" msgstr "" -msgid "Niederbayern" +#. Android resource: @strings/maps_installed +msgid "Installed maps" msgstr "" -msgid "Oberbayern" +#. Android resource: @strings/map_downloading +msgid "downloading" msgstr "" -msgid "Oberfranken" +#. Android resource: @strings/map_download_medium_unavailable +msgid "Media selected for map storage is not available" msgstr "" -msgid "Oberpfalz" +#. Android resource: @strings/map_download_error_writing_map +msgid "Error writing map!" msgstr "" -msgid "Schwaben" +#. Android resource: @strings/map_location_changed +#, c-format +msgid "New location set to %s Restart Navit to apply the changes." msgstr "" -msgid "Unterfranken" +#. Android resource: @strings/map_location_unavailable +#, c-format +msgid "" +"Current map location %s is not available Please restart Navit after you " +"attach an SD card or select a different map location." msgstr "" -msgid "Berlin" +#. Android resource: @strings/address_search_title +msgid "Address search" msgstr "" -msgid "Brandenburg" +#. Android resource: @strings/address_enter_destination +msgid "Enter destination" msgstr "" -msgid "Bremen" +#. Android resource: @strings/address_partial_match +msgid "Match partial address" msgstr "" -msgid "Hamburg" +#. Android resource: @strings/address_search_button +msgid "Search" msgstr "" -msgid "Hessen" +#. Android resource: @strings/address_search_searching +msgid "Searching..." msgstr "" -msgid "Mecklenburg-Vorpommern" +#. Android resource: @strings/address_search_not_found +msgid "Address not found" msgstr "" -msgid "Niedersachsen" +#. Android resource: @strings/address_search_getting_results +msgid "Getting search results" msgstr "" -msgid "Nordrhein-westfalen" +#. Android resource: @strings/address_search_loading_results +msgid "Loading search results" msgstr "" -msgid "Rheinland-Pfalz" +#. Android resource: @strings/address_search_no_results +msgid "No results found" msgstr "" -msgid "Saarland" +#. Android resource: @strings/address_search_no_text_entered +msgid "No text entered" msgstr "" -msgid "Sachsen-Anhalt" +#. Android resource: @strings/address_search_set_destination +msgid "Setting destination to:" msgstr "" -msgid "Sachsen" +#. Android resource: @strings/address_search_towns +msgid "Towns" msgstr "" -msgid "Schleswig-Holstein" +#. Android resource: @strings/choose_an_action +msgid "Choose an action" msgstr "" -msgid "Thueringen" +#. Android resource: @strings/please_insert_an_sd_card +msgid "Please insert an SD Card" msgstr "" -msgid "Mallorca" +#. Android resource: @strings/backing_up +msgid "Backing up..." msgstr "" -msgid "Galicia" +#. Android resource: @strings/restoring +msgid "Restoring..." msgstr "" -msgid "Scandinavia" +#. Android resource: @strings/failed_to_create_backup_directory +msgid "Failed to create backup directory" msgstr "" -msgid "England" +#. Android resource: @strings/backup_failed +msgid "Backup failed" msgstr "" -msgid "Buckinghamshire" +#. Android resource: @strings/no_backup_found +msgid "No backup found" msgstr "" -msgid "Cambridgeshire" +#. Android resource: @strings/failed_to_restore +msgid "Failed to restore" msgstr "" -msgid "Cumbria" +#. Android resource: @strings/backup_successful +msgid "Backup successful" msgstr "" -msgid "East yorkshire with hull" +#. Android resource: @strings/restore_successful_please_restart_navit +msgid "" +"Restore Successful\n" +"Please restart Navit" msgstr "" -msgid "Essex" +#. Android resource: @strings/backup_not_found +msgid "Backup not found" msgstr "" -msgid "Herefordshire" +#. Android resource: @strings/restore_failed +msgid "Restore failed" msgstr "" -msgid "Kent" +#. Android resource: @strings/select_backup +msgid "Select backup" msgstr "" -msgid "Lancashire" +#. Android resource: @strings/backup +msgid "Backup" msgstr "" -msgid "Leicestershire" +#. Android resource: @strings/restore +msgid "Restore" msgstr "" -msgid "Norfolk" +#. Android resource: @strings/TTS_title_data_missing +msgid "System text to speech engine data is missing" msgstr "" -msgid "Nottinghamshire" +#. Android resource: @strings/TTS_qery_install_data +msgid "" +"Navit can use any text to speech engine installed on your device. The " +"currently selected engine reports it is unable to speak in your language. " +"Should we ask the system to show voice download dialog?" msgstr "" -msgid "Oxfordshire" +#. Android resource: @strings/permissions_not_granted +msgid "" +"Navit needs permission to access GPS and read the map.\n" +"If you change your mind please restart Navit and grant the permissions" msgstr "" -msgid "Shropshire" +#. Android resource: @strings/permissions_info_box_title +msgid "One or more ungranted permissions" msgstr "" -msgid "Somerset" +#. Android resource: @strings/whole_planet +msgid "Whole Planet" msgstr "" -msgid "South yorkshire" +#. Android resource: @strings/africa +msgid "Africa" msgstr "" -msgid "Suffolk" +#. Android resource: @strings/canary_islands +msgid "Canary Islands" msgstr "" -msgid "Surrey" +#. Android resource: @strings/asia +msgid "Asia" msgstr "" -msgid "Wiltshire" +#. Android resource: @strings/taiwan +msgid "Taiwan" msgstr "" -msgid "Scotland" +#. Android resource: @strings/korea +msgid "Korea" msgstr "" -msgid "Wales" +#. Android resource: @strings/uae_other +msgid "UAE+Other" msgstr "" -msgid "Crete" +#. Android resource: @strings/oceania +msgid "Oceania" msgstr "" -msgid "North America" +#. Android resource: @strings/tasmania +msgid "Tasmania" msgstr "" -msgid "Alaska" +#. Android resource: @strings/victoria +msgid "Victoria" msgstr "" -msgid "Hawaii" +#. Android resource: @strings/new_south_wales +msgid "New South Wales" msgstr "" -msgid "USA" +#. Android resource: @strings/europe +msgid "Europe" msgstr "" -msgid " (except Alaska and Hawaii)" +#. Android resource: @strings/western_europe +msgid "Western Europe" msgstr "" -msgid "Midwest" +#. Android resource: @strings/azores +msgid "Azores" msgstr "" -msgid "Michigan" +#. Android resource: @strings/benelux +msgid "BeNeLux" msgstr "" -msgid "Ohio" +#. Android resource: @strings/alsace +msgid "Alsace" msgstr "" -msgid "Northeast" +#. Android resource: @strings/aquitaine +msgid "Aquitaine" msgstr "" -msgid "Massachusetts" +#. Android resource: @strings/auvergne +msgid "Auvergne" msgstr "" -msgid "Vermont" +#. Android resource: @strings/centre +msgid "Centre" msgstr "" -msgid "Pacific" +#. Android resource: @strings/bretagne +msgid "Bretagne" msgstr "" -msgid "South" +#. Android resource: @strings/bourgogne +msgid "Bourgogne" msgstr "" -msgid "Arkansas" +#. Android resource: @strings/basse_normandie +msgid "Basse-Normandie" msgstr "" -msgid "District of Columbia" +#. Android resource: @strings/champagne_ardenne +msgid "Champagne-Ardenne" msgstr "" -msgid "Florida" +#. Android resource: @strings/corse +msgid "Corse" msgstr "" -msgid "Louisiana" +#. Android resource: @strings/franche_comte +msgid "Franche-Comte" msgstr "" -msgid "Maryland" +#. Android resource: @strings/haute_normandie +msgid "Haute-Normandie" msgstr "" -msgid "Mississippi" +#. Android resource: @strings/ile_de_france +msgid "Ile-de-France" msgstr "" -msgid "Oklahoma" +#. Android resource: @strings/languedoc_roussillon +msgid "Languedoc-Roussillon" msgstr "" -msgid "Texas" +#. Android resource: @strings/limousin +msgid "Limousin" msgstr "" -msgid "Virginia" +#. Android resource: @strings/lorraine +msgid "Lorraine" msgstr "" -msgid "West Virginia" +#. Android resource: @strings/midi_pyrenees +msgid "Midi-Pyrenees" msgstr "" -msgid "West" +#. Android resource: @strings/nord_pas_de_calais +msgid "Nord-pas-de-Calais" msgstr "" -msgid "Arizona" +#. Android resource: @strings/pays_de_la_loire +msgid "Pays-de-la-Loire" msgstr "" -msgid "California" +#. Android resource: @strings/picardie +msgid "Picardie" msgstr "" -msgid "Colorado" +#. Android resource: @strings/poitou_charentes +msgid "Poitou-Charentes" msgstr "" -msgid "Idaho" +#. Android resource: @strings/provence_alpes_cote_d_azur +msgid "Provence-Alpes-Cote-d-Azur" msgstr "" -msgid "Montana" +#. Android resource: @strings/rhone_alpes +msgid "Rhone-Alpes" msgstr "" -msgid "New Mexico" +#. Android resource: @strings/baden_wuerttemberg +msgid "Baden-Wuerttemberg" msgstr "" -msgid "Nevada" +#. Android resource: @strings/bayern +msgid "Bayern" msgstr "" -msgid "Oregon" +#. Android resource: @strings/mittelfranken +msgid "Mittelfranken" msgstr "" -msgid "Utah" +#. Android resource: @strings/niederbayern +msgid "Niederbayern" msgstr "" -msgid "Washington State" +#. Android resource: @strings/oberbayern +msgid "Oberbayern" msgstr "" -msgid "South+Middle America" +#. Android resource: @strings/oberfranken +msgid "Oberfranken" msgstr "" -msgid "Guyane Francaise" +#. Android resource: @strings/oberpfalz +msgid "Oberpfalz" msgstr "" -msgid "downloading" +#. Android resource: @strings/schwaben +msgid "Schwaben" msgstr "" -#. Android resource: @strings/map_download_ready -msgid "ready" +#. Android resource: @strings/unterfranken +msgid "Unterfranken" msgstr "" -msgid "Media selected for map storage is not available" +#. Android resource: @strings/berlin +msgid "Berlin" msgstr "" -#. Android resource: @strings/map_download_not_enough_free_space -msgid "Not enough free space" +#. Android resource: @strings/brandenburg +msgid "Brandenburg" msgstr "" -msgid "Error downloading map!" +#. Android resource: @strings/bremen +msgid "Bremen" msgstr "" -msgid "Error writing map!" +#. Android resource: @strings/hamburg +msgid "Hamburg" msgstr "" -msgid "Map download aborted!" +#. Android resource: @strings/hessen +msgid "Hessen" msgstr "" -#. Android resource: @strings/map_download_eta -msgid "ETA" +#. Android resource: @strings/mecklenburg_vorpommern +msgid "Mecklenburg-Vorpommern" msgstr "" -#. Android resource: @strings/map_download_title -msgid "Map download" +#. Android resource: @strings/niedersachsen +msgid "Niedersachsen" msgstr "" -msgid "Vehicle Position" +#. Android resource: @strings/nordrhein_westfalen +msgid "Nordrhein-westfalen" msgstr "" -msgid "Main menu" +#. Android resource: @strings/rheinland_pfalz +msgid "Rheinland-Pfalz" msgstr "" -msgid "" -"Show\n" -"Map" +#. Android resource: @strings/saarland +msgid "Saarland" msgstr "" -msgid "Settings" -msgstr "Налады" - -msgid "Tools" -msgstr "Інструменты" - -msgid "Route" -msgstr "Шлях" - -msgid "About" -msgstr "Аб праграме" - -msgid "Quit" -msgstr "Выйсці" - -msgid "Actions" -msgstr "Дзеянні" +#. Android resource: @strings/sachsen_anhalt +msgid "Sachsen-Anhalt" +msgstr "" -msgid "" -"Former\n" -"Destinations" +#. Android resource: @strings/sachsen +msgid "Sachsen" msgstr "" -msgid "Coordinates" +#. Android resource: @strings/schleswig_holstein +msgid "Schleswig-Holstein" msgstr "" -msgid "" -"Stop\n" -"Navigation" +#. Android resource: @strings/thueringen +msgid "Thueringen" msgstr "" -msgid "Display" +#. Android resource: @strings/mallorca +msgid "Mallorca" msgstr "" -msgid "Fullscreen" -msgstr "Поўнаэкранны рэжым" +#. Android resource: @strings/galicia +msgid "Galicia" +msgstr "" -msgid "Window Mode" +#. Android resource: @strings/scandinavia +msgid "Scandinavia" msgstr "" -msgid "Layers" +#. Android resource: @strings/england +msgid "England" msgstr "" -msgid "Description" -msgstr "Апісанне" +#. Android resource: @strings/buckinghamshire +msgid "Buckinghamshire" +msgstr "" -msgid "" -"Drop last \n" -"Waypoint" +#. Android resource: @strings/cambridgeshire +msgid "Cambridgeshire" msgstr "" -msgid "" -"Drop next \n" -"Waypoint" +#. Android resource: @strings/cumbria +msgid "Cumbria" msgstr "" -msgid "Satellite Status" +#. Android resource: @strings/east_yorkshire_with_hull +msgid "East yorkshire with hull" msgstr "" -msgid "NMEA Data" +#. Android resource: @strings/essex +msgid "Essex" msgstr "" -msgid "car_shortest" +#. Android resource: @strings/herefordshire +msgid "Herefordshire" msgstr "" -msgid "car_avoid_tolls" +#. Android resource: @strings/kent +msgid "Kent" msgstr "" -msgid "car_pedantic" +#. Android resource: @strings/lancashire +msgid "Lancashire" msgstr "" -msgid "horse" +#. Android resource: @strings/leicestershire +msgid "Leicestershire" msgstr "" -msgid "Truck" +#. Android resource: @strings/norfolk +msgid "Norfolk" msgstr "" -#. Strings from android/res/values/strings.xml -#. Android resource: @strings/yes -msgid "Yes" +#. Android resource: @strings/nottinghamshire +msgid "Nottinghamshire" msgstr "" -#. Android resource: @strings/notification_ticker -msgid "Navit started" +#. Android resource: @strings/oxfordshire +msgid "Oxfordshire" msgstr "" -#. Android resource: @strings/notification_event_default -msgid "Navit running" +#. Android resource: @strings/shropshire +msgid "Shropshire" msgstr "" -#. Android resource: @strings/initial_info_box_title -msgid "Welcome to Navit" +#. Android resource: @strings/somerset +msgid "Somerset" msgstr "" -#. Android resource: @strings/initial_info_box_message -msgid "" -"Thank you for installing Navit!\n" -"\n" -"To start, select \"Download maps\" from the menu to download a map. Note: " -"The map filesize may be large (>50MB) - a wifi connection is recommended.\n" -"\n" -"Mapdata: (c) OpenStreetMap contributors\n" -"\n" -"Enjoy Navit!" +#. Android resource: @strings/south_yorkshire +msgid "South yorkshire" msgstr "" -#. Android resource: @strings/initial_info_box_OK -msgid "OK" +#. Android resource: @strings/suffolk +msgid "Suffolk" msgstr "" -#. Android resource: @strings/initial_info_box_more_info -msgid "More info" +#. Android resource: @strings/surrey +msgid "Surrey" msgstr "" -#. Android resource: @strings/optionsmenu_zoom_in -msgid "Zoom in" +#. Android resource: @strings/wiltshire +msgid "Wiltshire" msgstr "" -#. Android resource: @strings/optionsmenu_zoom_out -msgid "Zoom out" +#. Android resource: @strings/scotland +msgid "Scotland" msgstr "" -#. Android resource: @strings/optionsmenu_download_maps -msgid "Download maps" +#. Android resource: @strings/wales +msgid "Wales" msgstr "" -#. Android resource: @strings/optionsmenu_toggle_poi -msgid "Toggle POIs" +#. Android resource: @strings/crete +msgid "Crete" msgstr "" -#. Android resource: @strings/optionsmenu_exit_navit -msgid "Exit Navit" +#. Android resource: @strings/north_america +msgid "North America" msgstr "" -#. Android resource: @strings/optionsmenu_backup_restore -msgid "Backup / Restore" +#. Android resource: @strings/alaska +msgid "Alaska" msgstr "" -#. Android resource: @strings/optionsmenu_set_map_location -msgid "Set map location" +#. Android resource: @strings/hawaii +msgid "Hawaii" msgstr "" -#. Android resource: @strings/map_delete -msgid "Delete this map?" +#. Android resource: @strings/usa +msgid "USA" msgstr "" -#. Android resource: @strings/map_download_downloading -msgid "Downloading:" +#. Android resource: @strings/except_alaska_and_hawaii +msgid "(except Alaska and Hawaii)" msgstr "" -#. Android resource: @strings/map_download_download_error -msgid "Error downloading map." +#. Android resource: @strings/midwest +msgid "Midwest" msgstr "" -#. Android resource: @strings/map_download_download_aborted -msgid "Map download aborted" +#. Android resource: @strings/michigan +msgid "Michigan" msgstr "" -#. Android resource: @strings/map_no_fix -msgid "No location. Reopen after location fix." +#. Android resource: @strings/ohio +msgid "Ohio" msgstr "" -#. Android resource: @strings/maps_for_current_location -msgid "Maps containing current location" +#. Android resource: @strings/northeast +msgid "Northeast" msgstr "" -#. Android resource: @strings/address_search_title -msgid "Address search" +#. Android resource: @strings/massachusetts +msgid "Massachusetts" msgstr "" -#. Android resource: @strings/address_enter_destination -msgid "Enter destination" +#. Android resource: @strings/vermont +msgid "Vermont" msgstr "" -#. Android resource: @strings/address_partial_match -msgid "Match partial address" +#. Android resource: @strings/pacific +msgid "Pacific" msgstr "" -#. Android resource: @strings/address_search_searching -msgid "Searching..." +#. Android resource: @strings/south +msgid "South" msgstr "" -#. Android resource: @strings/address_search_not_found -msgid "Address not found" +#. Android resource: @strings/arkansas +msgid "Arkansas" msgstr "" -#. Android resource: @strings/address_search_getting_results -msgid "Getting search results" +#. Android resource: @strings/district_of_columbia +msgid "District of Columbia" msgstr "" -#. Android resource: @strings/address_search_loading_results -msgid "Loading search results" +#. Android resource: @strings/florida +msgid "Florida" msgstr "" -#. Android resource: @strings/address_search_no_results -msgid "No results found" +#. Android resource: @strings/louisiana +msgid "Louisiana" msgstr "" -#. Android resource: @strings/address_search_no_text_entered -msgid "No text entered" +#. Android resource: @strings/maryland +msgid "Maryland" msgstr "" -#. Android resource: @strings/address_search_set_destination -msgid "Setting destination to:" +#. Android resource: @strings/mississippi +msgid "Mississippi" msgstr "" -#. Android resource: @strings/choose_an_action -msgid "Choose an action" +#. Android resource: @strings/oklahoma +msgid "Oklahoma" msgstr "" -#. Android resource: @strings/please_insert_an_sd_card -msgid "Please insert an SD Card" +#. Android resource: @strings/texas +msgid "Texas" msgstr "" -#. Android resource: @strings/backing_up -msgid "Backing up..." +#. Android resource: @strings/virginia +msgid "Virginia" msgstr "" -#. Android resource: @strings/restoring -msgid "Restoring..." +#. Android resource: @strings/west_virginia +msgid "West Virginia" msgstr "" -#. Android resource: @strings/failed_to_create_backup_directory -msgid "Failed to create backup directory" +#. Android resource: @strings/west +msgid "West" msgstr "" -#. Android resource: @strings/backup_failed -msgid "Backup failed" +#. Android resource: @strings/arizona +msgid "Arizona" msgstr "" -#. Android resource: @strings/no_backup_found -msgid "No backup found" +#. Android resource: @strings/california +msgid "California" msgstr "" -#. Android resource: @strings/failed_to_restore -msgid "Failed to restore" +#. Android resource: @strings/colorado +msgid "Colorado" msgstr "" -#. Android resource: @strings/backup_successful -msgid "Backup successful" +#. Android resource: @strings/idaho +msgid "Idaho" msgstr "" -#. Android resource: @strings/restore_successful_please_restart_navit -msgid "" -"Restore Successful\n" -"Please restart Navit" +#. Android resource: @strings/montana +msgid "Montana" msgstr "" -#. Android resource: @strings/backup_not_found -msgid "Backup not found" +#. Android resource: @strings/new_mexico +msgid "New Mexico" msgstr "" -#. Android resource: @strings/restore_failed -msgid "Restore failed" +#. Android resource: @strings/nevada +msgid "Nevada" msgstr "" -#. Android resource: @strings/select_backup -msgid "Select backup" +#. Android resource: @strings/oregon +msgid "Oregon" msgstr "" -#. Android resource: @strings/backup -msgid "Backup" +#. Android resource: @strings/utah +msgid "Utah" msgstr "" -#. Android resource: @strings/restore -msgid "Restore" +#. Android resource: @strings/washington_state +msgid "Washington State" msgstr "" -#. Android resource: @strings/TTS_title_data_missing -msgid "System text to speech engine data is missing" +#. Android resource: @strings/south_middle_america +msgid "South+Middle America" msgstr "" -#. Android resource: @strings/TTS_qery_install_data -msgid "" -"Navit can use any text to speech engine installed on your device. The " -"currently selected engine reports it is unable to speak in your language. " -"Should we ask the system to show voice download dialog?" +#. Android resource: @strings/guyane_francaise +msgid "Guyane Francaise" msgstr "" diff --git a/po/bg.po.in b/po/bg.po.in index 8cba7b8d2..6dbfe0ea8 100644 --- a/po/bg.po.in +++ b/po/bg.po.in @@ -1,5 +1,5 @@ # Bulgarian translations for navit -# Copyright (C) 2006-2015 The Navit Team +# Copyright (C) 2006-2018 The Navit Team # This file is distributed under the same license as the navit package. # Many thanks to the contributors of this translation: # Alex Stanev https://launchpad.net/~realender @@ -7,13 +7,14 @@ # Anton Todorov https://launchpad.net/~antod # Lyudmil Bonev https://launchpad.net/~bonev-j # MalamiR https://launchpad.net/~mamut-killer +# Martin Voinov https://launchpad.net/~mvoinov msgid "" msgstr "" -"Project-Id-Version: navit 0.5.0\n" +"Project-Id-Version: navit 0.5.1\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2015-07-19 03:57+0000\n" -"Last-Translator: Alex Stanev <alex@stanev.org>\n" +"PO-Revision-Date: 2018-05-01 20:30+0000\n" +"Last-Translator: Anton Todorov <Unknown>\n" "Language-Team: Bulgarian <bg@li.org>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -23,7 +24,7 @@ msgstr "" "X-Report-Errors: https://translations.launchpad.net/navit/trunk/+pots/navit\n" msgid "Running from source directory\n" -msgstr "" +msgstr "стартиране от главната директория\n" #, c-format msgid "setting '%s' to '%s'\n" @@ -75,31 +76,31 @@ msgstr "шестия изход" #, c-format msgid "%d feet" -msgstr "" +msgstr "%d фута" #, c-format msgid "in %d feet" -msgstr "" +msgstr "след %d фута" #, c-format msgid "%d.%d miles" -msgstr "" +msgstr "%d.%d мили" #, c-format msgid "in %d.%d miles" -msgstr "" +msgstr "след %d.%d мили" #, c-format msgid "one mile" msgid_plural "%d miles" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "%d мили" +msgstr[1] "%d miles" #, c-format msgid "in one mile" msgid_plural "in %d miles" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "след %d миля" +msgstr[1] "in %d miles" #, c-format msgid "%d meters" @@ -154,7 +155,6 @@ msgstr "" msgid "%1$sonto %2$s|neuter form" msgstr "" -#. TRANSLATORS: motorway ramp refers to the slip road for entering a motorway. msgid "onto the motorway ramp" msgstr "на рампата" @@ -189,7 +189,7 @@ msgstr "Когато е възможно обърнете" #. TRANSLATORS: the argument is the destination to follow #, c-format msgid "towards %s" -msgstr "" +msgstr "към %s" #, c-format msgid "Follow the road for the next %s" @@ -204,7 +204,7 @@ msgid "Enter the roundabout %s" msgstr "Навлизате в кръгово %s" msgid "then enter the roundabout" -msgstr "" +msgstr "след това навлезте в кръговото движение" #. TRANSLATORS: first arg. is the manieth exit, second arg. is the destination to follow #, c-format @@ -241,57 +241,57 @@ msgid "Merge %1$s%2$s|left" msgstr "" msgid "on your left" -msgstr "" +msgstr "ваше ляво" msgid "on your right" -msgstr "" +msgstr "ваше дясно" #. TRANSLATORS: the first arg. is exit ref and/or name, the second is the direction of exit and the third is distance #, c-format msgid "Take exit %1$s %2$s %3$s" -msgstr "" +msgstr "вземете изход %1$s %2$s %3$s" #. TRANSLATORS: the first arg. is the direction of exit, the second is distance, the third is destination #, c-format msgid "Take the exit %1$s %2$s%3$s" -msgstr "" +msgstr "вземете изхода %1$s %2$s %3$s" #. TRANSLATORS: as in "Keep right at interchange 42 Greenmond-West" msgid "at interchange" -msgstr "" +msgstr "при обмен" msgid "at exit" -msgstr "" +msgstr "на изхода" #. TRANSLATORS: the arg. is where to do the maneuver #, c-format msgid "then continue straight%1$s" -msgstr "" +msgstr "след това продължете%1$s" #. TRANSLATORS: the first arg. is distance, the second is where to do the maneuver, the third is destination #, c-format msgid "Continue straight %1$s%2$s%3$s" -msgstr "" +msgstr "продължете направо %1$s%2$s%3$s" #. TRANSLATORS: the arg. is where to do the maneuver #, c-format msgid "then keep right%1$s" -msgstr "" +msgstr "след това дръжте в дясно %1$s" #. TRANSLATORS: the first arg. is distance, the second is where to do the maneuver, the third is destination #, c-format msgid "Keep right %1$s%2$s%3$s" -msgstr "" +msgstr "дръжте в дясно %1$s%2$s%3$s" #. TRANSLATORS: the arg. is where to do the maneuver #, c-format msgid "then keep left%1$s" -msgstr "" +msgstr "след това дръжте в ляво%1$s" #. TRANSLATORS: the first arg. is distance, the second is where to do the maneuver, the third is destination #, c-format msgid "Keep left %1$s%2$s%3$s" -msgstr "" +msgstr "дръжте в ляво%1$s%2$s%3$s" #. TRANSLATORS: "right" as in "turn right" msgid "right" @@ -357,7 +357,7 @@ msgstr "Обърнете %1$s" #. * #. msgid "follow" -msgstr "" +msgstr "следвайте" msgid "then you have reached your destination." msgstr "след това пристигате на местоназначението" @@ -367,9 +367,8 @@ msgstr "след това пристигате на местоназначени msgid "You have reached your destination %s" msgstr "Достигнахте до целта %s" -#. TRANSLATORS: Exit as a noun, as in "Exit 43 Greenmound-East" msgid "Interchange" -msgstr "" +msgstr "обмен" msgid "Exit" msgstr "Изход" @@ -384,9 +383,15 @@ msgstr "Команда" msgid "Length" msgstr "Дължина" +msgid "mi" +msgstr "" + msgid "km" msgstr "км" +msgid "feet" +msgstr "" + msgid "m" msgstr "м" @@ -447,6 +452,7 @@ msgid "Anguilla" msgstr "Ангуила" #. 008 +#. Android resource: @strings/albania msgid "Albania" msgstr "Албания" @@ -459,6 +465,7 @@ msgid "Netherlands Antilles" msgstr "Холандски Антили" #. 024 +#. Android resource: @strings/angola msgid "Angola" msgstr "Ангола" @@ -467,6 +474,7 @@ msgid "Antarctica" msgstr "Антарктика" #. 032 +#. Android resource: @strings/argentina msgid "Argentina" msgstr "Аржентина" @@ -475,10 +483,12 @@ msgid "American Samoa" msgstr "Американска Самоа" #. 040 +#. Android resource: @strings/austria msgid "Austria" msgstr "Австрия" #. 036 +#. Android resource: @strings/australia msgid "Australia" msgstr "Австралия" @@ -491,10 +501,12 @@ msgid "Aland Islands" msgstr "Айландски Острови" #. 031 +#. Android resource: @strings/azerbaijan msgid "Azerbaijan" msgstr "Азърбайджан" #. 070 +#. Android resource: @strings/bosnia_and_herzegovina msgid "Bosnia and Herzegovina" msgstr "Босна и Херцеговина" @@ -507,6 +519,7 @@ msgid "Bangladesh" msgstr "Бангладеш" #. 056 +#. Android resource: @strings/belgium msgid "Belgium" msgstr "Белгия" @@ -515,6 +528,7 @@ msgid "Burkina Faso" msgstr "Буркина Фасо" #. 100 +#. Android resource: @strings/bulgaria msgid "Bulgaria" msgstr "България" @@ -523,6 +537,7 @@ msgid "Bahrain" msgstr "Бахрейн" #. 108 +#. Android resource: @strings/burundi msgid "Burundi" msgstr "Бурунди" @@ -543,6 +558,7 @@ msgid "Brunei Darussalam" msgstr "Бруней" #. 068 +#. Android resource: @strings/bolivia msgid "Bolivia" msgstr "Боливия" @@ -551,6 +567,7 @@ msgid "Bonaire, Sint Eustatius and Saba" msgstr "" #. 076 +#. Android resource: @strings/brazil msgid "Brazil" msgstr "Бразилия" @@ -567,10 +584,12 @@ msgid "Bouvet Island" msgstr "Остров Буве" #. 072 +#. Android resource: @strings/botswana msgid "Botswana" msgstr "Ботсвана" #. 112 +#. Android resource: @strings/belarus msgid "Belarus" msgstr "Беларус" @@ -579,6 +598,7 @@ msgid "Belize" msgstr "Белийз" #. 124 +#. Android resource: @strings/canada msgid "Canada" msgstr "Канада" @@ -587,6 +607,7 @@ msgid "Cocos (Keeling) Islands" msgstr "Кокосови Острови" #. 180 +#. Android resource: @strings/congo msgid "Congo, Democratic Republic of the" msgstr "Демократична Република Конго" @@ -599,10 +620,12 @@ msgid "Congo" msgstr "Конго" #. 756 +#. Android resource: @strings/switzerland msgid "Switzerland" msgstr "Швейцария" #. 384 +#. Android resource: @strings/cotedivoire msgid "Cote d'Ivoire" msgstr "Кот Д'Ивоар" @@ -611,6 +634,7 @@ msgid "Cook Islands" msgstr "Острови Кук" #. 152 +#. Android resource: @strings/chile msgid "Chile" msgstr "Чили" @@ -619,10 +643,12 @@ msgid "Cameroon" msgstr "Камерун" #. 156 +#. Android resource: @strings/china msgid "China" msgstr "Китай" #. 170 +#. Android resource: @strings/colombia msgid "Colombia" msgstr "Колумбия" @@ -631,6 +657,7 @@ msgid "Costa Rica" msgstr "Коста Рика" #. 192 +#. Android resource: @strings/cuba msgid "Cuba" msgstr "Куба" @@ -647,14 +674,17 @@ msgid "Christmas Island" msgstr "Коледни острови" #. 196 +#. Android resource: @strings/cyprus msgid "Cyprus" msgstr "Кипър" #. 203 +#. Android resource: @strings/czech_republic msgid "Czech Republic" msgstr "Чешка република" #. 276 +#. Android resource: @strings/germany msgid "Germany" msgstr "Германия" @@ -663,6 +693,7 @@ msgid "Djibouti" msgstr "Джибути" #. 208 +#. Android resource: @strings/denmark msgid "Denmark" msgstr "Дания" @@ -671,6 +702,7 @@ msgid "Dominica" msgstr "Доминика" #. 214 +#. Android resource: @strings/dominican_republic msgid "Dominican Republic" msgstr "Доминиканска Република" @@ -679,10 +711,12 @@ msgid "Algeria" msgstr "Алжир" #. 218 +#. Android resource: @strings/ecuador msgid "Ecuador" msgstr "Еквадор" #. 233 +#. Android resource: @strings/estonia msgid "Estonia" msgstr "Естония" @@ -699,14 +733,17 @@ msgid "Eritrea" msgstr "Еритрея" #. 724 +#. Android resource: @strings/spain msgid "Spain" msgstr "Испания" #. 231 +#. Android resource: @strings/ethiopia msgid "Ethiopia" msgstr "Етиопия" #. 246 +#. Android resource: @strings/finland msgid "Finland" msgstr "Финландия" @@ -723,10 +760,12 @@ msgid "Micronesia, Federated States of" msgstr "Микронезия, Обединени щати" #. 234 +#. Android resource: @strings/faroe_islands msgid "Faroe Islands" msgstr "Острови Фаро" #. 250 +#. Android resource: @strings/france msgid "France" msgstr "Франция" @@ -735,6 +774,7 @@ msgid "Gabon" msgstr "Габон" #. 826 +#. Android resource: @strings/united_kingdom msgid "United Kingdom" msgstr "Обединеното Кралство" @@ -771,6 +811,7 @@ msgid "Gambia" msgstr "Гамбия" #. 324 +#. Android resource: @strings/guinea msgid "Guinea" msgstr "Гвинея" @@ -783,6 +824,7 @@ msgid "Equatorial Guinea" msgstr "Екваториална Гвинея" #. 300 +#. Android resource: @strings/greece msgid "Greece" msgstr "Гърция" @@ -803,6 +845,7 @@ msgid "Guinea-Bissau" msgstr "Гвинея-Бисау" #. 328 +#. Android resource: @strings/guyana msgid "Guyana" msgstr "Гаяна" @@ -819,26 +862,32 @@ msgid "Honduras" msgstr "Хондурас" #. 191 +#. Android resource: @strings/croatia msgid "Croatia" msgstr "Хърватска" #. 332 +#. Android resource: @strings/haiti msgid "Haiti" msgstr "Хаити" #. 348 +#. Android resource: @strings/hungary msgid "Hungary" msgstr "Унгария" #. 360 +#. Android resource: @strings/indonesia msgid "Indonesia" msgstr "Индонезия" #. 372 +#. Android resource: @strings/ireland msgid "Ireland" msgstr "Ирландия" #. 376 +#. Android resource: @strings/israel msgid "Israel" msgstr "Израел" @@ -847,6 +896,7 @@ msgid "Isle of Man" msgstr "Остров Ман" #. 356 +#. Android resource: @strings/india msgid "India" msgstr "Индия" @@ -855,18 +905,22 @@ msgid "British Indian Ocean Territory" msgstr "Британска територия в Индийския океан" #. 368 +#. Android resource: @strings/iraq msgid "Iraq" msgstr "Ирак" #. 364 +#. Android resource: @strings/iran msgid "Iran, Islamic Republic of" msgstr "Иран, Ислямска република" #. 352 +#. Android resource: @strings/iceland msgid "Iceland" msgstr "Исландия" #. 380 +#. Android resource: @strings/italy msgid "Italy" msgstr "Италия" @@ -875,6 +929,7 @@ msgid "Jersey" msgstr "Джърси (остров)" #. 388 +#. Android resource: @strings/jamaica msgid "Jamaica" msgstr "Ямайка" @@ -883,14 +938,17 @@ msgid "Jordan" msgstr "Йордания" #. 392 +#. Android resource: @strings/japan msgid "Japan" msgstr "Япония" #. 404 +#. Android resource: @strings/kenya msgid "Kenya" msgstr "Кения" #. 417 +#. Android resource: @strings/kyrgyzsyan msgid "Kyrgyzstan" msgstr "Киргизстан" @@ -927,6 +985,7 @@ msgid "Cayman Islands" msgstr "Кайманови острови" #. 398 +#. Android resource: @strings/kazakhstan msgid "Kazakhstan" msgstr "Казахстан" @@ -951,26 +1010,32 @@ msgid "Sri Lanka" msgstr "Шри Ланка" #. 430 +#. Android resource: @strings/liberia msgid "Liberia" msgstr "Либерия" #. 426 +#. Android resource: @strings/lesotho msgid "Lesotho" msgstr "Лесото" #. 440 +#. Android resource: @strings/lithuania msgid "Lithuania" msgstr "Литва" #. 442 +#. Android resource: @strings/luxembourg msgid "Luxembourg" msgstr "Люксембург" #. 428 +#. Android resource: @strings/latvia msgid "Latvia" msgstr "Латвия" #. 434 +#. Android resource: @strings/libya msgid "Libya" msgstr "" @@ -995,6 +1060,7 @@ msgid "Saint Martin (French part)" msgstr "Свети Мартин (френска част)" #. 450 +#. Android resource: @strings/madagascar msgid "Madagascar" msgstr "Мадагаскар" @@ -1015,6 +1081,7 @@ msgid "Myanmar" msgstr "Мианмарският съюз" #. 496 +#. Android resource: @strings/mongolia msgid "Mongolia" msgstr "Монголия" @@ -1055,10 +1122,12 @@ msgid "Malawi" msgstr "Малави" #. 484 +#. Android resource: @strings/mexico msgid "Mexico" msgstr "Мексико" #. 458 +#. Android resource: @strings/malaysia msgid "Malaysia" msgstr "Малайзия" @@ -1067,10 +1136,12 @@ msgid "Mozambique" msgstr "Мозамбик" #. 516 +#. Android resource: @strings/namibia msgid "Namibia" msgstr "Намибия" #. 540 +#. Android resource: @strings/new_caledonia msgid "New Caledonia" msgstr "Нова Каледония" @@ -1091,6 +1162,7 @@ msgid "Nicaragua" msgstr "Никарагуа" #. 528 +#. Android resource: @strings/netherlands msgid "Netherlands" msgstr "Кралство Холандия" @@ -1099,6 +1171,7 @@ msgid "Norway" msgstr "Кралство Норвегия" #. 524 +#. Android resource: @strings/nepal msgid "Nepal" msgstr "Непал" @@ -1111,6 +1184,7 @@ msgid "Niue" msgstr "Ниуе" #. 554 +#. Android resource: @strings/newzealand msgid "New Zealand" msgstr "Нова Зеландия" @@ -1123,6 +1197,7 @@ msgid "Panama" msgstr "Панама" #. 604 +#. Android resource: @strings/peru msgid "Peru" msgstr "Перу" @@ -1135,14 +1210,17 @@ msgid "Papua New Guinea" msgstr "Папуа Нова Гвинея" #. 608 +#. Android resource: @strings/philippines msgid "Philippines" msgstr "Филипини" #. 586 +#. Android resource: @strings/pakistan msgid "Pakistan" msgstr "Пакистан" #. 616 +#. Android resource: @strings/poland msgid "Poland" msgstr "Полша" @@ -1163,6 +1241,7 @@ msgid "Palestinian Territory, Occupied" msgstr "Палестинска територия, Окупирана" #. 620 +#. Android resource: @strings/portugal msgid "Portugal" msgstr "Португалия" @@ -1171,6 +1250,7 @@ msgid "Palau" msgstr "Палау" #. 600 +#. Android resource: @strings/paraguay msgid "Paraguay" msgstr "Парагвай" @@ -1179,10 +1259,12 @@ msgid "Qatar" msgstr "Катар" #. 638 +#. Android resource: @strings/reunion msgid "Reunion" msgstr "Реюнион" #. 642 +#. Android resource: @strings/romania msgid "Romania" msgstr "Румъния" @@ -1191,14 +1273,17 @@ msgid "Serbia" msgstr "Сърбия" #. 643 +#. Android resource: @strings/russian_federation msgid "Russian Federation" msgstr "Руска Федерация" #. 646 +#. Android resource: @strings/rwanda msgid "Rwanda" msgstr "Руанда" #. 682 +#. Android resource: @strings/saudi_arabia msgid "Saudi Arabia" msgstr "Саудитска Арабия" @@ -1219,6 +1304,7 @@ msgid "Sweden" msgstr "Швеция" #. 702 +#. Android resource: @strings/singapore msgid "Singapore" msgstr "Сингапур" @@ -1235,6 +1321,7 @@ msgid "Svalbard and Jan Mayen" msgstr "Шпицберген и Ян Майен" #. 703 +#. Android resource: @strings/slovakia msgid "Slovakia" msgstr "Словакия" @@ -1255,6 +1342,7 @@ msgid "Somalia" msgstr "Сомалия" #. 740 +#. Android resource: @strings/suriname msgid "Suriname" msgstr "Суринам" @@ -1299,6 +1387,7 @@ msgid "Togo" msgstr "Того" #. 764 +#. Android resource: @strings/thailand msgid "Thailand" msgstr "Тайланд" @@ -1315,6 +1404,7 @@ msgid "Timor-Leste" msgstr "Източен Тимор" #. 795 +#. Android resource: @strings/turkmenistan msgid "Turkmenistan" msgstr "Туркменистан" @@ -1327,6 +1417,7 @@ msgid "Tonga" msgstr "Тонга" #. 792 +#. Android resource: @strings/turkey msgid "Turkey" msgstr "Турция" @@ -1343,14 +1434,17 @@ msgid "Taiwan, Province of China" msgstr "Тайван, Китайска провинция" #. 834 +#. Android resource: @strings/tanzania msgid "Tanzania, United Republic of" msgstr "Танзания, Обединена република" #. 804 +#. Android resource: @strings/ukraine msgid "Ukraine" msgstr "Украйна" #. 800 +#. Android resource: @strings/uganda msgid "Uganda" msgstr "Уганда" @@ -1363,6 +1457,7 @@ msgid "United States" msgstr "Съединени Амеркански Щати" #. 858 +#. Android resource: @strings/uruguay msgid "Uruguay" msgstr "Уругвай" @@ -1379,6 +1474,7 @@ msgid "Saint Vincent and the Grenadines" msgstr "Сейнт Винсънт и Гренадини" #. 862 +#. Android resource: @strings/venezuela msgid "Venezuela" msgstr "Венецуела" @@ -1415,6 +1511,7 @@ msgid "Mayotte" msgstr "Майот" #. 710 +#. Android resource: @strings/south_africa msgid "South Africa" msgstr "Република Южна Африка" @@ -1442,23 +1539,23 @@ msgid "" msgstr "" #. We have not found an existing config file from all possibilities -msgid "No config file navit.xml, navit.xml.local found\n" +msgid "No config file navit.xml, navit.xml.local found" msgstr "" #, c-format -msgid "Error parsing config file '%s': %s\n" +msgid "Error parsing config file '%s': %s" msgstr "" #, c-format -msgid "Using config file '%s'\n" +msgid "Using config file '%s'" msgstr "" #, c-format -msgid "Error: No configuration found in config file '%s'\n" +msgid "Error: No configuration found in config file '%s'" msgstr "" msgid "" -"Internal initialization failed, exiting. Check previous error messages.\n" +"Internal initialization failed, exiting. Check previous error messages." msgstr "" msgid "unknown street" @@ -1599,6 +1696,9 @@ msgstr "" msgid "_Lock on Road" msgstr "Придържай към пътя" +msgid "_Follow Vehicle" +msgstr "" + msgid "_Keep orientation to the North" msgstr "" @@ -1668,7 +1768,12 @@ msgstr "" msgid "Shopping" msgstr "" -msgid "Select a search radius from screen center" +#. Input is in kilometers +msgid "Select a search radius from screen center in km" +msgstr "" + +#. Input is in miles. +msgid "Select a search radius from screen center in miles" msgstr "" #, c-format @@ -1676,15 +1781,15 @@ msgid "POI %s. %s" msgstr "" #, c-format -msgid "Set destination to %ld, %ld \n" +msgid "Set destination to %ld, %ld " msgstr "" #, c-format -msgid "Set map to %ld, %ld \n" +msgid "Set map to %ld, %ld " msgstr "" #, c-format -msgid "Set next visit to %ld, %ld \n" +msgid "Set next visit to %ld, %ld " msgstr "" msgid "POI search" @@ -1693,9 +1798,6 @@ msgstr "" msgid "Select a category" msgstr "" -msgid "Select a distance to look for (km)" -msgstr "" - msgid "Select a POI" msgstr "" @@ -1708,7 +1810,7 @@ msgstr "" msgid "Direction" msgstr "" -msgid "Distance(m)" +msgid "Distance" msgstr "" msgid "Name" @@ -1755,8 +1857,8 @@ msgid "OT" msgstr "" #, c-format -msgid "Route %4.0fkm %02d:%02d ETA" -msgstr "Маршрут %4.0fкм %02d:%02d ОВП" +msgid "Route %4.1f%s %02d:%02d ETA" +msgstr "" msgid "Route 0000km 0+00:00 ETA" msgstr "Маршрут 0000fкм 0+00:00 ОВП" @@ -1966,12 +2068,21 @@ msgstr "Изглед" msgid "Height Profile" msgstr "Височинен профил" +msgid "please install a map *.heightlines.bin to provide elevationdata" +msgstr "" + +msgid "The route must cross at least 2 heightlines" +msgstr "" + msgid "Route Description" msgstr "Описание на маршрута" msgid "Show Locale" msgstr "" +msgid "Network info" +msgstr "" + msgid "Former Destinations" msgstr "Предишни Местоназначения" @@ -2010,734 +2121,873 @@ msgstr "" msgid "Please decrease your speed" msgstr "" -msgid "partial match" -msgstr "" +msgid "Vehicle Position" +msgstr "Позиция на автомобил" -#. Android resource: @strings/address_search_button -msgid "Search" -msgstr "" +msgid "Main menu" +msgstr "Главно меню" -#. Android resource: @strings/address_search_towns -msgid "Towns" +msgid "" +"Show\n" +"Map" msgstr "" +"Покажи\n" +"Картата" -#. Android resource: @strings/position_popup_drive_here -msgid "Route to here" -msgstr "" +msgid "Settings" +msgstr "Настройки" -msgid "Map data (c) OpenStreetMap contributors, ODBL" -msgstr "" +msgid "Tools" +msgstr "Инструменти" + +msgid "Route" +msgstr "Маршрут" + +msgid "About" +msgstr "Относно" + +msgid "Quit" +msgstr "Излез" + +msgid "Actions" +msgstr "Действия" msgid "" -"Current map location %s is not available\n" -"Please restart Navit after you attach an SD card or select a different map " -"location." +"Former\n" +"Destinations" msgstr "" -msgid "Downloaded maps" +msgid "Coordinates" msgstr "" msgid "" -"Sorry, we currently do not support maps above 3.8G on Android, please select " -"a smaller one." +"Stop\n" +"Navigation" msgstr "" +"Спри\n" +"Навигацията" -msgid "Cancel" -msgstr "" +msgid "Display" +msgstr "Показване" -msgid "filenamePath" -msgstr "" +msgid "Fullscreen" +msgstr "Цял екран" -msgid "" -"New location set to %s\n" -"Restart Navit to apply the changes." -msgstr "" +msgid "Window Mode" +msgstr "Режим Прозорец" -msgid "Whole Planet" +msgid "Auto zoom" msgstr "" -msgid "Africa" +msgid "Manual zoom" msgstr "" -msgid "Canary Islands" +msgid "Layers" msgstr "" -msgid "Asia" +msgid "Zoom to route" msgstr "" -msgid "Korea" -msgstr "" +msgid "Description" +msgstr "Описание" -msgid "Taiwan" +msgid "" +"Drop last\n" +"Waypoint" msgstr "" -msgid "UAE+Other" +msgid "" +"Drop next\n" +"Waypoint" msgstr "" -msgid "Oceania" +msgid "Satellite Status" msgstr "" -msgid "Tasmania" +msgid "NMEA Data" msgstr "" -msgid "Victoria" +msgid "car_shortest" msgstr "" -msgid "New South Wales" +msgid "car_avoid_tolls" msgstr "" -msgid "Europe" +msgid "car_pedantic" msgstr "" -msgid "Western Europe" -msgstr "" +msgid "horse" +msgstr "кон" -msgid "Azores" +msgid "Truck" msgstr "" -msgid "BeNeLux" +#. Strings from android/res/values/strings.xml +#. Android resource: @strings/yes +msgid "Yes" msgstr "" -msgid "Alsace" +#. Android resource: @strings/cancel +msgid "Cancel" msgstr "" -msgid "Aquitaine" +#. Android resource: @strings/notification_ticker +msgid "Navit started" msgstr "" -msgid "Auvergne" +#. Android resource: @strings/notification_event_default +msgid "Navit running" msgstr "" -msgid "Basse-Normandie" +#. Android resource: @strings/initial_info_box_title +msgid "Welcome to Navit" msgstr "" -msgid "Bourgogne" +#. Android resource: @strings/initial_info_box_message +msgid "" +"Thank you for installing Navit!\n" +"\n" +"To start, select \"Download maps\" from the menu to download a map. Note: " +"The map filesize may be large (>50MB) - a wifi connection is recommended.\n" +"\n" +"Mapdata: (c) OpenStreetMap contributors\n" +"\n" +"Enjoy Navit!" msgstr "" -msgid "Bretagne" +#. Android resource: @strings/initial_info_box_OK +msgid "OK" msgstr "" -msgid "Centre" +#. Android resource: @strings/initial_info_box_more_info +msgid "More info" msgstr "" -msgid "Champagne-Ardenne" +#. Android resource: @strings/optionsmenu_zoom_in +msgid "Zoom in" msgstr "" -msgid "Corse" +#. Android resource: @strings/optionsmenu_zoom_out +msgid "Zoom out" msgstr "" -msgid "Franche-Comte" +#. Android resource: @strings/optionsmenu_download_maps +msgid "Download maps" msgstr "" -msgid "Haute-Normandie" +#. Android resource: @strings/optionsmenu_toggle_poi +msgid "Toggle POIs" msgstr "" -msgid "Ile-de-France" +#. Android resource: @strings/optionsmenu_exit_navit +msgid "Exit Navit" msgstr "" -msgid "Languedoc-Roussillon" +#. Android resource: @strings/optionsmenu_backup_restore +msgid "Backup / Restore" msgstr "" -msgid "Limousin" +#. Android resource: @strings/optionsmenu_set_map_location +msgid "Set map location" msgstr "" -msgid "Lorraine" +#. Android resource: @strings/position_popup_drive_here +msgid "Route to here" msgstr "" -msgid "Midi-Pyrenees" +#. Android resource: @strings/map_delete +msgid "Delete this map?" msgstr "" -msgid "Nord-pas-de-Calais" +#. Android resource: @strings/map_download_title +msgid "Map download" msgstr "" -msgid "Pays-de-la-Loire" +#. Android resource: @strings/map_download_downloading +msgid "Downloading:" msgstr "" -msgid "Picardie" +#. Android resource: @strings/map_download_eta +msgid "ETA" msgstr "" -msgid "Poitou-Charentes" +#. Android resource: @strings/map_download_ready +msgid "ready" msgstr "" -msgid "Provence-Alpes-Cote-d-Azur" +#. Android resource: @strings/map_download_download_error +msgid "Error downloading map." msgstr "" -msgid "Rhone-Alpes" +#. Android resource: @strings/map_download_download_aborted +msgid "Map download aborted" msgstr "" -msgid "Baden-Wuerttemberg" +#. Android resource: @strings/map_download_not_enough_free_space +msgid "Not enough free space" msgstr "" -msgid "Bayern" +#. Android resource: @strings/map_download_oversize +msgid "" +"Sorry, we currently do not support maps above 3.8G on Android, please select " +"a smaller one." msgstr "" -msgid "Mittelfranken" +#. Android resource: @strings/map_no_fix +msgid "No location. Reopen after location fix." msgstr "" -msgid "Niederbayern" +#. Android resource: @strings/maps_for_current_location +msgid "Maps containing current location" msgstr "" -msgid "Oberbayern" +#. Android resource: @strings/maps_installed +msgid "Installed maps" msgstr "" -msgid "Oberfranken" +#. Android resource: @strings/map_downloading +msgid "downloading" msgstr "" -msgid "Oberpfalz" +#. Android resource: @strings/map_download_medium_unavailable +msgid "Media selected for map storage is not available" msgstr "" -msgid "Schwaben" +#. Android resource: @strings/map_download_error_writing_map +msgid "Error writing map!" msgstr "" -msgid "Unterfranken" +#. Android resource: @strings/map_location_changed +#, c-format +msgid "New location set to %s Restart Navit to apply the changes." msgstr "" -msgid "Berlin" +#. Android resource: @strings/map_location_unavailable +#, c-format +msgid "" +"Current map location %s is not available Please restart Navit after you " +"attach an SD card or select a different map location." msgstr "" -msgid "Brandenburg" +#. Android resource: @strings/address_search_title +msgid "Address search" msgstr "" -msgid "Bremen" +#. Android resource: @strings/address_enter_destination +msgid "Enter destination" msgstr "" -msgid "Hamburg" +#. Android resource: @strings/address_partial_match +msgid "Match partial address" msgstr "" -msgid "Hessen" +#. Android resource: @strings/address_search_button +msgid "Search" msgstr "" -msgid "Mecklenburg-Vorpommern" +#. Android resource: @strings/address_search_searching +msgid "Searching..." msgstr "" -msgid "Niedersachsen" +#. Android resource: @strings/address_search_not_found +msgid "Address not found" msgstr "" -msgid "Nordrhein-westfalen" +#. Android resource: @strings/address_search_getting_results +msgid "Getting search results" msgstr "" -msgid "Rheinland-Pfalz" +#. Android resource: @strings/address_search_loading_results +msgid "Loading search results" msgstr "" -msgid "Saarland" +#. Android resource: @strings/address_search_no_results +msgid "No results found" msgstr "" -msgid "Sachsen-Anhalt" +#. Android resource: @strings/address_search_no_text_entered +msgid "No text entered" msgstr "" -msgid "Sachsen" +#. Android resource: @strings/address_search_set_destination +msgid "Setting destination to:" msgstr "" -msgid "Schleswig-Holstein" +#. Android resource: @strings/address_search_towns +msgid "Towns" msgstr "" -msgid "Thueringen" +#. Android resource: @strings/choose_an_action +msgid "Choose an action" msgstr "" -msgid "Mallorca" +#. Android resource: @strings/please_insert_an_sd_card +msgid "Please insert an SD Card" msgstr "" -msgid "Galicia" +#. Android resource: @strings/backing_up +msgid "Backing up..." msgstr "" -msgid "Scandinavia" +#. Android resource: @strings/restoring +msgid "Restoring..." msgstr "" -msgid "England" +#. Android resource: @strings/failed_to_create_backup_directory +msgid "Failed to create backup directory" msgstr "" -msgid "Buckinghamshire" +#. Android resource: @strings/backup_failed +msgid "Backup failed" msgstr "" -msgid "Cambridgeshire" +#. Android resource: @strings/no_backup_found +msgid "No backup found" msgstr "" -msgid "Cumbria" +#. Android resource: @strings/failed_to_restore +msgid "Failed to restore" msgstr "" -msgid "East yorkshire with hull" +#. Android resource: @strings/backup_successful +msgid "Backup successful" msgstr "" -msgid "Essex" +#. Android resource: @strings/restore_successful_please_restart_navit +msgid "" +"Restore Successful\n" +"Please restart Navit" msgstr "" -msgid "Herefordshire" +#. Android resource: @strings/backup_not_found +msgid "Backup not found" msgstr "" -msgid "Kent" +#. Android resource: @strings/restore_failed +msgid "Restore failed" msgstr "" -msgid "Lancashire" +#. Android resource: @strings/select_backup +msgid "Select backup" msgstr "" -msgid "Leicestershire" +#. Android resource: @strings/backup +msgid "Backup" msgstr "" -msgid "Norfolk" +#. Android resource: @strings/restore +msgid "Restore" msgstr "" -msgid "Nottinghamshire" +#. Android resource: @strings/TTS_title_data_missing +msgid "System text to speech engine data is missing" msgstr "" -msgid "Oxfordshire" +#. Android resource: @strings/TTS_qery_install_data +msgid "" +"Navit can use any text to speech engine installed on your device. The " +"currently selected engine reports it is unable to speak in your language. " +"Should we ask the system to show voice download dialog?" msgstr "" -msgid "Shropshire" +#. Android resource: @strings/permissions_not_granted +msgid "" +"Navit needs permission to access GPS and read the map.\n" +"If you change your mind please restart Navit and grant the permissions" msgstr "" -msgid "Somerset" +#. Android resource: @strings/permissions_info_box_title +msgid "One or more ungranted permissions" msgstr "" -msgid "South yorkshire" +#. Android resource: @strings/whole_planet +msgid "Whole Planet" msgstr "" -msgid "Suffolk" +#. Android resource: @strings/africa +msgid "Africa" msgstr "" -msgid "Surrey" +#. Android resource: @strings/canary_islands +msgid "Canary Islands" msgstr "" -msgid "Wiltshire" +#. Android resource: @strings/asia +msgid "Asia" msgstr "" -msgid "Scotland" +#. Android resource: @strings/taiwan +msgid "Taiwan" msgstr "" -msgid "Wales" +#. Android resource: @strings/korea +msgid "Korea" msgstr "" -msgid "Crete" +#. Android resource: @strings/uae_other +msgid "UAE+Other" msgstr "" -msgid "North America" +#. Android resource: @strings/oceania +msgid "Oceania" msgstr "" -msgid "Alaska" +#. Android resource: @strings/tasmania +msgid "Tasmania" msgstr "" -msgid "Hawaii" +#. Android resource: @strings/victoria +msgid "Victoria" msgstr "" -msgid "USA" +#. Android resource: @strings/new_south_wales +msgid "New South Wales" msgstr "" -msgid " (except Alaska and Hawaii)" +#. Android resource: @strings/europe +msgid "Europe" msgstr "" -msgid "Midwest" +#. Android resource: @strings/western_europe +msgid "Western Europe" msgstr "" -msgid "Michigan" +#. Android resource: @strings/azores +msgid "Azores" msgstr "" -msgid "Ohio" +#. Android resource: @strings/benelux +msgid "BeNeLux" msgstr "" -msgid "Northeast" +#. Android resource: @strings/alsace +msgid "Alsace" msgstr "" -msgid "Massachusetts" +#. Android resource: @strings/aquitaine +msgid "Aquitaine" msgstr "" -msgid "Vermont" +#. Android resource: @strings/auvergne +msgid "Auvergne" msgstr "" -msgid "Pacific" +#. Android resource: @strings/centre +msgid "Centre" msgstr "" -msgid "South" +#. Android resource: @strings/bretagne +msgid "Bretagne" msgstr "" -msgid "Arkansas" +#. Android resource: @strings/bourgogne +msgid "Bourgogne" msgstr "" -msgid "District of Columbia" +#. Android resource: @strings/basse_normandie +msgid "Basse-Normandie" msgstr "" -msgid "Florida" +#. Android resource: @strings/champagne_ardenne +msgid "Champagne-Ardenne" msgstr "" -msgid "Louisiana" +#. Android resource: @strings/corse +msgid "Corse" msgstr "" -msgid "Maryland" +#. Android resource: @strings/franche_comte +msgid "Franche-Comte" msgstr "" -msgid "Mississippi" +#. Android resource: @strings/haute_normandie +msgid "Haute-Normandie" msgstr "" -msgid "Oklahoma" +#. Android resource: @strings/ile_de_france +msgid "Ile-de-France" msgstr "" -msgid "Texas" +#. Android resource: @strings/languedoc_roussillon +msgid "Languedoc-Roussillon" msgstr "" -msgid "Virginia" +#. Android resource: @strings/limousin +msgid "Limousin" msgstr "" -msgid "West Virginia" +#. Android resource: @strings/lorraine +msgid "Lorraine" msgstr "" -msgid "West" +#. Android resource: @strings/midi_pyrenees +msgid "Midi-Pyrenees" msgstr "" -msgid "Arizona" +#. Android resource: @strings/nord_pas_de_calais +msgid "Nord-pas-de-Calais" msgstr "" -msgid "California" +#. Android resource: @strings/pays_de_la_loire +msgid "Pays-de-la-Loire" msgstr "" -msgid "Colorado" +#. Android resource: @strings/picardie +msgid "Picardie" msgstr "" -msgid "Idaho" +#. Android resource: @strings/poitou_charentes +msgid "Poitou-Charentes" msgstr "" -msgid "Montana" +#. Android resource: @strings/provence_alpes_cote_d_azur +msgid "Provence-Alpes-Cote-d-Azur" msgstr "" -msgid "New Mexico" +#. Android resource: @strings/rhone_alpes +msgid "Rhone-Alpes" msgstr "" -msgid "Nevada" +#. Android resource: @strings/baden_wuerttemberg +msgid "Baden-Wuerttemberg" msgstr "" -msgid "Oregon" +#. Android resource: @strings/bayern +msgid "Bayern" msgstr "" -msgid "Utah" +#. Android resource: @strings/mittelfranken +msgid "Mittelfranken" msgstr "" -msgid "Washington State" +#. Android resource: @strings/niederbayern +msgid "Niederbayern" msgstr "" -msgid "South+Middle America" +#. Android resource: @strings/oberbayern +msgid "Oberbayern" msgstr "" -msgid "Guyane Francaise" +#. Android resource: @strings/oberfranken +msgid "Oberfranken" msgstr "" -msgid "downloading" +#. Android resource: @strings/oberpfalz +msgid "Oberpfalz" msgstr "" -#. Android resource: @strings/map_download_ready -msgid "ready" +#. Android resource: @strings/schwaben +msgid "Schwaben" msgstr "" -msgid "Media selected for map storage is not available" +#. Android resource: @strings/unterfranken +msgid "Unterfranken" msgstr "" -#. Android resource: @strings/map_download_not_enough_free_space -msgid "Not enough free space" +#. Android resource: @strings/berlin +msgid "Berlin" msgstr "" -msgid "Error downloading map!" +#. Android resource: @strings/brandenburg +msgid "Brandenburg" msgstr "" -msgid "Error writing map!" +#. Android resource: @strings/bremen +msgid "Bremen" msgstr "" -msgid "Map download aborted!" +#. Android resource: @strings/hamburg +msgid "Hamburg" msgstr "" -#. Android resource: @strings/map_download_eta -msgid "ETA" +#. Android resource: @strings/hessen +msgid "Hessen" msgstr "" -#. Android resource: @strings/map_download_title -msgid "Map download" +#. Android resource: @strings/mecklenburg_vorpommern +msgid "Mecklenburg-Vorpommern" msgstr "" -msgid "Vehicle Position" -msgstr "Позиция на автомобил" - -msgid "Main menu" -msgstr "Главно меню" - -msgid "" -"Show\n" -"Map" +#. Android resource: @strings/niedersachsen +msgid "Niedersachsen" msgstr "" -"Покажи\n" -"Картата" - -msgid "Settings" -msgstr "Настройки" -msgid "Tools" -msgstr "Инструменти" +#. Android resource: @strings/nordrhein_westfalen +msgid "Nordrhein-westfalen" +msgstr "" -msgid "Route" -msgstr "Маршрут" +#. Android resource: @strings/rheinland_pfalz +msgid "Rheinland-Pfalz" +msgstr "" -msgid "About" -msgstr "Относно" +#. Android resource: @strings/saarland +msgid "Saarland" +msgstr "" -msgid "Quit" -msgstr "Излез" +#. Android resource: @strings/sachsen_anhalt +msgid "Sachsen-Anhalt" +msgstr "" -msgid "Actions" -msgstr "Действия" +#. Android resource: @strings/sachsen +msgid "Sachsen" +msgstr "" -msgid "" -"Former\n" -"Destinations" +#. Android resource: @strings/schleswig_holstein +msgid "Schleswig-Holstein" msgstr "" -msgid "Coordinates" +#. Android resource: @strings/thueringen +msgid "Thueringen" msgstr "" -msgid "" -"Stop\n" -"Navigation" +#. Android resource: @strings/mallorca +msgid "Mallorca" msgstr "" -"Спри\n" -"Навигацията" -msgid "Display" -msgstr "Показване" +#. Android resource: @strings/galicia +msgid "Galicia" +msgstr "" -msgid "Fullscreen" -msgstr "Цял екран" +#. Android resource: @strings/scandinavia +msgid "Scandinavia" +msgstr "" -msgid "Window Mode" -msgstr "Режим Прозорец" +#. Android resource: @strings/england +msgid "England" +msgstr "" -msgid "Description" -msgstr "Описание" +#. Android resource: @strings/buckinghamshire +msgid "Buckinghamshire" +msgstr "" -msgid "" -"Drop last \n" -"Waypoint" +#. Android resource: @strings/cambridgeshire +msgid "Cambridgeshire" msgstr "" -msgid "" -"Drop next \n" -"Waypoint" +#. Android resource: @strings/cumbria +msgid "Cumbria" msgstr "" -msgid "Satellite Status" +#. Android resource: @strings/east_yorkshire_with_hull +msgid "East yorkshire with hull" msgstr "" -msgid "NMEA Data" +#. Android resource: @strings/essex +msgid "Essex" msgstr "" -msgid "car_shortest" +#. Android resource: @strings/herefordshire +msgid "Herefordshire" msgstr "" -msgid "car_avoid_tolls" +#. Android resource: @strings/kent +msgid "Kent" msgstr "" -msgid "car_pedantic" +#. Android resource: @strings/lancashire +msgid "Lancashire" msgstr "" -msgid "horse" -msgstr "кон" +#. Android resource: @strings/leicestershire +msgid "Leicestershire" +msgstr "" -msgid "Truck" +#. Android resource: @strings/norfolk +msgid "Norfolk" msgstr "" -#. Strings from android/res/values/strings.xml -#. Android resource: @strings/yes -msgid "Yes" +#. Android resource: @strings/nottinghamshire +msgid "Nottinghamshire" msgstr "" -#. Android resource: @strings/notification_ticker -msgid "Navit started" +#. Android resource: @strings/oxfordshire +msgid "Oxfordshire" msgstr "" -#. Android resource: @strings/notification_event_default -msgid "Navit running" +#. Android resource: @strings/shropshire +msgid "Shropshire" msgstr "" -#. Android resource: @strings/initial_info_box_title -msgid "Welcome to Navit" +#. Android resource: @strings/somerset +msgid "Somerset" msgstr "" -#. Android resource: @strings/initial_info_box_message -msgid "" -"Thank you for installing Navit!\n" -"\n" -"To start, select \"Download maps\" from the menu to download a map. Note: " -"The map filesize may be large (>50MB) - a wifi connection is recommended.\n" -"\n" -"Mapdata: (c) OpenStreetMap contributors\n" -"\n" -"Enjoy Navit!" +#. Android resource: @strings/south_yorkshire +msgid "South yorkshire" msgstr "" -#. Android resource: @strings/initial_info_box_OK -msgid "OK" +#. Android resource: @strings/suffolk +msgid "Suffolk" msgstr "" -#. Android resource: @strings/initial_info_box_more_info -msgid "More info" +#. Android resource: @strings/surrey +msgid "Surrey" msgstr "" -#. Android resource: @strings/optionsmenu_zoom_in -msgid "Zoom in" +#. Android resource: @strings/wiltshire +msgid "Wiltshire" msgstr "" -#. Android resource: @strings/optionsmenu_zoom_out -msgid "Zoom out" +#. Android resource: @strings/scotland +msgid "Scotland" msgstr "" -#. Android resource: @strings/optionsmenu_download_maps -msgid "Download maps" +#. Android resource: @strings/wales +msgid "Wales" msgstr "" -#. Android resource: @strings/optionsmenu_toggle_poi -msgid "Toggle POIs" +#. Android resource: @strings/crete +msgid "Crete" msgstr "" -#. Android resource: @strings/optionsmenu_exit_navit -msgid "Exit Navit" +#. Android resource: @strings/north_america +msgid "North America" msgstr "" -#. Android resource: @strings/optionsmenu_backup_restore -msgid "Backup / Restore" +#. Android resource: @strings/alaska +msgid "Alaska" msgstr "" -#. Android resource: @strings/optionsmenu_set_map_location -msgid "Set map location" +#. Android resource: @strings/hawaii +msgid "Hawaii" msgstr "" -#. Android resource: @strings/map_delete -msgid "Delete this map?" +#. Android resource: @strings/usa +msgid "USA" msgstr "" -#. Android resource: @strings/map_download_downloading -msgid "Downloading:" +#. Android resource: @strings/except_alaska_and_hawaii +msgid "(except Alaska and Hawaii)" msgstr "" -#. Android resource: @strings/map_download_download_error -msgid "Error downloading map." +#. Android resource: @strings/midwest +msgid "Midwest" msgstr "" -#. Android resource: @strings/map_download_download_aborted -msgid "Map download aborted" +#. Android resource: @strings/michigan +msgid "Michigan" msgstr "" -#. Android resource: @strings/map_no_fix -msgid "No location. Reopen after location fix." +#. Android resource: @strings/ohio +msgid "Ohio" msgstr "" -#. Android resource: @strings/maps_for_current_location -msgid "Maps containing current location" +#. Android resource: @strings/northeast +msgid "Northeast" msgstr "" -#. Android resource: @strings/address_search_title -msgid "Address search" +#. Android resource: @strings/massachusetts +msgid "Massachusetts" msgstr "" -#. Android resource: @strings/address_enter_destination -msgid "Enter destination" +#. Android resource: @strings/vermont +msgid "Vermont" msgstr "" -#. Android resource: @strings/address_partial_match -msgid "Match partial address" +#. Android resource: @strings/pacific +msgid "Pacific" msgstr "" -#. Android resource: @strings/address_search_searching -msgid "Searching..." +#. Android resource: @strings/south +msgid "South" msgstr "" -#. Android resource: @strings/address_search_not_found -msgid "Address not found" +#. Android resource: @strings/arkansas +msgid "Arkansas" msgstr "" -#. Android resource: @strings/address_search_getting_results -msgid "Getting search results" +#. Android resource: @strings/district_of_columbia +msgid "District of Columbia" msgstr "" -#. Android resource: @strings/address_search_loading_results -msgid "Loading search results" +#. Android resource: @strings/florida +msgid "Florida" msgstr "" -#. Android resource: @strings/address_search_no_results -msgid "No results found" +#. Android resource: @strings/louisiana +msgid "Louisiana" msgstr "" -#. Android resource: @strings/address_search_no_text_entered -msgid "No text entered" +#. Android resource: @strings/maryland +msgid "Maryland" msgstr "" -#. Android resource: @strings/address_search_set_destination -msgid "Setting destination to:" +#. Android resource: @strings/mississippi +msgid "Mississippi" msgstr "" -#. Android resource: @strings/choose_an_action -msgid "Choose an action" +#. Android resource: @strings/oklahoma +msgid "Oklahoma" msgstr "" -#. Android resource: @strings/please_insert_an_sd_card -msgid "Please insert an SD Card" +#. Android resource: @strings/texas +msgid "Texas" msgstr "" -#. Android resource: @strings/backing_up -msgid "Backing up..." +#. Android resource: @strings/virginia +msgid "Virginia" msgstr "" -#. Android resource: @strings/restoring -msgid "Restoring..." +#. Android resource: @strings/west_virginia +msgid "West Virginia" msgstr "" -#. Android resource: @strings/failed_to_create_backup_directory -msgid "Failed to create backup directory" +#. Android resource: @strings/west +msgid "West" msgstr "" -#. Android resource: @strings/backup_failed -msgid "Backup failed" +#. Android resource: @strings/arizona +msgid "Arizona" msgstr "" -#. Android resource: @strings/no_backup_found -msgid "No backup found" +#. Android resource: @strings/california +msgid "California" msgstr "" -#. Android resource: @strings/failed_to_restore -msgid "Failed to restore" +#. Android resource: @strings/colorado +msgid "Colorado" msgstr "" -#. Android resource: @strings/backup_successful -msgid "Backup successful" +#. Android resource: @strings/idaho +msgid "Idaho" msgstr "" -#. Android resource: @strings/restore_successful_please_restart_navit -msgid "" -"Restore Successful\n" -"Please restart Navit" +#. Android resource: @strings/montana +msgid "Montana" msgstr "" -#. Android resource: @strings/backup_not_found -msgid "Backup not found" +#. Android resource: @strings/new_mexico +msgid "New Mexico" msgstr "" -#. Android resource: @strings/restore_failed -msgid "Restore failed" +#. Android resource: @strings/nevada +msgid "Nevada" msgstr "" -#. Android resource: @strings/select_backup -msgid "Select backup" +#. Android resource: @strings/oregon +msgid "Oregon" msgstr "" -#. Android resource: @strings/backup -msgid "Backup" +#. Android resource: @strings/utah +msgid "Utah" msgstr "" -#. Android resource: @strings/restore -msgid "Restore" +#. Android resource: @strings/washington_state +msgid "Washington State" msgstr "" -#. Android resource: @strings/TTS_title_data_missing -msgid "System text to speech engine data is missing" +#. Android resource: @strings/south_middle_america +msgid "South+Middle America" msgstr "" -#. Android resource: @strings/TTS_qery_install_data -msgid "" -"Navit can use any text to speech engine installed on your device. The " -"currently selected engine reports it is unable to speak in your language. " -"Should we ask the system to show voice download dialog?" +#. Android resource: @strings/guyane_francaise +msgid "Guyane Francaise" msgstr "" #, c-format +#~ msgid "Route %4.0fkm %02d:%02d ETA" +#~ msgstr "Маршрут %4.0fкм %02d:%02d ОВП" + +#, c-format #~ msgid "then leave the roundabout at the %1$s %2$s" #~ msgstr "след това излезте от кръговото на %1$s %2$s" diff --git a/po/bs.po.in b/po/bs.po.in index 2e9a96061..d28cdea28 100644 --- a/po/bs.po.in +++ b/po/bs.po.in @@ -1,5 +1,5 @@ # Bosnian translations for navit -# Copyright (C) 2006-2016 The Navit Team +# Copyright (C) 2006-2018 The Navit Team # This file is distributed under the same license as the navit package. # Many thanks to the contributors of this translation: # KaZeR https://launchpad.net/~kazer @@ -8,7 +8,7 @@ msgid "" msgstr "" -"Project-Id-Version: navit 0.5.0\n" +"Project-Id-Version: navit 0.5.1\n" "Report-Msgid-Bugs-To: \n" "PO-Revision-Date: 2015-07-19 03:57+0000\n" "Last-Translator: Michael von Glasow <Unknown>\n" @@ -154,7 +154,6 @@ msgstr "" msgid "%1$sonto %2$s|neuter form" msgstr "" -#. TRANSLATORS: motorway ramp refers to the slip road for entering a motorway. msgid "onto the motorway ramp" msgstr "u rampu" @@ -367,7 +366,6 @@ msgstr "" msgid "You have reached your destination %s" msgstr "" -#. TRANSLATORS: Exit as a noun, as in "Exit 43 Greenmound-East" msgid "Interchange" msgstr "" @@ -384,9 +382,15 @@ msgstr "" msgid "Length" msgstr "" +msgid "mi" +msgstr "" + msgid "km" msgstr "" +msgid "feet" +msgstr "" + msgid "m" msgstr "" @@ -447,6 +451,7 @@ msgid "Anguilla" msgstr "" #. 008 +#. Android resource: @strings/albania msgid "Albania" msgstr "" @@ -459,6 +464,7 @@ msgid "Netherlands Antilles" msgstr "" #. 024 +#. Android resource: @strings/angola msgid "Angola" msgstr "" @@ -467,6 +473,7 @@ msgid "Antarctica" msgstr "" #. 032 +#. Android resource: @strings/argentina msgid "Argentina" msgstr "" @@ -475,10 +482,12 @@ msgid "American Samoa" msgstr "" #. 040 +#. Android resource: @strings/austria msgid "Austria" msgstr "" #. 036 +#. Android resource: @strings/australia msgid "Australia" msgstr "" @@ -491,10 +500,12 @@ msgid "Aland Islands" msgstr "" #. 031 +#. Android resource: @strings/azerbaijan msgid "Azerbaijan" msgstr "" #. 070 +#. Android resource: @strings/bosnia_and_herzegovina msgid "Bosnia and Herzegovina" msgstr "" @@ -507,6 +518,7 @@ msgid "Bangladesh" msgstr "" #. 056 +#. Android resource: @strings/belgium msgid "Belgium" msgstr "" @@ -515,6 +527,7 @@ msgid "Burkina Faso" msgstr "" #. 100 +#. Android resource: @strings/bulgaria msgid "Bulgaria" msgstr "" @@ -523,6 +536,7 @@ msgid "Bahrain" msgstr "" #. 108 +#. Android resource: @strings/burundi msgid "Burundi" msgstr "" @@ -543,6 +557,7 @@ msgid "Brunei Darussalam" msgstr "" #. 068 +#. Android resource: @strings/bolivia msgid "Bolivia" msgstr "" @@ -551,6 +566,7 @@ msgid "Bonaire, Sint Eustatius and Saba" msgstr "" #. 076 +#. Android resource: @strings/brazil msgid "Brazil" msgstr "" @@ -567,10 +583,12 @@ msgid "Bouvet Island" msgstr "" #. 072 +#. Android resource: @strings/botswana msgid "Botswana" msgstr "" #. 112 +#. Android resource: @strings/belarus msgid "Belarus" msgstr "" @@ -579,6 +597,7 @@ msgid "Belize" msgstr "" #. 124 +#. Android resource: @strings/canada msgid "Canada" msgstr "" @@ -587,6 +606,7 @@ msgid "Cocos (Keeling) Islands" msgstr "" #. 180 +#. Android resource: @strings/congo msgid "Congo, Democratic Republic of the" msgstr "" @@ -599,10 +619,12 @@ msgid "Congo" msgstr "" #. 756 +#. Android resource: @strings/switzerland msgid "Switzerland" msgstr "" #. 384 +#. Android resource: @strings/cotedivoire msgid "Cote d'Ivoire" msgstr "" @@ -611,6 +633,7 @@ msgid "Cook Islands" msgstr "" #. 152 +#. Android resource: @strings/chile msgid "Chile" msgstr "" @@ -619,10 +642,12 @@ msgid "Cameroon" msgstr "" #. 156 +#. Android resource: @strings/china msgid "China" msgstr "" #. 170 +#. Android resource: @strings/colombia msgid "Colombia" msgstr "" @@ -631,6 +656,7 @@ msgid "Costa Rica" msgstr "" #. 192 +#. Android resource: @strings/cuba msgid "Cuba" msgstr "" @@ -647,14 +673,17 @@ msgid "Christmas Island" msgstr "" #. 196 +#. Android resource: @strings/cyprus msgid "Cyprus" msgstr "" #. 203 +#. Android resource: @strings/czech_republic msgid "Czech Republic" msgstr "" #. 276 +#. Android resource: @strings/germany msgid "Germany" msgstr "" @@ -663,6 +692,7 @@ msgid "Djibouti" msgstr "" #. 208 +#. Android resource: @strings/denmark msgid "Denmark" msgstr "" @@ -671,6 +701,7 @@ msgid "Dominica" msgstr "" #. 214 +#. Android resource: @strings/dominican_republic msgid "Dominican Republic" msgstr "" @@ -679,10 +710,12 @@ msgid "Algeria" msgstr "" #. 218 +#. Android resource: @strings/ecuador msgid "Ecuador" msgstr "" #. 233 +#. Android resource: @strings/estonia msgid "Estonia" msgstr "" @@ -699,14 +732,17 @@ msgid "Eritrea" msgstr "" #. 724 +#. Android resource: @strings/spain msgid "Spain" msgstr "" #. 231 +#. Android resource: @strings/ethiopia msgid "Ethiopia" msgstr "" #. 246 +#. Android resource: @strings/finland msgid "Finland" msgstr "" @@ -723,10 +759,12 @@ msgid "Micronesia, Federated States of" msgstr "" #. 234 +#. Android resource: @strings/faroe_islands msgid "Faroe Islands" msgstr "" #. 250 +#. Android resource: @strings/france msgid "France" msgstr "" @@ -735,6 +773,7 @@ msgid "Gabon" msgstr "" #. 826 +#. Android resource: @strings/united_kingdom msgid "United Kingdom" msgstr "" @@ -771,6 +810,7 @@ msgid "Gambia" msgstr "" #. 324 +#. Android resource: @strings/guinea msgid "Guinea" msgstr "" @@ -783,6 +823,7 @@ msgid "Equatorial Guinea" msgstr "" #. 300 +#. Android resource: @strings/greece msgid "Greece" msgstr "" @@ -803,6 +844,7 @@ msgid "Guinea-Bissau" msgstr "" #. 328 +#. Android resource: @strings/guyana msgid "Guyana" msgstr "" @@ -819,26 +861,32 @@ msgid "Honduras" msgstr "" #. 191 +#. Android resource: @strings/croatia msgid "Croatia" msgstr "" #. 332 +#. Android resource: @strings/haiti msgid "Haiti" msgstr "" #. 348 +#. Android resource: @strings/hungary msgid "Hungary" msgstr "" #. 360 +#. Android resource: @strings/indonesia msgid "Indonesia" msgstr "" #. 372 +#. Android resource: @strings/ireland msgid "Ireland" msgstr "" #. 376 +#. Android resource: @strings/israel msgid "Israel" msgstr "" @@ -847,6 +895,7 @@ msgid "Isle of Man" msgstr "" #. 356 +#. Android resource: @strings/india msgid "India" msgstr "" @@ -855,18 +904,22 @@ msgid "British Indian Ocean Territory" msgstr "" #. 368 +#. Android resource: @strings/iraq msgid "Iraq" msgstr "" #. 364 +#. Android resource: @strings/iran msgid "Iran, Islamic Republic of" msgstr "" #. 352 +#. Android resource: @strings/iceland msgid "Iceland" msgstr "" #. 380 +#. Android resource: @strings/italy msgid "Italy" msgstr "" @@ -875,6 +928,7 @@ msgid "Jersey" msgstr "" #. 388 +#. Android resource: @strings/jamaica msgid "Jamaica" msgstr "" @@ -883,14 +937,17 @@ msgid "Jordan" msgstr "" #. 392 +#. Android resource: @strings/japan msgid "Japan" msgstr "" #. 404 +#. Android resource: @strings/kenya msgid "Kenya" msgstr "" #. 417 +#. Android resource: @strings/kyrgyzsyan msgid "Kyrgyzstan" msgstr "" @@ -927,6 +984,7 @@ msgid "Cayman Islands" msgstr "" #. 398 +#. Android resource: @strings/kazakhstan msgid "Kazakhstan" msgstr "" @@ -951,26 +1009,32 @@ msgid "Sri Lanka" msgstr "" #. 430 +#. Android resource: @strings/liberia msgid "Liberia" msgstr "" #. 426 +#. Android resource: @strings/lesotho msgid "Lesotho" msgstr "" #. 440 +#. Android resource: @strings/lithuania msgid "Lithuania" msgstr "" #. 442 +#. Android resource: @strings/luxembourg msgid "Luxembourg" msgstr "" #. 428 +#. Android resource: @strings/latvia msgid "Latvia" msgstr "" #. 434 +#. Android resource: @strings/libya msgid "Libya" msgstr "" @@ -995,6 +1059,7 @@ msgid "Saint Martin (French part)" msgstr "" #. 450 +#. Android resource: @strings/madagascar msgid "Madagascar" msgstr "" @@ -1015,6 +1080,7 @@ msgid "Myanmar" msgstr "" #. 496 +#. Android resource: @strings/mongolia msgid "Mongolia" msgstr "" @@ -1055,10 +1121,12 @@ msgid "Malawi" msgstr "" #. 484 +#. Android resource: @strings/mexico msgid "Mexico" msgstr "" #. 458 +#. Android resource: @strings/malaysia msgid "Malaysia" msgstr "" @@ -1067,10 +1135,12 @@ msgid "Mozambique" msgstr "" #. 516 +#. Android resource: @strings/namibia msgid "Namibia" msgstr "" #. 540 +#. Android resource: @strings/new_caledonia msgid "New Caledonia" msgstr "" @@ -1091,6 +1161,7 @@ msgid "Nicaragua" msgstr "" #. 528 +#. Android resource: @strings/netherlands msgid "Netherlands" msgstr "" @@ -1099,6 +1170,7 @@ msgid "Norway" msgstr "" #. 524 +#. Android resource: @strings/nepal msgid "Nepal" msgstr "" @@ -1111,6 +1183,7 @@ msgid "Niue" msgstr "" #. 554 +#. Android resource: @strings/newzealand msgid "New Zealand" msgstr "" @@ -1123,6 +1196,7 @@ msgid "Panama" msgstr "" #. 604 +#. Android resource: @strings/peru msgid "Peru" msgstr "" @@ -1135,14 +1209,17 @@ msgid "Papua New Guinea" msgstr "" #. 608 +#. Android resource: @strings/philippines msgid "Philippines" msgstr "" #. 586 +#. Android resource: @strings/pakistan msgid "Pakistan" msgstr "" #. 616 +#. Android resource: @strings/poland msgid "Poland" msgstr "" @@ -1163,6 +1240,7 @@ msgid "Palestinian Territory, Occupied" msgstr "" #. 620 +#. Android resource: @strings/portugal msgid "Portugal" msgstr "" @@ -1171,6 +1249,7 @@ msgid "Palau" msgstr "" #. 600 +#. Android resource: @strings/paraguay msgid "Paraguay" msgstr "" @@ -1179,10 +1258,12 @@ msgid "Qatar" msgstr "" #. 638 +#. Android resource: @strings/reunion msgid "Reunion" msgstr "" #. 642 +#. Android resource: @strings/romania msgid "Romania" msgstr "" @@ -1191,14 +1272,17 @@ msgid "Serbia" msgstr "" #. 643 +#. Android resource: @strings/russian_federation msgid "Russian Federation" msgstr "" #. 646 +#. Android resource: @strings/rwanda msgid "Rwanda" msgstr "" #. 682 +#. Android resource: @strings/saudi_arabia msgid "Saudi Arabia" msgstr "" @@ -1219,6 +1303,7 @@ msgid "Sweden" msgstr "" #. 702 +#. Android resource: @strings/singapore msgid "Singapore" msgstr "" @@ -1235,6 +1320,7 @@ msgid "Svalbard and Jan Mayen" msgstr "" #. 703 +#. Android resource: @strings/slovakia msgid "Slovakia" msgstr "" @@ -1255,6 +1341,7 @@ msgid "Somalia" msgstr "" #. 740 +#. Android resource: @strings/suriname msgid "Suriname" msgstr "" @@ -1299,6 +1386,7 @@ msgid "Togo" msgstr "" #. 764 +#. Android resource: @strings/thailand msgid "Thailand" msgstr "" @@ -1315,6 +1403,7 @@ msgid "Timor-Leste" msgstr "" #. 795 +#. Android resource: @strings/turkmenistan msgid "Turkmenistan" msgstr "" @@ -1327,6 +1416,7 @@ msgid "Tonga" msgstr "" #. 792 +#. Android resource: @strings/turkey msgid "Turkey" msgstr "" @@ -1343,14 +1433,17 @@ msgid "Taiwan, Province of China" msgstr "" #. 834 +#. Android resource: @strings/tanzania msgid "Tanzania, United Republic of" msgstr "" #. 804 +#. Android resource: @strings/ukraine msgid "Ukraine" msgstr "" #. 800 +#. Android resource: @strings/uganda msgid "Uganda" msgstr "" @@ -1363,6 +1456,7 @@ msgid "United States" msgstr "" #. 858 +#. Android resource: @strings/uruguay msgid "Uruguay" msgstr "" @@ -1379,6 +1473,7 @@ msgid "Saint Vincent and the Grenadines" msgstr "" #. 862 +#. Android resource: @strings/venezuela msgid "Venezuela" msgstr "" @@ -1415,6 +1510,7 @@ msgid "Mayotte" msgstr "" #. 710 +#. Android resource: @strings/south_africa msgid "South Africa" msgstr "" @@ -1442,23 +1538,23 @@ msgid "" msgstr "" #. We have not found an existing config file from all possibilities -msgid "No config file navit.xml, navit.xml.local found\n" +msgid "No config file navit.xml, navit.xml.local found" msgstr "" #, c-format -msgid "Error parsing config file '%s': %s\n" +msgid "Error parsing config file '%s': %s" msgstr "" #, c-format -msgid "Using config file '%s'\n" +msgid "Using config file '%s'" msgstr "" #, c-format -msgid "Error: No configuration found in config file '%s'\n" +msgid "Error: No configuration found in config file '%s'" msgstr "" msgid "" -"Internal initialization failed, exiting. Check previous error messages.\n" +"Internal initialization failed, exiting. Check previous error messages." msgstr "" msgid "unknown street" @@ -1599,6 +1695,9 @@ msgstr "" msgid "_Lock on Road" msgstr "" +msgid "_Follow Vehicle" +msgstr "" + msgid "_Keep orientation to the North" msgstr "" @@ -1668,7 +1767,12 @@ msgstr "" msgid "Shopping" msgstr "" -msgid "Select a search radius from screen center" +#. Input is in kilometers +msgid "Select a search radius from screen center in km" +msgstr "" + +#. Input is in miles. +msgid "Select a search radius from screen center in miles" msgstr "" #, c-format @@ -1676,15 +1780,15 @@ msgid "POI %s. %s" msgstr "" #, c-format -msgid "Set destination to %ld, %ld \n" +msgid "Set destination to %ld, %ld " msgstr "" #, c-format -msgid "Set map to %ld, %ld \n" +msgid "Set map to %ld, %ld " msgstr "" #, c-format -msgid "Set next visit to %ld, %ld \n" +msgid "Set next visit to %ld, %ld " msgstr "" msgid "POI search" @@ -1693,9 +1797,6 @@ msgstr "" msgid "Select a category" msgstr "" -msgid "Select a distance to look for (km)" -msgstr "" - msgid "Select a POI" msgstr "" @@ -1708,7 +1809,7 @@ msgstr "" msgid "Direction" msgstr "" -msgid "Distance(m)" +msgid "Distance" msgstr "" msgid "Name" @@ -1755,7 +1856,7 @@ msgid "OT" msgstr "" #, c-format -msgid "Route %4.0fkm %02d:%02d ETA" +msgid "Route %4.1f%s %02d:%02d ETA" msgstr "" msgid "Route 0000km 0+00:00 ETA" @@ -1978,6 +2079,9 @@ msgstr "" msgid "Show Locale" msgstr "" +msgid "Network info" +msgstr "" + msgid "Former Destinations" msgstr "" @@ -2016,729 +2120,861 @@ msgstr "" msgid "Please decrease your speed" msgstr "" -msgid "partial match" +msgid "Vehicle Position" msgstr "" -#. Android resource: @strings/address_search_button -msgid "Search" +msgid "Main menu" msgstr "" -#. Android resource: @strings/address_search_towns -msgid "Towns" +msgid "" +"Show\n" +"Map" msgstr "" -msgid "Map data (c) OpenStreetMap contributors, ODBL" +msgid "Settings" msgstr "" -msgid "" -"Current map location %s is not available\n" -"Please restart Navit after you attach an SD card or select a different map " -"location." +msgid "Tools" msgstr "" -msgid "Downloaded maps" +msgid "Route" msgstr "" -msgid "" -"Sorry, we currently do not support maps above 3.8G on Android, please select " -"a smaller one." +msgid "About" msgstr "" -#. Android resource: @strings/position_popup_drive_here -msgid "Route to here" +msgid "Quit" msgstr "" -msgid "Cancel" +msgid "Actions" msgstr "" -msgid "filenamePath" +msgid "" +"Former\n" +"Destinations" msgstr "" -msgid "" -"New location set to %s\n" -"Restart Navit to apply the changes." +msgid "Coordinates" msgstr "" -msgid "Whole Planet" +msgid "" +"Stop\n" +"Navigation" msgstr "" -msgid "Africa" +msgid "Display" msgstr "" -msgid "Canary Islands" +msgid "Fullscreen" msgstr "" -msgid "Asia" +msgid "Window Mode" msgstr "" -msgid "Korea" +msgid "Auto zoom" msgstr "" -msgid "Taiwan" +msgid "Manual zoom" msgstr "" -msgid "UAE+Other" +msgid "Layers" msgstr "" -msgid "Oceania" +msgid "Zoom to route" msgstr "" -msgid "Tasmania" +msgid "Description" msgstr "" -msgid "Victoria" +msgid "" +"Drop last\n" +"Waypoint" msgstr "" -msgid "New South Wales" +msgid "" +"Drop next\n" +"Waypoint" msgstr "" -msgid "Europe" +msgid "Satellite Status" msgstr "" -msgid "Western Europe" +msgid "NMEA Data" msgstr "" -msgid "Azores" +msgid "car_shortest" msgstr "" -msgid "BeNeLux" +msgid "car_avoid_tolls" msgstr "" -msgid "Alsace" +msgid "car_pedantic" msgstr "" -msgid "Aquitaine" +msgid "horse" msgstr "" -msgid "Auvergne" +msgid "Truck" msgstr "" -msgid "Basse-Normandie" +#. Strings from android/res/values/strings.xml +#. Android resource: @strings/yes +msgid "Yes" msgstr "" -msgid "Bourgogne" +#. Android resource: @strings/cancel +msgid "Cancel" msgstr "" -msgid "Bretagne" +#. Android resource: @strings/notification_ticker +msgid "Navit started" msgstr "" -msgid "Centre" +#. Android resource: @strings/notification_event_default +msgid "Navit running" msgstr "" -msgid "Champagne-Ardenne" +#. Android resource: @strings/initial_info_box_title +msgid "Welcome to Navit" msgstr "" -msgid "Corse" +#. Android resource: @strings/initial_info_box_message +msgid "" +"Thank you for installing Navit!\n" +"\n" +"To start, select \"Download maps\" from the menu to download a map. Note: " +"The map filesize may be large (>50MB) - a wifi connection is recommended.\n" +"\n" +"Mapdata: (c) OpenStreetMap contributors\n" +"\n" +"Enjoy Navit!" msgstr "" -msgid "Franche-Comte" +#. Android resource: @strings/initial_info_box_OK +msgid "OK" msgstr "" -msgid "Haute-Normandie" +#. Android resource: @strings/initial_info_box_more_info +msgid "More info" msgstr "" -msgid "Ile-de-France" +#. Android resource: @strings/optionsmenu_zoom_in +msgid "Zoom in" msgstr "" -msgid "Languedoc-Roussillon" +#. Android resource: @strings/optionsmenu_zoom_out +msgid "Zoom out" msgstr "" -msgid "Limousin" +#. Android resource: @strings/optionsmenu_download_maps +msgid "Download maps" msgstr "" -msgid "Lorraine" +#. Android resource: @strings/optionsmenu_toggle_poi +msgid "Toggle POIs" msgstr "" -msgid "Midi-Pyrenees" +#. Android resource: @strings/optionsmenu_exit_navit +msgid "Exit Navit" msgstr "" -msgid "Nord-pas-de-Calais" +#. Android resource: @strings/optionsmenu_backup_restore +msgid "Backup / Restore" msgstr "" -msgid "Pays-de-la-Loire" +#. Android resource: @strings/optionsmenu_set_map_location +msgid "Set map location" msgstr "" -msgid "Picardie" +#. Android resource: @strings/position_popup_drive_here +msgid "Route to here" msgstr "" -msgid "Poitou-Charentes" +#. Android resource: @strings/map_delete +msgid "Delete this map?" msgstr "" -msgid "Provence-Alpes-Cote-d-Azur" +#. Android resource: @strings/map_download_title +msgid "Map download" msgstr "" -msgid "Rhone-Alpes" +#. Android resource: @strings/map_download_downloading +msgid "Downloading:" msgstr "" -msgid "Baden-Wuerttemberg" +#. Android resource: @strings/map_download_eta +msgid "ETA" msgstr "" -msgid "Bayern" +#. Android resource: @strings/map_download_ready +msgid "ready" msgstr "" -msgid "Mittelfranken" +#. Android resource: @strings/map_download_download_error +msgid "Error downloading map." msgstr "" -msgid "Niederbayern" +#. Android resource: @strings/map_download_download_aborted +msgid "Map download aborted" msgstr "" -msgid "Oberbayern" +#. Android resource: @strings/map_download_not_enough_free_space +msgid "Not enough free space" msgstr "" -msgid "Oberfranken" +#. Android resource: @strings/map_download_oversize +msgid "" +"Sorry, we currently do not support maps above 3.8G on Android, please select " +"a smaller one." msgstr "" -msgid "Oberpfalz" +#. Android resource: @strings/map_no_fix +msgid "No location. Reopen after location fix." msgstr "" -msgid "Schwaben" +#. Android resource: @strings/maps_for_current_location +msgid "Maps containing current location" msgstr "" -msgid "Unterfranken" +#. Android resource: @strings/maps_installed +msgid "Installed maps" msgstr "" -msgid "Berlin" +#. Android resource: @strings/map_downloading +msgid "downloading" msgstr "" -msgid "Brandenburg" +#. Android resource: @strings/map_download_medium_unavailable +msgid "Media selected for map storage is not available" msgstr "" -msgid "Bremen" +#. Android resource: @strings/map_download_error_writing_map +msgid "Error writing map!" msgstr "" -msgid "Hamburg" +#. Android resource: @strings/map_location_changed +#, c-format +msgid "New location set to %s Restart Navit to apply the changes." msgstr "" -msgid "Hessen" +#. Android resource: @strings/map_location_unavailable +#, c-format +msgid "" +"Current map location %s is not available Please restart Navit after you " +"attach an SD card or select a different map location." msgstr "" -msgid "Mecklenburg-Vorpommern" +#. Android resource: @strings/address_search_title +msgid "Address search" msgstr "" -msgid "Niedersachsen" +#. Android resource: @strings/address_enter_destination +msgid "Enter destination" msgstr "" -msgid "Nordrhein-westfalen" +#. Android resource: @strings/address_partial_match +msgid "Match partial address" msgstr "" -msgid "Rheinland-Pfalz" +#. Android resource: @strings/address_search_button +msgid "Search" msgstr "" -msgid "Saarland" +#. Android resource: @strings/address_search_searching +msgid "Searching..." msgstr "" -msgid "Sachsen-Anhalt" +#. Android resource: @strings/address_search_not_found +msgid "Address not found" msgstr "" -msgid "Sachsen" +#. Android resource: @strings/address_search_getting_results +msgid "Getting search results" msgstr "" -msgid "Schleswig-Holstein" +#. Android resource: @strings/address_search_loading_results +msgid "Loading search results" msgstr "" -msgid "Thueringen" +#. Android resource: @strings/address_search_no_results +msgid "No results found" msgstr "" -msgid "Mallorca" +#. Android resource: @strings/address_search_no_text_entered +msgid "No text entered" msgstr "" -msgid "Galicia" +#. Android resource: @strings/address_search_set_destination +msgid "Setting destination to:" msgstr "" -msgid "Scandinavia" +#. Android resource: @strings/address_search_towns +msgid "Towns" msgstr "" -msgid "England" +#. Android resource: @strings/choose_an_action +msgid "Choose an action" msgstr "" -msgid "Buckinghamshire" +#. Android resource: @strings/please_insert_an_sd_card +msgid "Please insert an SD Card" msgstr "" -msgid "Cambridgeshire" +#. Android resource: @strings/backing_up +msgid "Backing up..." msgstr "" -msgid "Cumbria" +#. Android resource: @strings/restoring +msgid "Restoring..." msgstr "" -msgid "East yorkshire with hull" +#. Android resource: @strings/failed_to_create_backup_directory +msgid "Failed to create backup directory" msgstr "" -msgid "Essex" +#. Android resource: @strings/backup_failed +msgid "Backup failed" msgstr "" -msgid "Herefordshire" +#. Android resource: @strings/no_backup_found +msgid "No backup found" msgstr "" -msgid "Kent" +#. Android resource: @strings/failed_to_restore +msgid "Failed to restore" msgstr "" -msgid "Lancashire" +#. Android resource: @strings/backup_successful +msgid "Backup successful" msgstr "" -msgid "Leicestershire" +#. Android resource: @strings/restore_successful_please_restart_navit +msgid "" +"Restore Successful\n" +"Please restart Navit" msgstr "" -msgid "Norfolk" +#. Android resource: @strings/backup_not_found +msgid "Backup not found" msgstr "" -msgid "Nottinghamshire" +#. Android resource: @strings/restore_failed +msgid "Restore failed" msgstr "" -msgid "Oxfordshire" +#. Android resource: @strings/select_backup +msgid "Select backup" msgstr "" -msgid "Shropshire" +#. Android resource: @strings/backup +msgid "Backup" msgstr "" -msgid "Somerset" +#. Android resource: @strings/restore +msgid "Restore" msgstr "" -msgid "South yorkshire" +#. Android resource: @strings/TTS_title_data_missing +msgid "System text to speech engine data is missing" msgstr "" -msgid "Suffolk" +#. Android resource: @strings/TTS_qery_install_data +msgid "" +"Navit can use any text to speech engine installed on your device. The " +"currently selected engine reports it is unable to speak in your language. " +"Should we ask the system to show voice download dialog?" msgstr "" -msgid "Surrey" +#. Android resource: @strings/permissions_not_granted +msgid "" +"Navit needs permission to access GPS and read the map.\n" +"If you change your mind please restart Navit and grant the permissions" msgstr "" -msgid "Wiltshire" +#. Android resource: @strings/permissions_info_box_title +msgid "One or more ungranted permissions" msgstr "" -msgid "Scotland" +#. Android resource: @strings/whole_planet +msgid "Whole Planet" msgstr "" -msgid "Wales" +#. Android resource: @strings/africa +msgid "Africa" msgstr "" -msgid "Crete" +#. Android resource: @strings/canary_islands +msgid "Canary Islands" msgstr "" -msgid "North America" +#. Android resource: @strings/asia +msgid "Asia" msgstr "" -msgid "Alaska" +#. Android resource: @strings/taiwan +msgid "Taiwan" msgstr "" -msgid "Hawaii" +#. Android resource: @strings/korea +msgid "Korea" msgstr "" -msgid "USA" +#. Android resource: @strings/uae_other +msgid "UAE+Other" msgstr "" -msgid " (except Alaska and Hawaii)" +#. Android resource: @strings/oceania +msgid "Oceania" msgstr "" -msgid "Midwest" +#. Android resource: @strings/tasmania +msgid "Tasmania" msgstr "" -msgid "Michigan" +#. Android resource: @strings/victoria +msgid "Victoria" msgstr "" -msgid "Ohio" +#. Android resource: @strings/new_south_wales +msgid "New South Wales" msgstr "" -msgid "Northeast" +#. Android resource: @strings/europe +msgid "Europe" msgstr "" -msgid "Massachusetts" +#. Android resource: @strings/western_europe +msgid "Western Europe" msgstr "" -msgid "Vermont" +#. Android resource: @strings/azores +msgid "Azores" msgstr "" -msgid "Pacific" +#. Android resource: @strings/benelux +msgid "BeNeLux" msgstr "" -msgid "South" +#. Android resource: @strings/alsace +msgid "Alsace" msgstr "" -msgid "Arkansas" +#. Android resource: @strings/aquitaine +msgid "Aquitaine" msgstr "" -msgid "District of Columbia" +#. Android resource: @strings/auvergne +msgid "Auvergne" msgstr "" -msgid "Florida" +#. Android resource: @strings/centre +msgid "Centre" msgstr "" -msgid "Louisiana" +#. Android resource: @strings/bretagne +msgid "Bretagne" msgstr "" -msgid "Maryland" +#. Android resource: @strings/bourgogne +msgid "Bourgogne" msgstr "" -msgid "Mississippi" +#. Android resource: @strings/basse_normandie +msgid "Basse-Normandie" msgstr "" -msgid "Oklahoma" +#. Android resource: @strings/champagne_ardenne +msgid "Champagne-Ardenne" msgstr "" -msgid "Texas" +#. Android resource: @strings/corse +msgid "Corse" msgstr "" -msgid "Virginia" +#. Android resource: @strings/franche_comte +msgid "Franche-Comte" msgstr "" -msgid "West Virginia" +#. Android resource: @strings/haute_normandie +msgid "Haute-Normandie" msgstr "" -msgid "West" +#. Android resource: @strings/ile_de_france +msgid "Ile-de-France" msgstr "" -msgid "Arizona" +#. Android resource: @strings/languedoc_roussillon +msgid "Languedoc-Roussillon" msgstr "" -msgid "California" +#. Android resource: @strings/limousin +msgid "Limousin" msgstr "" -msgid "Colorado" +#. Android resource: @strings/lorraine +msgid "Lorraine" msgstr "" -msgid "Idaho" +#. Android resource: @strings/midi_pyrenees +msgid "Midi-Pyrenees" msgstr "" -msgid "Montana" +#. Android resource: @strings/nord_pas_de_calais +msgid "Nord-pas-de-Calais" msgstr "" -msgid "New Mexico" +#. Android resource: @strings/pays_de_la_loire +msgid "Pays-de-la-Loire" msgstr "" -msgid "Nevada" +#. Android resource: @strings/picardie +msgid "Picardie" msgstr "" -msgid "Oregon" +#. Android resource: @strings/poitou_charentes +msgid "Poitou-Charentes" msgstr "" -msgid "Utah" +#. Android resource: @strings/provence_alpes_cote_d_azur +msgid "Provence-Alpes-Cote-d-Azur" msgstr "" -msgid "Washington State" +#. Android resource: @strings/rhone_alpes +msgid "Rhone-Alpes" msgstr "" -msgid "South+Middle America" +#. Android resource: @strings/baden_wuerttemberg +msgid "Baden-Wuerttemberg" msgstr "" -msgid "Guyane Francaise" +#. Android resource: @strings/bayern +msgid "Bayern" msgstr "" -msgid "downloading" +#. Android resource: @strings/mittelfranken +msgid "Mittelfranken" msgstr "" -#. Android resource: @strings/map_download_ready -msgid "ready" +#. Android resource: @strings/niederbayern +msgid "Niederbayern" msgstr "" -msgid "Media selected for map storage is not available" +#. Android resource: @strings/oberbayern +msgid "Oberbayern" msgstr "" -#. Android resource: @strings/map_download_not_enough_free_space -msgid "Not enough free space" +#. Android resource: @strings/oberfranken +msgid "Oberfranken" msgstr "" -msgid "Error downloading map!" +#. Android resource: @strings/oberpfalz +msgid "Oberpfalz" msgstr "" -msgid "Error writing map!" +#. Android resource: @strings/schwaben +msgid "Schwaben" msgstr "" -msgid "Map download aborted!" +#. Android resource: @strings/unterfranken +msgid "Unterfranken" msgstr "" -#. Android resource: @strings/map_download_eta -msgid "ETA" +#. Android resource: @strings/berlin +msgid "Berlin" msgstr "" -#. Android resource: @strings/map_download_title -msgid "Map download" +#. Android resource: @strings/brandenburg +msgid "Brandenburg" msgstr "" -msgid "Vehicle Position" +#. Android resource: @strings/bremen +msgid "Bremen" msgstr "" -msgid "Main menu" +#. Android resource: @strings/hamburg +msgid "Hamburg" msgstr "" -msgid "" -"Show\n" -"Map" +#. Android resource: @strings/hessen +msgid "Hessen" msgstr "" -msgid "Settings" +#. Android resource: @strings/mecklenburg_vorpommern +msgid "Mecklenburg-Vorpommern" msgstr "" -msgid "Tools" +#. Android resource: @strings/niedersachsen +msgid "Niedersachsen" msgstr "" -msgid "Route" +#. Android resource: @strings/nordrhein_westfalen +msgid "Nordrhein-westfalen" msgstr "" -msgid "About" +#. Android resource: @strings/rheinland_pfalz +msgid "Rheinland-Pfalz" msgstr "" -msgid "Quit" +#. Android resource: @strings/saarland +msgid "Saarland" msgstr "" -msgid "Actions" +#. Android resource: @strings/sachsen_anhalt +msgid "Sachsen-Anhalt" msgstr "" -msgid "" -"Former\n" -"Destinations" +#. Android resource: @strings/sachsen +msgid "Sachsen" msgstr "" -msgid "Coordinates" +#. Android resource: @strings/schleswig_holstein +msgid "Schleswig-Holstein" msgstr "" -msgid "" -"Stop\n" -"Navigation" +#. Android resource: @strings/thueringen +msgid "Thueringen" msgstr "" -msgid "Display" +#. Android resource: @strings/mallorca +msgid "Mallorca" msgstr "" -msgid "Fullscreen" +#. Android resource: @strings/galicia +msgid "Galicia" msgstr "" -msgid "Window Mode" +#. Android resource: @strings/scandinavia +msgid "Scandinavia" msgstr "" -msgid "Layers" +#. Android resource: @strings/england +msgid "England" msgstr "" -msgid "Description" +#. Android resource: @strings/buckinghamshire +msgid "Buckinghamshire" msgstr "" -msgid "" -"Drop last \n" -"Waypoint" +#. Android resource: @strings/cambridgeshire +msgid "Cambridgeshire" msgstr "" -msgid "" -"Drop next \n" -"Waypoint" +#. Android resource: @strings/cumbria +msgid "Cumbria" msgstr "" -msgid "Satellite Status" +#. Android resource: @strings/east_yorkshire_with_hull +msgid "East yorkshire with hull" msgstr "" -msgid "NMEA Data" +#. Android resource: @strings/essex +msgid "Essex" msgstr "" -msgid "car_shortest" +#. Android resource: @strings/herefordshire +msgid "Herefordshire" msgstr "" -msgid "car_avoid_tolls" +#. Android resource: @strings/kent +msgid "Kent" msgstr "" -msgid "car_pedantic" +#. Android resource: @strings/lancashire +msgid "Lancashire" msgstr "" -msgid "horse" +#. Android resource: @strings/leicestershire +msgid "Leicestershire" msgstr "" -msgid "Truck" +#. Android resource: @strings/norfolk +msgid "Norfolk" msgstr "" -#. Strings from android/res/values/strings.xml -#. Android resource: @strings/yes -msgid "Yes" +#. Android resource: @strings/nottinghamshire +msgid "Nottinghamshire" msgstr "" -#. Android resource: @strings/notification_ticker -msgid "Navit started" +#. Android resource: @strings/oxfordshire +msgid "Oxfordshire" msgstr "" -#. Android resource: @strings/notification_event_default -msgid "Navit running" +#. Android resource: @strings/shropshire +msgid "Shropshire" msgstr "" -#. Android resource: @strings/initial_info_box_title -msgid "Welcome to Navit" +#. Android resource: @strings/somerset +msgid "Somerset" msgstr "" -#. Android resource: @strings/initial_info_box_message -msgid "" -"Thank you for installing Navit!\n" -"\n" -"To start, select \"Download maps\" from the menu to download a map. Note: " -"The map filesize may be large (>50MB) - a wifi connection is recommended.\n" -"\n" -"Mapdata: (c) OpenStreetMap contributors\n" -"\n" -"Enjoy Navit!" +#. Android resource: @strings/south_yorkshire +msgid "South yorkshire" msgstr "" -#. Android resource: @strings/initial_info_box_OK -msgid "OK" +#. Android resource: @strings/suffolk +msgid "Suffolk" msgstr "" -#. Android resource: @strings/initial_info_box_more_info -msgid "More info" +#. Android resource: @strings/surrey +msgid "Surrey" msgstr "" -#. Android resource: @strings/optionsmenu_zoom_in -msgid "Zoom in" +#. Android resource: @strings/wiltshire +msgid "Wiltshire" msgstr "" -#. Android resource: @strings/optionsmenu_zoom_out -msgid "Zoom out" +#. Android resource: @strings/scotland +msgid "Scotland" msgstr "" -#. Android resource: @strings/optionsmenu_download_maps -msgid "Download maps" +#. Android resource: @strings/wales +msgid "Wales" msgstr "" -#. Android resource: @strings/optionsmenu_toggle_poi -msgid "Toggle POIs" +#. Android resource: @strings/crete +msgid "Crete" msgstr "" -#. Android resource: @strings/optionsmenu_exit_navit -msgid "Exit Navit" +#. Android resource: @strings/north_america +msgid "North America" msgstr "" -#. Android resource: @strings/optionsmenu_backup_restore -msgid "Backup / Restore" +#. Android resource: @strings/alaska +msgid "Alaska" msgstr "" -#. Android resource: @strings/optionsmenu_set_map_location -msgid "Set map location" +#. Android resource: @strings/hawaii +msgid "Hawaii" msgstr "" -#. Android resource: @strings/map_delete -msgid "Delete this map?" +#. Android resource: @strings/usa +msgid "USA" msgstr "" -#. Android resource: @strings/map_download_downloading -msgid "Downloading:" +#. Android resource: @strings/except_alaska_and_hawaii +msgid "(except Alaska and Hawaii)" msgstr "" -#. Android resource: @strings/map_download_download_error -msgid "Error downloading map." +#. Android resource: @strings/midwest +msgid "Midwest" msgstr "" -#. Android resource: @strings/map_download_download_aborted -msgid "Map download aborted" +#. Android resource: @strings/michigan +msgid "Michigan" msgstr "" -#. Android resource: @strings/map_no_fix -msgid "No location. Reopen after location fix." +#. Android resource: @strings/ohio +msgid "Ohio" msgstr "" -#. Android resource: @strings/maps_for_current_location -msgid "Maps containing current location" +#. Android resource: @strings/northeast +msgid "Northeast" msgstr "" -#. Android resource: @strings/address_search_title -msgid "Address search" +#. Android resource: @strings/massachusetts +msgid "Massachusetts" msgstr "" -#. Android resource: @strings/address_enter_destination -msgid "Enter destination" +#. Android resource: @strings/vermont +msgid "Vermont" msgstr "" -#. Android resource: @strings/address_partial_match -msgid "Match partial address" +#. Android resource: @strings/pacific +msgid "Pacific" msgstr "" -#. Android resource: @strings/address_search_searching -msgid "Searching..." +#. Android resource: @strings/south +msgid "South" msgstr "" -#. Android resource: @strings/address_search_not_found -msgid "Address not found" +#. Android resource: @strings/arkansas +msgid "Arkansas" msgstr "" -#. Android resource: @strings/address_search_getting_results -msgid "Getting search results" +#. Android resource: @strings/district_of_columbia +msgid "District of Columbia" msgstr "" -#. Android resource: @strings/address_search_loading_results -msgid "Loading search results" +#. Android resource: @strings/florida +msgid "Florida" msgstr "" -#. Android resource: @strings/address_search_no_results -msgid "No results found" +#. Android resource: @strings/louisiana +msgid "Louisiana" msgstr "" -#. Android resource: @strings/address_search_no_text_entered -msgid "No text entered" +#. Android resource: @strings/maryland +msgid "Maryland" msgstr "" -#. Android resource: @strings/address_search_set_destination -msgid "Setting destination to:" +#. Android resource: @strings/mississippi +msgid "Mississippi" msgstr "" -#. Android resource: @strings/choose_an_action -msgid "Choose an action" +#. Android resource: @strings/oklahoma +msgid "Oklahoma" msgstr "" -#. Android resource: @strings/please_insert_an_sd_card -msgid "Please insert an SD Card" +#. Android resource: @strings/texas +msgid "Texas" msgstr "" -#. Android resource: @strings/backing_up -msgid "Backing up..." +#. Android resource: @strings/virginia +msgid "Virginia" msgstr "" -#. Android resource: @strings/restoring -msgid "Restoring..." +#. Android resource: @strings/west_virginia +msgid "West Virginia" msgstr "" -#. Android resource: @strings/failed_to_create_backup_directory -msgid "Failed to create backup directory" +#. Android resource: @strings/west +msgid "West" msgstr "" -#. Android resource: @strings/backup_failed -msgid "Backup failed" +#. Android resource: @strings/arizona +msgid "Arizona" msgstr "" -#. Android resource: @strings/no_backup_found -msgid "No backup found" +#. Android resource: @strings/california +msgid "California" msgstr "" -#. Android resource: @strings/failed_to_restore -msgid "Failed to restore" +#. Android resource: @strings/colorado +msgid "Colorado" msgstr "" -#. Android resource: @strings/backup_successful -msgid "Backup successful" +#. Android resource: @strings/idaho +msgid "Idaho" msgstr "" -#. Android resource: @strings/restore_successful_please_restart_navit -msgid "" -"Restore Successful\n" -"Please restart Navit" +#. Android resource: @strings/montana +msgid "Montana" msgstr "" -#. Android resource: @strings/backup_not_found -msgid "Backup not found" +#. Android resource: @strings/new_mexico +msgid "New Mexico" msgstr "" -#. Android resource: @strings/restore_failed -msgid "Restore failed" +#. Android resource: @strings/nevada +msgid "Nevada" msgstr "" -#. Android resource: @strings/select_backup -msgid "Select backup" +#. Android resource: @strings/oregon +msgid "Oregon" msgstr "" -#. Android resource: @strings/backup -msgid "Backup" +#. Android resource: @strings/utah +msgid "Utah" msgstr "" -#. Android resource: @strings/restore -msgid "Restore" +#. Android resource: @strings/washington_state +msgid "Washington State" msgstr "" -#. Android resource: @strings/TTS_title_data_missing -msgid "System text to speech engine data is missing" +#. Android resource: @strings/south_middle_america +msgid "South+Middle America" msgstr "" -#. Android resource: @strings/TTS_qery_install_data -msgid "" -"Navit can use any text to speech engine installed on your device. The " -"currently selected engine reports it is unable to speak in your language. " -"Should we ask the system to show voice download dialog?" +#. Android resource: @strings/guyane_francaise +msgid "Guyane Francaise" msgstr "" diff --git a/po/ca.po.in b/po/ca.po.in index d4b7111f8..da9421f44 100644 --- a/po/ca.po.in +++ b/po/ca.po.in @@ -1,5 +1,5 @@ # Catalan translations for navit -# Copyright (C) 2006-2016 The Navit Team +# Copyright (C) 2006-2018 The Navit Team # This file is distributed under the same license as the navit package. # Many thanks to the contributors of this translation: # Ferran Roig https://launchpad.net/~ferro9 @@ -17,7 +17,7 @@ msgid "" msgstr "" -"Project-Id-Version: navit 0.5.0\n" +"Project-Id-Version: navit 0.5.1\n" "Report-Msgid-Bugs-To: \n" "PO-Revision-Date: 2016-01-01 20:32+0000\n" "Last-Translator: pataquets <Unknown>\n" @@ -161,7 +161,6 @@ msgstr "" msgid "%1$sonto %2$s|neuter form" msgstr "" -#. TRANSLATORS: motorway ramp refers to the slip road for entering a motorway. msgid "onto the motorway ramp" msgstr "" @@ -374,7 +373,6 @@ msgstr "aleshores heu arribat a destí" msgid "You have reached your destination %s" msgstr "Heu arribat a la destinació %s" -#. TRANSLATORS: Exit as a noun, as in "Exit 43 Greenmound-East" msgid "Interchange" msgstr "Intersecció" @@ -391,9 +389,15 @@ msgstr "Ordre" msgid "Length" msgstr "Durada" +msgid "mi" +msgstr "" + msgid "km" msgstr "km" +msgid "feet" +msgstr "" + msgid "m" msgstr "m" @@ -454,6 +458,7 @@ msgid "Anguilla" msgstr "Anguilla" #. 008 +#. Android resource: @strings/albania msgid "Albania" msgstr "Albània" @@ -466,6 +471,7 @@ msgid "Netherlands Antilles" msgstr "Antilles Holandeses" #. 024 +#. Android resource: @strings/angola msgid "Angola" msgstr "Angola" @@ -474,6 +480,7 @@ msgid "Antarctica" msgstr "Antàrtida" #. 032 +#. Android resource: @strings/argentina msgid "Argentina" msgstr "Argentina" @@ -482,10 +489,12 @@ msgid "American Samoa" msgstr "Samoa Americana" #. 040 +#. Android resource: @strings/austria msgid "Austria" msgstr "Àustria" #. 036 +#. Android resource: @strings/australia msgid "Australia" msgstr "Austràlia" @@ -498,10 +507,12 @@ msgid "Aland Islands" msgstr "Illes Aland" #. 031 +#. Android resource: @strings/azerbaijan msgid "Azerbaijan" msgstr "Azerbaitjan" #. 070 +#. Android resource: @strings/bosnia_and_herzegovina msgid "Bosnia and Herzegovina" msgstr "Bòsnia i Hercegovina" @@ -514,6 +525,7 @@ msgid "Bangladesh" msgstr "Bangladesh" #. 056 +#. Android resource: @strings/belgium msgid "Belgium" msgstr "Bèlgica" @@ -522,6 +534,7 @@ msgid "Burkina Faso" msgstr "Burkina Faso" #. 100 +#. Android resource: @strings/bulgaria msgid "Bulgaria" msgstr "Bulgària" @@ -530,6 +543,7 @@ msgid "Bahrain" msgstr "Bahrain" #. 108 +#. Android resource: @strings/burundi msgid "Burundi" msgstr "Burundi" @@ -550,6 +564,7 @@ msgid "Brunei Darussalam" msgstr "Brunei" #. 068 +#. Android resource: @strings/bolivia msgid "Bolivia" msgstr "Bolívia" @@ -558,6 +573,7 @@ msgid "Bonaire, Sint Eustatius and Saba" msgstr "" #. 076 +#. Android resource: @strings/brazil msgid "Brazil" msgstr "Brasil" @@ -574,10 +590,12 @@ msgid "Bouvet Island" msgstr "Illa Bouvet" #. 072 +#. Android resource: @strings/botswana msgid "Botswana" msgstr "Botswana" #. 112 +#. Android resource: @strings/belarus msgid "Belarus" msgstr "Bielorússia" @@ -586,6 +604,7 @@ msgid "Belize" msgstr "Belize" #. 124 +#. Android resource: @strings/canada msgid "Canada" msgstr "Canadà" @@ -594,6 +613,7 @@ msgid "Cocos (Keeling) Islands" msgstr "Illes Cocos (Keeling)" #. 180 +#. Android resource: @strings/congo msgid "Congo, Democratic Republic of the" msgstr "Congo, República Democràtica del" @@ -606,10 +626,12 @@ msgid "Congo" msgstr "Congo" #. 756 +#. Android resource: @strings/switzerland msgid "Switzerland" msgstr "Suïssa" #. 384 +#. Android resource: @strings/cotedivoire msgid "Cote d'Ivoire" msgstr "Costa d'Ivori" @@ -618,6 +640,7 @@ msgid "Cook Islands" msgstr "Illes Cook" #. 152 +#. Android resource: @strings/chile msgid "Chile" msgstr "Xile" @@ -626,10 +649,12 @@ msgid "Cameroon" msgstr "Camerun" #. 156 +#. Android resource: @strings/china msgid "China" msgstr "Xina" #. 170 +#. Android resource: @strings/colombia msgid "Colombia" msgstr "Colòmbia" @@ -638,6 +663,7 @@ msgid "Costa Rica" msgstr "Costa Rica" #. 192 +#. Android resource: @strings/cuba msgid "Cuba" msgstr "Cuba" @@ -654,14 +680,17 @@ msgid "Christmas Island" msgstr "Illa Christmas" #. 196 +#. Android resource: @strings/cyprus msgid "Cyprus" msgstr "Xipre" #. 203 +#. Android resource: @strings/czech_republic msgid "Czech Republic" msgstr "República Txeca" #. 276 +#. Android resource: @strings/germany msgid "Germany" msgstr "Alemanya" @@ -670,6 +699,7 @@ msgid "Djibouti" msgstr "Djibouti" #. 208 +#. Android resource: @strings/denmark msgid "Denmark" msgstr "Dinamarca" @@ -678,6 +708,7 @@ msgid "Dominica" msgstr "Dominica" #. 214 +#. Android resource: @strings/dominican_republic msgid "Dominican Republic" msgstr "República Dominicana" @@ -686,10 +717,12 @@ msgid "Algeria" msgstr "Algèria" #. 218 +#. Android resource: @strings/ecuador msgid "Ecuador" msgstr "Equador" #. 233 +#. Android resource: @strings/estonia msgid "Estonia" msgstr "Estònia" @@ -706,14 +739,17 @@ msgid "Eritrea" msgstr "Eritrea" #. 724 +#. Android resource: @strings/spain msgid "Spain" msgstr "Espanya" #. 231 +#. Android resource: @strings/ethiopia msgid "Ethiopia" msgstr "Etiòpia" #. 246 +#. Android resource: @strings/finland msgid "Finland" msgstr "Finlàndia" @@ -730,10 +766,12 @@ msgid "Micronesia, Federated States of" msgstr "Micronèsia, Estats Federats de" #. 234 +#. Android resource: @strings/faroe_islands msgid "Faroe Islands" msgstr "Illes Fèroe" #. 250 +#. Android resource: @strings/france msgid "France" msgstr "França" @@ -742,6 +780,7 @@ msgid "Gabon" msgstr "Gabon" #. 826 +#. Android resource: @strings/united_kingdom msgid "United Kingdom" msgstr "Regne Unit" @@ -778,6 +817,7 @@ msgid "Gambia" msgstr "Gàmbia" #. 324 +#. Android resource: @strings/guinea msgid "Guinea" msgstr "Guinea" @@ -790,6 +830,7 @@ msgid "Equatorial Guinea" msgstr "Guinea Equatorial" #. 300 +#. Android resource: @strings/greece msgid "Greece" msgstr "Grècia" @@ -810,6 +851,7 @@ msgid "Guinea-Bissau" msgstr "Guinea Bissau" #. 328 +#. Android resource: @strings/guyana msgid "Guyana" msgstr "Guyana" @@ -826,26 +868,32 @@ msgid "Honduras" msgstr "Hondures" #. 191 +#. Android resource: @strings/croatia msgid "Croatia" msgstr "Croàcia" #. 332 +#. Android resource: @strings/haiti msgid "Haiti" msgstr "Haití" #. 348 +#. Android resource: @strings/hungary msgid "Hungary" msgstr "Hongria" #. 360 +#. Android resource: @strings/indonesia msgid "Indonesia" msgstr "Indonèsia" #. 372 +#. Android resource: @strings/ireland msgid "Ireland" msgstr "Irlanda" #. 376 +#. Android resource: @strings/israel msgid "Israel" msgstr "Israel" @@ -854,6 +902,7 @@ msgid "Isle of Man" msgstr "Illa de Man" #. 356 +#. Android resource: @strings/india msgid "India" msgstr "Índia" @@ -862,18 +911,22 @@ msgid "British Indian Ocean Territory" msgstr "Territori britànic de l'oceà Índic" #. 368 +#. Android resource: @strings/iraq msgid "Iraq" msgstr "Iraq" #. 364 +#. Android resource: @strings/iran msgid "Iran, Islamic Republic of" msgstr "Iran" #. 352 +#. Android resource: @strings/iceland msgid "Iceland" msgstr "Islàndia" #. 380 +#. Android resource: @strings/italy msgid "Italy" msgstr "Itàlia" @@ -882,6 +935,7 @@ msgid "Jersey" msgstr "Jersey" #. 388 +#. Android resource: @strings/jamaica msgid "Jamaica" msgstr "Jamàica" @@ -890,14 +944,17 @@ msgid "Jordan" msgstr "Jordània" #. 392 +#. Android resource: @strings/japan msgid "Japan" msgstr "Japó" #. 404 +#. Android resource: @strings/kenya msgid "Kenya" msgstr "Kenya" #. 417 +#. Android resource: @strings/kyrgyzsyan msgid "Kyrgyzstan" msgstr "Kirguizistan" @@ -934,6 +991,7 @@ msgid "Cayman Islands" msgstr "Illes Caiman" #. 398 +#. Android resource: @strings/kazakhstan msgid "Kazakhstan" msgstr "Kazakhstan" @@ -958,26 +1016,32 @@ msgid "Sri Lanka" msgstr "Sri Lanka" #. 430 +#. Android resource: @strings/liberia msgid "Liberia" msgstr "Libèria" #. 426 +#. Android resource: @strings/lesotho msgid "Lesotho" msgstr "Lesotho" #. 440 +#. Android resource: @strings/lithuania msgid "Lithuania" msgstr "Lituània" #. 442 +#. Android resource: @strings/luxembourg msgid "Luxembourg" msgstr "Luxemburg" #. 428 +#. Android resource: @strings/latvia msgid "Latvia" msgstr "Letònia" #. 434 +#. Android resource: @strings/libya msgid "Libya" msgstr "Líbia" @@ -1002,6 +1066,7 @@ msgid "Saint Martin (French part)" msgstr "Saint-Martin (zona francesa)" #. 450 +#. Android resource: @strings/madagascar msgid "Madagascar" msgstr "Madagascar" @@ -1022,6 +1087,7 @@ msgid "Myanmar" msgstr "Myanmar" #. 496 +#. Android resource: @strings/mongolia msgid "Mongolia" msgstr "Mongòlia" @@ -1062,10 +1128,12 @@ msgid "Malawi" msgstr "Malawi" #. 484 +#. Android resource: @strings/mexico msgid "Mexico" msgstr "Mèxic" #. 458 +#. Android resource: @strings/malaysia msgid "Malaysia" msgstr "Malàisia" @@ -1074,10 +1142,12 @@ msgid "Mozambique" msgstr "Moçambic" #. 516 +#. Android resource: @strings/namibia msgid "Namibia" msgstr "Namíbia" #. 540 +#. Android resource: @strings/new_caledonia msgid "New Caledonia" msgstr "Nova Caledònia" @@ -1098,6 +1168,7 @@ msgid "Nicaragua" msgstr "Nicaragua" #. 528 +#. Android resource: @strings/netherlands msgid "Netherlands" msgstr "Països Baixos" @@ -1106,6 +1177,7 @@ msgid "Norway" msgstr "Noruega" #. 524 +#. Android resource: @strings/nepal msgid "Nepal" msgstr "Nepal" @@ -1118,6 +1190,7 @@ msgid "Niue" msgstr "Niue" #. 554 +#. Android resource: @strings/newzealand msgid "New Zealand" msgstr "Nova Zelanda" @@ -1130,6 +1203,7 @@ msgid "Panama" msgstr "Panamà" #. 604 +#. Android resource: @strings/peru msgid "Peru" msgstr "Perú" @@ -1142,14 +1216,17 @@ msgid "Papua New Guinea" msgstr "Papua Nova Guinea" #. 608 +#. Android resource: @strings/philippines msgid "Philippines" msgstr "Filipines" #. 586 +#. Android resource: @strings/pakistan msgid "Pakistan" msgstr "Pakistan" #. 616 +#. Android resource: @strings/poland msgid "Poland" msgstr "Polònia" @@ -1170,6 +1247,7 @@ msgid "Palestinian Territory, Occupied" msgstr "Palestina (territori ocupat)" #. 620 +#. Android resource: @strings/portugal msgid "Portugal" msgstr "Portugal" @@ -1178,6 +1256,7 @@ msgid "Palau" msgstr "Palau" #. 600 +#. Android resource: @strings/paraguay msgid "Paraguay" msgstr "Paraguai" @@ -1186,10 +1265,12 @@ msgid "Qatar" msgstr "Qatar" #. 638 +#. Android resource: @strings/reunion msgid "Reunion" msgstr "Illa de la Reunió" #. 642 +#. Android resource: @strings/romania msgid "Romania" msgstr "Romania" @@ -1198,14 +1279,17 @@ msgid "Serbia" msgstr "Sèrbia" #. 643 +#. Android resource: @strings/russian_federation msgid "Russian Federation" msgstr "Rússia" #. 646 +#. Android resource: @strings/rwanda msgid "Rwanda" msgstr "Rwanda" #. 682 +#. Android resource: @strings/saudi_arabia msgid "Saudi Arabia" msgstr "Aràbia Saudita" @@ -1226,6 +1310,7 @@ msgid "Sweden" msgstr "Suècia" #. 702 +#. Android resource: @strings/singapore msgid "Singapore" msgstr "Singapur" @@ -1242,6 +1327,7 @@ msgid "Svalbard and Jan Mayen" msgstr "Svalbard i Jan Mayen" #. 703 +#. Android resource: @strings/slovakia msgid "Slovakia" msgstr "Eslovàquia" @@ -1262,6 +1348,7 @@ msgid "Somalia" msgstr "Somàlia" #. 740 +#. Android resource: @strings/suriname msgid "Suriname" msgstr "Surinam" @@ -1306,6 +1393,7 @@ msgid "Togo" msgstr "Togo" #. 764 +#. Android resource: @strings/thailand msgid "Thailand" msgstr "Tailàndia" @@ -1322,6 +1410,7 @@ msgid "Timor-Leste" msgstr "Timor Oriental" #. 795 +#. Android resource: @strings/turkmenistan msgid "Turkmenistan" msgstr "Turkmenistan" @@ -1334,6 +1423,7 @@ msgid "Tonga" msgstr "Tonga" #. 792 +#. Android resource: @strings/turkey msgid "Turkey" msgstr "Turquia" @@ -1350,14 +1440,17 @@ msgid "Taiwan, Province of China" msgstr "Taiwan" #. 834 +#. Android resource: @strings/tanzania msgid "Tanzania, United Republic of" msgstr "Tanzània" #. 804 +#. Android resource: @strings/ukraine msgid "Ukraine" msgstr "Ucraïna" #. 800 +#. Android resource: @strings/uganda msgid "Uganda" msgstr "Uganda" @@ -1370,6 +1463,7 @@ msgid "United States" msgstr "Estats Units d'Amèrica" #. 858 +#. Android resource: @strings/uruguay msgid "Uruguay" msgstr "Uruguai" @@ -1386,6 +1480,7 @@ msgid "Saint Vincent and the Grenadines" msgstr "Saint Vincent i les Grenadines" #. 862 +#. Android resource: @strings/venezuela msgid "Venezuela" msgstr "Veneçuela" @@ -1422,6 +1517,7 @@ msgid "Mayotte" msgstr "Mayotte" #. 710 +#. Android resource: @strings/south_africa msgid "South Africa" msgstr "Sud-àfrica" @@ -1449,23 +1545,23 @@ msgid "" msgstr "" #. We have not found an existing config file from all possibilities -msgid "No config file navit.xml, navit.xml.local found\n" -msgstr "No s'ha trobat l'arxiu de configuració navit.xml, navit.xml.local\n" +msgid "No config file navit.xml, navit.xml.local found" +msgstr "" #, c-format -msgid "Error parsing config file '%s': %s\n" +msgid "Error parsing config file '%s': %s" msgstr "" #, c-format -msgid "Using config file '%s'\n" -msgstr "Usant l'arxiu de configuració '%s'\n" +msgid "Using config file '%s'" +msgstr "" #, c-format -msgid "Error: No configuration found in config file '%s'\n" +msgid "Error: No configuration found in config file '%s'" msgstr "" msgid "" -"Internal initialization failed, exiting. Check previous error messages.\n" +"Internal initialization failed, exiting. Check previous error messages." msgstr "" msgid "unknown street" @@ -1606,6 +1702,9 @@ msgstr "" msgid "_Lock on Road" msgstr "" +msgid "_Follow Vehicle" +msgstr "" + msgid "_Keep orientation to the North" msgstr "" @@ -1675,7 +1774,12 @@ msgstr "" msgid "Shopping" msgstr "" -msgid "Select a search radius from screen center" +#. Input is in kilometers +msgid "Select a search radius from screen center in km" +msgstr "" + +#. Input is in miles. +msgid "Select a search radius from screen center in miles" msgstr "" #, c-format @@ -1683,15 +1787,15 @@ msgid "POI %s. %s" msgstr "" #, c-format -msgid "Set destination to %ld, %ld \n" +msgid "Set destination to %ld, %ld " msgstr "" #, c-format -msgid "Set map to %ld, %ld \n" +msgid "Set map to %ld, %ld " msgstr "" #, c-format -msgid "Set next visit to %ld, %ld \n" +msgid "Set next visit to %ld, %ld " msgstr "" msgid "POI search" @@ -1700,9 +1804,6 @@ msgstr "" msgid "Select a category" msgstr "Seleccioneu una categoria" -msgid "Select a distance to look for (km)" -msgstr "" - msgid "Select a POI" msgstr "" @@ -1715,7 +1816,7 @@ msgstr "" msgid "Direction" msgstr "" -msgid "Distance(m)" +msgid "Distance" msgstr "" msgid "Name" @@ -1762,8 +1863,8 @@ msgid "OT" msgstr "" #, c-format -msgid "Route %4.0fkm %02d:%02d ETA" -msgstr "Ruta %4.0fkm %02d:%02d TEA" +msgid "Route %4.1f%s %02d:%02d ETA" +msgstr "" msgid "Route 0000km 0+00:00 ETA" msgstr "Ruta 0000km 0+00:00 TEA" @@ -1985,6 +2086,9 @@ msgstr "Descripció de la ruta" msgid "Show Locale" msgstr "Mostra la localitat" +msgid "Network info" +msgstr "" + msgid "Former Destinations" msgstr "Destinacions anteriors" @@ -2023,737 +2127,880 @@ msgstr "" msgid "Please decrease your speed" msgstr "" -msgid "partial match" -msgstr "" +msgid "Vehicle Position" +msgstr "Posició del vehicle" -#. Android resource: @strings/address_search_button -msgid "Search" -msgstr "" +msgid "Main menu" +msgstr "Menú principal" -#. Android resource: @strings/address_search_towns -msgid "Towns" +msgid "" +"Show\n" +"Map" msgstr "" +"Mostra\n" +"Mapa" -msgid "Map data (c) OpenStreetMap contributors, ODBL" -msgstr "" +msgid "Settings" +msgstr "Configuració" + +msgid "Tools" +msgstr "Eines" + +msgid "Route" +msgstr "Ruta" + +msgid "About" +msgstr "Quant a..." + +msgid "Quit" +msgstr "Surt" + +msgid "Actions" +msgstr "Accions" msgid "" -"Current map location %s is not available\n" -"Please restart Navit after you attach an SD card or select a different map " -"location." +"Former\n" +"Destinations" msgstr "" -msgid "Downloaded maps" +msgid "Coordinates" msgstr "" msgid "" -"Sorry, we currently do not support maps above 3.8G on Android, please select " -"a smaller one." +"Stop\n" +"Navigation" msgstr "" +"Atura la\n" +"Navegació" -#. Android resource: @strings/position_popup_drive_here -msgid "Route to here" -msgstr "" +msgid "Display" +msgstr "Pantalla" -msgid "Cancel" -msgstr "" +msgid "Fullscreen" +msgstr "Pantalla completa" -msgid "filenamePath" -msgstr "" +msgid "Window Mode" +msgstr "Mode de la finestra" -msgid "" -"New location set to %s\n" -"Restart Navit to apply the changes." +msgid "Auto zoom" msgstr "" -msgid "Whole Planet" +msgid "Manual zoom" msgstr "" -msgid "Africa" +msgid "Layers" msgstr "" -msgid "Canary Islands" +msgid "Zoom to route" msgstr "" -msgid "Asia" -msgstr "" +msgid "Description" +msgstr "Descripció" -msgid "Korea" +msgid "" +"Drop last\n" +"Waypoint" msgstr "" -msgid "Taiwan" +msgid "" +"Drop next\n" +"Waypoint" msgstr "" -msgid "UAE+Other" +msgid "Satellite Status" msgstr "" -msgid "Oceania" +msgid "NMEA Data" msgstr "" -msgid "Tasmania" +msgid "car_shortest" msgstr "" -msgid "Victoria" +msgid "car_avoid_tolls" msgstr "" -msgid "New South Wales" +msgid "car_pedantic" msgstr "" -msgid "Europe" -msgstr "" +msgid "horse" +msgstr "cavall" -msgid "Western Europe" +msgid "Truck" msgstr "" -msgid "Azores" +#. Strings from android/res/values/strings.xml +#. Android resource: @strings/yes +msgid "Yes" msgstr "" -msgid "BeNeLux" +#. Android resource: @strings/cancel +msgid "Cancel" msgstr "" -msgid "Alsace" +#. Android resource: @strings/notification_ticker +msgid "Navit started" msgstr "" -msgid "Aquitaine" +#. Android resource: @strings/notification_event_default +msgid "Navit running" msgstr "" -msgid "Auvergne" +#. Android resource: @strings/initial_info_box_title +msgid "Welcome to Navit" msgstr "" -msgid "Basse-Normandie" +#. Android resource: @strings/initial_info_box_message +msgid "" +"Thank you for installing Navit!\n" +"\n" +"To start, select \"Download maps\" from the menu to download a map. Note: " +"The map filesize may be large (>50MB) - a wifi connection is recommended.\n" +"\n" +"Mapdata: (c) OpenStreetMap contributors\n" +"\n" +"Enjoy Navit!" msgstr "" -msgid "Bourgogne" +#. Android resource: @strings/initial_info_box_OK +msgid "OK" msgstr "" -msgid "Bretagne" +#. Android resource: @strings/initial_info_box_more_info +msgid "More info" msgstr "" -msgid "Centre" +#. Android resource: @strings/optionsmenu_zoom_in +msgid "Zoom in" msgstr "" -msgid "Champagne-Ardenne" +#. Android resource: @strings/optionsmenu_zoom_out +msgid "Zoom out" msgstr "" -msgid "Corse" +#. Android resource: @strings/optionsmenu_download_maps +msgid "Download maps" msgstr "" -msgid "Franche-Comte" +#. Android resource: @strings/optionsmenu_toggle_poi +msgid "Toggle POIs" msgstr "" -msgid "Haute-Normandie" +#. Android resource: @strings/optionsmenu_exit_navit +msgid "Exit Navit" msgstr "" -msgid "Ile-de-France" +#. Android resource: @strings/optionsmenu_backup_restore +msgid "Backup / Restore" msgstr "" -msgid "Languedoc-Roussillon" +#. Android resource: @strings/optionsmenu_set_map_location +msgid "Set map location" msgstr "" -msgid "Limousin" +#. Android resource: @strings/position_popup_drive_here +msgid "Route to here" msgstr "" -msgid "Lorraine" +#. Android resource: @strings/map_delete +msgid "Delete this map?" msgstr "" -msgid "Midi-Pyrenees" +#. Android resource: @strings/map_download_title +msgid "Map download" msgstr "" -msgid "Nord-pas-de-Calais" +#. Android resource: @strings/map_download_downloading +msgid "Downloading:" msgstr "" -msgid "Pays-de-la-Loire" +#. Android resource: @strings/map_download_eta +msgid "ETA" msgstr "" -msgid "Picardie" +#. Android resource: @strings/map_download_ready +msgid "ready" msgstr "" -msgid "Poitou-Charentes" +#. Android resource: @strings/map_download_download_error +msgid "Error downloading map." msgstr "" -msgid "Provence-Alpes-Cote-d-Azur" +#. Android resource: @strings/map_download_download_aborted +msgid "Map download aborted" msgstr "" -msgid "Rhone-Alpes" +#. Android resource: @strings/map_download_not_enough_free_space +msgid "Not enough free space" msgstr "" -msgid "Baden-Wuerttemberg" +#. Android resource: @strings/map_download_oversize +msgid "" +"Sorry, we currently do not support maps above 3.8G on Android, please select " +"a smaller one." msgstr "" -msgid "Bayern" +#. Android resource: @strings/map_no_fix +msgid "No location. Reopen after location fix." msgstr "" -msgid "Mittelfranken" +#. Android resource: @strings/maps_for_current_location +msgid "Maps containing current location" msgstr "" -msgid "Niederbayern" +#. Android resource: @strings/maps_installed +msgid "Installed maps" msgstr "" -msgid "Oberbayern" +#. Android resource: @strings/map_downloading +msgid "downloading" msgstr "" -msgid "Oberfranken" +#. Android resource: @strings/map_download_medium_unavailable +msgid "Media selected for map storage is not available" msgstr "" -msgid "Oberpfalz" +#. Android resource: @strings/map_download_error_writing_map +msgid "Error writing map!" msgstr "" -msgid "Schwaben" +#. Android resource: @strings/map_location_changed +#, c-format +msgid "New location set to %s Restart Navit to apply the changes." msgstr "" -msgid "Unterfranken" +#. Android resource: @strings/map_location_unavailable +#, c-format +msgid "" +"Current map location %s is not available Please restart Navit after you " +"attach an SD card or select a different map location." msgstr "" -msgid "Berlin" +#. Android resource: @strings/address_search_title +msgid "Address search" msgstr "" -msgid "Brandenburg" +#. Android resource: @strings/address_enter_destination +msgid "Enter destination" msgstr "" -msgid "Bremen" +#. Android resource: @strings/address_partial_match +msgid "Match partial address" msgstr "" -msgid "Hamburg" +#. Android resource: @strings/address_search_button +msgid "Search" msgstr "" -msgid "Hessen" +#. Android resource: @strings/address_search_searching +msgid "Searching..." msgstr "" -msgid "Mecklenburg-Vorpommern" +#. Android resource: @strings/address_search_not_found +msgid "Address not found" msgstr "" -msgid "Niedersachsen" +#. Android resource: @strings/address_search_getting_results +msgid "Getting search results" msgstr "" -msgid "Nordrhein-westfalen" +#. Android resource: @strings/address_search_loading_results +msgid "Loading search results" msgstr "" -msgid "Rheinland-Pfalz" +#. Android resource: @strings/address_search_no_results +msgid "No results found" msgstr "" -msgid "Saarland" +#. Android resource: @strings/address_search_no_text_entered +msgid "No text entered" msgstr "" -msgid "Sachsen-Anhalt" +#. Android resource: @strings/address_search_set_destination +msgid "Setting destination to:" msgstr "" -msgid "Sachsen" +#. Android resource: @strings/address_search_towns +msgid "Towns" msgstr "" -msgid "Schleswig-Holstein" +#. Android resource: @strings/choose_an_action +msgid "Choose an action" msgstr "" -msgid "Thueringen" +#. Android resource: @strings/please_insert_an_sd_card +msgid "Please insert an SD Card" msgstr "" -msgid "Mallorca" +#. Android resource: @strings/backing_up +msgid "Backing up..." msgstr "" -msgid "Galicia" +#. Android resource: @strings/restoring +msgid "Restoring..." msgstr "" -msgid "Scandinavia" +#. Android resource: @strings/failed_to_create_backup_directory +msgid "Failed to create backup directory" msgstr "" -msgid "England" +#. Android resource: @strings/backup_failed +msgid "Backup failed" msgstr "" -msgid "Buckinghamshire" +#. Android resource: @strings/no_backup_found +msgid "No backup found" msgstr "" -msgid "Cambridgeshire" +#. Android resource: @strings/failed_to_restore +msgid "Failed to restore" msgstr "" -msgid "Cumbria" +#. Android resource: @strings/backup_successful +msgid "Backup successful" msgstr "" -msgid "East yorkshire with hull" +#. Android resource: @strings/restore_successful_please_restart_navit +msgid "" +"Restore Successful\n" +"Please restart Navit" msgstr "" -msgid "Essex" +#. Android resource: @strings/backup_not_found +msgid "Backup not found" msgstr "" -msgid "Herefordshire" +#. Android resource: @strings/restore_failed +msgid "Restore failed" msgstr "" -msgid "Kent" +#. Android resource: @strings/select_backup +msgid "Select backup" msgstr "" -msgid "Lancashire" +#. Android resource: @strings/backup +msgid "Backup" msgstr "" -msgid "Leicestershire" +#. Android resource: @strings/restore +msgid "Restore" msgstr "" -msgid "Norfolk" +#. Android resource: @strings/TTS_title_data_missing +msgid "System text to speech engine data is missing" msgstr "" -msgid "Nottinghamshire" +#. Android resource: @strings/TTS_qery_install_data +msgid "" +"Navit can use any text to speech engine installed on your device. The " +"currently selected engine reports it is unable to speak in your language. " +"Should we ask the system to show voice download dialog?" msgstr "" -msgid "Oxfordshire" +#. Android resource: @strings/permissions_not_granted +msgid "" +"Navit needs permission to access GPS and read the map.\n" +"If you change your mind please restart Navit and grant the permissions" msgstr "" -msgid "Shropshire" +#. Android resource: @strings/permissions_info_box_title +msgid "One or more ungranted permissions" msgstr "" -msgid "Somerset" +#. Android resource: @strings/whole_planet +msgid "Whole Planet" msgstr "" -msgid "South yorkshire" +#. Android resource: @strings/africa +msgid "Africa" msgstr "" -msgid "Suffolk" +#. Android resource: @strings/canary_islands +msgid "Canary Islands" msgstr "" -msgid "Surrey" +#. Android resource: @strings/asia +msgid "Asia" msgstr "" -msgid "Wiltshire" +#. Android resource: @strings/taiwan +msgid "Taiwan" msgstr "" -msgid "Scotland" +#. Android resource: @strings/korea +msgid "Korea" msgstr "" -msgid "Wales" +#. Android resource: @strings/uae_other +msgid "UAE+Other" msgstr "" -msgid "Crete" +#. Android resource: @strings/oceania +msgid "Oceania" msgstr "" -msgid "North America" +#. Android resource: @strings/tasmania +msgid "Tasmania" msgstr "" -msgid "Alaska" +#. Android resource: @strings/victoria +msgid "Victoria" msgstr "" -msgid "Hawaii" +#. Android resource: @strings/new_south_wales +msgid "New South Wales" msgstr "" -msgid "USA" +#. Android resource: @strings/europe +msgid "Europe" msgstr "" -msgid " (except Alaska and Hawaii)" +#. Android resource: @strings/western_europe +msgid "Western Europe" msgstr "" -msgid "Midwest" +#. Android resource: @strings/azores +msgid "Azores" msgstr "" -msgid "Michigan" +#. Android resource: @strings/benelux +msgid "BeNeLux" msgstr "" -msgid "Ohio" +#. Android resource: @strings/alsace +msgid "Alsace" msgstr "" -msgid "Northeast" +#. Android resource: @strings/aquitaine +msgid "Aquitaine" msgstr "" -msgid "Massachusetts" +#. Android resource: @strings/auvergne +msgid "Auvergne" msgstr "" -msgid "Vermont" +#. Android resource: @strings/centre +msgid "Centre" msgstr "" -msgid "Pacific" +#. Android resource: @strings/bretagne +msgid "Bretagne" msgstr "" -msgid "South" +#. Android resource: @strings/bourgogne +msgid "Bourgogne" msgstr "" -msgid "Arkansas" +#. Android resource: @strings/basse_normandie +msgid "Basse-Normandie" msgstr "" -msgid "District of Columbia" +#. Android resource: @strings/champagne_ardenne +msgid "Champagne-Ardenne" msgstr "" -msgid "Florida" +#. Android resource: @strings/corse +msgid "Corse" msgstr "" -msgid "Louisiana" +#. Android resource: @strings/franche_comte +msgid "Franche-Comte" msgstr "" -msgid "Maryland" +#. Android resource: @strings/haute_normandie +msgid "Haute-Normandie" msgstr "" -msgid "Mississippi" +#. Android resource: @strings/ile_de_france +msgid "Ile-de-France" msgstr "" -msgid "Oklahoma" +#. Android resource: @strings/languedoc_roussillon +msgid "Languedoc-Roussillon" msgstr "" -msgid "Texas" +#. Android resource: @strings/limousin +msgid "Limousin" msgstr "" -msgid "Virginia" +#. Android resource: @strings/lorraine +msgid "Lorraine" msgstr "" -msgid "West Virginia" +#. Android resource: @strings/midi_pyrenees +msgid "Midi-Pyrenees" msgstr "" -msgid "West" +#. Android resource: @strings/nord_pas_de_calais +msgid "Nord-pas-de-Calais" msgstr "" -msgid "Arizona" +#. Android resource: @strings/pays_de_la_loire +msgid "Pays-de-la-Loire" msgstr "" -msgid "California" +#. Android resource: @strings/picardie +msgid "Picardie" msgstr "" -msgid "Colorado" +#. Android resource: @strings/poitou_charentes +msgid "Poitou-Charentes" msgstr "" -msgid "Idaho" +#. Android resource: @strings/provence_alpes_cote_d_azur +msgid "Provence-Alpes-Cote-d-Azur" msgstr "" -msgid "Montana" +#. Android resource: @strings/rhone_alpes +msgid "Rhone-Alpes" msgstr "" -msgid "New Mexico" +#. Android resource: @strings/baden_wuerttemberg +msgid "Baden-Wuerttemberg" msgstr "" -msgid "Nevada" +#. Android resource: @strings/bayern +msgid "Bayern" msgstr "" -msgid "Oregon" +#. Android resource: @strings/mittelfranken +msgid "Mittelfranken" msgstr "" -msgid "Utah" +#. Android resource: @strings/niederbayern +msgid "Niederbayern" msgstr "" -msgid "Washington State" +#. Android resource: @strings/oberbayern +msgid "Oberbayern" msgstr "" -msgid "South+Middle America" +#. Android resource: @strings/oberfranken +msgid "Oberfranken" msgstr "" -msgid "Guyane Francaise" +#. Android resource: @strings/oberpfalz +msgid "Oberpfalz" msgstr "" -msgid "downloading" +#. Android resource: @strings/schwaben +msgid "Schwaben" msgstr "" -#. Android resource: @strings/map_download_ready -msgid "ready" +#. Android resource: @strings/unterfranken +msgid "Unterfranken" msgstr "" -msgid "Media selected for map storage is not available" +#. Android resource: @strings/berlin +msgid "Berlin" msgstr "" -#. Android resource: @strings/map_download_not_enough_free_space -msgid "Not enough free space" +#. Android resource: @strings/brandenburg +msgid "Brandenburg" msgstr "" -msgid "Error downloading map!" +#. Android resource: @strings/bremen +msgid "Bremen" msgstr "" -msgid "Error writing map!" +#. Android resource: @strings/hamburg +msgid "Hamburg" msgstr "" -msgid "Map download aborted!" +#. Android resource: @strings/hessen +msgid "Hessen" msgstr "" -#. Android resource: @strings/map_download_eta -msgid "ETA" +#. Android resource: @strings/mecklenburg_vorpommern +msgid "Mecklenburg-Vorpommern" msgstr "" -#. Android resource: @strings/map_download_title -msgid "Map download" +#. Android resource: @strings/niedersachsen +msgid "Niedersachsen" msgstr "" -msgid "Vehicle Position" -msgstr "Posició del vehicle" - -msgid "Main menu" -msgstr "Menú principal" - -msgid "" -"Show\n" -"Map" +#. Android resource: @strings/nordrhein_westfalen +msgid "Nordrhein-westfalen" msgstr "" -"Mostra\n" -"Mapa" -msgid "Settings" -msgstr "Configuració" - -msgid "Tools" -msgstr "Eines" - -msgid "Route" -msgstr "Ruta" - -msgid "About" -msgstr "Quant a..." +#. Android resource: @strings/rheinland_pfalz +msgid "Rheinland-Pfalz" +msgstr "" -msgid "Quit" -msgstr "Surt" +#. Android resource: @strings/saarland +msgid "Saarland" +msgstr "" -msgid "Actions" -msgstr "Accions" +#. Android resource: @strings/sachsen_anhalt +msgid "Sachsen-Anhalt" +msgstr "" -msgid "" -"Former\n" -"Destinations" +#. Android resource: @strings/sachsen +msgid "Sachsen" msgstr "" -msgid "Coordinates" +#. Android resource: @strings/schleswig_holstein +msgid "Schleswig-Holstein" msgstr "" -msgid "" -"Stop\n" -"Navigation" +#. Android resource: @strings/thueringen +msgid "Thueringen" msgstr "" -"Atura la\n" -"Navegació" -msgid "Display" -msgstr "Pantalla" +#. Android resource: @strings/mallorca +msgid "Mallorca" +msgstr "" -msgid "Fullscreen" -msgstr "Pantalla completa" +#. Android resource: @strings/galicia +msgid "Galicia" +msgstr "" -msgid "Window Mode" -msgstr "Mode de la finestra" +#. Android resource: @strings/scandinavia +msgid "Scandinavia" +msgstr "" -msgid "Layers" +#. Android resource: @strings/england +msgid "England" msgstr "" -msgid "Description" -msgstr "Descripció" +#. Android resource: @strings/buckinghamshire +msgid "Buckinghamshire" +msgstr "" -msgid "" -"Drop last \n" -"Waypoint" +#. Android resource: @strings/cambridgeshire +msgid "Cambridgeshire" msgstr "" -msgid "" -"Drop next \n" -"Waypoint" +#. Android resource: @strings/cumbria +msgid "Cumbria" msgstr "" -msgid "Satellite Status" +#. Android resource: @strings/east_yorkshire_with_hull +msgid "East yorkshire with hull" msgstr "" -msgid "NMEA Data" +#. Android resource: @strings/essex +msgid "Essex" msgstr "" -msgid "car_shortest" +#. Android resource: @strings/herefordshire +msgid "Herefordshire" msgstr "" -msgid "car_avoid_tolls" +#. Android resource: @strings/kent +msgid "Kent" msgstr "" -msgid "car_pedantic" +#. Android resource: @strings/lancashire +msgid "Lancashire" msgstr "" -msgid "horse" -msgstr "cavall" +#. Android resource: @strings/leicestershire +msgid "Leicestershire" +msgstr "" -msgid "Truck" +#. Android resource: @strings/norfolk +msgid "Norfolk" msgstr "" -#. Strings from android/res/values/strings.xml -#. Android resource: @strings/yes -msgid "Yes" +#. Android resource: @strings/nottinghamshire +msgid "Nottinghamshire" msgstr "" -#. Android resource: @strings/notification_ticker -msgid "Navit started" +#. Android resource: @strings/oxfordshire +msgid "Oxfordshire" msgstr "" -#. Android resource: @strings/notification_event_default -msgid "Navit running" +#. Android resource: @strings/shropshire +msgid "Shropshire" msgstr "" -#. Android resource: @strings/initial_info_box_title -msgid "Welcome to Navit" +#. Android resource: @strings/somerset +msgid "Somerset" msgstr "" -#. Android resource: @strings/initial_info_box_message -msgid "" -"Thank you for installing Navit!\n" -"\n" -"To start, select \"Download maps\" from the menu to download a map. Note: " -"The map filesize may be large (>50MB) - a wifi connection is recommended.\n" -"\n" -"Mapdata: (c) OpenStreetMap contributors\n" -"\n" -"Enjoy Navit!" +#. Android resource: @strings/south_yorkshire +msgid "South yorkshire" msgstr "" -#. Android resource: @strings/initial_info_box_OK -msgid "OK" +#. Android resource: @strings/suffolk +msgid "Suffolk" msgstr "" -#. Android resource: @strings/initial_info_box_more_info -msgid "More info" +#. Android resource: @strings/surrey +msgid "Surrey" msgstr "" -#. Android resource: @strings/optionsmenu_zoom_in -msgid "Zoom in" +#. Android resource: @strings/wiltshire +msgid "Wiltshire" msgstr "" -#. Android resource: @strings/optionsmenu_zoom_out -msgid "Zoom out" +#. Android resource: @strings/scotland +msgid "Scotland" msgstr "" -#. Android resource: @strings/optionsmenu_download_maps -msgid "Download maps" +#. Android resource: @strings/wales +msgid "Wales" msgstr "" -#. Android resource: @strings/optionsmenu_toggle_poi -msgid "Toggle POIs" +#. Android resource: @strings/crete +msgid "Crete" msgstr "" -#. Android resource: @strings/optionsmenu_exit_navit -msgid "Exit Navit" +#. Android resource: @strings/north_america +msgid "North America" msgstr "" -#. Android resource: @strings/optionsmenu_backup_restore -msgid "Backup / Restore" +#. Android resource: @strings/alaska +msgid "Alaska" msgstr "" -#. Android resource: @strings/optionsmenu_set_map_location -msgid "Set map location" +#. Android resource: @strings/hawaii +msgid "Hawaii" msgstr "" -#. Android resource: @strings/map_delete -msgid "Delete this map?" +#. Android resource: @strings/usa +msgid "USA" msgstr "" -#. Android resource: @strings/map_download_downloading -msgid "Downloading:" +#. Android resource: @strings/except_alaska_and_hawaii +msgid "(except Alaska and Hawaii)" msgstr "" -#. Android resource: @strings/map_download_download_error -msgid "Error downloading map." +#. Android resource: @strings/midwest +msgid "Midwest" msgstr "" -#. Android resource: @strings/map_download_download_aborted -msgid "Map download aborted" +#. Android resource: @strings/michigan +msgid "Michigan" msgstr "" -#. Android resource: @strings/map_no_fix -msgid "No location. Reopen after location fix." +#. Android resource: @strings/ohio +msgid "Ohio" msgstr "" -#. Android resource: @strings/maps_for_current_location -msgid "Maps containing current location" +#. Android resource: @strings/northeast +msgid "Northeast" msgstr "" -#. Android resource: @strings/address_search_title -msgid "Address search" +#. Android resource: @strings/massachusetts +msgid "Massachusetts" msgstr "" -#. Android resource: @strings/address_enter_destination -msgid "Enter destination" +#. Android resource: @strings/vermont +msgid "Vermont" msgstr "" -#. Android resource: @strings/address_partial_match -msgid "Match partial address" +#. Android resource: @strings/pacific +msgid "Pacific" msgstr "" -#. Android resource: @strings/address_search_searching -msgid "Searching..." +#. Android resource: @strings/south +msgid "South" msgstr "" -#. Android resource: @strings/address_search_not_found -msgid "Address not found" +#. Android resource: @strings/arkansas +msgid "Arkansas" msgstr "" -#. Android resource: @strings/address_search_getting_results -msgid "Getting search results" +#. Android resource: @strings/district_of_columbia +msgid "District of Columbia" msgstr "" -#. Android resource: @strings/address_search_loading_results -msgid "Loading search results" +#. Android resource: @strings/florida +msgid "Florida" msgstr "" -#. Android resource: @strings/address_search_no_results -msgid "No results found" +#. Android resource: @strings/louisiana +msgid "Louisiana" msgstr "" -#. Android resource: @strings/address_search_no_text_entered -msgid "No text entered" +#. Android resource: @strings/maryland +msgid "Maryland" msgstr "" -#. Android resource: @strings/address_search_set_destination -msgid "Setting destination to:" +#. Android resource: @strings/mississippi +msgid "Mississippi" msgstr "" -#. Android resource: @strings/choose_an_action -msgid "Choose an action" +#. Android resource: @strings/oklahoma +msgid "Oklahoma" msgstr "" -#. Android resource: @strings/please_insert_an_sd_card -msgid "Please insert an SD Card" +#. Android resource: @strings/texas +msgid "Texas" msgstr "" -#. Android resource: @strings/backing_up -msgid "Backing up..." +#. Android resource: @strings/virginia +msgid "Virginia" msgstr "" -#. Android resource: @strings/restoring -msgid "Restoring..." +#. Android resource: @strings/west_virginia +msgid "West Virginia" msgstr "" -#. Android resource: @strings/failed_to_create_backup_directory -msgid "Failed to create backup directory" +#. Android resource: @strings/west +msgid "West" msgstr "" -#. Android resource: @strings/backup_failed -msgid "Backup failed" +#. Android resource: @strings/arizona +msgid "Arizona" msgstr "" -#. Android resource: @strings/no_backup_found -msgid "No backup found" +#. Android resource: @strings/california +msgid "California" msgstr "" -#. Android resource: @strings/failed_to_restore -msgid "Failed to restore" +#. Android resource: @strings/colorado +msgid "Colorado" msgstr "" -#. Android resource: @strings/backup_successful -msgid "Backup successful" +#. Android resource: @strings/idaho +msgid "Idaho" msgstr "" -#. Android resource: @strings/restore_successful_please_restart_navit -msgid "" -"Restore Successful\n" -"Please restart Navit" +#. Android resource: @strings/montana +msgid "Montana" msgstr "" -#. Android resource: @strings/backup_not_found -msgid "Backup not found" +#. Android resource: @strings/new_mexico +msgid "New Mexico" msgstr "" -#. Android resource: @strings/restore_failed -msgid "Restore failed" +#. Android resource: @strings/nevada +msgid "Nevada" msgstr "" -#. Android resource: @strings/select_backup -msgid "Select backup" +#. Android resource: @strings/oregon +msgid "Oregon" msgstr "" -#. Android resource: @strings/backup -msgid "Backup" +#. Android resource: @strings/utah +msgid "Utah" msgstr "" -#. Android resource: @strings/restore -msgid "Restore" +#. Android resource: @strings/washington_state +msgid "Washington State" msgstr "" -#. Android resource: @strings/TTS_title_data_missing -msgid "System text to speech engine data is missing" +#. Android resource: @strings/south_middle_america +msgid "South+Middle America" msgstr "" -#. Android resource: @strings/TTS_qery_install_data -msgid "" -"Navit can use any text to speech engine installed on your device. The " -"currently selected engine reports it is unable to speak in your language. " -"Should we ask the system to show voice download dialog?" +#. Android resource: @strings/guyane_francaise +msgid "Guyane Francaise" msgstr "" #, c-format +#~ msgid "Route %4.0fkm %02d:%02d ETA" +#~ msgstr "Ruta %4.0fkm %02d:%02d TEA" + +#, c-format +#~ msgid "Using config file '%s'\n" +#~ msgstr "Usant l'arxiu de configuració '%s'\n" + +#~ msgid "No config file navit.xml, navit.xml.local found\n" +#~ msgstr "No s'ha trobat l'arxiu de configuració navit.xml, navit.xml.local\n" + +#, c-format #~ msgid "then leave the roundabout at the %1$s %2$s" #~ msgstr "aleshores deixeu la rotonda a la %1$s %2$s" diff --git a/po/cs.po.in b/po/cs.po.in index 4b6a3ae95..4bfa00bc1 100644 --- a/po/cs.po.in +++ b/po/cs.po.in @@ -8,7 +8,6 @@ # Ivan Kološ https://launchpad.net/~ivan-kolos # Jakuje https://launchpad.net/~jakuje # Jiří Holubčík https://launchpad.net/~jery -# KaZeR https://launchpad.net/~kazer # MMlosh https://launchpad.net/~mmlosh # Marc0 https://launchpad.net/~z-ubuntuone-y # Mike Crash https://launchpad.net/~mike-mikecrash @@ -171,7 +170,6 @@ msgstr "%1$sna %2$s" msgid "%1$sonto %2$s|neuter form" msgstr "%1$sna %2$s" -#. TRANSLATORS: motorway ramp refers to the slip road for entering a motorway. msgid "onto the motorway ramp" msgstr "na přivadeč" @@ -384,7 +382,6 @@ msgstr "pak budete v cíli." msgid "You have reached your destination %s" msgstr "%s dorazíte do cíle" -#. TRANSLATORS: Exit as a noun, as in "Exit 43 Greenmound-East" msgid "Interchange" msgstr "Sjezd" @@ -1796,8 +1793,13 @@ msgstr "Taxi" msgid "Shopping" msgstr "Nakupování" -msgid "Select a search radius from screen center" -msgstr "Vzdálenost od středu mapy" +#. Input is in kilometers +msgid "Select a search radius from screen center in km" +msgstr "" + +#. Input is in miles. +msgid "Select a search radius from screen center in miles" +msgstr "" #, c-format msgid "POI %s. %s" @@ -1821,9 +1823,6 @@ msgstr "Vyhledávání POI" msgid "Select a category" msgstr "Vyberte kategorii" -msgid "Select a distance to look for (km)" -msgstr "Vyberte vzdálenost ve které hledat (km)" - msgid "Select a POI" msgstr "Vyberte POI" @@ -1836,8 +1835,8 @@ msgstr "Kategorie" msgid "Direction" msgstr "Směr" -msgid "Distance(m)" -msgstr "Vzdálenost (m)" +msgid "Distance" +msgstr "" msgid "Name" msgstr "Název" @@ -2220,18 +2219,14 @@ msgid "Description" msgstr "Popis" msgid "" -"Drop last \n" +"Drop last\n" "Waypoint" msgstr "" -"Zrušit minulý \n" -"bod trasy" msgid "" -"Drop next \n" +"Drop next\n" "Waypoint" msgstr "" -"Zrušit příští \n" -" bod trasy" msgid "Satellite Status" msgstr "Stav satelitu" @@ -3068,6 +3063,20 @@ msgstr "Francouzská Guyana" #~ msgid "Map download aborted!" #~ msgstr "Stahování mapy přerušeno!" +#~ msgid "" +#~ "Drop last \n" +#~ "Waypoint" +#~ msgstr "" +#~ "Zrušit minulý \n" +#~ "bod trasy" + +#~ msgid "" +#~ "Drop next \n" +#~ "Waypoint" +#~ msgstr "" +#~ "Zrušit příští \n" +#~ " bod trasy" + #, c-format #~ msgid "Error: No configuration found in config file '%s'\n" #~ msgstr "Chyba: Nenalezena žádná konfigurace v konfiguračním souboru '%s'\n" @@ -3087,6 +3096,12 @@ msgstr "Francouzská Guyana" #~ msgid "Set next visit to %ld, %ld \n" #~ msgstr "Nastav další zastavení na %ld, %ld \n" +#~ msgid "Select a distance to look for (km)" +#~ msgstr "Vyberte vzdálenost ve které hledat (km)" + +#~ msgid "Distance(m)" +#~ msgstr "Vzdálenost (m)" + #, c-format #~ msgid "then leave the roundabout at the %1$s %2$s" #~ msgstr "pak sjeďte na %1$s %2$s" diff --git a/po/en_GB.po.in b/po/en_GB.po.in index 7cb179f3b..e8cc6e9bf 100644 --- a/po/en_GB.po.in +++ b/po/en_GB.po.in @@ -1,5 +1,5 @@ # English (United Kingdom) translations for navit -# Copyright (C) 2006-2016 The Navit Team +# Copyright (C) 2006-2018 The Navit Team # This file is distributed under the same license as the navit package. # Many thanks to the contributors of this translation: # Andi Chandler https://launchpad.net/~bing @@ -14,9 +14,9 @@ msgid "" msgstr "" -"Project-Id-Version: navit 0.5.0\n" +"Project-Id-Version: navit 0.5.1\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2016-02-17 14:43+0000\n" +"PO-Revision-Date: 2018-06-19 22:44+0000\n" "Last-Translator: Andi Chandler <Unknown>\n" "Language-Team: English (United Kingdom) <en_GB@li.org>\n" "MIME-Version: 1.0\n" @@ -158,7 +158,6 @@ msgstr "%1$sonto %2$s" msgid "%1$sonto %2$s|neuter form" msgstr "%1$sonto %2$s" -#. TRANSLATORS: motorway ramp refers to the slip road for entering a motorway. msgid "onto the motorway ramp" msgstr "onto the slip road" @@ -371,7 +370,6 @@ msgstr "then you have reached your destination" msgid "You have reached your destination %s" msgstr "You have reached your destination %s" -#. TRANSLATORS: Exit as a noun, as in "Exit 43 Greenmound-East" msgid "Interchange" msgstr "Interchange" @@ -388,9 +386,15 @@ msgstr "Command" msgid "Length" msgstr "Length" +msgid "mi" +msgstr "mi" + msgid "km" msgstr "km" +msgid "feet" +msgstr "feet" + msgid "m" msgstr "m" @@ -451,6 +455,7 @@ msgid "Anguilla" msgstr "Anguilla" #. 008 +#. Android resource: @strings/albania msgid "Albania" msgstr "Albania" @@ -463,6 +468,7 @@ msgid "Netherlands Antilles" msgstr "Netherlands Antilles" #. 024 +#. Android resource: @strings/angola msgid "Angola" msgstr "Angola" @@ -471,6 +477,7 @@ msgid "Antarctica" msgstr "Antarctica" #. 032 +#. Android resource: @strings/argentina msgid "Argentina" msgstr "Argentina" @@ -479,10 +486,12 @@ msgid "American Samoa" msgstr "American Samoa" #. 040 +#. Android resource: @strings/austria msgid "Austria" msgstr "Austria" #. 036 +#. Android resource: @strings/australia msgid "Australia" msgstr "Australia" @@ -495,10 +504,12 @@ msgid "Aland Islands" msgstr "Aland Islands" #. 031 +#. Android resource: @strings/azerbaijan msgid "Azerbaijan" msgstr "Azerbaijan" #. 070 +#. Android resource: @strings/bosnia_and_herzegovina msgid "Bosnia and Herzegovina" msgstr "Bosnia and Herzegovina" @@ -511,6 +522,7 @@ msgid "Bangladesh" msgstr "Bangladesh" #. 056 +#. Android resource: @strings/belgium msgid "Belgium" msgstr "Belgium" @@ -519,6 +531,7 @@ msgid "Burkina Faso" msgstr "Burkina Faso" #. 100 +#. Android resource: @strings/bulgaria msgid "Bulgaria" msgstr "Bulgaria" @@ -527,6 +540,7 @@ msgid "Bahrain" msgstr "Bahrain" #. 108 +#. Android resource: @strings/burundi msgid "Burundi" msgstr "Burundi" @@ -547,6 +561,7 @@ msgid "Brunei Darussalam" msgstr "Brunei Darussalam" #. 068 +#. Android resource: @strings/bolivia msgid "Bolivia" msgstr "Bolivia" @@ -555,6 +570,7 @@ msgid "Bonaire, Sint Eustatius and Saba" msgstr "Bonaire, Sint Eustatius and Saba" #. 076 +#. Android resource: @strings/brazil msgid "Brazil" msgstr "Brazil" @@ -571,10 +587,12 @@ msgid "Bouvet Island" msgstr "Bouvet Island" #. 072 +#. Android resource: @strings/botswana msgid "Botswana" msgstr "Botswana" #. 112 +#. Android resource: @strings/belarus msgid "Belarus" msgstr "Belarus" @@ -583,6 +601,7 @@ msgid "Belize" msgstr "Belize" #. 124 +#. Android resource: @strings/canada msgid "Canada" msgstr "Canada" @@ -591,6 +610,7 @@ msgid "Cocos (Keeling) Islands" msgstr "Cocos (Keeling) Islands" #. 180 +#. Android resource: @strings/congo msgid "Congo, Democratic Republic of the" msgstr "Congo, Democratic Republic of the" @@ -603,10 +623,12 @@ msgid "Congo" msgstr "Congo" #. 756 +#. Android resource: @strings/switzerland msgid "Switzerland" msgstr "Switzerland" #. 384 +#. Android resource: @strings/cotedivoire msgid "Cote d'Ivoire" msgstr "Cote d'Ivoire" @@ -615,6 +637,7 @@ msgid "Cook Islands" msgstr "Cook Islands" #. 152 +#. Android resource: @strings/chile msgid "Chile" msgstr "Chile" @@ -623,10 +646,12 @@ msgid "Cameroon" msgstr "Cameroon" #. 156 +#. Android resource: @strings/china msgid "China" msgstr "China" #. 170 +#. Android resource: @strings/colombia msgid "Colombia" msgstr "Colombia" @@ -635,6 +660,7 @@ msgid "Costa Rica" msgstr "Costa Rica" #. 192 +#. Android resource: @strings/cuba msgid "Cuba" msgstr "Cuba" @@ -651,14 +677,17 @@ msgid "Christmas Island" msgstr "Christmas Island" #. 196 +#. Android resource: @strings/cyprus msgid "Cyprus" msgstr "Cyprus" #. 203 +#. Android resource: @strings/czech_republic msgid "Czech Republic" msgstr "Czech Republic" #. 276 +#. Android resource: @strings/germany msgid "Germany" msgstr "Germany" @@ -667,6 +696,7 @@ msgid "Djibouti" msgstr "Djibouti" #. 208 +#. Android resource: @strings/denmark msgid "Denmark" msgstr "Denmark" @@ -675,6 +705,7 @@ msgid "Dominica" msgstr "Dominica" #. 214 +#. Android resource: @strings/dominican_republic msgid "Dominican Republic" msgstr "Dominican Republic" @@ -683,10 +714,12 @@ msgid "Algeria" msgstr "Algeria" #. 218 +#. Android resource: @strings/ecuador msgid "Ecuador" msgstr "Ecuador" #. 233 +#. Android resource: @strings/estonia msgid "Estonia" msgstr "Estonia" @@ -703,14 +736,17 @@ msgid "Eritrea" msgstr "Eritrea" #. 724 +#. Android resource: @strings/spain msgid "Spain" msgstr "Spain" #. 231 +#. Android resource: @strings/ethiopia msgid "Ethiopia" msgstr "Ethiopia" #. 246 +#. Android resource: @strings/finland msgid "Finland" msgstr "Finland" @@ -727,10 +763,12 @@ msgid "Micronesia, Federated States of" msgstr "Micronesia, Federated States of" #. 234 +#. Android resource: @strings/faroe_islands msgid "Faroe Islands" msgstr "Faroe Islands" #. 250 +#. Android resource: @strings/france msgid "France" msgstr "France" @@ -739,6 +777,7 @@ msgid "Gabon" msgstr "Gabon" #. 826 +#. Android resource: @strings/united_kingdom msgid "United Kingdom" msgstr "United Kingdom" @@ -775,6 +814,7 @@ msgid "Gambia" msgstr "Gambia" #. 324 +#. Android resource: @strings/guinea msgid "Guinea" msgstr "Guinea" @@ -787,6 +827,7 @@ msgid "Equatorial Guinea" msgstr "Equatorial Guinea" #. 300 +#. Android resource: @strings/greece msgid "Greece" msgstr "Greece" @@ -807,6 +848,7 @@ msgid "Guinea-Bissau" msgstr "Guinea-Bissau" #. 328 +#. Android resource: @strings/guyana msgid "Guyana" msgstr "Guyana" @@ -823,26 +865,32 @@ msgid "Honduras" msgstr "Honduras" #. 191 +#. Android resource: @strings/croatia msgid "Croatia" msgstr "Croatia" #. 332 +#. Android resource: @strings/haiti msgid "Haiti" msgstr "Haiti" #. 348 +#. Android resource: @strings/hungary msgid "Hungary" msgstr "Hungary" #. 360 +#. Android resource: @strings/indonesia msgid "Indonesia" msgstr "Indonesia" #. 372 +#. Android resource: @strings/ireland msgid "Ireland" msgstr "Ireland" #. 376 +#. Android resource: @strings/israel msgid "Israel" msgstr "Israel" @@ -851,6 +899,7 @@ msgid "Isle of Man" msgstr "Isle of Man" #. 356 +#. Android resource: @strings/india msgid "India" msgstr "India" @@ -859,18 +908,22 @@ msgid "British Indian Ocean Territory" msgstr "British Indian Ocean Territory" #. 368 +#. Android resource: @strings/iraq msgid "Iraq" msgstr "Iraq" #. 364 +#. Android resource: @strings/iran msgid "Iran, Islamic Republic of" msgstr "Iran, Islamic Republic of" #. 352 +#. Android resource: @strings/iceland msgid "Iceland" msgstr "Iceland" #. 380 +#. Android resource: @strings/italy msgid "Italy" msgstr "Italy" @@ -879,6 +932,7 @@ msgid "Jersey" msgstr "Jersey" #. 388 +#. Android resource: @strings/jamaica msgid "Jamaica" msgstr "Jamaica" @@ -887,14 +941,17 @@ msgid "Jordan" msgstr "Jordan" #. 392 +#. Android resource: @strings/japan msgid "Japan" msgstr "Japan" #. 404 +#. Android resource: @strings/kenya msgid "Kenya" msgstr "Kenya" #. 417 +#. Android resource: @strings/kyrgyzsyan msgid "Kyrgyzstan" msgstr "Kyrgyzstan" @@ -931,6 +988,7 @@ msgid "Cayman Islands" msgstr "Cayman Islands" #. 398 +#. Android resource: @strings/kazakhstan msgid "Kazakhstan" msgstr "Kazakhstan" @@ -955,26 +1013,32 @@ msgid "Sri Lanka" msgstr "Sri Lanka" #. 430 +#. Android resource: @strings/liberia msgid "Liberia" msgstr "Liberia" #. 426 +#. Android resource: @strings/lesotho msgid "Lesotho" msgstr "Lesotho" #. 440 +#. Android resource: @strings/lithuania msgid "Lithuania" msgstr "Lithuania" #. 442 +#. Android resource: @strings/luxembourg msgid "Luxembourg" msgstr "Luxembourg" #. 428 +#. Android resource: @strings/latvia msgid "Latvia" msgstr "Latvia" #. 434 +#. Android resource: @strings/libya msgid "Libya" msgstr "Libya" @@ -999,6 +1063,7 @@ msgid "Saint Martin (French part)" msgstr "Saint Martin (French part)" #. 450 +#. Android resource: @strings/madagascar msgid "Madagascar" msgstr "Madagascar" @@ -1019,6 +1084,7 @@ msgid "Myanmar" msgstr "Myanmar" #. 496 +#. Android resource: @strings/mongolia msgid "Mongolia" msgstr "Mongolia" @@ -1059,10 +1125,12 @@ msgid "Malawi" msgstr "Malawi" #. 484 +#. Android resource: @strings/mexico msgid "Mexico" msgstr "Mexico" #. 458 +#. Android resource: @strings/malaysia msgid "Malaysia" msgstr "Malaysia" @@ -1071,10 +1139,12 @@ msgid "Mozambique" msgstr "Mozambique" #. 516 +#. Android resource: @strings/namibia msgid "Namibia" msgstr "Namibia" #. 540 +#. Android resource: @strings/new_caledonia msgid "New Caledonia" msgstr "New Caledonia" @@ -1095,6 +1165,7 @@ msgid "Nicaragua" msgstr "Nicaragua" #. 528 +#. Android resource: @strings/netherlands msgid "Netherlands" msgstr "Netherlands" @@ -1103,6 +1174,7 @@ msgid "Norway" msgstr "Norway" #. 524 +#. Android resource: @strings/nepal msgid "Nepal" msgstr "Nepal" @@ -1115,6 +1187,7 @@ msgid "Niue" msgstr "Niue" #. 554 +#. Android resource: @strings/newzealand msgid "New Zealand" msgstr "New Zealand" @@ -1127,6 +1200,7 @@ msgid "Panama" msgstr "Panama" #. 604 +#. Android resource: @strings/peru msgid "Peru" msgstr "Peru" @@ -1139,14 +1213,17 @@ msgid "Papua New Guinea" msgstr "Papua New Guinea" #. 608 +#. Android resource: @strings/philippines msgid "Philippines" msgstr "Philippines" #. 586 +#. Android resource: @strings/pakistan msgid "Pakistan" msgstr "Pakistan" #. 616 +#. Android resource: @strings/poland msgid "Poland" msgstr "Poland" @@ -1167,6 +1244,7 @@ msgid "Palestinian Territory, Occupied" msgstr "Palestinian Territory, Occupied" #. 620 +#. Android resource: @strings/portugal msgid "Portugal" msgstr "Portugal" @@ -1175,6 +1253,7 @@ msgid "Palau" msgstr "Palau" #. 600 +#. Android resource: @strings/paraguay msgid "Paraguay" msgstr "Paraguay" @@ -1183,10 +1262,12 @@ msgid "Qatar" msgstr "Qatar" #. 638 +#. Android resource: @strings/reunion msgid "Reunion" msgstr "Reunion" #. 642 +#. Android resource: @strings/romania msgid "Romania" msgstr "Romania" @@ -1195,14 +1276,17 @@ msgid "Serbia" msgstr "Serbia" #. 643 +#. Android resource: @strings/russian_federation msgid "Russian Federation" msgstr "Russian Federation" #. 646 +#. Android resource: @strings/rwanda msgid "Rwanda" msgstr "Rwanda" #. 682 +#. Android resource: @strings/saudi_arabia msgid "Saudi Arabia" msgstr "Saudi Arabia" @@ -1223,6 +1307,7 @@ msgid "Sweden" msgstr "Sweden" #. 702 +#. Android resource: @strings/singapore msgid "Singapore" msgstr "Singapore" @@ -1239,6 +1324,7 @@ msgid "Svalbard and Jan Mayen" msgstr "Svalbard and Jan Mayen" #. 703 +#. Android resource: @strings/slovakia msgid "Slovakia" msgstr "Slovakia" @@ -1259,6 +1345,7 @@ msgid "Somalia" msgstr "Somalia" #. 740 +#. Android resource: @strings/suriname msgid "Suriname" msgstr "Suriname" @@ -1303,6 +1390,7 @@ msgid "Togo" msgstr "Togo" #. 764 +#. Android resource: @strings/thailand msgid "Thailand" msgstr "Thailand" @@ -1319,6 +1407,7 @@ msgid "Timor-Leste" msgstr "Timor-Leste" #. 795 +#. Android resource: @strings/turkmenistan msgid "Turkmenistan" msgstr "Turkmenistan" @@ -1331,6 +1420,7 @@ msgid "Tonga" msgstr "Tonga" #. 792 +#. Android resource: @strings/turkey msgid "Turkey" msgstr "Turkey" @@ -1347,14 +1437,17 @@ msgid "Taiwan, Province of China" msgstr "Taiwan, Province of China" #. 834 +#. Android resource: @strings/tanzania msgid "Tanzania, United Republic of" msgstr "Tanzania, United Republic of" #. 804 +#. Android resource: @strings/ukraine msgid "Ukraine" msgstr "Ukraine" #. 800 +#. Android resource: @strings/uganda msgid "Uganda" msgstr "Uganda" @@ -1367,6 +1460,7 @@ msgid "United States" msgstr "United States" #. 858 +#. Android resource: @strings/uruguay msgid "Uruguay" msgstr "Uruguay" @@ -1383,6 +1477,7 @@ msgid "Saint Vincent and the Grenadines" msgstr "Saint Vincent and the Grenadines" #. 862 +#. Android resource: @strings/venezuela msgid "Venezuela" msgstr "Venezuela" @@ -1419,6 +1514,7 @@ msgid "Mayotte" msgstr "Mayotte" #. 710 +#. Android resource: @strings/south_africa msgid "South Africa" msgstr "South Africa" @@ -1455,25 +1551,25 @@ msgstr "" "\t-v: print the version and exit.\n" #. We have not found an existing config file from all possibilities -msgid "No config file navit.xml, navit.xml.local found\n" -msgstr "No config file navit.xml, navit.xml.local found\n" +msgid "No config file navit.xml, navit.xml.local found" +msgstr "No config file navit.xml, navit.xml.local found" #, c-format -msgid "Error parsing config file '%s': %s\n" -msgstr "Error parsing config file '%s': %s\n" +msgid "Error parsing config file '%s': %s" +msgstr "Error parsing config file '%s': %s" #, c-format -msgid "Using config file '%s'\n" -msgstr "Using config file '%s'\n" +msgid "Using config file '%s'" +msgstr "Using config file '%s'" #, c-format -msgid "Error: No configuration found in config file '%s'\n" -msgstr "Error: No configuration found in config file '%s'\n" +msgid "Error: No configuration found in config file '%s'" +msgstr "Error: No configuration found in config file '%s'" msgid "" -"Internal initialization failed, exiting. Check previous error messages.\n" +"Internal initialization failed, exiting. Check previous error messages." msgstr "" -"Internal initialisation failed, exiting. Check previous error messages.\n" +"Internal initialisation failed, exiting. Check previous error messages." msgid "unknown street" msgstr "unknown street" @@ -1613,6 +1709,9 @@ msgstr "Show position _cursor" msgid "_Lock on Road" msgstr "Lock on road" +msgid "_Follow Vehicle" +msgstr "_Follow Vehicle" + msgid "_Keep orientation to the North" msgstr "_Keep orientation to the North" @@ -1682,7 +1781,12 @@ msgstr "Taxi" msgid "Shopping" msgstr "Shopping" -msgid "Select a search radius from screen center" +#. Input is in kilometers +msgid "Select a search radius from screen center in km" +msgstr "" + +#. Input is in miles. +msgid "Select a search radius from screen center in miles" msgstr "" #, c-format @@ -1690,16 +1794,16 @@ msgid "POI %s. %s" msgstr "POI %s. %s" #, c-format -msgid "Set destination to %ld, %ld \n" -msgstr "Set destination to %ld, %ld \n" +msgid "Set destination to %ld, %ld " +msgstr "Set destination to %ld, %ld " #, c-format -msgid "Set map to %ld, %ld \n" -msgstr "Set map to %ld, %ld \n" +msgid "Set map to %ld, %ld " +msgstr "Set map to %ld, %ld " #, c-format -msgid "Set next visit to %ld, %ld \n" -msgstr "Set next visit to %ld, %ld \n" +msgid "Set next visit to %ld, %ld " +msgstr "Set next visit to %ld, %ld " msgid "POI search" msgstr "POI search" @@ -1707,9 +1811,6 @@ msgstr "POI search" msgid "Select a category" msgstr "Select a category" -msgid "Select a distance to look for (km)" -msgstr "Select a search radius from screen center" - msgid "Select a POI" msgstr "Select a POI" @@ -1722,9 +1823,8 @@ msgstr "Category" msgid "Direction" msgstr "Direction" -# TRANSLATORS: This is the distance to a Point of Interest (POI) in the POI window. It will be feet (imperial) or, meters (metric), depending on the user's preference. -msgid "Distance(m)" -msgstr "Distance" +msgid "Distance" +msgstr "" msgid "Name" msgstr "Name" @@ -1770,8 +1870,8 @@ msgid "OT" msgstr "QT" #, c-format -msgid "Route %4.0fkm %02d:%02d ETA" -msgstr "Route %4.0fkm %02d:%02d ETA" +msgid "Route %4.1f%s %02d:%02d ETA" +msgstr "Route %4.1f%s %02d:%02d ETA" msgid "Route 0000km 0+00:00 ETA" msgstr "Route 0000km 0+00:00 ETA" @@ -1982,10 +2082,10 @@ msgid "Height Profile" msgstr "Height Profile" msgid "please install a map *.heightlines.bin to provide elevationdata" -msgstr "" +msgstr "please install a map *.heightlines.bin to provide elevationdata" msgid "The route must cross at least 2 heightlines" -msgstr "" +msgstr "The route must cross at least 2 heightlines" msgid "Route Description" msgstr "Route Description" @@ -1993,6 +2093,9 @@ msgstr "Route Description" msgid "Show Locale" msgstr "Show Locale" +msgid "Network info" +msgstr "Network info" + msgid "Former Destinations" msgstr "Former Destinations" @@ -2031,32 +2134,223 @@ msgstr "Look out! Camera!" msgid "Please decrease your speed" msgstr "Please decrease your speed" -msgid "partial match" -msgstr "partial match" +msgid "Vehicle Position" +msgstr "Vehicle Position" -#. Android resource: @strings/address_search_button -msgid "Search" -msgstr "Search" +msgid "Main menu" +msgstr "Main Menu" -#. Android resource: @strings/address_search_towns -msgid "Towns" -msgstr "Towns" +msgid "" +"Show\n" +"Map" +msgstr "Show Map" + +msgid "Settings" +msgstr "Settings" + +msgid "Tools" +msgstr "Tools" + +msgid "Route" +msgstr "Route" -msgid "Map data (c) OpenStreetMap contributors, ODBL" -msgstr "Map data (c) OpenStreetMap contributors, ODBL" +msgid "About" +msgstr "About" + +msgid "Quit" +msgstr "Quit" + +msgid "Actions" +msgstr "Actions" msgid "" -"Current map location %s is not available\n" -"Please restart Navit after you attach an SD card or select a different map " -"location." +"Former\n" +"Destinations" msgstr "" -"Current map location %s is not available\n" -"Please restart Navit after you attach an SD card or select a different map " -"location." +"Former\n" +"Destinations" + +msgid "Coordinates" +msgstr "Coordinates" + +msgid "" +"Stop\n" +"Navigation" +msgstr "Stop" + +msgid "Display" +msgstr "Display" + +msgid "Fullscreen" +msgstr "Fullscreen" + +msgid "Window Mode" +msgstr "Window Mode" + +msgid "Auto zoom" +msgstr "Auto zoom" + +msgid "Manual zoom" +msgstr "Manual zoom" + +msgid "Layers" +msgstr "Layers" + +msgid "Zoom to route" +msgstr "Zoom to route" + +msgid "Description" +msgstr "Description" + +msgid "" +"Drop last\n" +"Waypoint" +msgstr "" +"Drop last\n" +"Waypoint" + +msgid "" +"Drop next\n" +"Waypoint" +msgstr "" +"Drop next\n" +"Waypoint" + +msgid "Satellite Status" +msgstr "Satellite Status" + +msgid "NMEA Data" +msgstr "NMEA Data" + +msgid "car_shortest" +msgstr "car_shortest" + +msgid "car_avoid_tolls" +msgstr "car_avoid_tolls" + +msgid "car_pedantic" +msgstr "car_pedantic" + +msgid "horse" +msgstr "horse" + +msgid "Truck" +msgstr "Truck" + +#. Strings from android/res/values/strings.xml +#. Android resource: @strings/yes +msgid "Yes" +msgstr "Yes" + +#. Android resource: @strings/cancel +msgid "Cancel" +msgstr "Cancel" + +#. Android resource: @strings/notification_ticker +msgid "Navit started" +msgstr "Navit started" + +#. Android resource: @strings/notification_event_default +msgid "Navit running" +msgstr "Navit running" + +#. Android resource: @strings/initial_info_box_title +msgid "Welcome to Navit" +msgstr "Welcome to Navit" + +#. Android resource: @strings/initial_info_box_message +msgid "" +"Thank you for installing Navit!\n" +"\n" +"To start, select \"Download maps\" from the menu to download a map. Note: " +"The map filesize may be large (>50MB) - a wifi connection is recommended.\n" +"\n" +"Mapdata: (c) OpenStreetMap contributors\n" +"\n" +"Enjoy Navit!" +msgstr "" +"Thank you for installing Navit!\n" +"\n" +"To start, select \"Download maps\" from the menu to download a map. Note: " +"The map file size may be large (>50MB) - a WiFi connection is recommended.\n" +"\n" +"Mapdata: (c) OpenStreetMap contributors\n" +"\n" +"Enjoy Navit!" + +#. Android resource: @strings/initial_info_box_OK +msgid "OK" +msgstr "OK" + +#. Android resource: @strings/initial_info_box_more_info +msgid "More info" +msgstr "More info" + +#. Android resource: @strings/optionsmenu_zoom_in +msgid "Zoom in" +msgstr "Zoom in" + +#. Android resource: @strings/optionsmenu_zoom_out +msgid "Zoom out" +msgstr "Zoom out" + +#. Android resource: @strings/optionsmenu_download_maps +msgid "Download maps" +msgstr "Download maps" + +#. Android resource: @strings/optionsmenu_toggle_poi +msgid "Toggle POIs" +msgstr "Toggle POIs" + +#. Android resource: @strings/optionsmenu_exit_navit +msgid "Exit Navit" +msgstr "Exit Navit" + +#. Android resource: @strings/optionsmenu_backup_restore +msgid "Backup / Restore" +msgstr "Backup / Restore" + +#. Android resource: @strings/optionsmenu_set_map_location +msgid "Set map location" +msgstr "Set map location" + +#. Android resource: @strings/position_popup_drive_here +msgid "Route to here" +msgstr "Route to here" + +#. Android resource: @strings/map_delete +msgid "Delete this map?" +msgstr "Delete this map?" -msgid "Downloaded maps" -msgstr "Downloaded maps" +#. Android resource: @strings/map_download_title +msgid "Map download" +msgstr "Map download" +#. Android resource: @strings/map_download_downloading +msgid "Downloading:" +msgstr "Downloading:" + +#. Android resource: @strings/map_download_eta +msgid "ETA" +msgstr "ETA" + +#. Android resource: @strings/map_download_ready +msgid "ready" +msgstr "ready" + +#. Android resource: @strings/map_download_download_error +msgid "Error downloading map." +msgstr "Error downloading map." + +#. Android resource: @strings/map_download_download_aborted +msgid "Map download aborted" +msgstr "Map download aborted" + +#. Android resource: @strings/map_download_not_enough_free_space +msgid "Not enough free space" +msgstr "Not enough free space" + +#. Android resource: @strings/map_download_oversize msgid "" "Sorry, we currently do not support maps above 3.8G on Android, please select " "a smaller one." @@ -2064,726 +2358,771 @@ msgstr "" "Sorry, we currently do not support maps above 3.8G on Android, please select " "a smaller one." -#. Android resource: @strings/position_popup_drive_here -msgid "Route to here" -msgstr "Route to here" +#. Android resource: @strings/map_no_fix +msgid "No location. Reopen after location fix." +msgstr "No location. Reopen after location fix." -msgid "Cancel" -msgstr "Cancel" +#. Android resource: @strings/maps_for_current_location +msgid "Maps containing current location" +msgstr "Maps containing current location" + +#. Android resource: @strings/maps_installed +msgid "Installed maps" +msgstr "Installed maps" + +#. Android resource: @strings/map_downloading +msgid "downloading" +msgstr "downloading" + +#. Android resource: @strings/map_download_medium_unavailable +msgid "Media selected for map storage is not available" +msgstr "Media selected for map storage is not available" + +#. Android resource: @strings/map_download_error_writing_map +msgid "Error writing map!" +msgstr "Error writing map!" -msgid "filenamePath" -msgstr "filenamePath" +#. Android resource: @strings/map_location_changed +#, c-format +msgid "New location set to %s Restart Navit to apply the changes." +msgstr "New location set to %s Restart Navit to apply the changes." +#. Android resource: @strings/map_location_unavailable +#, c-format msgid "" -"New location set to %s\n" -"Restart Navit to apply the changes." +"Current map location %s is not available Please restart Navit after you " +"attach an SD card or select a different map location." msgstr "" -"New location set to %s\n" -"Restart Navit to apply the changes." +"Current map location %s is not available Please restart Navit after you " +"attach an SD card or select a different map location." + +#. Android resource: @strings/address_search_title +msgid "Address search" +msgstr "Address search" + +#. Android resource: @strings/address_enter_destination +msgid "Enter destination" +msgstr "Enter destination" +#. Android resource: @strings/address_partial_match +msgid "Match partial address" +msgstr "Match partial address" + +#. Android resource: @strings/address_search_button +msgid "Search" +msgstr "Search" + +#. Android resource: @strings/address_search_searching +msgid "Searching..." +msgstr "Searching..." + +#. Android resource: @strings/address_search_not_found +msgid "Address not found" +msgstr "Address not found" + +#. Android resource: @strings/address_search_getting_results +msgid "Getting search results" +msgstr "Getting search results" + +#. Android resource: @strings/address_search_loading_results +msgid "Loading search results" +msgstr "Loading search results" + +#. Android resource: @strings/address_search_no_results +msgid "No results found" +msgstr "No results found" + +#. Android resource: @strings/address_search_no_text_entered +msgid "No text entered" +msgstr "No text entered" + +#. Android resource: @strings/address_search_set_destination +msgid "Setting destination to:" +msgstr "Setting destination to:" + +#. Android resource: @strings/address_search_towns +msgid "Towns" +msgstr "Towns" + +#. Android resource: @strings/choose_an_action +msgid "Choose an action" +msgstr "Choose an action" + +#. Android resource: @strings/please_insert_an_sd_card +msgid "Please insert an SD Card" +msgstr "Please insert an SD Card" + +#. Android resource: @strings/backing_up +msgid "Backing up..." +msgstr "Backing up..." + +#. Android resource: @strings/restoring +msgid "Restoring..." +msgstr "Restoring..." + +#. Android resource: @strings/failed_to_create_backup_directory +msgid "Failed to create backup directory" +msgstr "Failed to create backup directory" + +#. Android resource: @strings/backup_failed +msgid "Backup failed" +msgstr "Backup failed" + +#. Android resource: @strings/no_backup_found +msgid "No backup found" +msgstr "No backup found" + +#. Android resource: @strings/failed_to_restore +msgid "Failed to restore" +msgstr "Failed to restore" + +#. Android resource: @strings/backup_successful +msgid "Backup successful" +msgstr "Backup successful" + +#. Android resource: @strings/restore_successful_please_restart_navit +msgid "" +"Restore Successful\n" +"Please restart Navit" +msgstr "" +"Restore Successful\n" +"Please restart Navit" + +#. Android resource: @strings/backup_not_found +msgid "Backup not found" +msgstr "Backup not found" + +#. Android resource: @strings/restore_failed +msgid "Restore failed" +msgstr "Restore failed" + +#. Android resource: @strings/select_backup +msgid "Select backup" +msgstr "Select backup" + +#. Android resource: @strings/backup +msgid "Backup" +msgstr "Backup" + +#. Android resource: @strings/restore +msgid "Restore" +msgstr "Restore" + +#. Android resource: @strings/TTS_title_data_missing +msgid "System text to speech engine data is missing" +msgstr "System text to speech engine data is missing" + +#. Android resource: @strings/TTS_qery_install_data +msgid "" +"Navit can use any text to speech engine installed on your device. The " +"currently selected engine reports it is unable to speak in your language. " +"Should we ask the system to show voice download dialog?" +msgstr "" +"Navit can use any text to speech engine installed on your device. The " +"currently selected engine reports it is unable to speak in your language. " +"Should we ask the system to show voice download dialog?" + +#. Android resource: @strings/permissions_not_granted +msgid "" +"Navit needs permission to access GPS and read the map.\n" +"If you change your mind please restart Navit and grant the permissions" +msgstr "" +"Navit needs permission to access GPS and read the map.\n" +"If you change your mind please restart Navit and grant the permissions" + +#. Android resource: @strings/permissions_info_box_title +msgid "One or more ungranted permissions" +msgstr "One or more ungranted permissions" + +#. Android resource: @strings/whole_planet msgid "Whole Planet" msgstr "Whole Planet" +#. Android resource: @strings/africa msgid "Africa" msgstr "Africa" +#. Android resource: @strings/canary_islands msgid "Canary Islands" msgstr "Canary Islands" +#. Android resource: @strings/asia msgid "Asia" msgstr "Asia" -msgid "Korea" -msgstr "Korea" - +#. Android resource: @strings/taiwan msgid "Taiwan" msgstr "Taiwan" +#. Android resource: @strings/korea +msgid "Korea" +msgstr "Korea" + +#. Android resource: @strings/uae_other msgid "UAE+Other" msgstr "UAE+Other" +#. Android resource: @strings/oceania msgid "Oceania" msgstr "Oceania" +#. Android resource: @strings/tasmania msgid "Tasmania" msgstr "Tasmania" +#. Android resource: @strings/victoria msgid "Victoria" msgstr "Victoria" +#. Android resource: @strings/new_south_wales msgid "New South Wales" msgstr "New South Wales" +#. Android resource: @strings/europe msgid "Europe" msgstr "Europe" +#. Android resource: @strings/western_europe msgid "Western Europe" msgstr "Western Europe" +#. Android resource: @strings/azores msgid "Azores" msgstr "Azores" +#. Android resource: @strings/benelux msgid "BeNeLux" msgstr "BeNeLux" +#. Android resource: @strings/alsace msgid "Alsace" msgstr "Alsace" +#. Android resource: @strings/aquitaine msgid "Aquitaine" msgstr "Aquitaine" +#. Android resource: @strings/auvergne msgid "Auvergne" msgstr "Auvergne" -msgid "Basse-Normandie" -msgstr "Basse-Normandie" - -msgid "Bourgogne" -msgstr "Bourgogne" +#. Android resource: @strings/centre +msgid "Centre" +msgstr "Centre" +#. Android resource: @strings/bretagne msgid "Bretagne" msgstr "Bretagne" -msgid "Centre" -msgstr "Centre" +#. Android resource: @strings/bourgogne +msgid "Bourgogne" +msgstr "Bourgogne" +#. Android resource: @strings/basse_normandie +msgid "Basse-Normandie" +msgstr "Basse-Normandie" + +#. Android resource: @strings/champagne_ardenne msgid "Champagne-Ardenne" msgstr "Champagne-Ardenne" +#. Android resource: @strings/corse msgid "Corse" msgstr "Corse" +#. Android resource: @strings/franche_comte msgid "Franche-Comte" msgstr "Franche-Comte" +#. Android resource: @strings/haute_normandie msgid "Haute-Normandie" msgstr "Haute-Normandie" +#. Android resource: @strings/ile_de_france msgid "Ile-de-France" msgstr "Ile-de-France" +#. Android resource: @strings/languedoc_roussillon msgid "Languedoc-Roussillon" msgstr "Languedoc-Roussillon" +#. Android resource: @strings/limousin msgid "Limousin" msgstr "Limousin" +#. Android resource: @strings/lorraine msgid "Lorraine" msgstr "Lorraine" +#. Android resource: @strings/midi_pyrenees msgid "Midi-Pyrenees" msgstr "Midi-Pyrenees" +#. Android resource: @strings/nord_pas_de_calais msgid "Nord-pas-de-Calais" msgstr "Nord-pas-de-Calais" +#. Android resource: @strings/pays_de_la_loire msgid "Pays-de-la-Loire" msgstr "Pays-de-la-Loire" +#. Android resource: @strings/picardie msgid "Picardie" msgstr "Picardie" +#. Android resource: @strings/poitou_charentes msgid "Poitou-Charentes" msgstr "Poitou-Charentes" +#. Android resource: @strings/provence_alpes_cote_d_azur msgid "Provence-Alpes-Cote-d-Azur" msgstr "Provence-Alpes-Cote-d-Azur" +#. Android resource: @strings/rhone_alpes msgid "Rhone-Alpes" msgstr "Rhone-Alpes" +#. Android resource: @strings/baden_wuerttemberg msgid "Baden-Wuerttemberg" msgstr "Baden-Wuerttemberg" +#. Android resource: @strings/bayern msgid "Bayern" msgstr "Bayern" +#. Android resource: @strings/mittelfranken msgid "Mittelfranken" msgstr "Mittelfranken" +#. Android resource: @strings/niederbayern msgid "Niederbayern" msgstr "Niederbayern" +#. Android resource: @strings/oberbayern msgid "Oberbayern" msgstr "Oberbayern" +#. Android resource: @strings/oberfranken msgid "Oberfranken" msgstr "Oberfranken" +#. Android resource: @strings/oberpfalz msgid "Oberpfalz" msgstr "Oberpfalz" +#. Android resource: @strings/schwaben msgid "Schwaben" msgstr "Schwaben" +#. Android resource: @strings/unterfranken msgid "Unterfranken" msgstr "Unterfranken" +#. Android resource: @strings/berlin msgid "Berlin" msgstr "Berlin" +#. Android resource: @strings/brandenburg msgid "Brandenburg" msgstr "Brandenburg" +#. Android resource: @strings/bremen msgid "Bremen" msgstr "Bremen" +#. Android resource: @strings/hamburg msgid "Hamburg" msgstr "Hamburg" +#. Android resource: @strings/hessen msgid "Hessen" msgstr "Hessen" +#. Android resource: @strings/mecklenburg_vorpommern msgid "Mecklenburg-Vorpommern" msgstr "Mecklenburg-Vorpommern" +#. Android resource: @strings/niedersachsen msgid "Niedersachsen" msgstr "Niedersachsen" +#. Android resource: @strings/nordrhein_westfalen msgid "Nordrhein-westfalen" msgstr "Nordrhein-westfalen" +#. Android resource: @strings/rheinland_pfalz msgid "Rheinland-Pfalz" msgstr "Rheinland-Pfalz" +#. Android resource: @strings/saarland msgid "Saarland" msgstr "Saarland" +#. Android resource: @strings/sachsen_anhalt msgid "Sachsen-Anhalt" msgstr "Sachsen-Anhalt" +#. Android resource: @strings/sachsen msgid "Sachsen" msgstr "Sachsen" +#. Android resource: @strings/schleswig_holstein msgid "Schleswig-Holstein" msgstr "Schleswig-Holstein" +#. Android resource: @strings/thueringen msgid "Thueringen" msgstr "Thueringen" +#. Android resource: @strings/mallorca msgid "Mallorca" msgstr "Mallorca" +#. Android resource: @strings/galicia msgid "Galicia" msgstr "Galicia" +#. Android resource: @strings/scandinavia msgid "Scandinavia" msgstr "Scandinavia" +#. Android resource: @strings/england msgid "England" msgstr "England" +#. Android resource: @strings/buckinghamshire msgid "Buckinghamshire" msgstr "Buckinghamshire" +#. Android resource: @strings/cambridgeshire msgid "Cambridgeshire" msgstr "Cambridgeshire" +#. Android resource: @strings/cumbria msgid "Cumbria" msgstr "Cumbria" +#. Android resource: @strings/east_yorkshire_with_hull msgid "East yorkshire with hull" msgstr "East Yorkshire with Hull" +#. Android resource: @strings/essex msgid "Essex" msgstr "Essex" +#. Android resource: @strings/herefordshire msgid "Herefordshire" msgstr "Herefordshire" +#. Android resource: @strings/kent msgid "Kent" msgstr "Kent" +#. Android resource: @strings/lancashire msgid "Lancashire" msgstr "Lancashire" +#. Android resource: @strings/leicestershire msgid "Leicestershire" msgstr "Leicestershire" +#. Android resource: @strings/norfolk msgid "Norfolk" msgstr "Norfolk" +#. Android resource: @strings/nottinghamshire msgid "Nottinghamshire" msgstr "Nottinghamshire" +#. Android resource: @strings/oxfordshire msgid "Oxfordshire" msgstr "Oxfordshire" +#. Android resource: @strings/shropshire msgid "Shropshire" msgstr "Shropshire" +#. Android resource: @strings/somerset msgid "Somerset" msgstr "Somerset" +#. Android resource: @strings/south_yorkshire msgid "South yorkshire" msgstr "South Yorkshire" +#. Android resource: @strings/suffolk msgid "Suffolk" msgstr "Suffolk" +#. Android resource: @strings/surrey msgid "Surrey" msgstr "Surrey" +#. Android resource: @strings/wiltshire msgid "Wiltshire" msgstr "Wiltshire" +#. Android resource: @strings/scotland msgid "Scotland" msgstr "Scotland" +#. Android resource: @strings/wales msgid "Wales" msgstr "Wales" +#. Android resource: @strings/crete msgid "Crete" msgstr "Crete" +#. Android resource: @strings/north_america msgid "North America" msgstr "North America" +#. Android resource: @strings/alaska msgid "Alaska" msgstr "Alaska" +#. Android resource: @strings/hawaii msgid "Hawaii" msgstr "Hawaii" +#. Android resource: @strings/usa msgid "USA" msgstr "USA" -msgid " (except Alaska and Hawaii)" -msgstr " (except Alaska and Hawaii)" +#. Android resource: @strings/except_alaska_and_hawaii +msgid "(except Alaska and Hawaii)" +msgstr "(except Alaska and Hawaii)" +#. Android resource: @strings/midwest msgid "Midwest" msgstr "Midwest" +#. Android resource: @strings/michigan msgid "Michigan" msgstr "Michigan" +#. Android resource: @strings/ohio msgid "Ohio" msgstr "Ohio" +#. Android resource: @strings/northeast msgid "Northeast" msgstr "Northeast" +#. Android resource: @strings/massachusetts msgid "Massachusetts" msgstr "Massachusetts" +#. Android resource: @strings/vermont msgid "Vermont" msgstr "Vermont" +#. Android resource: @strings/pacific msgid "Pacific" msgstr "Pacific" +#. Android resource: @strings/south msgid "South" msgstr "South" +#. Android resource: @strings/arkansas msgid "Arkansas" msgstr "Arkansas" +#. Android resource: @strings/district_of_columbia msgid "District of Columbia" msgstr "District of Columbia" +#. Android resource: @strings/florida msgid "Florida" msgstr "Florida" +#. Android resource: @strings/louisiana msgid "Louisiana" msgstr "Louisiana" +#. Android resource: @strings/maryland msgid "Maryland" msgstr "Maryland" +#. Android resource: @strings/mississippi msgid "Mississippi" msgstr "Mississippi" +#. Android resource: @strings/oklahoma msgid "Oklahoma" msgstr "Oklahoma" +#. Android resource: @strings/texas msgid "Texas" msgstr "Texas" +#. Android resource: @strings/virginia msgid "Virginia" msgstr "Virginia" +#. Android resource: @strings/west_virginia msgid "West Virginia" msgstr "West Virginia" +#. Android resource: @strings/west msgid "West" msgstr "West" +#. Android resource: @strings/arizona msgid "Arizona" msgstr "Arizona" +#. Android resource: @strings/california msgid "California" msgstr "California" +#. Android resource: @strings/colorado msgid "Colorado" msgstr "Colorado" +#. Android resource: @strings/idaho msgid "Idaho" msgstr "Idaho" +#. Android resource: @strings/montana msgid "Montana" msgstr "Montana" +#. Android resource: @strings/new_mexico msgid "New Mexico" msgstr "New Mexico" +#. Android resource: @strings/nevada msgid "Nevada" msgstr "Nevada" +#. Android resource: @strings/oregon msgid "Oregon" msgstr "Oregon" +#. Android resource: @strings/utah msgid "Utah" msgstr "Utah" +#. Android resource: @strings/washington_state msgid "Washington State" msgstr "Washington State" +#. Android resource: @strings/south_middle_america msgid "South+Middle America" msgstr "South+Middle America" +#. Android resource: @strings/guyane_francaise msgid "Guyane Francaise" msgstr "Guyane Francaise" -msgid "downloading" -msgstr "downloading" - -#. Android resource: @strings/map_download_ready -msgid "ready" -msgstr "ready" - -msgid "Media selected for map storage is not available" -msgstr "Media selected for map storage is not available" - -#. Android resource: @strings/map_download_not_enough_free_space -msgid "Not enough free space" -msgstr "Not enough free space" - -msgid "Error downloading map!" -msgstr "Error downloading map!" - -msgid "Error writing map!" -msgstr "Error writing map!" - -msgid "Map download aborted!" -msgstr "Map download aborted!" - -#. Android resource: @strings/map_download_eta -msgid "ETA" -msgstr "ETA" - -#. Android resource: @strings/map_download_title -msgid "Map download" -msgstr "Map download" - -msgid "Vehicle Position" -msgstr "Vehicle Position" - -msgid "Main menu" -msgstr "Main Menu" - -msgid "" -"Show\n" -"Map" -msgstr "Show Map" - -msgid "Settings" -msgstr "Settings" - -msgid "Tools" -msgstr "Tools" - -msgid "Route" -msgstr "Route" - -msgid "About" -msgstr "About" - -msgid "Quit" -msgstr "Quit" - -msgid "Actions" -msgstr "Actions" - -msgid "" -"Former\n" -"Destinations" -msgstr "" -"Former\n" -"Destinations" - -msgid "Coordinates" -msgstr "Coordinates" - -msgid "" -"Stop\n" -"Navigation" -msgstr "Stop" - -msgid "Display" -msgstr "Display" - -msgid "Fullscreen" -msgstr "Fullscreen" - -msgid "Window Mode" -msgstr "Window Mode" - -msgid "Layers" -msgstr "" - -msgid "Description" -msgstr "Description" - -msgid "" -"Drop last \n" -"Waypoint" -msgstr "" -"Drop last \n" -"Waypoint" - -msgid "" -"Drop next \n" -"Waypoint" -msgstr "" -"Drop next \n" -"Waypoint" - -msgid "Satellite Status" -msgstr "Satellite Status" - -msgid "NMEA Data" -msgstr "NMEA Data" - -msgid "car_shortest" -msgstr "car_shortest" - -msgid "car_avoid_tolls" -msgstr "car_avoid_tolls" - -msgid "car_pedantic" -msgstr "car_pedantic" - -msgid "horse" -msgstr "horse" - -msgid "Truck" -msgstr "Truck" - -#. Strings from android/res/values/strings.xml -#. Android resource: @strings/yes -msgid "Yes" -msgstr "Yes" - -#. Android resource: @strings/notification_ticker -msgid "Navit started" -msgstr "Navit started" - -#. Android resource: @strings/notification_event_default -msgid "Navit running" -msgstr "Navit running" - -#. Android resource: @strings/initial_info_box_title -msgid "Welcome to Navit" -msgstr "Welcome to Navit" - -#. Android resource: @strings/initial_info_box_message -msgid "" -"Thank you for installing Navit!\n" -"\n" -"To start, select \"Download maps\" from the menu to download a map. Note: " -"The map filesize may be large (>50MB) - a wifi connection is recommended.\n" -"\n" -"Mapdata: (c) OpenStreetMap contributors\n" -"\n" -"Enjoy Navit!" -msgstr "" -"Thank you for installing Navit!\n" -"\n" -"To start, select \"Download maps\" from the menu to download a map. Note: " -"The map file size may be large (>50MB) - a WiFi connection is recommended.\n" -"\n" -"Mapdata: (c) OpenStreetMap contributors\n" -"\n" -"Enjoy Navit!" - -#. Android resource: @strings/initial_info_box_OK -msgid "OK" -msgstr "OK" - -#. Android resource: @strings/initial_info_box_more_info -msgid "More info" -msgstr "More info" - -#. Android resource: @strings/optionsmenu_zoom_in -msgid "Zoom in" -msgstr "Zoom in" - -#. Android resource: @strings/optionsmenu_zoom_out -msgid "Zoom out" -msgstr "Zoom out" - -#. Android resource: @strings/optionsmenu_download_maps -msgid "Download maps" -msgstr "Download maps" - -#. Android resource: @strings/optionsmenu_toggle_poi -msgid "Toggle POIs" -msgstr "Toggle POIs" - -#. Android resource: @strings/optionsmenu_exit_navit -msgid "Exit Navit" -msgstr "Exit Navit" - -#. Android resource: @strings/optionsmenu_backup_restore -msgid "Backup / Restore" -msgstr "Backup / Restore" - -#. Android resource: @strings/optionsmenu_set_map_location -msgid "Set map location" -msgstr "Set map location" - -#. Android resource: @strings/map_delete -msgid "Delete this map?" -msgstr "Delete this map?" - -#. Android resource: @strings/map_download_downloading -msgid "Downloading:" -msgstr "Downloading:" - -#. Android resource: @strings/map_download_download_error -msgid "Error downloading map." -msgstr "Error downloading map." - -#. Android resource: @strings/map_download_download_aborted -msgid "Map download aborted" -msgstr "Map download aborted" - -#. Android resource: @strings/map_no_fix -msgid "No location. Reopen after location fix." -msgstr "No location. Reopen after location fix." - -#. Android resource: @strings/maps_for_current_location -msgid "Maps containing current location" -msgstr "Maps containing current location" - -#. Android resource: @strings/address_search_title -msgid "Address search" -msgstr "Address search" - -#. Android resource: @strings/address_enter_destination -msgid "Enter destination" -msgstr "Enter destination" - -#. Android resource: @strings/address_partial_match -msgid "Match partial address" -msgstr "Match partial address" +#, c-format +#~ msgid "Route %4.0fkm %02d:%02d ETA" +#~ msgstr "Route %4.0fkm %02d:%02d ETA" -#. Android resource: @strings/address_search_searching -msgid "Searching..." -msgstr "Searching..." +#, c-format +#~ msgid "Error: No configuration found in config file '%s'\n" +#~ msgstr "Error: No configuration found in config file '%s'\n" -#. Android resource: @strings/address_search_not_found -msgid "Address not found" -msgstr "Address not found" +#, c-format +#~ msgid "Using config file '%s'\n" +#~ msgstr "Using config file '%s'\n" -#. Android resource: @strings/address_search_getting_results -msgid "Getting search results" -msgstr "Getting search results" +#~ msgid "" +#~ "Internal initialization failed, exiting. Check previous error messages.\n" +#~ msgstr "" +#~ "Internal initialisation failed, exiting. Check previous error messages.\n" -#. Android resource: @strings/address_search_loading_results -msgid "Loading search results" -msgstr "Loading search results" +#~ msgid "No config file navit.xml, navit.xml.local found\n" +#~ msgstr "No config file navit.xml, navit.xml.local found\n" -#. Android resource: @strings/address_search_no_results -msgid "No results found" -msgstr "No results found" +#, c-format +#~ msgid "Error parsing config file '%s': %s\n" +#~ msgstr "Error parsing config file '%s': %s\n" -#. Android resource: @strings/address_search_no_text_entered -msgid "No text entered" -msgstr "No text entered" +#~ msgid "Map data (c) OpenStreetMap contributors, ODBL" +#~ msgstr "Map data (c) OpenStreetMap contributors, ODBL" -#. Android resource: @strings/address_search_set_destination -msgid "Setting destination to:" -msgstr "Setting destination to:" +#~ msgid "partial match" +#~ msgstr "partial match" -#. Android resource: @strings/choose_an_action -msgid "Choose an action" -msgstr "Choose an action" +#~ msgid "Downloaded maps" +#~ msgstr "Downloaded maps" -#. Android resource: @strings/please_insert_an_sd_card -msgid "Please insert an SD Card" -msgstr "Please insert an SD Card" +#~ msgid " (except Alaska and Hawaii)" +#~ msgstr " (except Alaska and Hawaii)" -#. Android resource: @strings/backing_up -msgid "Backing up..." -msgstr "Backing up..." +#~ msgid "Error downloading map!" +#~ msgstr "Error downloading map!" -#. Android resource: @strings/restoring -msgid "Restoring..." -msgstr "Restoring..." +#~ msgid "" +#~ "Drop last \n" +#~ "Waypoint" +#~ msgstr "" +#~ "Drop last \n" +#~ "Waypoint" -#. Android resource: @strings/failed_to_create_backup_directory -msgid "Failed to create backup directory" -msgstr "Failed to create backup directory" +#~ msgid "" +#~ "Drop next \n" +#~ "Waypoint" +#~ msgstr "" +#~ "Drop next \n" +#~ "Waypoint" -#. Android resource: @strings/backup_failed -msgid "Backup failed" -msgstr "Backup failed" +#~ msgid "Map download aborted!" +#~ msgstr "Map download aborted!" -#. Android resource: @strings/no_backup_found -msgid "No backup found" -msgstr "No backup found" +#, c-format +#~ msgid "Set destination to %ld, %ld \n" +#~ msgstr "Set destination to %ld, %ld \n" -#. Android resource: @strings/failed_to_restore -msgid "Failed to restore" -msgstr "Failed to restore" +#~ msgid "Distance from screen center (km)" +#~ msgstr "Distance from screen centre (km)" -#. Android resource: @strings/backup_successful -msgid "Backup successful" -msgstr "Backup successful" +#, c-format +#~ msgid "Set map to %ld, %ld \n" +#~ msgstr "Set map to %ld, %ld \n" -#. Android resource: @strings/restore_successful_please_restart_navit -msgid "" -"Restore Successful\n" -"Please restart Navit" -msgstr "" -"Restore Successful\n" -"Please restart Navit" +#, c-format +#~ msgid "Set next visit to %ld, %ld \n" +#~ msgstr "Set next visit to %ld, %ld \n" -#. Android resource: @strings/backup_not_found -msgid "Backup not found" -msgstr "Backup not found" +#, c-format +#~ msgid "then leave the roundabout at the %1$s %2$s" +#~ msgstr "then leave the roundabout at the %1$s %2$s" -#. Android resource: @strings/restore_failed -msgid "Restore failed" -msgstr "Restore failed" +#~ msgid "filenamePath" +#~ msgstr "filenamePath" -#. Android resource: @strings/select_backup -msgid "Select backup" -msgstr "Select backup" +#~ msgid "" +#~ "New location set to %s\n" +#~ "Restart Navit to apply the changes." +#~ msgstr "" +#~ "New location set to %s\n" +#~ "Restart Navit to apply the changes." -#. Android resource: @strings/backup -msgid "Backup" -msgstr "Backup" +#~ msgid "" +#~ "Current map location %s is not available\n" +#~ "Please restart Navit after you attach an SD card or select a different map " +#~ "location." +#~ msgstr "" +#~ "Current map location %s is not available\n" +#~ "Please restart Navit after you attach an SD card or select a different map " +#~ "location." -#. Android resource: @strings/restore -msgid "Restore" -msgstr "Restore" +#~ msgid "Select a distance to look for (km)" +#~ msgstr "Select a search radius from screen center" -#. Android resource: @strings/TTS_title_data_missing -msgid "System text to speech engine data is missing" -msgstr "System text to speech engine data is missing" +# TRANSLATORS: This is the distance to a Point of Interest (POI) in the POI window. It will be feet (imperial) or, meters (metric), depending on the user's preference. +#~ msgid "Distance(m)" +#~ msgstr "Distance" -#. Android resource: @strings/TTS_qery_install_data -msgid "" -"Navit can use any text to speech engine installed on your device. The " -"currently selected engine reports it is unable to speak in your language. " -"Should we ask the system to show voice download dialog?" -msgstr "" -"Navit can use any text to speech engine installed on your device. The " -"currently selected engine reports it is unable to speak in your language. " -"Should we ask the system to show voice download dialog?" +#, c-format +#~ msgid "in %d m" +#~ msgstr "in %d m" #, c-format -#~ msgid "then leave the roundabout at the %1$s %2$s" -#~ msgstr "then leave the roundabout at the %1$s %2$s" +#~ msgid "%d m" +#~ msgstr "%d m" diff --git a/po/fil.po.in b/po/fil.po.in index b3ba50fd8..5e301ac35 100644 --- a/po/fil.po.in +++ b/po/fil.po.in @@ -1,15 +1,16 @@ # Filipino translations for navit -# Copyright (C) 2006-2016 The Navit Team +# Copyright (C) 2006-2018 The Navit Team # This file is distributed under the same license as the navit package. # Many thanks to the contributors of this translation: +# Marlon Janssen Arao https://launchpad.net/~marlonjanssenarao # chito https://launchpad.net/~cnuarin msgid "" msgstr "" -"Project-Id-Version: navit 0.5.0\n" +"Project-Id-Version: navit 0.5.1\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2015-07-19 03:58+0000\n" -"Last-Translator: chito <cnuarin@gmail.com>\n" +"PO-Revision-Date: 2018-06-04 20:43+0000\n" +"Last-Translator: Marlon Janssen Arao <Unknown>\n" "Language-Team: Filipino <fil@li.org>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -22,20 +23,20 @@ msgstr "" #, c-format msgid "setting '%s' to '%s'\n" -msgstr "" +msgstr "itinatakda ang '%s' sa '%s'\n" #. TRANSLATORS: the following counts refer to streets msgid "zeroth" msgstr "" msgid "first" -msgstr "" +msgstr "una" msgid "second" -msgstr "" +msgstr "pangalawa" msgid "third" -msgstr "" +msgstr "pangatlo" msgid "fourth" msgstr "pang-apat" @@ -70,39 +71,39 @@ msgstr "pang-anim na labasan" #, c-format msgid "%d feet" -msgstr "" +msgstr "%d talampakan" #, c-format msgid "in %d feet" -msgstr "" +msgstr "sa %d talampakan" #, c-format msgid "%d.%d miles" -msgstr "" +msgstr "%d.%d milya" #, c-format msgid "in %d.%d miles" -msgstr "" +msgstr "sa %d.%d na milya" #, c-format msgid "one mile" msgid_plural "%d miles" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "isang milya" +msgstr[1] "%d na milya" #, c-format msgid "in one mile" msgid_plural "in %d miles" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "sa isang milya" +msgstr[1] "sa %d na milya" #, c-format msgid "%d meters" -msgstr "" +msgstr "%d metro" #, c-format msgid "in %d meters" -msgstr "" +msgstr "sa %d metro" #, c-format msgid "%d.%d kilometers" @@ -110,29 +111,29 @@ msgstr "%d.%d kilometro" #, c-format msgid "in %d.%d kilometers" -msgstr "%d.%d kilometro" +msgstr "sa %d.%d na kilometro" #, c-format msgid "one kilometer" msgid_plural "%d kilometers" -msgstr[0] "" +msgstr[0] "isang kilometro" msgstr[1] "%d kilometro" #, c-format msgid "in one kilometer" msgid_plural "in %d kilometers" -msgstr[0] "sa loob ng isang kilometro" -msgstr[1] "sa loob ng %d kilometro" +msgstr[0] "sa isang kilometro" +msgstr[1] "sa %d na kilometro" #. TRANSLATORS: Arguments: 1: Prefix (Space if required) 2: Systematic Street Name 3: Separator (Space if required), 4: Street Name #, c-format msgid "%1$sonto the %2$s%3$s%4$s" -msgstr "" +msgstr "%1$s papunta sa %2$s%3$s%4$s" #. TRANSLATORS: Arguments: 1: Prefix (Space if required) 2: Street Name #, c-format msgid "%1$sonto %2$s" -msgstr "" +msgstr "%1$s papuntang %2$s" #. TRANSLATORS: Arguments: 1: Prefix (Space if required) 2: Street Name. Masculine form. The stuff after | doesn't have to be included #, c-format @@ -149,71 +150,70 @@ msgstr "" msgid "%1$sonto %2$s|neuter form" msgstr "" -#. TRANSLATORS: motorway ramp refers to the slip road for entering a motorway. msgid "onto the motorway ramp" msgstr "" #. TRANSLATORS: Arguments: 1: Prefix (Space if required) 2: Street Name 3: Separator (Space if required), 4: Systematic Street Name #, c-format msgid "%sinto %s%s%s" -msgstr "%s sa kalyeng %s%s%s" +msgstr "%s sa %s%s%s" #. TRANSLATORS: Arguments: 1: Prefix (Space if required) 2: Street Name 3: Separator (Space if required), 4: Systematic Street Name. Masculine form. The stuff after | doesn't have to be included #, c-format msgid "%sinto %s%s%s|masculine form" -msgstr "%s sa kalyeng %s%s%s" +msgstr "%s sa %s%s%s|masculine form" #. TRANSLATORS: Arguments: 1: Prefix (Space if required) 2: Street Name 3: Separator (Space if required), 4: Systematic Street Name. Feminine form. The stuff after | doesn't have to be included #, c-format msgid "%sinto %s%s%s|feminine form" -msgstr "%s sa kalyeng %s%s%s" +msgstr "%s sa %s%s%s|feminine form" #. TRANSLATORS: Arguments: 1: Prefix (Space if required) 2: Street Name 3: Separator (Space if required), 4: Systematic Street Name. Neuter form. The stuff after | doesn't have to be included #, c-format msgid "%sinto %s%s%s|neuter form" -msgstr "%s sa kalyeng %s%s%s" +msgstr "%s sa %s%s%s|neuter form" #. TRANSLATORS: gives the name of the next road to turn into (into the E17) #, c-format msgid "%sinto the %s" -msgstr "" +msgstr "%s sa %s" msgid "When possible, please turn around" -msgstr "Kung maari ay bumalik" +msgstr "Kung maari, mangyaring umikot pabalik" #. TRANSLATORS: the argument is the destination to follow #, c-format msgid "towards %s" -msgstr "" +msgstr "patungo sa %s" #, c-format msgid "Follow the road for the next %s" -msgstr "Sundan ang kalye sa susunod na %s" +msgstr "Sundan ang daan para sa susunod na %s" msgid "Enter the roundabout soon" -msgstr "" +msgstr "Pumasok sa rotonda sa lalong madaling panahon" #. TRANSLATORS: %s is the distance to the roundabout #, c-format msgid "Enter the roundabout %s" -msgstr "" +msgstr "Pumasok sa rotonda sa %s" msgid "then enter the roundabout" -msgstr "" +msgstr "pagkatapos ay pumasok sa rotonda" #. TRANSLATORS: first arg. is the manieth exit, second arg. is the destination to follow #, c-format msgid "Leave the roundabout at the %1$s %2$s" -msgstr "Lisanin ang rotonda sa may %1$s %2$s" +msgstr "Lumabas sa rotonda sa %1$s %2$s" msgid "soon" -msgstr "" +msgstr "sa lalong madaling panahon" msgid "now" msgstr "ngayon na" msgid "then" -msgstr "" +msgstr "pagkatapos" #. TRANSLATORS: the arg. is the phrase 'onto ...'. Right merge, the stuff after | doesn't have to be included. #, c-format @@ -236,10 +236,10 @@ msgid "Merge %1$s%2$s|left" msgstr "" msgid "on your left" -msgstr "" +msgstr "sa iyong gawing kaliwa" msgid "on your right" -msgstr "" +msgstr "sa iyong gawing kaliwa" #. TRANSLATORS: the first arg. is exit ref and/or name, the second is the direction of exit and the third is distance #, c-format @@ -362,7 +362,6 @@ msgstr "" msgid "You have reached your destination %s" msgstr "" -#. TRANSLATORS: Exit as a noun, as in "Exit 43 Greenmound-East" msgid "Interchange" msgstr "" @@ -379,9 +378,15 @@ msgstr "" msgid "Length" msgstr "" +msgid "mi" +msgstr "" + msgid "km" msgstr "" +msgid "feet" +msgstr "" + msgid "m" msgstr "" @@ -442,6 +447,7 @@ msgid "Anguilla" msgstr "" #. 008 +#. Android resource: @strings/albania msgid "Albania" msgstr "" @@ -454,6 +460,7 @@ msgid "Netherlands Antilles" msgstr "" #. 024 +#. Android resource: @strings/angola msgid "Angola" msgstr "" @@ -462,6 +469,7 @@ msgid "Antarctica" msgstr "" #. 032 +#. Android resource: @strings/argentina msgid "Argentina" msgstr "" @@ -470,10 +478,12 @@ msgid "American Samoa" msgstr "" #. 040 +#. Android resource: @strings/austria msgid "Austria" msgstr "" #. 036 +#. Android resource: @strings/australia msgid "Australia" msgstr "" @@ -486,10 +496,12 @@ msgid "Aland Islands" msgstr "" #. 031 +#. Android resource: @strings/azerbaijan msgid "Azerbaijan" msgstr "" #. 070 +#. Android resource: @strings/bosnia_and_herzegovina msgid "Bosnia and Herzegovina" msgstr "" @@ -502,6 +514,7 @@ msgid "Bangladesh" msgstr "" #. 056 +#. Android resource: @strings/belgium msgid "Belgium" msgstr "" @@ -510,6 +523,7 @@ msgid "Burkina Faso" msgstr "" #. 100 +#. Android resource: @strings/bulgaria msgid "Bulgaria" msgstr "" @@ -518,6 +532,7 @@ msgid "Bahrain" msgstr "" #. 108 +#. Android resource: @strings/burundi msgid "Burundi" msgstr "" @@ -538,6 +553,7 @@ msgid "Brunei Darussalam" msgstr "" #. 068 +#. Android resource: @strings/bolivia msgid "Bolivia" msgstr "" @@ -546,6 +562,7 @@ msgid "Bonaire, Sint Eustatius and Saba" msgstr "" #. 076 +#. Android resource: @strings/brazil msgid "Brazil" msgstr "" @@ -562,10 +579,12 @@ msgid "Bouvet Island" msgstr "" #. 072 +#. Android resource: @strings/botswana msgid "Botswana" msgstr "" #. 112 +#. Android resource: @strings/belarus msgid "Belarus" msgstr "" @@ -574,6 +593,7 @@ msgid "Belize" msgstr "" #. 124 +#. Android resource: @strings/canada msgid "Canada" msgstr "" @@ -582,6 +602,7 @@ msgid "Cocos (Keeling) Islands" msgstr "" #. 180 +#. Android resource: @strings/congo msgid "Congo, Democratic Republic of the" msgstr "" @@ -594,10 +615,12 @@ msgid "Congo" msgstr "" #. 756 +#. Android resource: @strings/switzerland msgid "Switzerland" msgstr "" #. 384 +#. Android resource: @strings/cotedivoire msgid "Cote d'Ivoire" msgstr "" @@ -606,6 +629,7 @@ msgid "Cook Islands" msgstr "" #. 152 +#. Android resource: @strings/chile msgid "Chile" msgstr "" @@ -614,10 +638,12 @@ msgid "Cameroon" msgstr "" #. 156 +#. Android resource: @strings/china msgid "China" msgstr "" #. 170 +#. Android resource: @strings/colombia msgid "Colombia" msgstr "" @@ -626,6 +652,7 @@ msgid "Costa Rica" msgstr "" #. 192 +#. Android resource: @strings/cuba msgid "Cuba" msgstr "" @@ -642,14 +669,17 @@ msgid "Christmas Island" msgstr "" #. 196 +#. Android resource: @strings/cyprus msgid "Cyprus" msgstr "" #. 203 +#. Android resource: @strings/czech_republic msgid "Czech Republic" msgstr "" #. 276 +#. Android resource: @strings/germany msgid "Germany" msgstr "" @@ -658,6 +688,7 @@ msgid "Djibouti" msgstr "" #. 208 +#. Android resource: @strings/denmark msgid "Denmark" msgstr "" @@ -666,6 +697,7 @@ msgid "Dominica" msgstr "" #. 214 +#. Android resource: @strings/dominican_republic msgid "Dominican Republic" msgstr "" @@ -674,10 +706,12 @@ msgid "Algeria" msgstr "" #. 218 +#. Android resource: @strings/ecuador msgid "Ecuador" msgstr "" #. 233 +#. Android resource: @strings/estonia msgid "Estonia" msgstr "" @@ -694,14 +728,17 @@ msgid "Eritrea" msgstr "" #. 724 +#. Android resource: @strings/spain msgid "Spain" msgstr "" #. 231 +#. Android resource: @strings/ethiopia msgid "Ethiopia" msgstr "" #. 246 +#. Android resource: @strings/finland msgid "Finland" msgstr "" @@ -718,10 +755,12 @@ msgid "Micronesia, Federated States of" msgstr "" #. 234 +#. Android resource: @strings/faroe_islands msgid "Faroe Islands" msgstr "" #. 250 +#. Android resource: @strings/france msgid "France" msgstr "" @@ -730,6 +769,7 @@ msgid "Gabon" msgstr "" #. 826 +#. Android resource: @strings/united_kingdom msgid "United Kingdom" msgstr "" @@ -766,6 +806,7 @@ msgid "Gambia" msgstr "" #. 324 +#. Android resource: @strings/guinea msgid "Guinea" msgstr "" @@ -778,6 +819,7 @@ msgid "Equatorial Guinea" msgstr "" #. 300 +#. Android resource: @strings/greece msgid "Greece" msgstr "" @@ -798,6 +840,7 @@ msgid "Guinea-Bissau" msgstr "" #. 328 +#. Android resource: @strings/guyana msgid "Guyana" msgstr "" @@ -814,26 +857,32 @@ msgid "Honduras" msgstr "" #. 191 +#. Android resource: @strings/croatia msgid "Croatia" msgstr "" #. 332 +#. Android resource: @strings/haiti msgid "Haiti" msgstr "" #. 348 +#. Android resource: @strings/hungary msgid "Hungary" msgstr "" #. 360 +#. Android resource: @strings/indonesia msgid "Indonesia" msgstr "" #. 372 +#. Android resource: @strings/ireland msgid "Ireland" msgstr "" #. 376 +#. Android resource: @strings/israel msgid "Israel" msgstr "" @@ -842,6 +891,7 @@ msgid "Isle of Man" msgstr "" #. 356 +#. Android resource: @strings/india msgid "India" msgstr "" @@ -850,18 +900,22 @@ msgid "British Indian Ocean Territory" msgstr "" #. 368 +#. Android resource: @strings/iraq msgid "Iraq" msgstr "" #. 364 +#. Android resource: @strings/iran msgid "Iran, Islamic Republic of" msgstr "" #. 352 +#. Android resource: @strings/iceland msgid "Iceland" msgstr "" #. 380 +#. Android resource: @strings/italy msgid "Italy" msgstr "" @@ -870,6 +924,7 @@ msgid "Jersey" msgstr "" #. 388 +#. Android resource: @strings/jamaica msgid "Jamaica" msgstr "" @@ -878,14 +933,17 @@ msgid "Jordan" msgstr "" #. 392 +#. Android resource: @strings/japan msgid "Japan" msgstr "" #. 404 +#. Android resource: @strings/kenya msgid "Kenya" msgstr "" #. 417 +#. Android resource: @strings/kyrgyzsyan msgid "Kyrgyzstan" msgstr "" @@ -922,6 +980,7 @@ msgid "Cayman Islands" msgstr "" #. 398 +#. Android resource: @strings/kazakhstan msgid "Kazakhstan" msgstr "" @@ -946,26 +1005,32 @@ msgid "Sri Lanka" msgstr "" #. 430 +#. Android resource: @strings/liberia msgid "Liberia" msgstr "" #. 426 +#. Android resource: @strings/lesotho msgid "Lesotho" msgstr "" #. 440 +#. Android resource: @strings/lithuania msgid "Lithuania" msgstr "" #. 442 +#. Android resource: @strings/luxembourg msgid "Luxembourg" msgstr "" #. 428 +#. Android resource: @strings/latvia msgid "Latvia" msgstr "" #. 434 +#. Android resource: @strings/libya msgid "Libya" msgstr "" @@ -990,6 +1055,7 @@ msgid "Saint Martin (French part)" msgstr "" #. 450 +#. Android resource: @strings/madagascar msgid "Madagascar" msgstr "" @@ -1010,6 +1076,7 @@ msgid "Myanmar" msgstr "" #. 496 +#. Android resource: @strings/mongolia msgid "Mongolia" msgstr "" @@ -1050,10 +1117,12 @@ msgid "Malawi" msgstr "" #. 484 +#. Android resource: @strings/mexico msgid "Mexico" msgstr "" #. 458 +#. Android resource: @strings/malaysia msgid "Malaysia" msgstr "" @@ -1062,10 +1131,12 @@ msgid "Mozambique" msgstr "" #. 516 +#. Android resource: @strings/namibia msgid "Namibia" msgstr "" #. 540 +#. Android resource: @strings/new_caledonia msgid "New Caledonia" msgstr "" @@ -1086,6 +1157,7 @@ msgid "Nicaragua" msgstr "" #. 528 +#. Android resource: @strings/netherlands msgid "Netherlands" msgstr "" @@ -1094,6 +1166,7 @@ msgid "Norway" msgstr "" #. 524 +#. Android resource: @strings/nepal msgid "Nepal" msgstr "" @@ -1106,6 +1179,7 @@ msgid "Niue" msgstr "" #. 554 +#. Android resource: @strings/newzealand msgid "New Zealand" msgstr "" @@ -1118,6 +1192,7 @@ msgid "Panama" msgstr "" #. 604 +#. Android resource: @strings/peru msgid "Peru" msgstr "" @@ -1130,14 +1205,17 @@ msgid "Papua New Guinea" msgstr "" #. 608 +#. Android resource: @strings/philippines msgid "Philippines" msgstr "" #. 586 +#. Android resource: @strings/pakistan msgid "Pakistan" msgstr "" #. 616 +#. Android resource: @strings/poland msgid "Poland" msgstr "" @@ -1158,6 +1236,7 @@ msgid "Palestinian Territory, Occupied" msgstr "" #. 620 +#. Android resource: @strings/portugal msgid "Portugal" msgstr "" @@ -1166,6 +1245,7 @@ msgid "Palau" msgstr "" #. 600 +#. Android resource: @strings/paraguay msgid "Paraguay" msgstr "" @@ -1174,10 +1254,12 @@ msgid "Qatar" msgstr "" #. 638 +#. Android resource: @strings/reunion msgid "Reunion" msgstr "" #. 642 +#. Android resource: @strings/romania msgid "Romania" msgstr "" @@ -1186,14 +1268,17 @@ msgid "Serbia" msgstr "" #. 643 +#. Android resource: @strings/russian_federation msgid "Russian Federation" msgstr "" #. 646 +#. Android resource: @strings/rwanda msgid "Rwanda" msgstr "" #. 682 +#. Android resource: @strings/saudi_arabia msgid "Saudi Arabia" msgstr "" @@ -1214,6 +1299,7 @@ msgid "Sweden" msgstr "" #. 702 +#. Android resource: @strings/singapore msgid "Singapore" msgstr "" @@ -1230,6 +1316,7 @@ msgid "Svalbard and Jan Mayen" msgstr "" #. 703 +#. Android resource: @strings/slovakia msgid "Slovakia" msgstr "" @@ -1250,6 +1337,7 @@ msgid "Somalia" msgstr "" #. 740 +#. Android resource: @strings/suriname msgid "Suriname" msgstr "" @@ -1294,6 +1382,7 @@ msgid "Togo" msgstr "" #. 764 +#. Android resource: @strings/thailand msgid "Thailand" msgstr "" @@ -1310,6 +1399,7 @@ msgid "Timor-Leste" msgstr "" #. 795 +#. Android resource: @strings/turkmenistan msgid "Turkmenistan" msgstr "" @@ -1322,6 +1412,7 @@ msgid "Tonga" msgstr "" #. 792 +#. Android resource: @strings/turkey msgid "Turkey" msgstr "" @@ -1338,14 +1429,17 @@ msgid "Taiwan, Province of China" msgstr "" #. 834 +#. Android resource: @strings/tanzania msgid "Tanzania, United Republic of" msgstr "" #. 804 +#. Android resource: @strings/ukraine msgid "Ukraine" msgstr "" #. 800 +#. Android resource: @strings/uganda msgid "Uganda" msgstr "" @@ -1358,6 +1452,7 @@ msgid "United States" msgstr "" #. 858 +#. Android resource: @strings/uruguay msgid "Uruguay" msgstr "" @@ -1374,6 +1469,7 @@ msgid "Saint Vincent and the Grenadines" msgstr "" #. 862 +#. Android resource: @strings/venezuela msgid "Venezuela" msgstr "" @@ -1410,6 +1506,7 @@ msgid "Mayotte" msgstr "" #. 710 +#. Android resource: @strings/south_africa msgid "South Africa" msgstr "" @@ -1437,23 +1534,23 @@ msgid "" msgstr "" #. We have not found an existing config file from all possibilities -msgid "No config file navit.xml, navit.xml.local found\n" +msgid "No config file navit.xml, navit.xml.local found" msgstr "" #, c-format -msgid "Error parsing config file '%s': %s\n" +msgid "Error parsing config file '%s': %s" msgstr "" #, c-format -msgid "Using config file '%s'\n" +msgid "Using config file '%s'" msgstr "" #, c-format -msgid "Error: No configuration found in config file '%s'\n" +msgid "Error: No configuration found in config file '%s'" msgstr "" msgid "" -"Internal initialization failed, exiting. Check previous error messages.\n" +"Internal initialization failed, exiting. Check previous error messages." msgstr "" msgid "unknown street" @@ -1594,6 +1691,9 @@ msgstr "" msgid "_Lock on Road" msgstr "" +msgid "_Follow Vehicle" +msgstr "" + msgid "_Keep orientation to the North" msgstr "" @@ -1663,7 +1763,12 @@ msgstr "" msgid "Shopping" msgstr "" -msgid "Select a search radius from screen center" +#. Input is in kilometers +msgid "Select a search radius from screen center in km" +msgstr "" + +#. Input is in miles. +msgid "Select a search radius from screen center in miles" msgstr "" #, c-format @@ -1671,15 +1776,15 @@ msgid "POI %s. %s" msgstr "" #, c-format -msgid "Set destination to %ld, %ld \n" +msgid "Set destination to %ld, %ld " msgstr "" #, c-format -msgid "Set map to %ld, %ld \n" +msgid "Set map to %ld, %ld " msgstr "" #, c-format -msgid "Set next visit to %ld, %ld \n" +msgid "Set next visit to %ld, %ld " msgstr "" msgid "POI search" @@ -1688,9 +1793,6 @@ msgstr "" msgid "Select a category" msgstr "" -msgid "Select a distance to look for (km)" -msgstr "" - msgid "Select a POI" msgstr "" @@ -1703,7 +1805,7 @@ msgstr "" msgid "Direction" msgstr "" -msgid "Distance(m)" +msgid "Distance" msgstr "" msgid "Name" @@ -1750,7 +1852,7 @@ msgid "OT" msgstr "" #, c-format -msgid "Route %4.0fkm %02d:%02d ETA" +msgid "Route %4.1f%s %02d:%02d ETA" msgstr "" msgid "Route 0000km 0+00:00 ETA" @@ -1973,6 +2075,9 @@ msgstr "" msgid "Show Locale" msgstr "" +msgid "Network info" +msgstr "" + msgid "Former Destinations" msgstr "" @@ -2011,731 +2116,863 @@ msgstr "" msgid "Please decrease your speed" msgstr "" -msgid "partial match" +msgid "Vehicle Position" msgstr "" -#. Android resource: @strings/address_search_button -msgid "Search" +msgid "Main menu" msgstr "" -#. Android resource: @strings/address_search_towns -msgid "Towns" +msgid "" +"Show\n" +"Map" msgstr "" -msgid "Map data (c) OpenStreetMap contributors, ODBL" +msgid "Settings" msgstr "" -msgid "" -"Current map location %s is not available\n" -"Please restart Navit after you attach an SD card or select a different map " -"location." +msgid "Tools" msgstr "" -msgid "Downloaded maps" +msgid "Route" msgstr "" -msgid "" -"Sorry, we currently do not support maps above 3.8G on Android, please select " -"a smaller one." +msgid "About" msgstr "" -#. Android resource: @strings/position_popup_drive_here -msgid "Route to here" +msgid "Quit" msgstr "" -msgid "Cancel" +msgid "Actions" msgstr "" -msgid "filenamePath" +msgid "" +"Former\n" +"Destinations" msgstr "" -msgid "" -"New location set to %s\n" -"Restart Navit to apply the changes." +msgid "Coordinates" msgstr "" -msgid "Whole Planet" +msgid "" +"Stop\n" +"Navigation" msgstr "" -msgid "Africa" +msgid "Display" msgstr "" -msgid "Canary Islands" +msgid "Fullscreen" msgstr "" -msgid "Asia" +msgid "Window Mode" msgstr "" -msgid "Korea" +msgid "Auto zoom" msgstr "" -msgid "Taiwan" +msgid "Manual zoom" msgstr "" -msgid "UAE+Other" +msgid "Layers" msgstr "" -msgid "Oceania" +msgid "Zoom to route" msgstr "" -msgid "Tasmania" +msgid "Description" msgstr "" -msgid "Victoria" +msgid "" +"Drop last\n" +"Waypoint" msgstr "" -msgid "New South Wales" +msgid "" +"Drop next\n" +"Waypoint" msgstr "" -msgid "Europe" +msgid "Satellite Status" msgstr "" -msgid "Western Europe" +msgid "NMEA Data" msgstr "" -msgid "Azores" +msgid "car_shortest" msgstr "" -msgid "BeNeLux" +msgid "car_avoid_tolls" msgstr "" -msgid "Alsace" +msgid "car_pedantic" msgstr "" -msgid "Aquitaine" +msgid "horse" msgstr "" -msgid "Auvergne" +msgid "Truck" msgstr "" -msgid "Basse-Normandie" +#. Strings from android/res/values/strings.xml +#. Android resource: @strings/yes +msgid "Yes" msgstr "" -msgid "Bourgogne" +#. Android resource: @strings/cancel +msgid "Cancel" msgstr "" -msgid "Bretagne" +#. Android resource: @strings/notification_ticker +msgid "Navit started" msgstr "" -msgid "Centre" +#. Android resource: @strings/notification_event_default +msgid "Navit running" msgstr "" -msgid "Champagne-Ardenne" +#. Android resource: @strings/initial_info_box_title +msgid "Welcome to Navit" msgstr "" -msgid "Corse" +#. Android resource: @strings/initial_info_box_message +msgid "" +"Thank you for installing Navit!\n" +"\n" +"To start, select \"Download maps\" from the menu to download a map. Note: " +"The map filesize may be large (>50MB) - a wifi connection is recommended.\n" +"\n" +"Mapdata: (c) OpenStreetMap contributors\n" +"\n" +"Enjoy Navit!" msgstr "" -msgid "Franche-Comte" +#. Android resource: @strings/initial_info_box_OK +msgid "OK" msgstr "" -msgid "Haute-Normandie" +#. Android resource: @strings/initial_info_box_more_info +msgid "More info" msgstr "" -msgid "Ile-de-France" +#. Android resource: @strings/optionsmenu_zoom_in +msgid "Zoom in" msgstr "" -msgid "Languedoc-Roussillon" +#. Android resource: @strings/optionsmenu_zoom_out +msgid "Zoom out" msgstr "" -msgid "Limousin" +#. Android resource: @strings/optionsmenu_download_maps +msgid "Download maps" msgstr "" -msgid "Lorraine" +#. Android resource: @strings/optionsmenu_toggle_poi +msgid "Toggle POIs" msgstr "" -msgid "Midi-Pyrenees" +#. Android resource: @strings/optionsmenu_exit_navit +msgid "Exit Navit" msgstr "" -msgid "Nord-pas-de-Calais" +#. Android resource: @strings/optionsmenu_backup_restore +msgid "Backup / Restore" msgstr "" -msgid "Pays-de-la-Loire" +#. Android resource: @strings/optionsmenu_set_map_location +msgid "Set map location" msgstr "" -msgid "Picardie" +#. Android resource: @strings/position_popup_drive_here +msgid "Route to here" msgstr "" -msgid "Poitou-Charentes" +#. Android resource: @strings/map_delete +msgid "Delete this map?" msgstr "" -msgid "Provence-Alpes-Cote-d-Azur" +#. Android resource: @strings/map_download_title +msgid "Map download" msgstr "" -msgid "Rhone-Alpes" +#. Android resource: @strings/map_download_downloading +msgid "Downloading:" msgstr "" -msgid "Baden-Wuerttemberg" +#. Android resource: @strings/map_download_eta +msgid "ETA" msgstr "" -msgid "Bayern" +#. Android resource: @strings/map_download_ready +msgid "ready" msgstr "" -msgid "Mittelfranken" +#. Android resource: @strings/map_download_download_error +msgid "Error downloading map." msgstr "" -msgid "Niederbayern" +#. Android resource: @strings/map_download_download_aborted +msgid "Map download aborted" msgstr "" -msgid "Oberbayern" +#. Android resource: @strings/map_download_not_enough_free_space +msgid "Not enough free space" msgstr "" -msgid "Oberfranken" +#. Android resource: @strings/map_download_oversize +msgid "" +"Sorry, we currently do not support maps above 3.8G on Android, please select " +"a smaller one." msgstr "" -msgid "Oberpfalz" +#. Android resource: @strings/map_no_fix +msgid "No location. Reopen after location fix." msgstr "" -msgid "Schwaben" +#. Android resource: @strings/maps_for_current_location +msgid "Maps containing current location" msgstr "" -msgid "Unterfranken" +#. Android resource: @strings/maps_installed +msgid "Installed maps" msgstr "" -msgid "Berlin" +#. Android resource: @strings/map_downloading +msgid "downloading" msgstr "" -msgid "Brandenburg" +#. Android resource: @strings/map_download_medium_unavailable +msgid "Media selected for map storage is not available" msgstr "" -msgid "Bremen" +#. Android resource: @strings/map_download_error_writing_map +msgid "Error writing map!" msgstr "" -msgid "Hamburg" +#. Android resource: @strings/map_location_changed +#, c-format +msgid "New location set to %s Restart Navit to apply the changes." msgstr "" -msgid "Hessen" +#. Android resource: @strings/map_location_unavailable +#, c-format +msgid "" +"Current map location %s is not available Please restart Navit after you " +"attach an SD card or select a different map location." msgstr "" -msgid "Mecklenburg-Vorpommern" +#. Android resource: @strings/address_search_title +msgid "Address search" msgstr "" -msgid "Niedersachsen" +#. Android resource: @strings/address_enter_destination +msgid "Enter destination" msgstr "" -msgid "Nordrhein-westfalen" +#. Android resource: @strings/address_partial_match +msgid "Match partial address" msgstr "" -msgid "Rheinland-Pfalz" +#. Android resource: @strings/address_search_button +msgid "Search" msgstr "" -msgid "Saarland" +#. Android resource: @strings/address_search_searching +msgid "Searching..." msgstr "" -msgid "Sachsen-Anhalt" +#. Android resource: @strings/address_search_not_found +msgid "Address not found" msgstr "" -msgid "Sachsen" +#. Android resource: @strings/address_search_getting_results +msgid "Getting search results" msgstr "" -msgid "Schleswig-Holstein" +#. Android resource: @strings/address_search_loading_results +msgid "Loading search results" msgstr "" -msgid "Thueringen" +#. Android resource: @strings/address_search_no_results +msgid "No results found" msgstr "" -msgid "Mallorca" +#. Android resource: @strings/address_search_no_text_entered +msgid "No text entered" msgstr "" -msgid "Galicia" +#. Android resource: @strings/address_search_set_destination +msgid "Setting destination to:" msgstr "" -msgid "Scandinavia" +#. Android resource: @strings/address_search_towns +msgid "Towns" msgstr "" -msgid "England" +#. Android resource: @strings/choose_an_action +msgid "Choose an action" msgstr "" -msgid "Buckinghamshire" +#. Android resource: @strings/please_insert_an_sd_card +msgid "Please insert an SD Card" msgstr "" -msgid "Cambridgeshire" +#. Android resource: @strings/backing_up +msgid "Backing up..." msgstr "" -msgid "Cumbria" +#. Android resource: @strings/restoring +msgid "Restoring..." msgstr "" -msgid "East yorkshire with hull" +#. Android resource: @strings/failed_to_create_backup_directory +msgid "Failed to create backup directory" msgstr "" -msgid "Essex" +#. Android resource: @strings/backup_failed +msgid "Backup failed" msgstr "" -msgid "Herefordshire" +#. Android resource: @strings/no_backup_found +msgid "No backup found" msgstr "" -msgid "Kent" +#. Android resource: @strings/failed_to_restore +msgid "Failed to restore" msgstr "" -msgid "Lancashire" +#. Android resource: @strings/backup_successful +msgid "Backup successful" msgstr "" -msgid "Leicestershire" +#. Android resource: @strings/restore_successful_please_restart_navit +msgid "" +"Restore Successful\n" +"Please restart Navit" msgstr "" -msgid "Norfolk" +#. Android resource: @strings/backup_not_found +msgid "Backup not found" msgstr "" -msgid "Nottinghamshire" +#. Android resource: @strings/restore_failed +msgid "Restore failed" msgstr "" -msgid "Oxfordshire" +#. Android resource: @strings/select_backup +msgid "Select backup" msgstr "" -msgid "Shropshire" +#. Android resource: @strings/backup +msgid "Backup" msgstr "" -msgid "Somerset" +#. Android resource: @strings/restore +msgid "Restore" msgstr "" -msgid "South yorkshire" +#. Android resource: @strings/TTS_title_data_missing +msgid "System text to speech engine data is missing" msgstr "" -msgid "Suffolk" +#. Android resource: @strings/TTS_qery_install_data +msgid "" +"Navit can use any text to speech engine installed on your device. The " +"currently selected engine reports it is unable to speak in your language. " +"Should we ask the system to show voice download dialog?" msgstr "" -msgid "Surrey" +#. Android resource: @strings/permissions_not_granted +msgid "" +"Navit needs permission to access GPS and read the map.\n" +"If you change your mind please restart Navit and grant the permissions" msgstr "" -msgid "Wiltshire" +#. Android resource: @strings/permissions_info_box_title +msgid "One or more ungranted permissions" msgstr "" -msgid "Scotland" +#. Android resource: @strings/whole_planet +msgid "Whole Planet" msgstr "" -msgid "Wales" +#. Android resource: @strings/africa +msgid "Africa" msgstr "" -msgid "Crete" +#. Android resource: @strings/canary_islands +msgid "Canary Islands" msgstr "" -msgid "North America" +#. Android resource: @strings/asia +msgid "Asia" msgstr "" -msgid "Alaska" +#. Android resource: @strings/taiwan +msgid "Taiwan" msgstr "" -msgid "Hawaii" +#. Android resource: @strings/korea +msgid "Korea" msgstr "" -msgid "USA" +#. Android resource: @strings/uae_other +msgid "UAE+Other" msgstr "" -msgid " (except Alaska and Hawaii)" +#. Android resource: @strings/oceania +msgid "Oceania" msgstr "" -msgid "Midwest" +#. Android resource: @strings/tasmania +msgid "Tasmania" msgstr "" -msgid "Michigan" +#. Android resource: @strings/victoria +msgid "Victoria" msgstr "" -msgid "Ohio" +#. Android resource: @strings/new_south_wales +msgid "New South Wales" msgstr "" -msgid "Northeast" +#. Android resource: @strings/europe +msgid "Europe" msgstr "" -msgid "Massachusetts" +#. Android resource: @strings/western_europe +msgid "Western Europe" msgstr "" -msgid "Vermont" +#. Android resource: @strings/azores +msgid "Azores" msgstr "" -msgid "Pacific" +#. Android resource: @strings/benelux +msgid "BeNeLux" msgstr "" -msgid "South" +#. Android resource: @strings/alsace +msgid "Alsace" msgstr "" -msgid "Arkansas" +#. Android resource: @strings/aquitaine +msgid "Aquitaine" msgstr "" -msgid "District of Columbia" +#. Android resource: @strings/auvergne +msgid "Auvergne" msgstr "" -msgid "Florida" +#. Android resource: @strings/centre +msgid "Centre" msgstr "" -msgid "Louisiana" +#. Android resource: @strings/bretagne +msgid "Bretagne" msgstr "" -msgid "Maryland" +#. Android resource: @strings/bourgogne +msgid "Bourgogne" msgstr "" -msgid "Mississippi" +#. Android resource: @strings/basse_normandie +msgid "Basse-Normandie" msgstr "" -msgid "Oklahoma" +#. Android resource: @strings/champagne_ardenne +msgid "Champagne-Ardenne" msgstr "" -msgid "Texas" +#. Android resource: @strings/corse +msgid "Corse" msgstr "" -msgid "Virginia" +#. Android resource: @strings/franche_comte +msgid "Franche-Comte" msgstr "" -msgid "West Virginia" +#. Android resource: @strings/haute_normandie +msgid "Haute-Normandie" msgstr "" -msgid "West" +#. Android resource: @strings/ile_de_france +msgid "Ile-de-France" msgstr "" -msgid "Arizona" +#. Android resource: @strings/languedoc_roussillon +msgid "Languedoc-Roussillon" msgstr "" -msgid "California" +#. Android resource: @strings/limousin +msgid "Limousin" msgstr "" -msgid "Colorado" +#. Android resource: @strings/lorraine +msgid "Lorraine" msgstr "" -msgid "Idaho" +#. Android resource: @strings/midi_pyrenees +msgid "Midi-Pyrenees" msgstr "" -msgid "Montana" +#. Android resource: @strings/nord_pas_de_calais +msgid "Nord-pas-de-Calais" msgstr "" -msgid "New Mexico" +#. Android resource: @strings/pays_de_la_loire +msgid "Pays-de-la-Loire" msgstr "" -msgid "Nevada" +#. Android resource: @strings/picardie +msgid "Picardie" msgstr "" -msgid "Oregon" +#. Android resource: @strings/poitou_charentes +msgid "Poitou-Charentes" msgstr "" -msgid "Utah" +#. Android resource: @strings/provence_alpes_cote_d_azur +msgid "Provence-Alpes-Cote-d-Azur" msgstr "" -msgid "Washington State" +#. Android resource: @strings/rhone_alpes +msgid "Rhone-Alpes" msgstr "" -msgid "South+Middle America" +#. Android resource: @strings/baden_wuerttemberg +msgid "Baden-Wuerttemberg" msgstr "" -msgid "Guyane Francaise" +#. Android resource: @strings/bayern +msgid "Bayern" msgstr "" -msgid "downloading" +#. Android resource: @strings/mittelfranken +msgid "Mittelfranken" msgstr "" -#. Android resource: @strings/map_download_ready -msgid "ready" +#. Android resource: @strings/niederbayern +msgid "Niederbayern" msgstr "" -msgid "Media selected for map storage is not available" +#. Android resource: @strings/oberbayern +msgid "Oberbayern" msgstr "" -#. Android resource: @strings/map_download_not_enough_free_space -msgid "Not enough free space" +#. Android resource: @strings/oberfranken +msgid "Oberfranken" msgstr "" -msgid "Error downloading map!" +#. Android resource: @strings/oberpfalz +msgid "Oberpfalz" msgstr "" -msgid "Error writing map!" +#. Android resource: @strings/schwaben +msgid "Schwaben" msgstr "" -msgid "Map download aborted!" +#. Android resource: @strings/unterfranken +msgid "Unterfranken" msgstr "" -#. Android resource: @strings/map_download_eta -msgid "ETA" +#. Android resource: @strings/berlin +msgid "Berlin" msgstr "" -#. Android resource: @strings/map_download_title -msgid "Map download" +#. Android resource: @strings/brandenburg +msgid "Brandenburg" msgstr "" -msgid "Vehicle Position" +#. Android resource: @strings/bremen +msgid "Bremen" msgstr "" -msgid "Main menu" +#. Android resource: @strings/hamburg +msgid "Hamburg" msgstr "" -msgid "" -"Show\n" -"Map" +#. Android resource: @strings/hessen +msgid "Hessen" msgstr "" -msgid "Settings" +#. Android resource: @strings/mecklenburg_vorpommern +msgid "Mecklenburg-Vorpommern" msgstr "" -msgid "Tools" +#. Android resource: @strings/niedersachsen +msgid "Niedersachsen" msgstr "" -msgid "Route" +#. Android resource: @strings/nordrhein_westfalen +msgid "Nordrhein-westfalen" msgstr "" -msgid "About" +#. Android resource: @strings/rheinland_pfalz +msgid "Rheinland-Pfalz" msgstr "" -msgid "Quit" +#. Android resource: @strings/saarland +msgid "Saarland" msgstr "" -msgid "Actions" +#. Android resource: @strings/sachsen_anhalt +msgid "Sachsen-Anhalt" msgstr "" -msgid "" -"Former\n" -"Destinations" +#. Android resource: @strings/sachsen +msgid "Sachsen" msgstr "" -msgid "Coordinates" +#. Android resource: @strings/schleswig_holstein +msgid "Schleswig-Holstein" msgstr "" -msgid "" -"Stop\n" -"Navigation" +#. Android resource: @strings/thueringen +msgid "Thueringen" msgstr "" -msgid "Display" +#. Android resource: @strings/mallorca +msgid "Mallorca" msgstr "" -msgid "Fullscreen" +#. Android resource: @strings/galicia +msgid "Galicia" msgstr "" -msgid "Window Mode" +#. Android resource: @strings/scandinavia +msgid "Scandinavia" msgstr "" -msgid "Layers" +#. Android resource: @strings/england +msgid "England" msgstr "" -msgid "Description" +#. Android resource: @strings/buckinghamshire +msgid "Buckinghamshire" msgstr "" -msgid "" -"Drop last \n" -"Waypoint" +#. Android resource: @strings/cambridgeshire +msgid "Cambridgeshire" msgstr "" -msgid "" -"Drop next \n" -"Waypoint" +#. Android resource: @strings/cumbria +msgid "Cumbria" msgstr "" -msgid "Satellite Status" +#. Android resource: @strings/east_yorkshire_with_hull +msgid "East yorkshire with hull" msgstr "" -msgid "NMEA Data" +#. Android resource: @strings/essex +msgid "Essex" msgstr "" -msgid "car_shortest" +#. Android resource: @strings/herefordshire +msgid "Herefordshire" msgstr "" -msgid "car_avoid_tolls" +#. Android resource: @strings/kent +msgid "Kent" msgstr "" -msgid "car_pedantic" +#. Android resource: @strings/lancashire +msgid "Lancashire" msgstr "" -msgid "horse" +#. Android resource: @strings/leicestershire +msgid "Leicestershire" msgstr "" -msgid "Truck" +#. Android resource: @strings/norfolk +msgid "Norfolk" msgstr "" -#. Strings from android/res/values/strings.xml -#. Android resource: @strings/yes -msgid "Yes" +#. Android resource: @strings/nottinghamshire +msgid "Nottinghamshire" msgstr "" -#. Android resource: @strings/notification_ticker -msgid "Navit started" +#. Android resource: @strings/oxfordshire +msgid "Oxfordshire" msgstr "" -#. Android resource: @strings/notification_event_default -msgid "Navit running" +#. Android resource: @strings/shropshire +msgid "Shropshire" msgstr "" -#. Android resource: @strings/initial_info_box_title -msgid "Welcome to Navit" +#. Android resource: @strings/somerset +msgid "Somerset" msgstr "" -#. Android resource: @strings/initial_info_box_message -msgid "" -"Thank you for installing Navit!\n" -"\n" -"To start, select \"Download maps\" from the menu to download a map. Note: " -"The map filesize may be large (>50MB) - a wifi connection is recommended.\n" -"\n" -"Mapdata: (c) OpenStreetMap contributors\n" -"\n" -"Enjoy Navit!" +#. Android resource: @strings/south_yorkshire +msgid "South yorkshire" msgstr "" -#. Android resource: @strings/initial_info_box_OK -msgid "OK" +#. Android resource: @strings/suffolk +msgid "Suffolk" msgstr "" -#. Android resource: @strings/initial_info_box_more_info -msgid "More info" +#. Android resource: @strings/surrey +msgid "Surrey" msgstr "" -#. Android resource: @strings/optionsmenu_zoom_in -msgid "Zoom in" +#. Android resource: @strings/wiltshire +msgid "Wiltshire" msgstr "" -#. Android resource: @strings/optionsmenu_zoom_out -msgid "Zoom out" +#. Android resource: @strings/scotland +msgid "Scotland" msgstr "" -#. Android resource: @strings/optionsmenu_download_maps -msgid "Download maps" +#. Android resource: @strings/wales +msgid "Wales" msgstr "" -#. Android resource: @strings/optionsmenu_toggle_poi -msgid "Toggle POIs" +#. Android resource: @strings/crete +msgid "Crete" msgstr "" -#. Android resource: @strings/optionsmenu_exit_navit -msgid "Exit Navit" +#. Android resource: @strings/north_america +msgid "North America" msgstr "" -#. Android resource: @strings/optionsmenu_backup_restore -msgid "Backup / Restore" +#. Android resource: @strings/alaska +msgid "Alaska" msgstr "" -#. Android resource: @strings/optionsmenu_set_map_location -msgid "Set map location" +#. Android resource: @strings/hawaii +msgid "Hawaii" msgstr "" -#. Android resource: @strings/map_delete -msgid "Delete this map?" +#. Android resource: @strings/usa +msgid "USA" msgstr "" -#. Android resource: @strings/map_download_downloading -msgid "Downloading:" +#. Android resource: @strings/except_alaska_and_hawaii +msgid "(except Alaska and Hawaii)" msgstr "" -#. Android resource: @strings/map_download_download_error -msgid "Error downloading map." +#. Android resource: @strings/midwest +msgid "Midwest" msgstr "" -#. Android resource: @strings/map_download_download_aborted -msgid "Map download aborted" +#. Android resource: @strings/michigan +msgid "Michigan" msgstr "" -#. Android resource: @strings/map_no_fix -msgid "No location. Reopen after location fix." +#. Android resource: @strings/ohio +msgid "Ohio" msgstr "" -#. Android resource: @strings/maps_for_current_location -msgid "Maps containing current location" +#. Android resource: @strings/northeast +msgid "Northeast" msgstr "" -#. Android resource: @strings/address_search_title -msgid "Address search" +#. Android resource: @strings/massachusetts +msgid "Massachusetts" msgstr "" -#. Android resource: @strings/address_enter_destination -msgid "Enter destination" +#. Android resource: @strings/vermont +msgid "Vermont" msgstr "" -#. Android resource: @strings/address_partial_match -msgid "Match partial address" +#. Android resource: @strings/pacific +msgid "Pacific" msgstr "" -#. Android resource: @strings/address_search_searching -msgid "Searching..." +#. Android resource: @strings/south +msgid "South" msgstr "" -#. Android resource: @strings/address_search_not_found -msgid "Address not found" +#. Android resource: @strings/arkansas +msgid "Arkansas" msgstr "" -#. Android resource: @strings/address_search_getting_results -msgid "Getting search results" +#. Android resource: @strings/district_of_columbia +msgid "District of Columbia" msgstr "" -#. Android resource: @strings/address_search_loading_results -msgid "Loading search results" +#. Android resource: @strings/florida +msgid "Florida" msgstr "" -#. Android resource: @strings/address_search_no_results -msgid "No results found" +#. Android resource: @strings/louisiana +msgid "Louisiana" msgstr "" -#. Android resource: @strings/address_search_no_text_entered -msgid "No text entered" +#. Android resource: @strings/maryland +msgid "Maryland" msgstr "" -#. Android resource: @strings/address_search_set_destination -msgid "Setting destination to:" +#. Android resource: @strings/mississippi +msgid "Mississippi" msgstr "" -#. Android resource: @strings/choose_an_action -msgid "Choose an action" +#. Android resource: @strings/oklahoma +msgid "Oklahoma" msgstr "" -#. Android resource: @strings/please_insert_an_sd_card -msgid "Please insert an SD Card" +#. Android resource: @strings/texas +msgid "Texas" msgstr "" -#. Android resource: @strings/backing_up -msgid "Backing up..." +#. Android resource: @strings/virginia +msgid "Virginia" msgstr "" -#. Android resource: @strings/restoring -msgid "Restoring..." +#. Android resource: @strings/west_virginia +msgid "West Virginia" msgstr "" -#. Android resource: @strings/failed_to_create_backup_directory -msgid "Failed to create backup directory" +#. Android resource: @strings/west +msgid "West" msgstr "" -#. Android resource: @strings/backup_failed -msgid "Backup failed" +#. Android resource: @strings/arizona +msgid "Arizona" msgstr "" -#. Android resource: @strings/no_backup_found -msgid "No backup found" +#. Android resource: @strings/california +msgid "California" msgstr "" -#. Android resource: @strings/failed_to_restore -msgid "Failed to restore" +#. Android resource: @strings/colorado +msgid "Colorado" msgstr "" -#. Android resource: @strings/backup_successful -msgid "Backup successful" +#. Android resource: @strings/idaho +msgid "Idaho" msgstr "" -#. Android resource: @strings/restore_successful_please_restart_navit -msgid "" -"Restore Successful\n" -"Please restart Navit" +#. Android resource: @strings/montana +msgid "Montana" msgstr "" -#. Android resource: @strings/backup_not_found -msgid "Backup not found" +#. Android resource: @strings/new_mexico +msgid "New Mexico" msgstr "" -#. Android resource: @strings/restore_failed -msgid "Restore failed" +#. Android resource: @strings/nevada +msgid "Nevada" msgstr "" -#. Android resource: @strings/select_backup -msgid "Select backup" +#. Android resource: @strings/oregon +msgid "Oregon" msgstr "" -#. Android resource: @strings/backup -msgid "Backup" +#. Android resource: @strings/utah +msgid "Utah" msgstr "" -#. Android resource: @strings/restore -msgid "Restore" +#. Android resource: @strings/washington_state +msgid "Washington State" msgstr "" -#. Android resource: @strings/TTS_title_data_missing -msgid "System text to speech engine data is missing" +#. Android resource: @strings/south_middle_america +msgid "South+Middle America" msgstr "" -#. Android resource: @strings/TTS_qery_install_data -msgid "" -"Navit can use any text to speech engine installed on your device. The " -"currently selected engine reports it is unable to speak in your language. " -"Should we ask the system to show voice download dialog?" +#. Android resource: @strings/guyane_francaise +msgid "Guyane Francaise" msgstr "" #, c-format diff --git a/po/fr.po.in b/po/fr.po.in index 60d708f76..380470f6c 100644 --- a/po/fr.po.in +++ b/po/fr.po.in @@ -21,6 +21,7 @@ # alfred002 https://launchpad.net/~alfred002 # boism https://launchpad.net/~boism # cyp https://launchpad.net/~cyprien-d +# lains https://launchpad.net/~lains-lp # mercier133 https://launchpad.net/~mercierdamien # metehyi https://launchpad.net/~metehyi # pierre https://launchpad.net/~pmghost4 @@ -30,10 +31,10 @@ msgid "" msgstr "" -"Project-Id-Version: navit 0.5.0\n" +"Project-Id-Version: navit 0.5.1\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2018-04-13 17:26+0000\n" -"Last-Translator: Francois.Mocq <francois.mocq@gmail.com>\n" +"PO-Revision-Date: 2018-10-13 16:09+0000\n" +"Last-Translator: lains <Unknown>\n" "Language-Team: KaZeR <kazer@altern.org>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -174,7 +175,6 @@ msgstr "%1$svers la %2$s" msgid "%1$sonto %2$s|neuter form" msgstr "%1$svers l'%2$s" -#. TRANSLATORS: motorway ramp refers to the slip road for entering a motorway. msgid "onto the motorway ramp" msgstr "et prendre la bretelle" @@ -243,22 +243,22 @@ msgstr "puis" #. TRANSLATORS: the arg. is the phrase 'onto ...'. Right merge, the stuff after | doesn't have to be included. #, c-format msgid "then merge%1$s|right" -msgstr "Puis prendre à droite %1$s" +msgstr "puis s'insérer à droite %1$s" #. TRANSLATORS: the first arg. is distance, the second is the phrase 'onto ...'. Right merge, the stuff after | doesn't have to be included. #, c-format msgid "Merge %1$s%2$s|right" -msgstr "%1$s prendre à droite %2$s" +msgstr "%1$s s'insérer à droite %2$s" #. TRANSLATORS: the arg. is the phrase 'onto ...'. Left merge, the stuff after | doesn't have to be included. #, c-format msgid "then merge%1$s|left" -msgstr "Puis prendre à gauche %1$s" +msgstr "Puis s'insérer à gauche %1$s" #. TRANSLATORS: the first arg. is distance, the second is the phrase 'onto ...'. Left merge, the stuff after | doesn't have to be included. #, c-format msgid "Merge %1$s%2$s|left" -msgstr "%1$s prendre à gauche %2$s" +msgstr "%1$s s'insérer à gauche %2$s" msgid "on your left" msgstr "sur votre gauche" @@ -390,7 +390,6 @@ msgstr "puis vous arriverez à destination" msgid "You have reached your destination %s" msgstr "Vous êtes arrivé à destination %s" -#. TRANSLATORS: Exit as a noun, as in "Exit 43 Greenmound-East" msgid "Interchange" msgstr "Echangeur" @@ -414,7 +413,7 @@ msgid "km" msgstr "km" msgid "feet" -msgstr "" +msgstr "pieds" msgid "m" msgstr "m" @@ -476,6 +475,7 @@ msgid "Anguilla" msgstr "Anguille" #. 008 +#. Android resource: @strings/albania msgid "Albania" msgstr "Albanie" @@ -488,6 +488,7 @@ msgid "Netherlands Antilles" msgstr "Antilles néerlandaises" #. 024 +#. Android resource: @strings/angola msgid "Angola" msgstr "Angola" @@ -496,6 +497,7 @@ msgid "Antarctica" msgstr "Antarctique" #. 032 +#. Android resource: @strings/argentina msgid "Argentina" msgstr "Argentine" @@ -504,10 +506,12 @@ msgid "American Samoa" msgstr "Samoa américaines" #. 040 +#. Android resource: @strings/austria msgid "Austria" msgstr "Autriche" #. 036 +#. Android resource: @strings/australia msgid "Australia" msgstr "Australie" @@ -520,10 +524,12 @@ msgid "Aland Islands" msgstr "Åland, îles" #. 031 +#. Android resource: @strings/azerbaijan msgid "Azerbaijan" msgstr "Azerbaïdjan" #. 070 +#. Android resource: @strings/bosnia_and_herzegovina msgid "Bosnia and Herzegovina" msgstr "Bosnie Herzégovine" @@ -536,6 +542,7 @@ msgid "Bangladesh" msgstr "Bengladesh" #. 056 +#. Android resource: @strings/belgium msgid "Belgium" msgstr "Belgique" @@ -544,6 +551,7 @@ msgid "Burkina Faso" msgstr "Burkina Faso" #. 100 +#. Android resource: @strings/bulgaria msgid "Bulgaria" msgstr "Bulgarie" @@ -552,6 +560,7 @@ msgid "Bahrain" msgstr "Bahreïn" #. 108 +#. Android resource: @strings/burundi msgid "Burundi" msgstr "Burundi" @@ -572,6 +581,7 @@ msgid "Brunei Darussalam" msgstr "Brunei Darussalam" #. 068 +#. Android resource: @strings/bolivia msgid "Bolivia" msgstr "Bolivie" @@ -580,6 +590,7 @@ msgid "Bonaire, Sint Eustatius and Saba" msgstr "Bonaire, Saint-Eustache et Saba" #. 076 +#. Android resource: @strings/brazil msgid "Brazil" msgstr "Brésil" @@ -596,10 +607,12 @@ msgid "Bouvet Island" msgstr "Îles Bouvet" #. 072 +#. Android resource: @strings/botswana msgid "Botswana" msgstr "Botswana" #. 112 +#. Android resource: @strings/belarus msgid "Belarus" msgstr "Biélorussie" @@ -608,6 +621,7 @@ msgid "Belize" msgstr "Belize" #. 124 +#. Android resource: @strings/canada msgid "Canada" msgstr "Canada" @@ -616,6 +630,7 @@ msgid "Cocos (Keeling) Islands" msgstr "Îles Cocos" #. 180 +#. Android resource: @strings/congo msgid "Congo, Democratic Republic of the" msgstr "Répulique démocratique du Congo" @@ -628,10 +643,12 @@ msgid "Congo" msgstr "Congo" #. 756 +#. Android resource: @strings/switzerland msgid "Switzerland" msgstr "Suisse" #. 384 +#. Android resource: @strings/cotedivoire msgid "Cote d'Ivoire" msgstr "Côte d'Ivoire" @@ -640,6 +657,7 @@ msgid "Cook Islands" msgstr "Îles Cook" #. 152 +#. Android resource: @strings/chile msgid "Chile" msgstr "Chili" @@ -648,10 +666,12 @@ msgid "Cameroon" msgstr "Cameroun" #. 156 +#. Android resource: @strings/china msgid "China" msgstr "Chine" #. 170 +#. Android resource: @strings/colombia msgid "Colombia" msgstr "Colombie" @@ -660,6 +680,7 @@ msgid "Costa Rica" msgstr "Costa Rica" #. 192 +#. Android resource: @strings/cuba msgid "Cuba" msgstr "Cuba" @@ -676,14 +697,17 @@ msgid "Christmas Island" msgstr "Île Christmas" #. 196 +#. Android resource: @strings/cyprus msgid "Cyprus" msgstr "Chypre" #. 203 +#. Android resource: @strings/czech_republic msgid "Czech Republic" msgstr "République Tchèque" #. 276 +#. Android resource: @strings/germany msgid "Germany" msgstr "Allemagne" @@ -692,6 +716,7 @@ msgid "Djibouti" msgstr "Djibouti" #. 208 +#. Android resource: @strings/denmark msgid "Denmark" msgstr "Danemark" @@ -700,6 +725,7 @@ msgid "Dominica" msgstr "Dominique" #. 214 +#. Android resource: @strings/dominican_republic msgid "Dominican Republic" msgstr "République Dominicaine" @@ -708,10 +734,12 @@ msgid "Algeria" msgstr "Algérie" #. 218 +#. Android resource: @strings/ecuador msgid "Ecuador" msgstr "Équateur" #. 233 +#. Android resource: @strings/estonia msgid "Estonia" msgstr "Estonie" @@ -728,14 +756,17 @@ msgid "Eritrea" msgstr "Erythrée" #. 724 +#. Android resource: @strings/spain msgid "Spain" msgstr "Espagne" #. 231 +#. Android resource: @strings/ethiopia msgid "Ethiopia" msgstr "Ethiopie" #. 246 +#. Android resource: @strings/finland msgid "Finland" msgstr "Finlande" @@ -752,10 +783,12 @@ msgid "Micronesia, Federated States of" msgstr "Micronésie, États fédérés de" #. 234 +#. Android resource: @strings/faroe_islands msgid "Faroe Islands" msgstr "Îles Féroé" #. 250 +#. Android resource: @strings/france msgid "France" msgstr "France" @@ -764,6 +797,7 @@ msgid "Gabon" msgstr "Gabon" #. 826 +#. Android resource: @strings/united_kingdom msgid "United Kingdom" msgstr "Royaume-Uni" @@ -800,6 +834,7 @@ msgid "Gambia" msgstr "Gambie" #. 324 +#. Android resource: @strings/guinea msgid "Guinea" msgstr "Guinée" @@ -812,6 +847,7 @@ msgid "Equatorial Guinea" msgstr "Guinée équatoriale" #. 300 +#. Android resource: @strings/greece msgid "Greece" msgstr "Grèce" @@ -832,6 +868,7 @@ msgid "Guinea-Bissau" msgstr "Guinée-Bissau" #. 328 +#. Android resource: @strings/guyana msgid "Guyana" msgstr "Guyane" @@ -848,26 +885,32 @@ msgid "Honduras" msgstr "Honduras" #. 191 +#. Android resource: @strings/croatia msgid "Croatia" msgstr "Croatie" #. 332 +#. Android resource: @strings/haiti msgid "Haiti" msgstr "Haïti" #. 348 +#. Android resource: @strings/hungary msgid "Hungary" msgstr "Hongrie" #. 360 +#. Android resource: @strings/indonesia msgid "Indonesia" msgstr "Indonésie" #. 372 +#. Android resource: @strings/ireland msgid "Ireland" msgstr "Irlande" #. 376 +#. Android resource: @strings/israel msgid "Israel" msgstr "Israël" @@ -876,6 +919,7 @@ msgid "Isle of Man" msgstr "Ile de Man" #. 356 +#. Android resource: @strings/india msgid "India" msgstr "Inde" @@ -884,18 +928,22 @@ msgid "British Indian Ocean Territory" msgstr "Territoire britannique de l'océan Indien" #. 368 +#. Android resource: @strings/iraq msgid "Iraq" msgstr "Irak" #. 364 +#. Android resource: @strings/iran msgid "Iran, Islamic Republic of" msgstr "Iran, République islamique d'" #. 352 +#. Android resource: @strings/iceland msgid "Iceland" msgstr "Islande" #. 380 +#. Android resource: @strings/italy msgid "Italy" msgstr "Italie" @@ -904,6 +952,7 @@ msgid "Jersey" msgstr "Jersey" #. 388 +#. Android resource: @strings/jamaica msgid "Jamaica" msgstr "Jamaïque" @@ -912,14 +961,17 @@ msgid "Jordan" msgstr "Jordanie" #. 392 +#. Android resource: @strings/japan msgid "Japan" msgstr "Japon" #. 404 +#. Android resource: @strings/kenya msgid "Kenya" msgstr "Kenya" #. 417 +#. Android resource: @strings/kyrgyzsyan msgid "Kyrgyzstan" msgstr "Kirghizstan" @@ -956,6 +1008,7 @@ msgid "Cayman Islands" msgstr "Îles Cayman" #. 398 +#. Android resource: @strings/kazakhstan msgid "Kazakhstan" msgstr "Kazakhstan" @@ -980,26 +1033,32 @@ msgid "Sri Lanka" msgstr "Sri Lanka" #. 430 +#. Android resource: @strings/liberia msgid "Liberia" msgstr "Libéria" #. 426 +#. Android resource: @strings/lesotho msgid "Lesotho" msgstr "Lesotho" #. 440 +#. Android resource: @strings/lithuania msgid "Lithuania" msgstr "Lithuanie" #. 442 +#. Android resource: @strings/luxembourg msgid "Luxembourg" msgstr "Luxembourg" #. 428 +#. Android resource: @strings/latvia msgid "Latvia" msgstr "Lettonie" #. 434 +#. Android resource: @strings/libya msgid "Libya" msgstr "Libye" @@ -1024,6 +1083,7 @@ msgid "Saint Martin (French part)" msgstr "Saint Martin" #. 450 +#. Android resource: @strings/madagascar msgid "Madagascar" msgstr "Madagascar" @@ -1044,6 +1104,7 @@ msgid "Myanmar" msgstr "Myanmar" #. 496 +#. Android resource: @strings/mongolia msgid "Mongolia" msgstr "Mongolie" @@ -1084,10 +1145,12 @@ msgid "Malawi" msgstr "Malawi" #. 484 +#. Android resource: @strings/mexico msgid "Mexico" msgstr "Mexique" #. 458 +#. Android resource: @strings/malaysia msgid "Malaysia" msgstr "Malaisie" @@ -1096,10 +1159,12 @@ msgid "Mozambique" msgstr "Mozambique" #. 516 +#. Android resource: @strings/namibia msgid "Namibia" msgstr "Namibie" #. 540 +#. Android resource: @strings/new_caledonia msgid "New Caledonia" msgstr "Nouvelle Calédonie" @@ -1120,6 +1185,7 @@ msgid "Nicaragua" msgstr "Nicaragua" #. 528 +#. Android resource: @strings/netherlands msgid "Netherlands" msgstr "Pays-Bas" @@ -1128,6 +1194,7 @@ msgid "Norway" msgstr "Norvège" #. 524 +#. Android resource: @strings/nepal msgid "Nepal" msgstr "Népal" @@ -1140,6 +1207,7 @@ msgid "Niue" msgstr "Niue" #. 554 +#. Android resource: @strings/newzealand msgid "New Zealand" msgstr "Nouvelle-Zélande" @@ -1152,6 +1220,7 @@ msgid "Panama" msgstr "Panama" #. 604 +#. Android resource: @strings/peru msgid "Peru" msgstr "Pérou" @@ -1164,14 +1233,17 @@ msgid "Papua New Guinea" msgstr "Papouasie-Nouvelle-Guinée" #. 608 +#. Android resource: @strings/philippines msgid "Philippines" msgstr "Philippines" #. 586 +#. Android resource: @strings/pakistan msgid "Pakistan" msgstr "Pakistan" #. 616 +#. Android resource: @strings/poland msgid "Poland" msgstr "Pologne" @@ -1192,6 +1264,7 @@ msgid "Palestinian Territory, Occupied" msgstr "Territoire palestinien, occupé" #. 620 +#. Android resource: @strings/portugal msgid "Portugal" msgstr "Portugal" @@ -1200,6 +1273,7 @@ msgid "Palau" msgstr "Palau" #. 600 +#. Android resource: @strings/paraguay msgid "Paraguay" msgstr "Paraguay" @@ -1208,10 +1282,12 @@ msgid "Qatar" msgstr "Qatar" #. 638 +#. Android resource: @strings/reunion msgid "Reunion" msgstr "Réunion" #. 642 +#. Android resource: @strings/romania msgid "Romania" msgstr "Roumanie" @@ -1220,14 +1296,17 @@ msgid "Serbia" msgstr "Serbie" #. 643 +#. Android resource: @strings/russian_federation msgid "Russian Federation" msgstr "Russie" #. 646 +#. Android resource: @strings/rwanda msgid "Rwanda" msgstr "Rwanda" #. 682 +#. Android resource: @strings/saudi_arabia msgid "Saudi Arabia" msgstr "Arabie Saoudite" @@ -1248,6 +1327,7 @@ msgid "Sweden" msgstr "Suède" #. 702 +#. Android resource: @strings/singapore msgid "Singapore" msgstr "Singapour" @@ -1264,6 +1344,7 @@ msgid "Svalbard and Jan Mayen" msgstr "Svalbard et Jan Mayen" #. 703 +#. Android resource: @strings/slovakia msgid "Slovakia" msgstr "Slovaquie" @@ -1284,6 +1365,7 @@ msgid "Somalia" msgstr "Somalie" #. 740 +#. Android resource: @strings/suriname msgid "Suriname" msgstr "Surinam" @@ -1328,6 +1410,7 @@ msgid "Togo" msgstr "Togo" #. 764 +#. Android resource: @strings/thailand msgid "Thailand" msgstr "Thailande" @@ -1344,6 +1427,7 @@ msgid "Timor-Leste" msgstr "Timor-Leste" #. 795 +#. Android resource: @strings/turkmenistan msgid "Turkmenistan" msgstr "Turkmenistan" @@ -1356,6 +1440,7 @@ msgid "Tonga" msgstr "Tonga" #. 792 +#. Android resource: @strings/turkey msgid "Turkey" msgstr "Turquie" @@ -1372,14 +1457,17 @@ msgid "Taiwan, Province of China" msgstr "Taïwan, province de Chine" #. 834 +#. Android resource: @strings/tanzania msgid "Tanzania, United Republic of" msgstr "Tanzanie, République unie de" #. 804 +#. Android resource: @strings/ukraine msgid "Ukraine" msgstr "Ukraine" #. 800 +#. Android resource: @strings/uganda msgid "Uganda" msgstr "Uganda" @@ -1392,6 +1480,7 @@ msgid "United States" msgstr "États-Unis" #. 858 +#. Android resource: @strings/uruguay msgid "Uruguay" msgstr "Uruguay" @@ -1408,6 +1497,7 @@ msgid "Saint Vincent and the Grenadines" msgstr "Saint-Vincent-et-les Grenadines" #. 862 +#. Android resource: @strings/venezuela msgid "Venezuela" msgstr "Venezuela" @@ -1444,6 +1534,7 @@ msgid "Mayotte" msgstr "Mayotte" #. 710 +#. Android resource: @strings/south_africa msgid "South Africa" msgstr "Afrique du Sud" @@ -1481,26 +1572,26 @@ msgstr "" "\t-v: affiche la version et quitte.\n" #. We have not found an existing config file from all possibilities -msgid "No config file navit.xml, navit.xml.local found\n" -msgstr "Pas de fichier de configuration navit.xml, navit.xml.local trouvé\n" +msgid "No config file navit.xml, navit.xml.local found" +msgstr "Aucun fichier de configuration (navit.xml, navit.xml.local) trouvé" #, c-format -msgid "Error parsing config file '%s': %s\n" -msgstr "erreur d'analyse du fichier de configuration '%s': %s\n" +msgid "Error parsing config file '%s': %s" +msgstr "Erreur d'analyse du fichier de configuration '%s': %s" #, c-format -msgid "Using config file '%s'\n" -msgstr "utilisation du fichier '%s'\n" +msgid "Using config file '%s'" +msgstr "Utilisation du fichier de configuration '%s'" #, c-format -msgid "Error: No configuration found in config file '%s'\n" -msgstr "Erreur: Configuration non trouvée dans le fichier '%s'\n" +msgid "Error: No configuration found in config file '%s'" +msgstr "Erreur: Aucune configuration trouvée dans le fichier '%s'" msgid "" -"Internal initialization failed, exiting. Check previous error messages.\n" +"Internal initialization failed, exiting. Check previous error messages." msgstr "" -"initialisation interne échouée, arrêt de l'exécution. Vérifiez les messages " -"d'erreurs précédents.\n" +"\"Echec de l'initialisation interne , arrêt de l'exécution. Consulter les " +"messages d'erreur précédents." msgid "unknown street" msgstr "rue inconnue" @@ -1712,24 +1803,29 @@ msgstr "Taxi" msgid "Shopping" msgstr "Achats" -msgid "Select a search radius from screen center" -msgstr "Distance du centre de l'écran" +#. Input is in kilometers +msgid "Select a search radius from screen center in km" +msgstr "Choisir un rayon de recherche autour du centre de l'écran (en km)" + +#. Input is in miles. +msgid "Select a search radius from screen center in miles" +msgstr "Choisir un rayon de recherche autour du centre de l'écran (en miles)" #, c-format msgid "POI %s. %s" msgstr "Point d'intérêt %s. %s" #, c-format -msgid "Set destination to %ld, %ld \n" -msgstr "Définir la destination vers %ld, %ld \n" +msgid "Set destination to %ld, %ld " +msgstr "Définir la destination vers %ld,%ld " #, c-format -msgid "Set map to %ld, %ld \n" -msgstr "sélectionner la carte de %ld, %ld \n" +msgid "Set map to %ld, %ld " +msgstr "Centrer la carte sur %ld, %ld \\n " #, c-format -msgid "Set next visit to %ld, %ld \n" -msgstr "Définir la prochaine visite à %ld, %ld \n" +msgid "Set next visit to %ld, %ld " +msgstr "Définir la prochaine étape à %ld, %ld\\n " msgid "POI search" msgstr "recherche de point d'intérêt" @@ -1737,9 +1833,6 @@ msgstr "recherche de point d'intérêt" msgid "Select a category" msgstr "Sélectionnez une catégorie" -msgid "Select a distance to look for (km)" -msgstr "Sélectionnez une distance à chercher (km)" - msgid "Select a POI" msgstr "Sélectionnez un point d'intérêt" @@ -1752,8 +1845,8 @@ msgstr "Catégorie" msgid "Direction" msgstr "Direction" -msgid "Distance(m)" -msgstr "Distance (m)" +msgid "Distance" +msgstr "Distance" msgid "Name" msgstr "Nom" @@ -1889,14 +1982,14 @@ msgstr "Insérer le signet" #, c-format msgid "Bookmark %s" -msgstr "Ajouter %s aux favoris" +msgstr "Favoris %s" #, c-format msgid "Download %s" msgstr "Télécharger %s" msgid "Map Download" -msgstr "Télécharger la carte" +msgstr "Téléchargement de carte" msgid "Active" msgstr "Actif" @@ -1905,7 +1998,7 @@ msgid "Download Enabled" msgstr "Téléchargement activé" msgid "Download completely" -msgstr "Télécharger completement" +msgstr "Télécharger complètement" msgid "Show Satellite Status" msgstr "Afficher les infos satellite" @@ -2024,7 +2117,7 @@ msgid "Show Locale" msgstr "Afficher la locale" msgid "Network info" -msgstr "" +msgstr "Informations réseau" msgid "Former Destinations" msgstr "Destinations précédentes" @@ -2064,9 +2157,6 @@ msgstr "Attention ! Contrôle radar !" msgid "Please decrease your speed" msgstr "Veuillez ralentir" -msgid "filenamePath" -msgstr "emplacementFichier" - msgid "Vehicle Position" msgstr "Position du véhicule" @@ -2125,33 +2215,29 @@ msgid "Window Mode" msgstr "Mode fenêtré" msgid "Auto zoom" -msgstr "" +msgstr "Zoom auto" msgid "Manual zoom" -msgstr "" +msgstr "Zoom manuel" msgid "Layers" msgstr "Couches" msgid "Zoom to route" -msgstr "" +msgstr "Zoomer sur le parcours" msgid "Description" msgstr "Description" msgid "" -"Drop last \n" +"Drop last\n" "Waypoint" -msgstr "" -"Sauter le dernier \n" -"Point de passage" +msgstr "Abandonner la\\ndernière étape" msgid "" -"Drop next \n" +"Drop next\n" "Waypoint" -msgstr "" -"Sauter le prochain \n" -"point de passage" +msgstr "Abandonner la\\nprochaine étape" msgid "Satellite Status" msgstr "Etat des satellites" @@ -2179,6 +2265,10 @@ msgstr "Camion" msgid "Yes" msgstr "Oui" +#. Android resource: @strings/cancel +msgid "Cancel" +msgstr "Annuler" + #. Android resource: @strings/notification_ticker msgid "Navit started" msgstr "Navit commencé" @@ -2234,7 +2324,7 @@ msgstr "Télécharger des cartes" #. Android resource: @strings/optionsmenu_toggle_poi msgid "Toggle POIs" -msgstr "Basculer POIs" +msgstr "Afficher/masquer POIs" #. Android resource: @strings/optionsmenu_exit_navit msgid "Exit Navit" @@ -2246,7 +2336,7 @@ msgstr "Sauvegarde / Restauration" #. Android resource: @strings/optionsmenu_set_map_location msgid "Set map location" -msgstr "sélectionner le chemin de la carte" +msgstr "Emplacement des cartes" #. Android resource: @strings/position_popup_drive_here msgid "Route to here" @@ -2258,7 +2348,7 @@ msgstr "Supprimer cette carte?" #. Android resource: @strings/map_download_title msgid "Map download" -msgstr "Télécharger la carte" +msgstr "Téléchargement de carte" #. Android resource: @strings/map_download_downloading msgid "Downloading:" @@ -2284,6 +2374,14 @@ msgstr "Téléchargement de la carte abandonné" msgid "Not enough free space" msgstr "Pas assez d'espace libre" +#. Android resource: @strings/map_download_oversize +msgid "" +"Sorry, we currently do not support maps above 3.8G on Android, please select " +"a smaller one." +msgstr "" +"Désolé, nous ne supportons pas les cartes de plus de 3.8GB sur Android, " +"merci de sélectionner une carte plus petite." + #. Android resource: @strings/map_no_fix msgid "No location. Reopen after location fix." msgstr "Pas de géolocalisation. Relancez après obtention d'un signal GPS" @@ -2292,6 +2390,35 @@ msgstr "Pas de géolocalisation. Relancez après obtention d'un signal GPS" msgid "Maps containing current location" msgstr "Cartes couvrant la position actuelle" +#. Android resource: @strings/maps_installed +msgid "Installed maps" +msgstr "" + +#. Android resource: @strings/map_downloading +msgid "downloading" +msgstr "transfert en cours" + +#. Android resource: @strings/map_download_medium_unavailable +msgid "Media selected for map storage is not available" +msgstr "" +"Le support sélectionné pour le stockage de la carte n'est pas disponible" + +#. Android resource: @strings/map_download_error_writing_map +msgid "Error writing map!" +msgstr "Erreur d'écriture de carte !" + +#. Android resource: @strings/map_location_changed +#, c-format +msgid "New location set to %s Restart Navit to apply the changes." +msgstr "" + +#. Android resource: @strings/map_location_unavailable +#, c-format +msgid "" +"Current map location %s is not available Please restart Navit after you " +"attach an SD card or select a different map location." +msgstr "" + #. Android resource: @strings/address_search_title msgid "Address search" msgstr "Cherchez adresse" @@ -2431,398 +2558,559 @@ msgstr "" msgid "One or more ungranted permissions" msgstr "Une ou plusieurs autorisations manquantes" -#, c-format -#~ msgid "Route %4.0fkm %02d:%02d ETA" -#~ msgstr "Trajet restant %4.0f km heure d'arrivée estimée %02d:%02d" +#. Android resource: @strings/whole_planet +msgid "Whole Planet" +msgstr "Terre entière" -#~ msgid "Downloaded maps" -#~ msgstr "Cartes téléchargées" +#. Android resource: @strings/africa +msgid "Africa" +msgstr "Afrique" -#~ msgid "Taiwan" -#~ msgstr "Taïwan" +#. Android resource: @strings/canary_islands +msgid "Canary Islands" +msgstr "Îles Canaries" -#~ msgid "Asia" -#~ msgstr "Asie" +#. Android resource: @strings/asia +msgid "Asia" +msgstr "Asie" -#~ msgid "Canary Islands" -#~ msgstr "Îles Canaries" +#. Android resource: @strings/taiwan +msgid "Taiwan" +msgstr "Taïwan" -#~ msgid "Africa" -#~ msgstr "Afrique" +#. Android resource: @strings/korea +msgid "Korea" +msgstr "Corée" -#~ msgid "Korea" -#~ msgstr "Corée" +#. Android resource: @strings/uae_other +msgid "UAE+Other" +msgstr "EAU+Autres" -#~ msgid "Tasmania" -#~ msgstr "Tasmanie" +#. Android resource: @strings/oceania +msgid "Oceania" +msgstr "Océanie" -#~ msgid "partial match" -#~ msgstr "correspondance partielle" +#. Android resource: @strings/tasmania +msgid "Tasmania" +msgstr "Tasmanie" -#~ msgid "downloading" -#~ msgstr "transfert en cours" +#. Android resource: @strings/victoria +msgid "Victoria" +msgstr "Victoria" -#~ msgid "Whole Planet" -#~ msgstr "Terre entière" +#. Android resource: @strings/new_south_wales +msgid "New South Wales" +msgstr "Nouvelle-Galles du Sud" -#~ msgid "Map data (c) OpenStreetMap contributors, ODBL" -#~ msgstr "Données cartographiques (c) OpenStreetMap contributors, ODBL" +#. Android resource: @strings/europe +msgid "Europe" +msgstr "Europe" -#~ msgid "Cancel" -#~ msgstr "Annuler" +#. Android resource: @strings/western_europe +msgid "Western Europe" +msgstr "Europe de l'Ouest" -#~ msgid "Alsace" -#~ msgstr "Alsace" +#. Android resource: @strings/azores +msgid "Azores" +msgstr "Açores" -#~ msgid "BeNeLux" -#~ msgstr "BeNeLux" +#. Android resource: @strings/benelux +msgid "BeNeLux" +msgstr "BeNeLux" -#~ msgid "Oceania" -#~ msgstr "Océanie" +#. Android resource: @strings/alsace +msgid "Alsace" +msgstr "Alsace" -#~ msgid "Western Europe" -#~ msgstr "Europe de l'Ouest" +#. Android resource: @strings/aquitaine +msgid "Aquitaine" +msgstr "Aquitaine" -#~ msgid "Azores" -#~ msgstr "Açores" +#. Android resource: @strings/auvergne +msgid "Auvergne" +msgstr "Auvergne" -#~ msgid "New South Wales" -#~ msgstr "Nouvelle-Galles du Sud" +#. Android resource: @strings/centre +msgid "Centre" +msgstr "Centre" -#~ msgid "Europe" -#~ msgstr "Europe" +#. Android resource: @strings/bretagne +msgid "Bretagne" +msgstr "Bretagne" -#~ msgid "Haute-Normandie" -#~ msgstr "Haute-Normandie" +#. Android resource: @strings/bourgogne +msgid "Bourgogne" +msgstr "Bourgogne" -#~ msgid "Franche-Comte" -#~ msgstr "Franche-Comté" +#. Android resource: @strings/basse_normandie +msgid "Basse-Normandie" +msgstr "Basse-Normandie" -#~ msgid "Centre" -#~ msgstr "Centre" +#. Android resource: @strings/champagne_ardenne +msgid "Champagne-Ardenne" +msgstr "Champagne-Ardenne" -#~ msgid "Bretagne" -#~ msgstr "Bretagne" +#. Android resource: @strings/corse +msgid "Corse" +msgstr "Corse" -#~ msgid "Corse" -#~ msgstr "Corse" +#. Android resource: @strings/franche_comte +msgid "Franche-Comte" +msgstr "Franche-Comté" -#~ msgid "Champagne-Ardenne" -#~ msgstr "Champagne-Ardenne" +#. Android resource: @strings/haute_normandie +msgid "Haute-Normandie" +msgstr "Haute-Normandie" -#~ msgid "Auvergne" -#~ msgstr "Auvergne" +#. Android resource: @strings/ile_de_france +msgid "Ile-de-France" +msgstr "Île-de-France" -#~ msgid "Aquitaine" -#~ msgstr "Aquitaine" +#. Android resource: @strings/languedoc_roussillon +msgid "Languedoc-Roussillon" +msgstr "Languedoc-Roussillon" -#~ msgid "Bourgogne" -#~ msgstr "Bourgogne" +#. Android resource: @strings/limousin +msgid "Limousin" +msgstr "Limousin" -#~ msgid "Basse-Normandie" -#~ msgstr "Basse-Normandie" +#. Android resource: @strings/lorraine +msgid "Lorraine" +msgstr "Lorraine" -#~ msgid "Ile-de-France" -#~ msgstr "Île-de-France" +#. Android resource: @strings/midi_pyrenees +msgid "Midi-Pyrenees" +msgstr "Midi-Pyrénées" -#~ msgid "Languedoc-Roussillon" -#~ msgstr "Languedoc-Roussillon" +#. Android resource: @strings/nord_pas_de_calais +msgid "Nord-pas-de-Calais" +msgstr "Nord-Pas-de-Calais" -#~ msgid "Limousin" -#~ msgstr "Limousin" +#. Android resource: @strings/pays_de_la_loire +msgid "Pays-de-la-Loire" +msgstr "Pays-de-la-Loire" -#~ msgid "Lorraine" -#~ msgstr "Lorraine" +#. Android resource: @strings/picardie +msgid "Picardie" +msgstr "Picardie" -#~ msgid "Midi-Pyrenees" -#~ msgstr "Midi-Pyrénées" +#. Android resource: @strings/poitou_charentes +msgid "Poitou-Charentes" +msgstr "Poitou-Charentes" -#~ msgid "Nord-pas-de-Calais" -#~ msgstr "Nord-Pas-de-Calais" +#. Android resource: @strings/provence_alpes_cote_d_azur +msgid "Provence-Alpes-Cote-d-Azur" +msgstr "Provence-Alpes-Côte d'Azur" -#~ msgid "Pays-de-la-Loire" -#~ msgstr "Pays-de-la-Loire" +#. Android resource: @strings/rhone_alpes +msgid "Rhone-Alpes" +msgstr "Rhône-Alpes" -#~ msgid "Picardie" -#~ msgstr "Picardie" +#. Android resource: @strings/baden_wuerttemberg +msgid "Baden-Wuerttemberg" +msgstr "Bade-Wurtemberg" -#~ msgid "Poitou-Charentes" -#~ msgstr "Poitou-Charentes" +#. Android resource: @strings/bayern +msgid "Bayern" +msgstr "Bavière" -#~ msgid "Provence-Alpes-Cote-d-Azur" -#~ msgstr "Provence-Alpes-Côte d'Azur" +#. Android resource: @strings/mittelfranken +msgid "Mittelfranken" +msgstr "Moyenne-Franconie" -#~ msgid "Mittelfranken" -#~ msgstr "Moyenne-Franconie" +#. Android resource: @strings/niederbayern +msgid "Niederbayern" +msgstr "Basse-Bavière" -#~ msgid "Bayern" -#~ msgstr "Bavière" +#. Android resource: @strings/oberbayern +msgid "Oberbayern" +msgstr "Basse-Bavière" -#~ msgid "Baden-Wuerttemberg" -#~ msgstr "Bade-Wurtemberg" +#. Android resource: @strings/oberfranken +msgid "Oberfranken" +msgstr "Haute-Franconie" -#~ msgid "Rhone-Alpes" -#~ msgstr "Rhône-Alpes" +#. Android resource: @strings/oberpfalz +msgid "Oberpfalz" +msgstr "Haut-Palatinat" -#~ msgid "Oberpfalz" -#~ msgstr "Haut-Palatinat" +#. Android resource: @strings/schwaben +msgid "Schwaben" +msgstr "Souabe" -#~ msgid "Oberfranken" -#~ msgstr "Haute-Franconie" +#. Android resource: @strings/unterfranken +msgid "Unterfranken" +msgstr "Basse-Franconie" -#~ msgid "Oberbayern" -#~ msgstr "Basse-Bavière" +#. Android resource: @strings/berlin +msgid "Berlin" +msgstr "Berlin" -#~ msgid "Unterfranken" -#~ msgstr "Basse-Franconie" +#. Android resource: @strings/brandenburg +msgid "Brandenburg" +msgstr "Brandebourg" -#~ msgid "Schwaben" -#~ msgstr "Souabe" +#. Android resource: @strings/bremen +msgid "Bremen" +msgstr "Brême" -#~ msgid "Niederbayern" -#~ msgstr "Basse-Bavière" +#. Android resource: @strings/hamburg +msgid "Hamburg" +msgstr "Hambourg" -#~ msgid "Rheinland-Pfalz" -#~ msgstr "Rhénanie-Palatinat" +#. Android resource: @strings/hessen +msgid "Hessen" +msgstr "Hesse" -#~ msgid "Niedersachsen" -#~ msgstr "Basse-Saxe" +#. Android resource: @strings/mecklenburg_vorpommern +msgid "Mecklenburg-Vorpommern" +msgstr "Mecklembourg-Poméranie occidentale" -#~ msgid "Nordrhein-westfalen" -#~ msgstr "Rhénanie-du-Nord - Westphalie" +#. Android resource: @strings/niedersachsen +msgid "Niedersachsen" +msgstr "Basse-Saxe" -#~ msgid "Hessen" -#~ msgstr "Hesse" +#. Android resource: @strings/nordrhein_westfalen +msgid "Nordrhein-westfalen" +msgstr "Rhénanie-du-Nord - Westphalie" -#~ msgid "Mecklenburg-Vorpommern" -#~ msgstr "Mecklembourg-Poméranie occidentale" +#. Android resource: @strings/rheinland_pfalz +msgid "Rheinland-Pfalz" +msgstr "Rhénanie-Palatinat" -#~ msgid "Bremen" -#~ msgstr "Brême" +#. Android resource: @strings/saarland +msgid "Saarland" +msgstr "Sarre" -#~ msgid "Hamburg" -#~ msgstr "Hambourg" +#. Android resource: @strings/sachsen_anhalt +msgid "Sachsen-Anhalt" +msgstr "Saxe-Anhalt" -#~ msgid "Berlin" -#~ msgstr "Berlin" +#. Android resource: @strings/sachsen +msgid "Sachsen" +msgstr "Saxe" -#~ msgid "Brandenburg" -#~ msgstr "Brandebourg" +#. Android resource: @strings/schleswig_holstein +msgid "Schleswig-Holstein" +msgstr "Schleswig-Holstein" -#~ msgid "Saarland" -#~ msgstr "Sarre" +#. Android resource: @strings/thueringen +msgid "Thueringen" +msgstr "Thuringe" -#~ msgid "Galicia" -#~ msgstr "Galice" +#. Android resource: @strings/mallorca +msgid "Mallorca" +msgstr "Majorque" -#~ msgid "Cambridgeshire" -#~ msgstr "Cambridgeshire" +#. Android resource: @strings/galicia +msgid "Galicia" +msgstr "Galice" -#~ msgid "Sachsen" -#~ msgstr "Saxe" +#. Android resource: @strings/scandinavia +msgid "Scandinavia" +msgstr "Scandinavie" -#~ msgid "Sachsen-Anhalt" -#~ msgstr "Saxe-Anhalt" +#. Android resource: @strings/england +msgid "England" +msgstr "Angleterre" -#~ msgid "Thueringen" -#~ msgstr "Thuringe" +#. Android resource: @strings/buckinghamshire +msgid "Buckinghamshire" +msgstr "Buckinghamshire" -#~ msgid "Schleswig-Holstein" -#~ msgstr "Schleswig-Holstein" +#. Android resource: @strings/cambridgeshire +msgid "Cambridgeshire" +msgstr "Cambridgeshire" -#~ msgid "Mallorca" -#~ msgstr "Majorque" +#. Android resource: @strings/cumbria +msgid "Cumbria" +msgstr "Cumbrie" -#~ msgid "England" -#~ msgstr "Angleterre" +#. Android resource: @strings/east_yorkshire_with_hull +msgid "East yorkshire with hull" +msgstr "Hull & Yorkshire de l'Est" -#~ msgid "Scandinavia" -#~ msgstr "Scandinavie" +#. Android resource: @strings/essex +msgid "Essex" +msgstr "Essex" -#~ msgid "Buckinghamshire" -#~ msgstr "Buckinghamshire" +#. Android resource: @strings/herefordshire +msgid "Herefordshire" +msgstr "Herefordshire" -#~ msgid "Cumbria" -#~ msgstr "Cumbrie" +#. Android resource: @strings/kent +msgid "Kent" +msgstr "Kent" -#~ msgid "Oregon" -#~ msgstr "Oregon" +#. Android resource: @strings/lancashire +msgid "Lancashire" +msgstr "Lancashire" -#~ msgid "Nevada" -#~ msgstr "Nevada" +#. Android resource: @strings/leicestershire +msgid "Leicestershire" +msgstr "Leicestershire" -#~ msgid "New Mexico" -#~ msgstr "Nouveau-Mexique" +#. Android resource: @strings/norfolk +msgid "Norfolk" +msgstr "Norfolk" -#~ msgid "Arizona" -#~ msgstr "Arizona" +#. Android resource: @strings/nottinghamshire +msgid "Nottinghamshire" +msgstr "Nottinghamshire" -#~ msgid "West" -#~ msgstr "Ouest" +#. Android resource: @strings/oxfordshire +msgid "Oxfordshire" +msgstr "Oxfordshire" -#~ msgid "Colorado" -#~ msgstr "Colorado" +#. Android resource: @strings/shropshire +msgid "Shropshire" +msgstr "Shropshire" -#~ msgid "California" -#~ msgstr "Californie" +#. Android resource: @strings/somerset +msgid "Somerset" +msgstr "Somerset" -#~ msgid "Montana" -#~ msgstr "Montana" +#. Android resource: @strings/south_yorkshire +msgid "South yorkshire" +msgstr "Yorkshire de l'Ouest" -#~ msgid "Florida" -#~ msgstr "Floride" +#. Android resource: @strings/suffolk +msgid "Suffolk" +msgstr "Suffolk" -#~ msgid "Louisiana" -#~ msgstr "Louisiane" +#. Android resource: @strings/surrey +msgid "Surrey" +msgstr "Surrey" -#~ msgid "Maryland" -#~ msgstr "Maryland" +#. Android resource: @strings/wiltshire +msgid "Wiltshire" +msgstr "Wiltshire" -#~ msgid "Oklahoma" -#~ msgstr "Oklahoma" +#. Android resource: @strings/scotland +msgid "Scotland" +msgstr "Écosse" -#~ msgid "Texas" -#~ msgstr "Texas" +#. Android resource: @strings/wales +msgid "Wales" +msgstr "Pays de Galles" -#~ msgid "Mississippi" -#~ msgstr "Mississippi" +#. Android resource: @strings/crete +msgid "Crete" +msgstr "Crète" -#~ msgid "West Virginia" -#~ msgstr "Virginie-Occidentale" +#. Android resource: @strings/north_america +msgid "North America" +msgstr "Amérique du Nord" -#~ msgid "Virginia" -#~ msgstr "Virginie" +#. Android resource: @strings/alaska +msgid "Alaska" +msgstr "Alaska" -#~ msgid "Idaho" -#~ msgstr "Idaho" +#. Android resource: @strings/hawaii +msgid "Hawaii" +msgstr "Hawaï" -#~ msgid "Error downloading map!" -#~ msgstr "Erreur de téléchargement de carte !" +#. Android resource: @strings/usa +msgid "USA" +msgstr "États-Unis" -#~ msgid "Guyane Francaise" -#~ msgstr "Guyane Française" +#. Android resource: @strings/except_alaska_and_hawaii +msgid "(except Alaska and Hawaii)" +msgstr "" -#~ msgid "Washington State" -#~ msgstr "État de Washington" +#. Android resource: @strings/midwest +msgid "Midwest" +msgstr "Midwest" -#~ msgid "Utah" -#~ msgstr "Utah" +#. Android resource: @strings/michigan +msgid "Michigan" +msgstr "Michigan" -#~ msgid "South" -#~ msgstr "Sud" +#. Android resource: @strings/ohio +msgid "Ohio" +msgstr "Ohio" -#~ msgid "Arkansas" -#~ msgstr "Arkansas" +#. Android resource: @strings/northeast +msgid "Northeast" +msgstr "Nord-Est" -#~ msgid "District of Columbia" -#~ msgstr "District de Columbia" +#. Android resource: @strings/massachusetts +msgid "Massachusetts" +msgstr "Massachusetts" -#~ msgid "Error writing map!" -#~ msgstr "Erreur d'écriture de carte !" +#. Android resource: @strings/vermont +msgid "Vermont" +msgstr "Vermont" -#~ msgid "Victoria" -#~ msgstr "Victoria" +#. Android resource: @strings/pacific +msgid "Pacific" +msgstr "Pacifique" -#~ msgid "Oxfordshire" -#~ msgstr "Oxfordshire" +#. Android resource: @strings/south +msgid "South" +msgstr "Sud" -#~ msgid "Nottinghamshire" -#~ msgstr "Nottinghamshire" +#. Android resource: @strings/arkansas +msgid "Arkansas" +msgstr "Arkansas" -#~ msgid "Lancashire" -#~ msgstr "Lancashire" +#. Android resource: @strings/district_of_columbia +msgid "District of Columbia" +msgstr "District de Columbia" -#~ msgid "Kent" -#~ msgstr "Kent" +#. Android resource: @strings/florida +msgid "Florida" +msgstr "Floride" -#~ msgid "Norfolk" -#~ msgstr "Norfolk" +#. Android resource: @strings/louisiana +msgid "Louisiana" +msgstr "Louisiane" -#~ msgid "Leicestershire" -#~ msgstr "Leicestershire" +#. Android resource: @strings/maryland +msgid "Maryland" +msgstr "Maryland" -#~ msgid "Herefordshire" -#~ msgstr "Herefordshire" +#. Android resource: @strings/mississippi +msgid "Mississippi" +msgstr "Mississippi" -#~ msgid "Essex" -#~ msgstr "Essex" +#. Android resource: @strings/oklahoma +msgid "Oklahoma" +msgstr "Oklahoma" -#~ msgid "Shropshire" -#~ msgstr "Shropshire" +#. Android resource: @strings/texas +msgid "Texas" +msgstr "Texas" -#~ msgid "North America" -#~ msgstr "Amérique du Nord" +#. Android resource: @strings/virginia +msgid "Virginia" +msgstr "Virginie" -#~ msgid "Alaska" -#~ msgstr "Alaska" +#. Android resource: @strings/west_virginia +msgid "West Virginia" +msgstr "Virginie-Occidentale" -#~ msgid "Crete" -#~ msgstr "Crète" +#. Android resource: @strings/west +msgid "West" +msgstr "Ouest" -#~ msgid "Somerset" -#~ msgstr "Somerset" +#. Android resource: @strings/arizona +msgid "Arizona" +msgstr "Arizona" -#~ msgid "Scotland" -#~ msgstr "Écosse" +#. Android resource: @strings/california +msgid "California" +msgstr "Californie" -#~ msgid "Wales" -#~ msgstr "Pays de Galles" +#. Android resource: @strings/colorado +msgid "Colorado" +msgstr "Colorado" -#~ msgid " (except Alaska and Hawaii)" -#~ msgstr " (sans Alaska et Hawaï)" +#. Android resource: @strings/idaho +msgid "Idaho" +msgstr "Idaho" -#~ msgid "USA" -#~ msgstr "États-Unis" +#. Android resource: @strings/montana +msgid "Montana" +msgstr "Montana" -#~ msgid "Hawaii" -#~ msgstr "Hawaï" +#. Android resource: @strings/new_mexico +msgid "New Mexico" +msgstr "Nouveau-Mexique" -#~ msgid "Ohio" -#~ msgstr "Ohio" +#. Android resource: @strings/nevada +msgid "Nevada" +msgstr "Nevada" -#~ msgid "Michigan" -#~ msgstr "Michigan" +#. Android resource: @strings/oregon +msgid "Oregon" +msgstr "Oregon" -#~ msgid "Vermont" -#~ msgstr "Vermont" +#. Android resource: @strings/utah +msgid "Utah" +msgstr "Utah" -#~ msgid "UAE+Other" -#~ msgstr "EAU+Autres" +#. Android resource: @strings/washington_state +msgid "Washington State" +msgstr "État de Washington" -#~ msgid "East yorkshire with hull" -#~ msgstr "Hull & Yorkshire de l'Est" +#. Android resource: @strings/south_middle_america +msgid "South+Middle America" +msgstr "Amérique (Centrale et Sud)" -#~ msgid "South yorkshire" -#~ msgstr "Yorkshire de l'Ouest" +#. Android resource: @strings/guyane_francaise +msgid "Guyane Francaise" +msgstr "Guyane Française" -#~ msgid "Pacific" -#~ msgstr "Pacifique" +#, c-format +#~ msgid "Route %4.0fkm %02d:%02d ETA" +#~ msgstr "Trajet restant %4.0f km heure d'arrivée estimée %02d:%02d" -#~ msgid "South+Middle America" -#~ msgstr "Amérique (Centrale et Sud)" +#, c-format +#~ msgid "Using config file '%s'\n" +#~ msgstr "utilisation du fichier '%s'\n" -#~ msgid "Northeast" -#~ msgstr "Nord-Est" +#~ msgid "" +#~ "Internal initialization failed, exiting. Check previous error messages.\n" +#~ msgstr "" +#~ "initialisation interne échouée, arrêt de l'exécution. Vérifiez les messages " +#~ "d'erreurs précédents.\n" -#~ msgid "Midwest" -#~ msgstr "Midwest" +#~ msgid "No config file navit.xml, navit.xml.local found\n" +#~ msgstr "Pas de fichier de configuration navit.xml, navit.xml.local trouvé\n" -#~ msgid "Massachusetts" -#~ msgstr "Massachusetts" +#, c-format +#~ msgid "Error parsing config file '%s': %s\n" +#~ msgstr "erreur d'analyse du fichier de configuration '%s': %s\n" -#~ msgid "Suffolk" -#~ msgstr "Suffolk" +#~ msgid "Downloaded maps" +#~ msgstr "Cartes téléchargées" -#~ msgid "Surrey" -#~ msgstr "Surrey" +#~ msgid "" +#~ "Drop last \n" +#~ "Waypoint" +#~ msgstr "" +#~ "Sauter le dernier \n" +#~ "Point de passage" + +#~ msgid "" +#~ "Drop next \n" +#~ "Waypoint" +#~ msgstr "" +#~ "Sauter le prochain \n" +#~ "point de passage" + +#~ msgid "partial match" +#~ msgstr "correspondance partielle" -#~ msgid "Wiltshire" -#~ msgstr "Wiltshire" +#~ msgid "Map data (c) OpenStreetMap contributors, ODBL" +#~ msgstr "Données cartographiques (c) OpenStreetMap contributors, ODBL" + +#~ msgid "Error downloading map!" +#~ msgstr "Erreur de téléchargement de carte !" + +#~ msgid " (except Alaska and Hawaii)" +#~ msgstr " (sans Alaska et Hawaï)" + +#, c-format +#~ msgid "Error: No configuration found in config file '%s'\n" +#~ msgstr "Erreur: Configuration non trouvée dans le fichier '%s'\n" + +#, c-format +#~ msgid "Set destination to %ld, %ld \n" +#~ msgstr "Définir la destination vers %ld, %ld \n" + +#~ msgid "Distance(m)" +#~ msgstr "Distance (m)" #, c-format #~ msgid "then leave the roundabout at the %1$s %2$s" #~ msgstr "puis sortez du rond-point à la %1$s %2$s" +#, c-format +#~ msgid "Set map to %ld, %ld \n" +#~ msgstr "sélectionner la carte de %ld, %ld \n" + #~ msgid "" #~ "New location set to %s\n" #~ "Restart Navit to apply the changes." @@ -2836,9 +3124,18 @@ msgstr "Une ou plusieurs autorisations manquantes" #~ msgid "%d m" #~ msgstr "%d m" -#~ msgid "Media selected for map storage is not available" -#~ msgstr "" -#~ "Le support sélectionné pour le stockage de la carte n'est pas disponible" +#~ msgid "Select a distance to look for (km)" +#~ msgstr "Sélectionnez une distance à chercher (km)" + +#, c-format +#~ msgid "Set next visit to %ld, %ld \n" +#~ msgstr "Définir la prochaine visite à %ld, %ld \n" + +#~ msgid "Distance from screen center (km)" +#~ msgstr "Distance du centre de l'écran (km)" + +#~ msgid "filenamePath" +#~ msgstr "emplacementFichier" #~ msgid "" #~ "Current map location %s is not available\n" @@ -2849,12 +3146,5 @@ msgstr "Une ou plusieurs autorisations manquantes" #~ "Veuillez redémarrer Navit après avoir branché une carte SD ou selectionné en " #~ "emplacement de carte différent." -#~ msgid "" -#~ "Sorry, we currently do not support maps above 3.8G on Android, please select " -#~ "a smaller one." -#~ msgstr "" -#~ "Désolé, nous ne supportons pas les cartes de plus de 3.8GB sur Android, " -#~ "merci de sélectionner une carte plus petite." - #~ msgid "Map download aborted!" #~ msgstr "Téléchargement de la carte abandonné!" diff --git a/po/nl.po.in b/po/nl.po.in index 353b12e44..6b1936122 100644 --- a/po/nl.po.in +++ b/po/nl.po.in @@ -170,7 +170,6 @@ msgstr "%1$s de %2$s op" msgid "%1$sonto %2$s|neuter form" msgstr "%1$s de %2$s op" -#. TRANSLATORS: motorway ramp refers to the slip road for entering a motorway. msgid "onto the motorway ramp" msgstr "naar de oprit" @@ -380,7 +379,6 @@ msgstr "daarna heeft u uw bestemming bereikt." msgid "You have reached your destination %s" msgstr "Bestemming %s bereikt" -#. TRANSLATORS: Exit as a noun, as in "Exit 43 Greenmound-East" msgid "Interchange" msgstr "Knooppunt" @@ -1796,8 +1794,13 @@ msgstr "Taxi" msgid "Shopping" msgstr "Winkelen" -msgid "Select a search radius from screen center" -msgstr "Afstand vanaf schem midden" +#. Input is in kilometers +msgid "Select a search radius from screen center in km" +msgstr "" + +#. Input is in miles. +msgid "Select a search radius from screen center in miles" +msgstr "" #, c-format msgid "POI %s. %s" @@ -1821,9 +1824,6 @@ msgstr "POI zoeken" msgid "Select a category" msgstr "Kies een categorie" -msgid "Select a distance to look for (km)" -msgstr "Zoekafstand kiezen (km)" - msgid "Select a POI" msgstr "POI selecteren" @@ -1836,8 +1836,8 @@ msgstr "Categorie" msgid "Direction" msgstr "Richting" -msgid "Distance(m)" -msgstr "Afstand(m)" +msgid "Distance" +msgstr "" msgid "Name" msgstr "Naam" @@ -2220,18 +2220,14 @@ msgid "Description" msgstr "Beschrijving" msgid "" -"Drop last \n" +"Drop last\n" "Waypoint" msgstr "" -"Laatste routepunt \n" -"verwijderen" msgid "" -"Drop next \n" +"Drop next\n" "Waypoint" msgstr "" -"Volgende routepunt \n" -"verwijderen" msgid "Satellite Status" msgstr "GPS-status" @@ -3073,10 +3069,27 @@ msgstr "Frans Guyana" #~ msgid "Map download aborted!" #~ msgstr "Kaart-download afgebroken!" +#~ msgid "" +#~ "Drop last \n" +#~ "Waypoint" +#~ msgstr "" +#~ "Laatste routepunt \n" +#~ "verwijderen" + +#~ msgid "" +#~ "Drop next \n" +#~ "Waypoint" +#~ msgstr "" +#~ "Volgende routepunt \n" +#~ "verwijderen" + #, c-format #~ msgid "Error: No configuration found in config file '%s'\n" #~ msgstr "Fout: Geen configuratie gevonden in configuratiebestand '%s'\n" +#~ msgid "Distance(m)" +#~ msgstr "Afstand(m)" + #~ msgid "" #~ "Current map location %s is not available\n" #~ "Please restart Navit after you attach an SD card or select a different map " @@ -3093,6 +3106,9 @@ msgstr "Frans Guyana" #~ "%s is als nieuwe locatie ingesteld.\n" #~ "Herstart a.u.b. Navit om de wijzigingen door te voeren." +#~ msgid "Select a distance to look for (km)" +#~ msgstr "Zoekafstand kiezen (km)" + #~ msgid "Distance from screen center (km)" #~ msgstr "Afstand vanaf schem midden (km)" diff --git a/po/pt_BR.po.in b/po/pt_BR.po.in index 348bd0725..e20c8a1ca 100644 --- a/po/pt_BR.po.in +++ b/po/pt_BR.po.in @@ -1,5 +1,5 @@ # Brazilian Portuguese translations for navit -# Copyright (C) 2006-2015 The Navit Team +# Copyright (C) 2006-2018 The Navit Team # This file is distributed under the same license as the navit package. # Many thanks to the contributors of this translation: # Carla Pita https://launchpad.net/~carla-pita @@ -22,10 +22,10 @@ msgid "" msgstr "" -"Project-Id-Version: navit 0.5.0\n" +"Project-Id-Version: navit 0.5.1\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2015-07-27 11:44+0000\n" -"Last-Translator: Julio Alexander Sieg <julio.sieg@gmail.com>\n" +"PO-Revision-Date: 2018-07-20 01:19+0000\n" +"Last-Translator: Jairo Roberto Duarte <Unknown>\n" "Language-Team: Brazilian Portuguese <pt_BR@li.org>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -144,7 +144,7 @@ msgstr[1] "em %d quilômetros" #. TRANSLATORS: Arguments: 1: Prefix (Space if required) 2: Systematic Street Name 3: Separator (Space if required), 4: Street Name #, c-format msgid "%1$sonto the %2$s%3$s%4$s" -msgstr "" +msgstr "%1$sno %2$s%3$s%4$s" #. TRANSLATORS: Arguments: 1: Prefix (Space if required) 2: Street Name #, c-format @@ -154,19 +154,18 @@ msgstr "%1$sno %2$s" #. TRANSLATORS: Arguments: 1: Prefix (Space if required) 2: Street Name. Masculine form. The stuff after | doesn't have to be included #, c-format msgid "%1$sonto %2$s|masculine form" -msgstr "" +msgstr "%1$sno %2$s|formato masculino" #. TRANSLATORS: Arguments: 1: Prefix (Space if required) 2: Street Name. Feminine form. The stuff after | doesn't have to be included #, c-format msgid "%1$sonto %2$s|feminine form" -msgstr "" +msgstr "%1$sno %2$s|formato feminino" #. TRANSLATORS: Arguments: 1: Prefix (Space if required) 2: Street Name. Neuter form. The stuff after | doesn't have to be included #, c-format msgid "%1$sonto %2$s|neuter form" -msgstr "" +msgstr "%1$sno %2$s|formato neutro" -#. TRANSLATORS: motorway ramp refers to the slip road for entering a motorway. msgid "onto the motorway ramp" msgstr "na rampa" @@ -216,7 +215,7 @@ msgid "Enter the roundabout %s" msgstr "Entre na rotatória %s" msgid "then enter the roundabout" -msgstr "" +msgstr "em seguida entre na rotatória" #. TRANSLATORS: first arg. is the manieth exit, second arg. is the destination to follow #, c-format @@ -235,12 +234,12 @@ msgstr "em seguida" #. TRANSLATORS: the arg. is the phrase 'onto ...'. Right merge, the stuff after | doesn't have to be included. #, c-format msgid "then merge%1$s|right" -msgstr "" +msgstr "em seguida vire a %1$s|direita" #. TRANSLATORS: the first arg. is distance, the second is the phrase 'onto ...'. Right merge, the stuff after | doesn't have to be included. #, c-format msgid "Merge %1$s%2$s|right" -msgstr "" +msgstr "Vire a %1$s%2$s|direita" #. TRANSLATORS: the arg. is the phrase 'onto ...'. Left merge, the stuff after | doesn't have to be included. #, c-format @@ -323,7 +322,7 @@ msgstr "fortemente " #, c-format msgid "then take the %1$s road to the %2$s" -msgstr "" +msgstr "então pegue a %1$s via para a %2$s" #, c-format msgid "Take the %1$s road to the %2$s" @@ -379,7 +378,6 @@ msgstr "então você chegará ao destino." msgid "You have reached your destination %s" msgstr "Você chegará ao destino %s" -#. TRANSLATORS: Exit as a noun, as in "Exit 43 Greenmound-East" msgid "Interchange" msgstr "Trevo" @@ -396,9 +394,15 @@ msgstr "Comando" msgid "Length" msgstr "Distância" +msgid "mi" +msgstr "milha" + msgid "km" msgstr "km" +msgid "feet" +msgstr "pé" + msgid "m" msgstr "m" @@ -459,6 +463,7 @@ msgid "Anguilla" msgstr "Anguilla" #. 008 +#. Android resource: @strings/albania msgid "Albania" msgstr "Albânia" @@ -471,6 +476,7 @@ msgid "Netherlands Antilles" msgstr "Antilhas Holandesas" #. 024 +#. Android resource: @strings/angola msgid "Angola" msgstr "Angola" @@ -479,6 +485,7 @@ msgid "Antarctica" msgstr "Antártida" #. 032 +#. Android resource: @strings/argentina msgid "Argentina" msgstr "Argentina" @@ -487,10 +494,12 @@ msgid "American Samoa" msgstr "Samoa Americana" #. 040 +#. Android resource: @strings/austria msgid "Austria" msgstr "Áustria" #. 036 +#. Android resource: @strings/australia msgid "Australia" msgstr "Austrália" @@ -503,10 +512,12 @@ msgid "Aland Islands" msgstr "Ilhas Aland" #. 031 +#. Android resource: @strings/azerbaijan msgid "Azerbaijan" msgstr "Azerbaijão" #. 070 +#. Android resource: @strings/bosnia_and_herzegovina msgid "Bosnia and Herzegovina" msgstr "Bósnia e Herzegovina" @@ -519,6 +530,7 @@ msgid "Bangladesh" msgstr "Bangladesh" #. 056 +#. Android resource: @strings/belgium msgid "Belgium" msgstr "Bélgica" @@ -527,6 +539,7 @@ msgid "Burkina Faso" msgstr "Burkina Faso" #. 100 +#. Android resource: @strings/bulgaria msgid "Bulgaria" msgstr "Bulgária" @@ -535,6 +548,7 @@ msgid "Bahrain" msgstr "Bahrein" #. 108 +#. Android resource: @strings/burundi msgid "Burundi" msgstr "Burundi" @@ -555,6 +569,7 @@ msgid "Brunei Darussalam" msgstr "Brunei" #. 068 +#. Android resource: @strings/bolivia msgid "Bolivia" msgstr "Bolívia" @@ -563,6 +578,7 @@ msgid "Bonaire, Sint Eustatius and Saba" msgstr "Bonaire, São Eustácio e Saba" #. 076 +#. Android resource: @strings/brazil msgid "Brazil" msgstr "Brasil" @@ -579,10 +595,12 @@ msgid "Bouvet Island" msgstr "Ilha Bouvet" #. 072 +#. Android resource: @strings/botswana msgid "Botswana" msgstr "Botswana" #. 112 +#. Android resource: @strings/belarus msgid "Belarus" msgstr "Bielorrússia" @@ -591,6 +609,7 @@ msgid "Belize" msgstr "Belize" #. 124 +#. Android resource: @strings/canada msgid "Canada" msgstr "Canadá" @@ -599,6 +618,7 @@ msgid "Cocos (Keeling) Islands" msgstr "Ilhas Cocos (Keeling)" #. 180 +#. Android resource: @strings/congo msgid "Congo, Democratic Republic of the" msgstr "República Democrática do Congo" @@ -611,10 +631,12 @@ msgid "Congo" msgstr "Congo" #. 756 +#. Android resource: @strings/switzerland msgid "Switzerland" msgstr "Suíça" #. 384 +#. Android resource: @strings/cotedivoire msgid "Cote d'Ivoire" msgstr "Costa do Marfim" @@ -623,6 +645,7 @@ msgid "Cook Islands" msgstr "Ilhas Cook" #. 152 +#. Android resource: @strings/chile msgid "Chile" msgstr "Chile" @@ -631,10 +654,12 @@ msgid "Cameroon" msgstr "Camarões" #. 156 +#. Android resource: @strings/china msgid "China" msgstr "China" #. 170 +#. Android resource: @strings/colombia msgid "Colombia" msgstr "Colômbia" @@ -643,6 +668,7 @@ msgid "Costa Rica" msgstr "Costa Rica" #. 192 +#. Android resource: @strings/cuba msgid "Cuba" msgstr "Cuba" @@ -659,14 +685,17 @@ msgid "Christmas Island" msgstr "Ilha Christmas" #. 196 +#. Android resource: @strings/cyprus msgid "Cyprus" msgstr "Chipre" #. 203 +#. Android resource: @strings/czech_republic msgid "Czech Republic" msgstr "República Tcheca" #. 276 +#. Android resource: @strings/germany msgid "Germany" msgstr "Alemanha" @@ -675,6 +704,7 @@ msgid "Djibouti" msgstr "Djibuti" #. 208 +#. Android resource: @strings/denmark msgid "Denmark" msgstr "Dinamarca" @@ -683,6 +713,7 @@ msgid "Dominica" msgstr "Dominica" #. 214 +#. Android resource: @strings/dominican_republic msgid "Dominican Republic" msgstr "República Dominicana" @@ -691,10 +722,12 @@ msgid "Algeria" msgstr "Argélia" #. 218 +#. Android resource: @strings/ecuador msgid "Ecuador" msgstr "Equador" #. 233 +#. Android resource: @strings/estonia msgid "Estonia" msgstr "Estônia" @@ -711,14 +744,17 @@ msgid "Eritrea" msgstr "Eritréia" #. 724 +#. Android resource: @strings/spain msgid "Spain" msgstr "Espanha" #. 231 +#. Android resource: @strings/ethiopia msgid "Ethiopia" msgstr "Etiópia" #. 246 +#. Android resource: @strings/finland msgid "Finland" msgstr "Finlândia" @@ -735,10 +771,12 @@ msgid "Micronesia, Federated States of" msgstr "Micronésia" #. 234 +#. Android resource: @strings/faroe_islands msgid "Faroe Islands" msgstr "Ilhas Faroé" #. 250 +#. Android resource: @strings/france msgid "France" msgstr "França" @@ -747,6 +785,7 @@ msgid "Gabon" msgstr "Gabão" #. 826 +#. Android resource: @strings/united_kingdom msgid "United Kingdom" msgstr "Reino Unido" @@ -783,6 +822,7 @@ msgid "Gambia" msgstr "Gâmbia" #. 324 +#. Android resource: @strings/guinea msgid "Guinea" msgstr "Guiné" @@ -795,6 +835,7 @@ msgid "Equatorial Guinea" msgstr "Guiné Equatorial" #. 300 +#. Android resource: @strings/greece msgid "Greece" msgstr "Grécia" @@ -815,6 +856,7 @@ msgid "Guinea-Bissau" msgstr "Guiné-Bissau" #. 328 +#. Android resource: @strings/guyana msgid "Guyana" msgstr "Guiana" @@ -831,26 +873,32 @@ msgid "Honduras" msgstr "Honduras" #. 191 +#. Android resource: @strings/croatia msgid "Croatia" msgstr "Croácia" #. 332 +#. Android resource: @strings/haiti msgid "Haiti" msgstr "Haiti" #. 348 +#. Android resource: @strings/hungary msgid "Hungary" msgstr "Hungria" #. 360 +#. Android resource: @strings/indonesia msgid "Indonesia" msgstr "Indonésia" #. 372 +#. Android resource: @strings/ireland msgid "Ireland" msgstr "Irlanda" #. 376 +#. Android resource: @strings/israel msgid "Israel" msgstr "Israel" @@ -859,6 +907,7 @@ msgid "Isle of Man" msgstr "Ilha de Man" #. 356 +#. Android resource: @strings/india msgid "India" msgstr "Índia" @@ -867,18 +916,22 @@ msgid "British Indian Ocean Territory" msgstr "Território Britânico do Oceano Índico" #. 368 +#. Android resource: @strings/iraq msgid "Iraq" msgstr "Iraque" #. 364 +#. Android resource: @strings/iran msgid "Iran, Islamic Republic of" msgstr "Irã" #. 352 +#. Android resource: @strings/iceland msgid "Iceland" msgstr "Islândia" #. 380 +#. Android resource: @strings/italy msgid "Italy" msgstr "Itália" @@ -887,6 +940,7 @@ msgid "Jersey" msgstr "Jersey" #. 388 +#. Android resource: @strings/jamaica msgid "Jamaica" msgstr "Jamaica" @@ -895,14 +949,17 @@ msgid "Jordan" msgstr "Jordânia" #. 392 +#. Android resource: @strings/japan msgid "Japan" msgstr "Japão" #. 404 +#. Android resource: @strings/kenya msgid "Kenya" msgstr "Quênia" #. 417 +#. Android resource: @strings/kyrgyzsyan msgid "Kyrgyzstan" msgstr "Quirguistão" @@ -939,6 +996,7 @@ msgid "Cayman Islands" msgstr "Ilhas Caiman" #. 398 +#. Android resource: @strings/kazakhstan msgid "Kazakhstan" msgstr "Cazaquistão" @@ -963,26 +1021,32 @@ msgid "Sri Lanka" msgstr "Siri Lanka" #. 430 +#. Android resource: @strings/liberia msgid "Liberia" msgstr "Libéria" #. 426 +#. Android resource: @strings/lesotho msgid "Lesotho" msgstr "Lesoto" #. 440 +#. Android resource: @strings/lithuania msgid "Lithuania" msgstr "Lituânia" #. 442 +#. Android resource: @strings/luxembourg msgid "Luxembourg" msgstr "Luxemburgo" #. 428 +#. Android resource: @strings/latvia msgid "Latvia" msgstr "Letônia" #. 434 +#. Android resource: @strings/libya msgid "Libya" msgstr "Líbia" @@ -1007,6 +1071,7 @@ msgid "Saint Martin (French part)" msgstr "São Martin (parte francesa)" #. 450 +#. Android resource: @strings/madagascar msgid "Madagascar" msgstr "Madagascar" @@ -1027,6 +1092,7 @@ msgid "Myanmar" msgstr "Mianmar" #. 496 +#. Android resource: @strings/mongolia msgid "Mongolia" msgstr "Mongólia" @@ -1067,10 +1133,12 @@ msgid "Malawi" msgstr "Malawi" #. 484 +#. Android resource: @strings/mexico msgid "Mexico" msgstr "México" #. 458 +#. Android resource: @strings/malaysia msgid "Malaysia" msgstr "Malásia" @@ -1079,10 +1147,12 @@ msgid "Mozambique" msgstr "Moçambique" #. 516 +#. Android resource: @strings/namibia msgid "Namibia" msgstr "Namíbia" #. 540 +#. Android resource: @strings/new_caledonia msgid "New Caledonia" msgstr "Nova Caledônia" @@ -1103,6 +1173,7 @@ msgid "Nicaragua" msgstr "Nicarágua" #. 528 +#. Android resource: @strings/netherlands msgid "Netherlands" msgstr "Holanda" @@ -1111,6 +1182,7 @@ msgid "Norway" msgstr "Noruega" #. 524 +#. Android resource: @strings/nepal msgid "Nepal" msgstr "Nepal" @@ -1123,6 +1195,7 @@ msgid "Niue" msgstr "Niue" #. 554 +#. Android resource: @strings/newzealand msgid "New Zealand" msgstr "Nova Zelândia" @@ -1135,6 +1208,7 @@ msgid "Panama" msgstr "Panamá" #. 604 +#. Android resource: @strings/peru msgid "Peru" msgstr "Perú" @@ -1147,14 +1221,17 @@ msgid "Papua New Guinea" msgstr "Papua Nova Guiné" #. 608 +#. Android resource: @strings/philippines msgid "Philippines" msgstr "Filipinas" #. 586 +#. Android resource: @strings/pakistan msgid "Pakistan" msgstr "Paquistão" #. 616 +#. Android resource: @strings/poland msgid "Poland" msgstr "Polônia" @@ -1175,6 +1252,7 @@ msgid "Palestinian Territory, Occupied" msgstr "Palestina" #. 620 +#. Android resource: @strings/portugal msgid "Portugal" msgstr "Portugal" @@ -1183,6 +1261,7 @@ msgid "Palau" msgstr "Palau" #. 600 +#. Android resource: @strings/paraguay msgid "Paraguay" msgstr "Paraguai" @@ -1191,10 +1270,12 @@ msgid "Qatar" msgstr "Catar" #. 638 +#. Android resource: @strings/reunion msgid "Reunion" msgstr "Ilhas Reunião" #. 642 +#. Android resource: @strings/romania msgid "Romania" msgstr "Romênia" @@ -1203,14 +1284,17 @@ msgid "Serbia" msgstr "Sérvia" #. 643 +#. Android resource: @strings/russian_federation msgid "Russian Federation" msgstr "Rússia" #. 646 +#. Android resource: @strings/rwanda msgid "Rwanda" msgstr "Ruanda" #. 682 +#. Android resource: @strings/saudi_arabia msgid "Saudi Arabia" msgstr "Arábia Saudita" @@ -1231,6 +1315,7 @@ msgid "Sweden" msgstr "Suécia" #. 702 +#. Android resource: @strings/singapore msgid "Singapore" msgstr "Singapura" @@ -1247,6 +1332,7 @@ msgid "Svalbard and Jan Mayen" msgstr "Svalbard e Jan Mayen" #. 703 +#. Android resource: @strings/slovakia msgid "Slovakia" msgstr "Eslováquia" @@ -1267,6 +1353,7 @@ msgid "Somalia" msgstr "Somália" #. 740 +#. Android resource: @strings/suriname msgid "Suriname" msgstr "Suriname" @@ -1311,6 +1398,7 @@ msgid "Togo" msgstr "Togo" #. 764 +#. Android resource: @strings/thailand msgid "Thailand" msgstr "Tailândia" @@ -1327,6 +1415,7 @@ msgid "Timor-Leste" msgstr "Timor-Leste" #. 795 +#. Android resource: @strings/turkmenistan msgid "Turkmenistan" msgstr "Turcomenistão" @@ -1339,6 +1428,7 @@ msgid "Tonga" msgstr "Tonga" #. 792 +#. Android resource: @strings/turkey msgid "Turkey" msgstr "Turquia" @@ -1355,14 +1445,17 @@ msgid "Taiwan, Province of China" msgstr "Taiwan" #. 834 +#. Android resource: @strings/tanzania msgid "Tanzania, United Republic of" msgstr "Tanzânia" #. 804 +#. Android resource: @strings/ukraine msgid "Ukraine" msgstr "Ucrânia" #. 800 +#. Android resource: @strings/uganda msgid "Uganda" msgstr "Uganda" @@ -1375,6 +1468,7 @@ msgid "United States" msgstr "Estados Unidos" #. 858 +#. Android resource: @strings/uruguay msgid "Uruguay" msgstr "Uruguai" @@ -1391,6 +1485,7 @@ msgid "Saint Vincent and the Grenadines" msgstr "São Vicente e Granadinas" #. 862 +#. Android resource: @strings/venezuela msgid "Venezuela" msgstr "Venezuela" @@ -1427,6 +1522,7 @@ msgid "Mayotte" msgstr "Mayotte" #. 710 +#. Android resource: @strings/south_africa msgid "South Africa" msgstr "África do Sul" @@ -1464,27 +1560,26 @@ msgstr "" "\t-v: imprimir a versão e sair.\n" #. We have not found an existing config file from all possibilities -msgid "No config file navit.xml, navit.xml.local found\n" -msgstr "" -"Nenhum arquivo de configuração navit.xml, navit.xml.local foi encontrado\n" +msgid "No config file navit.xml, navit.xml.local found" +msgstr "Nenhum arquivo de configuração navit.xml, navit.xml.local encontrado" #, c-format -msgid "Error parsing config file '%s': %s\n" -msgstr "Erro ao analizar o arquivo de configuração '%s': %s\n" +msgid "Error parsing config file '%s': %s" +msgstr "Erro ao analisar o arquivo de configuração '%s': %s" #, c-format -msgid "Using config file '%s'\n" -msgstr "Utilizando arquivo de configuração '%s'\n" +msgid "Using config file '%s'" +msgstr "Usando o arquivo de configuração '%s'" #, c-format -msgid "Error: No configuration found in config file '%s'\n" -msgstr "Erro: Nenhuma configuração encontrada no arquivo '%s'\n" +msgid "Error: No configuration found in config file '%s'" +msgstr "" +"Erro: Nenhuma configuração encontrada no arquivo de configuração '%s'" msgid "" -"Internal initialization failed, exiting. Check previous error messages.\n" +"Internal initialization failed, exiting. Check previous error messages." msgstr "" -"Inicialização interna falhou, finalizando. Verifique mensagens de erro " -"anteriores.\n" +"Inicialização interna falhou, saindo. Verificar mensagens de erro anteriores." msgid "unknown street" msgstr "rua desconhecida" @@ -1624,6 +1719,9 @@ msgstr "Mostrar a posição _cursor" msgid "_Lock on Road" msgstr "_Bloqueio na estrada" +msgid "_Follow Vehicle" +msgstr "_Siga o Veículo" + msgid "_Keep orientation to the North" msgstr "_Manter orientação para o Norte" @@ -1693,24 +1791,29 @@ msgstr "Táxi" msgid "Shopping" msgstr "Comprando" -msgid "Select a search radius from screen center" -msgstr "Distância do centro da tela" +#. Input is in kilometers +msgid "Select a search radius from screen center in km" +msgstr "" + +#. Input is in miles. +msgid "Select a search radius from screen center in miles" +msgstr "" #, c-format msgid "POI %s. %s" msgstr "POI %s. %s" #, c-format -msgid "Set destination to %ld, %ld \n" -msgstr "Definir destino para %ld, %ld \n" +msgid "Set destination to %ld, %ld " +msgstr "Definir destino para %ld, %ld " #, c-format -msgid "Set map to %ld, %ld \n" -msgstr "Definir mapa para o %ld, %ld \n" +msgid "Set map to %ld, %ld " +msgstr "Definir mapa para %ld, %ld " #, c-format -msgid "Set next visit to %ld, %ld \n" -msgstr "Definir próxima parada parao %ld, %ld \n" +msgid "Set next visit to %ld, %ld " +msgstr "Configurar próxima visita para %ld, %ld " msgid "POI search" msgstr "Pesquisar POI" @@ -1718,9 +1821,6 @@ msgstr "Pesquisar POI" msgid "Select a category" msgstr "Selecione uma categoria" -msgid "Select a distance to look for (km)" -msgstr "Selecione a distância para pesquisar (km)" - msgid "Select a POI" msgstr "Selecione um POI" @@ -1733,8 +1833,8 @@ msgstr "Categoria" msgid "Direction" msgstr "Direção" -msgid "Distance(m)" -msgstr "Distância (m)" +msgid "Distance" +msgstr "" msgid "Name" msgstr "Nome" @@ -1780,8 +1880,8 @@ msgid "OT" msgstr "OT" #, c-format -msgid "Route %4.0fkm %02d:%02d ETA" -msgstr "Rota %4.0fkm TEC %02d:%02d" +msgid "Route %4.1f%s %02d:%02d ETA" +msgstr "Rota %4.1f%s %02d:%02d ETA" msgid "Route 0000km 0+00:00 ETA" msgstr "Rota 0000km TEC 0+00:00" @@ -1991,12 +2091,21 @@ msgstr "Layout" msgid "Height Profile" msgstr "Perfil de Altitude" +msgid "please install a map *.heightlines.bin to provide elevationdata" +msgstr "Instale um mapa *.heightlines.bin para fornecer dados de elevação" + +msgid "The route must cross at least 2 heightlines" +msgstr "A rota deve atravessar pelo menos 2 linhas de altitude" + msgid "Route Description" msgstr "Descrição da Rota" msgid "Show Locale" msgstr "Inf. Regionais" +msgid "Network info" +msgstr "Informações de rede" + msgid "Former Destinations" msgstr "Destinos Anteriores" @@ -2035,751 +2144,996 @@ msgstr "Cuidado! Radar!" msgid "Please decrease your speed" msgstr "Por favor, reduza a velocidade" -msgid "partial match" -msgstr "resultado parcial" +msgid "Vehicle Position" +msgstr "Posição do Veículo" + +msgid "Main menu" +msgstr "Menu principal" + +msgid "" +"Show\n" +"Map" +msgstr "" +"Mostrar\n" +"Mapa" + +msgid "Settings" +msgstr "Configurações" + +msgid "Tools" +msgstr "Ferramentas" + +msgid "Route" +msgstr "Rota" + +msgid "About" +msgstr "Sobre" + +msgid "Quit" +msgstr "Sair" + +msgid "Actions" +msgstr "Ações" + +msgid "" +"Former\n" +"Destinations" +msgstr "" +"Destinos\n" +"Anteriores" + +msgid "Coordinates" +msgstr "Coordenadas" + +msgid "" +"Stop\n" +"Navigation" +msgstr "" +"Parar\n" +"Navegação" + +msgid "Display" +msgstr "Exibição" + +msgid "Fullscreen" +msgstr "Tela cheia" + +msgid "Window Mode" +msgstr "Modo de Janela" + +msgid "Auto zoom" +msgstr "Zoom automático" + +msgid "Manual zoom" +msgstr "Zoom manual" + +msgid "Layers" +msgstr "Camadas" + +msgid "Zoom to route" +msgstr "Zoom para rota" + +msgid "Description" +msgstr "Descrição" + +msgid "" +"Drop last\n" +"Waypoint" +msgstr "" +"Baixe o último\n" +"Nó" + +msgid "" +"Drop next\n" +"Waypoint" +msgstr "" +"Baixe o próximo\n" +"Nó" + +msgid "Satellite Status" +msgstr "Estado do Satélite" + +msgid "NMEA Data" +msgstr "Dados NMEA" + +msgid "car_shortest" +msgstr "carro_pequeno" + +msgid "car_avoid_tolls" +msgstr "Evitar pedágios" + +msgid "car_pedantic" +msgstr "detalhe do carro" + +msgid "horse" +msgstr "cavalo" + +msgid "Truck" +msgstr "Caminhão" + +#. Strings from android/res/values/strings.xml +#. Android resource: @strings/yes +msgid "Yes" +msgstr "Sim" + +#. Android resource: @strings/cancel +msgid "Cancel" +msgstr "Cancelar" + +#. Android resource: @strings/notification_ticker +msgid "Navit started" +msgstr "Navit iniciou" + +#. Android resource: @strings/notification_event_default +msgid "Navit running" +msgstr "Navit rodando" + +#. Android resource: @strings/initial_info_box_title +msgid "Welcome to Navit" +msgstr "Bem-vindo ao Navit" + +#. Android resource: @strings/initial_info_box_message +msgid "" +"Thank you for installing Navit!\n" +"\n" +"To start, select \"Download maps\" from the menu to download a map. Note: " +"The map filesize may be large (>50MB) - a wifi connection is recommended.\n" +"\n" +"Mapdata: (c) OpenStreetMap contributors\n" +"\n" +"Enjoy Navit!" +msgstr "" +"Obrigado por instalar Navit!\n" +"\n" +"Para começar, selecione \"Importar mapas\" no menu para fazer o download de " +"um mapa. Nota: O tamanho do arquivo do mapa pode ser grande (> 50MB) - uma " +"conexão Wi-Fi é recomendada.\n" +"\n" +"Mapdata: (c) contribuidores OpenStreetMap\n" +"\n" +"Desfrute do Navit!" + +#. Android resource: @strings/initial_info_box_OK +msgid "OK" +msgstr "OK" + +#. Android resource: @strings/initial_info_box_more_info +msgid "More info" +msgstr "Mais informações" + +#. Android resource: @strings/optionsmenu_zoom_in +msgid "Zoom in" +msgstr "Aumentar zoom" + +#. Android resource: @strings/optionsmenu_zoom_out +msgid "Zoom out" +msgstr "Diminuir zoom" + +#. Android resource: @strings/optionsmenu_download_maps +msgid "Download maps" +msgstr "Baixar mapas" + +#. Android resource: @strings/optionsmenu_toggle_poi +msgid "Toggle POIs" +msgstr "Alternar POIs" + +#. Android resource: @strings/optionsmenu_exit_navit +msgid "Exit Navit" +msgstr "Sair do Navit" + +#. Android resource: @strings/optionsmenu_backup_restore +msgid "Backup / Restore" +msgstr "Backup / Restauração" + +#. Android resource: @strings/optionsmenu_set_map_location +msgid "Set map location" +msgstr "Definir localização no mapa" + +#. Android resource: @strings/position_popup_drive_here +msgid "Route to here" +msgstr "Rota até aqui" + +#. Android resource: @strings/map_delete +msgid "Delete this map?" +msgstr "Excluir este mapa?" + +#. Android resource: @strings/map_download_title +msgid "Map download" +msgstr "Baixa do mapa" + +#. Android resource: @strings/map_download_downloading +msgid "Downloading:" +msgstr "Baixando:" + +#. Android resource: @strings/map_download_eta +msgid "ETA" +msgstr "ETA" + +#. Android resource: @strings/map_download_ready +msgid "ready" +msgstr "pronto" + +#. Android resource: @strings/map_download_download_error +msgid "Error downloading map." +msgstr "Erro ao baixar mapa." + +#. Android resource: @strings/map_download_download_aborted +msgid "Map download aborted" +msgstr "Baixa do mapa abortada" + +#. Android resource: @strings/map_download_not_enough_free_space +msgid "Not enough free space" +msgstr "Não há espaço livre suficiente" + +#. Android resource: @strings/map_download_oversize +msgid "" +"Sorry, we currently do not support maps above 3.8G on Android, please select " +"a smaller one." +msgstr "" +"Desculpe, atualmente não suportamos mapas acima do 3.8G no Android, " +"selecione um menor." + +#. Android resource: @strings/map_no_fix +msgid "No location. Reopen after location fix." +msgstr "Nenhum local. Reabrir após corrigir localização" + +#. Android resource: @strings/maps_for_current_location +msgid "Maps containing current location" +msgstr "Mapas contendo localização atual" + +#. Android resource: @strings/maps_installed +msgid "Installed maps" +msgstr "Installed maps" + +#. Android resource: @strings/map_downloading +msgid "downloading" +msgstr "baixando" + +#. Android resource: @strings/map_download_medium_unavailable +msgid "Media selected for map storage is not available" +msgstr "Mídia selecionada para armazenamento de mapas não está disponível" + +#. Android resource: @strings/map_download_error_writing_map +msgid "Error writing map!" +msgstr "Erro escrevendo mapa!" + +#. Android resource: @strings/map_location_changed +#, c-format +msgid "New location set to %s Restart Navit to apply the changes." +msgstr "" +"Novo local configurado para %s Reinicie o Navit para aplicar as alterações." + +#. Android resource: @strings/map_location_unavailable +#, c-format +msgid "" +"Current map location %s is not available Please restart Navit after you " +"attach an SD card or select a different map location." +msgstr "" +"Localização atual no mapa %s não está disponível. Por favor, reinicie o " +"Navit depois de conectar um cartão SD ou selecione um local diferente no " +"mapa." + +#. Android resource: @strings/address_search_title +msgid "Address search" +msgstr "Pesquisar endereço" + +#. Android resource: @strings/address_enter_destination +msgid "Enter destination" +msgstr "Digite o destino" + +#. Android resource: @strings/address_partial_match +msgid "Match partial address" +msgstr "Combine endereço parcial" #. Android resource: @strings/address_search_button msgid "Search" msgstr "Pesquisar" +#. Android resource: @strings/address_search_searching +msgid "Searching..." +msgstr "Procurando..." + +#. Android resource: @strings/address_search_not_found +msgid "Address not found" +msgstr "Endereço não encontrado" + +#. Android resource: @strings/address_search_getting_results +msgid "Getting search results" +msgstr "Obtendo resultados de busca" + +#. Android resource: @strings/address_search_loading_results +msgid "Loading search results" +msgstr "Carregando resultados da busca" + +#. Android resource: @strings/address_search_no_results +msgid "No results found" +msgstr "Nenhum resultado encontrado" + +#. Android resource: @strings/address_search_no_text_entered +msgid "No text entered" +msgstr "Nenhum texto digitado" + +#. Android resource: @strings/address_search_set_destination +msgid "Setting destination to:" +msgstr "Definir destino para:" + #. Android resource: @strings/address_search_towns msgid "Towns" msgstr "Cidades" -#. Android resource: @strings/position_popup_drive_here -msgid "Route to here" -msgstr "Rota até aqui" +#. Android resource: @strings/choose_an_action +msgid "Choose an action" +msgstr "Escolha uma ação" -msgid "Map data (c) OpenStreetMap contributors, ODBL" -msgstr "Dados do mapa (c) colaboradores OpenStreetMap, ODBL" +#. Android resource: @strings/please_insert_an_sd_card +msgid "Please insert an SD Card" +msgstr "Por favor insira um cartão SD" -msgid "" -"Current map location %s is not available\n" -"Please restart Navit after you attach an SD card or select a different map " -"location." -msgstr "" +#. Android resource: @strings/backing_up +msgid "Backing up..." +msgstr "Cópia de Segurança em andamento..." + +#. Android resource: @strings/restoring +msgid "Restoring..." +msgstr "Restaurando ..." + +#. Android resource: @strings/failed_to_create_backup_directory +msgid "Failed to create backup directory" +msgstr "Falha ao criar o diretório da cópia de segurança" + +#. Android resource: @strings/backup_failed +msgid "Backup failed" +msgstr "Cópia de segurança falhou" -msgid "Downloaded maps" -msgstr "Mapas baixados" +#. Android resource: @strings/no_backup_found +msgid "No backup found" +msgstr "Não encontrou a cópia de segurança" + +#. Android resource: @strings/failed_to_restore +msgid "Failed to restore" +msgstr "Falha ao restaurar" + +#. Android resource: @strings/backup_successful +msgid "Backup successful" +msgstr "Cópia de segurança bem-sucedida" +#. Android resource: @strings/restore_successful_please_restart_navit msgid "" -"Sorry, we currently do not support maps above 3.8G on Android, please select " -"a smaller one." +"Restore Successful\n" +"Please restart Navit" msgstr "" +"Restauração bem-sucedida\n" +"Por favor, reinicie Navit" -msgid "Cancel" -msgstr "Cancelar" +#. Android resource: @strings/backup_not_found +msgid "Backup not found" +msgstr "Cópia de segurança não encontrada" + +#. Android resource: @strings/restore_failed +msgid "Restore failed" +msgstr "Falha na restauração" -msgid "filenamePath" +#. Android resource: @strings/select_backup +msgid "Select backup" +msgstr "Selecione a cópia de segurança" + +#. Android resource: @strings/backup +msgid "Backup" +msgstr "Cópia de segurança" + +#. Android resource: @strings/restore +msgid "Restore" +msgstr "Restaurar" + +#. Android resource: @strings/TTS_title_data_missing +msgid "System text to speech engine data is missing" +msgstr "Faltam dados de texto para o sistema de fala" + +#. Android resource: @strings/TTS_qery_install_data +msgid "" +"Navit can use any text to speech engine installed on your device. The " +"currently selected engine reports it is unable to speak in your language. " +"Should we ask the system to show voice download dialog?" msgstr "" +"Navit pode usar qualquer motor de conversão de texto para voz instalado em " +"seu dispositivo. O motor atualmente selecionado informa que é incapaz de " +"falar em seu idioma. Devemos pedir ao sistema que mostre a caixa de diálogo " +"de download de voz?" +#. Android resource: @strings/permissions_not_granted msgid "" -"New location set to %s\n" -"Restart Navit to apply the changes." +"Navit needs permission to access GPS and read the map.\n" +"If you change your mind please restart Navit and grant the permissions" msgstr "" +"Navit precisa de permissão para acessar GPS e ler o mapa. \n" +"Se você mudar de idéia, por favor, reinicie o Navit e conceda as permissões" +#. Android resource: @strings/permissions_info_box_title +msgid "One or more ungranted permissions" +msgstr "Uma ou mais permissões não concedidas" + +#. Android resource: @strings/whole_planet msgid "Whole Planet" msgstr "Todo o Planeta" +#. Android resource: @strings/africa msgid "Africa" msgstr "África" +#. Android resource: @strings/canary_islands msgid "Canary Islands" msgstr "Ilhas Canárias" +#. Android resource: @strings/asia msgid "Asia" msgstr "Ásia" -msgid "Korea" -msgstr "Coréia" - +#. Android resource: @strings/taiwan msgid "Taiwan" msgstr "Taiwan" +#. Android resource: @strings/korea +msgid "Korea" +msgstr "Coréia" + +#. Android resource: @strings/uae_other msgid "UAE+Other" -msgstr "UAE + Outros" +msgstr "Emirados Árabes Unidos+Outros" +#. Android resource: @strings/oceania msgid "Oceania" msgstr "Oceania" +#. Android resource: @strings/tasmania msgid "Tasmania" msgstr "Tasmânia" +#. Android resource: @strings/victoria msgid "Victoria" msgstr "Vitória" +#. Android resource: @strings/new_south_wales msgid "New South Wales" msgstr "Nova Gales do Sul" +#. Android resource: @strings/europe msgid "Europe" msgstr "Europa" +#. Android resource: @strings/western_europe msgid "Western Europe" msgstr "Europa Ocidental" +#. Android resource: @strings/azores msgid "Azores" msgstr "Açores" +#. Android resource: @strings/benelux msgid "BeNeLux" msgstr "Países Baixos" +#. Android resource: @strings/alsace msgid "Alsace" msgstr "Alsácia" +#. Android resource: @strings/aquitaine msgid "Aquitaine" msgstr "Aquitânia" +#. Android resource: @strings/auvergne msgid "Auvergne" msgstr "Auvergne" -msgid "Basse-Normandie" -msgstr "Baixa-Normandia" - -msgid "Bourgogne" -msgstr "Borgonha" +#. Android resource: @strings/centre +msgid "Centre" +msgstr "Centro" +#. Android resource: @strings/bretagne msgid "Bretagne" msgstr "Bretanha" -msgid "Centre" -msgstr "Centro" +#. Android resource: @strings/bourgogne +msgid "Bourgogne" +msgstr "Borgonha" + +#. Android resource: @strings/basse_normandie +msgid "Basse-Normandie" +msgstr "Baixa-Normandia" +#. Android resource: @strings/champagne_ardenne msgid "Champagne-Ardenne" msgstr "Champagne-Ardenne" +#. Android resource: @strings/corse msgid "Corse" msgstr "Córsega" +#. Android resource: @strings/franche_comte msgid "Franche-Comte" msgstr "Franche-Comte" +#. Android resource: @strings/haute_normandie msgid "Haute-Normandie" msgstr "Alta-Normandia" +#. Android resource: @strings/ile_de_france msgid "Ile-de-France" msgstr "Ile-deFrance" +#. Android resource: @strings/languedoc_roussillon msgid "Languedoc-Roussillon" msgstr "Languedoc-Roussillon" +#. Android resource: @strings/limousin msgid "Limousin" msgstr "Limousin" +#. Android resource: @strings/lorraine msgid "Lorraine" msgstr "Lorena" +#. Android resource: @strings/midi_pyrenees msgid "Midi-Pyrenees" msgstr "Médio Pirineus" +#. Android resource: @strings/nord_pas_de_calais msgid "Nord-pas-de-Calais" msgstr "Nord-pas-de-Calais" +#. Android resource: @strings/pays_de_la_loire msgid "Pays-de-la-Loire" msgstr "País do Loire" +#. Android resource: @strings/picardie msgid "Picardie" msgstr "Picardia" +#. Android resource: @strings/poitou_charentes msgid "Poitou-Charentes" msgstr "Poitou-Charentes" +#. Android resource: @strings/provence_alpes_cote_d_azur msgid "Provence-Alpes-Cote-d-Azur" msgstr "Provença-Alpes-Costa Azul" +#. Android resource: @strings/rhone_alpes msgid "Rhone-Alpes" msgstr "Rhone-Alpes" +#. Android resource: @strings/baden_wuerttemberg msgid "Baden-Wuerttemberg" msgstr "Baden-Wuerttemberg" +#. Android resource: @strings/bayern msgid "Bayern" msgstr "Bayern" +#. Android resource: @strings/mittelfranken msgid "Mittelfranken" msgstr "Mittelfranken" +#. Android resource: @strings/niederbayern msgid "Niederbayern" msgstr "Baixa Bavária" +#. Android resource: @strings/oberbayern msgid "Oberbayern" msgstr "Alta Bavária" +#. Android resource: @strings/oberfranken msgid "Oberfranken" msgstr "Alta Franconia" +#. Android resource: @strings/oberpfalz msgid "Oberpfalz" msgstr "Alto Palatinado" +#. Android resource: @strings/schwaben msgid "Schwaben" msgstr "Suábia" +#. Android resource: @strings/unterfranken msgid "Unterfranken" msgstr "Baixa Francônia" +#. Android resource: @strings/berlin msgid "Berlin" msgstr "Berlim" +#. Android resource: @strings/brandenburg msgid "Brandenburg" msgstr "Brandenburg" +#. Android resource: @strings/bremen msgid "Bremen" msgstr "Bremen" +#. Android resource: @strings/hamburg msgid "Hamburg" msgstr "Hamburgo" +#. Android resource: @strings/hessen msgid "Hessen" msgstr "Hesse" +#. Android resource: @strings/mecklenburg_vorpommern msgid "Mecklenburg-Vorpommern" msgstr "Mecklenburgo-Pomerânia Ocidental" +#. Android resource: @strings/niedersachsen msgid "Niedersachsen" msgstr "Baixa Saxônia" +#. Android resource: @strings/nordrhein_westfalen msgid "Nordrhein-westfalen" msgstr "Renânia do Norte-Vestfália" +#. Android resource: @strings/rheinland_pfalz msgid "Rheinland-Pfalz" msgstr "Renânia-Palatinado" +#. Android resource: @strings/saarland msgid "Saarland" msgstr "Sarre" +#. Android resource: @strings/sachsen_anhalt msgid "Sachsen-Anhalt" msgstr "Saxônia-Anhalt" +#. Android resource: @strings/sachsen msgid "Sachsen" msgstr "Saxônia" +#. Android resource: @strings/schleswig_holstein msgid "Schleswig-Holstein" msgstr "Schleswig-Holstein" +#. Android resource: @strings/thueringen msgid "Thueringen" msgstr "Turíngia" +#. Android resource: @strings/mallorca msgid "Mallorca" msgstr "Maiorca" +#. Android resource: @strings/galicia msgid "Galicia" msgstr "Galicia" +#. Android resource: @strings/scandinavia msgid "Scandinavia" msgstr "Escandinávia" +#. Android resource: @strings/england msgid "England" msgstr "Inglaterra" +#. Android resource: @strings/buckinghamshire msgid "Buckinghamshire" msgstr "Condado de Buckingham" +#. Android resource: @strings/cambridgeshire msgid "Cambridgeshire" msgstr "Condado de Cambridge" +#. Android resource: @strings/cumbria msgid "Cumbria" msgstr "Cumbria" +#. Android resource: @strings/east_yorkshire_with_hull msgid "East yorkshire with hull" msgstr "Condado de York a leste do Hull" +#. Android resource: @strings/essex msgid "Essex" msgstr "Essex" +#. Android resource: @strings/herefordshire msgid "Herefordshire" msgstr "Condado de Hereford" +#. Android resource: @strings/kent msgid "Kent" msgstr "Kent" +#. Android resource: @strings/lancashire msgid "Lancashire" msgstr "condado de Lanca" +#. Android resource: @strings/leicestershire msgid "Leicestershire" msgstr "Condado de Leichester" +#. Android resource: @strings/norfolk msgid "Norfolk" msgstr "Norfolk" +#. Android resource: @strings/nottinghamshire msgid "Nottinghamshire" msgstr "Condado de Nottinham" +#. Android resource: @strings/oxfordshire msgid "Oxfordshire" msgstr "Condado de Oxford" +#. Android resource: @strings/shropshire msgid "Shropshire" msgstr "Condado de Shrop" +#. Android resource: @strings/somerset msgid "Somerset" msgstr "Somerset" +#. Android resource: @strings/south_yorkshire msgid "South yorkshire" msgstr "Condado York do Sul" +#. Android resource: @strings/suffolk msgid "Suffolk" msgstr "Suffolk" +#. Android resource: @strings/surrey msgid "Surrey" msgstr "Surrey" +#. Android resource: @strings/wiltshire msgid "Wiltshire" msgstr "condado de Wilt" +#. Android resource: @strings/scotland msgid "Scotland" msgstr "Escócia" +#. Android resource: @strings/wales msgid "Wales" msgstr "País de Gales" +#. Android resource: @strings/crete msgid "Crete" msgstr "Creta" +#. Android resource: @strings/north_america msgid "North America" msgstr "América do Norte" +#. Android resource: @strings/alaska msgid "Alaska" msgstr "Alasca" +#. Android resource: @strings/hawaii msgid "Hawaii" msgstr "Havaí" +#. Android resource: @strings/usa msgid "USA" msgstr "EUA" -msgid " (except Alaska and Hawaii)" -msgstr " (exceto Alasca e Havaí)" +#. Android resource: @strings/except_alaska_and_hawaii +msgid "(except Alaska and Hawaii)" +msgstr "(exceto Alasca e Havaí)" +#. Android resource: @strings/midwest msgid "Midwest" msgstr "Meio Oeste" +#. Android resource: @strings/michigan msgid "Michigan" msgstr "Michigan" +#. Android resource: @strings/ohio msgid "Ohio" msgstr "Ohio" +#. Android resource: @strings/northeast msgid "Northeast" msgstr "Nordeste" +#. Android resource: @strings/massachusetts msgid "Massachusetts" msgstr "Massachusetts" +#. Android resource: @strings/vermont msgid "Vermont" msgstr "Vermont" +#. Android resource: @strings/pacific msgid "Pacific" msgstr "Pacífico" +#. Android resource: @strings/south msgid "South" msgstr "Sul" +#. Android resource: @strings/arkansas msgid "Arkansas" msgstr "Arkansas" +#. Android resource: @strings/district_of_columbia msgid "District of Columbia" msgstr "Distrito de Columbia" +#. Android resource: @strings/florida msgid "Florida" msgstr "Flórida" +#. Android resource: @strings/louisiana msgid "Louisiana" msgstr "Luisiana" +#. Android resource: @strings/maryland msgid "Maryland" msgstr "Maryland" +#. Android resource: @strings/mississippi msgid "Mississippi" msgstr "Mississippi" +#. Android resource: @strings/oklahoma msgid "Oklahoma" msgstr "Oklahoma" +#. Android resource: @strings/texas msgid "Texas" msgstr "Texas" +#. Android resource: @strings/virginia msgid "Virginia" msgstr "Virginia" +#. Android resource: @strings/west_virginia msgid "West Virginia" msgstr "Virgínia Ocidental" +#. Android resource: @strings/west msgid "West" msgstr "Oeste" +#. Android resource: @strings/arizona msgid "Arizona" msgstr "Arizona" +#. Android resource: @strings/california msgid "California" msgstr "Califórnia" +#. Android resource: @strings/colorado msgid "Colorado" msgstr "Colorado" +#. Android resource: @strings/idaho msgid "Idaho" msgstr "Idaho" +#. Android resource: @strings/montana msgid "Montana" msgstr "Montana" +#. Android resource: @strings/new_mexico msgid "New Mexico" msgstr "Novo México" +#. Android resource: @strings/nevada msgid "Nevada" msgstr "Nevada" +#. Android resource: @strings/oregon msgid "Oregon" msgstr "Oregon" +#. Android resource: @strings/utah msgid "Utah" msgstr "Utah" +#. Android resource: @strings/washington_state msgid "Washington State" msgstr "Washington" +#. Android resource: @strings/south_middle_america msgid "South+Middle America" msgstr "Sul + América Central" +#. Android resource: @strings/guyane_francaise msgid "Guyane Francaise" msgstr "Guiana Francesa" -msgid "downloading" -msgstr "baixando" - -#. Android resource: @strings/map_download_ready -msgid "ready" -msgstr "pronto" - -msgid "Media selected for map storage is not available" -msgstr "" - -#. Android resource: @strings/map_download_not_enough_free_space -msgid "Not enough free space" -msgstr "Não há espaço livre suficiente" - -msgid "Error downloading map!" -msgstr "Erro ao baixar o mapa!" - -msgid "Error writing map!" -msgstr "Erro escrevendo mapa!" - -msgid "Map download aborted!" -msgstr "Baixa do mapa abortada!" - -#. Android resource: @strings/map_download_eta -msgid "ETA" -msgstr "ETA" - -#. Android resource: @strings/map_download_title -msgid "Map download" -msgstr "Baixa do mapa" - -msgid "Vehicle Position" -msgstr "Posição do Veículo" - -msgid "Main menu" -msgstr "Menu principal" - -msgid "" -"Show\n" -"Map" -msgstr "" -"Mostrar\n" -"Mapa" - -msgid "Settings" -msgstr "Configurações" - -msgid "Tools" -msgstr "Ferramentas" - -msgid "Route" -msgstr "Rota" - -msgid "About" -msgstr "Sobre" - -msgid "Quit" -msgstr "Sair" - -msgid "Actions" -msgstr "Ações" - -msgid "" -"Former\n" -"Destinations" -msgstr "" -"Destinos\n" -"Anteriores" - -msgid "Coordinates" -msgstr "Coordenadas" - -msgid "" -"Stop\n" -"Navigation" -msgstr "" -"Parar\n" -"Navegação" - -msgid "Display" -msgstr "Exibição" - -msgid "Fullscreen" -msgstr "Tela cheia" - -msgid "Window Mode" -msgstr "Modo de Janela" - -msgid "Description" -msgstr "Descrição" - -msgid "" -"Drop last \n" -"Waypoint" -msgstr "" -"Remover último\n" -"Ponto" - -msgid "" -"Drop next \n" -"Waypoint" -msgstr "" -"Remover próximo\n" -"Ponto" - -msgid "Satellite Status" -msgstr "Estado do Satélite" - -msgid "NMEA Data" -msgstr "Dados NMEA" - -msgid "car_shortest" -msgstr "carro_pequeno" - -msgid "car_avoid_tolls" -msgstr "Evitar pedágios" - -msgid "car_pedantic" -msgstr "detalhe do carro" - -msgid "horse" -msgstr "cavalo" - -msgid "Truck" -msgstr "Caminhão" - -#. Strings from android/res/values/strings.xml -#. Android resource: @strings/yes -msgid "Yes" -msgstr "Sim" - -#. Android resource: @strings/notification_ticker -msgid "Navit started" -msgstr "Navit iniciou" - -#. Android resource: @strings/notification_event_default -msgid "Navit running" -msgstr "Navit rodando" - -#. Android resource: @strings/initial_info_box_title -msgid "Welcome to Navit" -msgstr "Bem-vindo ao Navit" - -#. Android resource: @strings/initial_info_box_message -msgid "" -"Thank you for installing Navit!\n" -"\n" -"To start, select \"Download maps\" from the menu to download a map. Note: " -"The map filesize may be large (>50MB) - a wifi connection is recommended.\n" -"\n" -"Mapdata: (c) OpenStreetMap contributors\n" -"\n" -"Enjoy Navit!" -msgstr "" -"Obrigado por instalar Navit!\n" -"\n" -"Para começar, selecione \"Importar mapas\" no menu para fazer o download de " -"um mapa. Nota: O tamanho do arquivo do mapa pode ser grande (> 50MB) - uma " -"conexão Wi-Fi é recomendada.\n" -"\n" -"Mapdata: (c) contribuidores OpenStreetMap\n" -"\n" -"Desfrute do Navit!" - -#. Android resource: @strings/initial_info_box_OK -msgid "OK" -msgstr "OK" - -#. Android resource: @strings/initial_info_box_more_info -msgid "More info" -msgstr "Mais informações" - -#. Android resource: @strings/optionsmenu_zoom_in -msgid "Zoom in" -msgstr "Aumentar zoom" - -#. Android resource: @strings/optionsmenu_zoom_out -msgid "Zoom out" -msgstr "Diminuir zoom" - -#. Android resource: @strings/optionsmenu_download_maps -msgid "Download maps" -msgstr "Baixar mapas" - -#. Android resource: @strings/optionsmenu_toggle_poi -msgid "Toggle POIs" -msgstr "Alternar POIs" - -#. Android resource: @strings/optionsmenu_exit_navit -msgid "Exit Navit" -msgstr "Sair do Navit" - -#. Android resource: @strings/optionsmenu_backup_restore -msgid "Backup / Restore" -msgstr "Backup / Restauração" - -#. Android resource: @strings/optionsmenu_set_map_location -msgid "Set map location" -msgstr "" - -#. Android resource: @strings/map_delete -msgid "Delete this map?" -msgstr "Excluir este mapa?" - -#. Android resource: @strings/map_download_downloading -msgid "Downloading:" -msgstr "Baixando:" - -#. Android resource: @strings/map_download_download_error -msgid "Error downloading map." -msgstr "Erro ao baixar mapa." - -#. Android resource: @strings/map_download_download_aborted -msgid "Map download aborted" -msgstr "Baixa do mapa abortada" - -#. Android resource: @strings/map_no_fix -msgid "No location. Reopen after location fix." -msgstr "Nenhum local. Reabrir após corrigir localização" - -#. Android resource: @strings/maps_for_current_location -msgid "Maps containing current location" -msgstr "Mapas contendo localização atual" - -#. Android resource: @strings/address_search_title -msgid "Address search" -msgstr "Pesquisar endereço" - -#. Android resource: @strings/address_enter_destination -msgid "Enter destination" -msgstr "Digite o destino" - -#. Android resource: @strings/address_partial_match -msgid "Match partial address" -msgstr "Combine endereço parcial" - -#. Android resource: @strings/address_search_searching -msgid "Searching..." -msgstr "Procurando..." - -#. Android resource: @strings/address_search_not_found -msgid "Address not found" -msgstr "Endereço não encontrado" - -#. Android resource: @strings/address_search_getting_results -msgid "Getting search results" -msgstr "Obtendo resultados de busca" - -#. Android resource: @strings/address_search_loading_results -msgid "Loading search results" -msgstr "Carregando resultados da busca" - -#. Android resource: @strings/address_search_no_results -msgid "No results found" -msgstr "Nenhum resultado encontrado" +#, c-format +#~ msgid "Route %4.0fkm %02d:%02d ETA" +#~ msgstr "Rota %4.0fkm TEC %02d:%02d" -#. Android resource: @strings/address_search_no_text_entered -msgid "No text entered" -msgstr "Nenhum texto digitado" +#~ msgid "No config file navit.xml, navit.xml.local found\n" +#~ msgstr "" +#~ "Nenhum arquivo de configuração navit.xml, navit.xml.local foi encontrado\n" -#. Android resource: @strings/address_search_set_destination -msgid "Setting destination to:" -msgstr "Definir destino para:" +#, c-format +#~ msgid "Error parsing config file '%s': %s\n" +#~ msgstr "Erro ao analizar o arquivo de configuração '%s': %s\n" -#. Android resource: @strings/choose_an_action -msgid "Choose an action" -msgstr "Escolha uma ação" +#, c-format +#~ msgid "Using config file '%s'\n" +#~ msgstr "Utilizando arquivo de configuração '%s'\n" -#. Android resource: @strings/please_insert_an_sd_card -msgid "Please insert an SD Card" -msgstr "Por favor insira um cartão SD" +#~ msgid "" +#~ "Internal initialization failed, exiting. Check previous error messages.\n" +#~ msgstr "" +#~ "Inicialização interna falhou, finalizando. Verifique mensagens de erro " +#~ "anteriores.\n" -#. Android resource: @strings/backing_up -msgid "Backing up..." -msgstr "Cópia de Segurança em andamento..." +#~ msgid "Downloaded maps" +#~ msgstr "Mapas baixados" -#. Android resource: @strings/restoring -msgid "Restoring..." -msgstr "Restaurando ..." +#~ msgid "Map data (c) OpenStreetMap contributors, ODBL" +#~ msgstr "Dados do mapa (c) colaboradores OpenStreetMap, ODBL" -#. Android resource: @strings/failed_to_create_backup_directory -msgid "Failed to create backup directory" -msgstr "Falha ao criar o diretório da cópia de segurança" +#~ msgid "partial match" +#~ msgstr "resultado parcial" -#. Android resource: @strings/backup_failed -msgid "Backup failed" -msgstr "Cópia de segurança falhou" +#~ msgid " (except Alaska and Hawaii)" +#~ msgstr " (exceto Alasca e Havaí)" -#. Android resource: @strings/no_backup_found -msgid "No backup found" -msgstr "Não encontrou a cópia de segurança" +#~ msgid "Error downloading map!" +#~ msgstr "Erro ao baixar o mapa!" -#. Android resource: @strings/failed_to_restore -msgid "Failed to restore" -msgstr "Falha ao restaurar" +#~ msgid "Map download aborted!" +#~ msgstr "Baixa do mapa abortada!" -#. Android resource: @strings/backup_successful -msgid "Backup successful" -msgstr "Cópia de segurança bem-sucedida" +#, c-format +#~ msgid "Error: No configuration found in config file '%s'\n" +#~ msgstr "Erro: Nenhuma configuração encontrada no arquivo '%s'\n" -#. Android resource: @strings/restore_successful_please_restart_navit -msgid "" -"Restore Successful\n" -"Please restart Navit" -msgstr "" -"Restauração bem-sucedida\n" -"Por favor, reinicie Navit" +#~ msgid "Distance from screen center (km)" +#~ msgstr "Distância do centro da tela (km)" -#. Android resource: @strings/backup_not_found -msgid "Backup not found" -msgstr "Cópia de segurança não encontrada" +#, c-format +#~ msgid "Set destination to %ld, %ld \n" +#~ msgstr "Definir destino para %ld, %ld \n" -#. Android resource: @strings/restore_failed -msgid "Restore failed" -msgstr "Falha na restauração" +#, c-format +#~ msgid "Set next visit to %ld, %ld \n" +#~ msgstr "Definir próxima parada parao %ld, %ld \n" -#. Android resource: @strings/select_backup -msgid "Select backup" -msgstr "Selecione a cópia de segurança" +#, c-format +#~ msgid "Set map to %ld, %ld \n" +#~ msgstr "Definir mapa para o %ld, %ld \n" -#. Android resource: @strings/backup -msgid "Backup" -msgstr "Cópia de segurança" +#~ msgid "Select a distance to look for (km)" +#~ msgstr "Selecione a distância para pesquisar (km)" -#. Android resource: @strings/restore -msgid "Restore" -msgstr "Restaurar" +#~ msgid "Distance(m)" +#~ msgstr "Distância (m)" -#. Android resource: @strings/TTS_title_data_missing -msgid "System text to speech engine data is missing" -msgstr "" +#~ msgid "" +#~ "Drop last \n" +#~ "Waypoint" +#~ msgstr "" +#~ "Remover último\n" +#~ "Ponto" -#. Android resource: @strings/TTS_qery_install_data -msgid "" -"Navit can use any text to speech engine installed on your device. The " -"currently selected engine reports it is unable to speak in your language. " -"Should we ask the system to show voice download dialog?" -msgstr "" +#~ msgid "" +#~ "Drop next \n" +#~ "Waypoint" +#~ msgstr "" +#~ "Remover próximo\n" +#~ "Ponto" #, c-format #~ msgid "then leave the roundabout at the %1$s %2$s" #~ msgstr "então deixe a rotatória na %1$s %2$s" + +#~ msgid "filenamePath" +#~ msgstr "nome do aquivoPath" + +#~ msgid "" +#~ "New location set to %s\n" +#~ "Restart Navit to apply the changes." +#~ msgstr "" +#~ "Nova localização definida como %s\n" +#~ "Reinicie o Navit para aplicar as alterações." + +#~ msgid "" +#~ "Current map location %s is not available\n" +#~ "Please restart Navit after you attach an SD card or select a different map " +#~ "location." +#~ msgstr "" +#~ "O atual localização %s não está disponível no mapa \n" +#~ "Reinicie o Navit depois de plugar um cartão SD ou selecione outra " +#~ "localização no mapa." diff --git a/scripts/build_win32.sh b/scripts/build_win32.sh index 3fbe81d1d..993c0273f 100644 --- a/scripts/build_win32.sh +++ b/scripts/build_win32.sh @@ -1,33 +1,17 @@ #!/usr/bin/env bash set -e -export nixpaste="curl -F 'text=<-' http://nixpaste.lbr.uno" + apt-get update && apt-get install -y mingw-w64 mingw-w64-tools \ default-jdk nsis libsaxonb-java curl mkdir win32 pushd win32 -if ! cmake -Dbinding/python:BOOL=FALSE -DSAMPLE_MAP=n -DBUILD_MAPTOOL=n \ - -DXSLTS=windows -DCMAKE_TOOLCHAIN_FILE=../Toolchain/mingw32.cmake ../ -then - find . - #nixpaste < ./CMakeFiles/CMakeError.log - exit 1 -fi -if ! make -j $(nproc --all) -then - echo "make" - make -d - nixpaste < ./Makefile || cat ./Makefile - exit 1 -fi +cmake -Dbinding/python:BOOL=FALSE -DSAMPLE_MAP=n -DBUILD_MAPTOOL=n \ + -DXSLTS=windows -DCMAKE_TOOLCHAIN_FILE=../Toolchain/mingw32.cmake .. +make -j $(nproc --all) +make -j $(nproc --all) package -if ! make -j $(nproc --all) package -then - echo "make package" - nixpaste < ./Makefile - exit 1 -fi popd cp win32/*.exe $CIRCLE_ARTIFACTS/ diff --git a/scripts/import_translation.sh b/scripts/import_translation.sh index d1d1f3a6c..fc4117847 100644 --- a/scripts/import_translation.sh +++ b/scripts/import_translation.sh @@ -56,6 +56,9 @@ for i in po/import_queue/*.po; do mv po/${po}.header po/${po}.in sed '1,/msgid ""/ d' ${i} >> po/${po}.in + # We remove extra whitespaces to make the sanity checks happy + sed -i -e 's/ *$//' po/${po}.in + git status git add po/${po}.in && rm $i git commit -m "Update:i18n:Updated ${lname} translation from launchpad" po/${po}.in diff --git a/scripts/setup_14.04_requirements.list b/scripts/setup_14.04_requirements.list new file mode 100644 index 000000000..efa122c7e --- /dev/null +++ b/scripts/setup_14.04_requirements.list @@ -0,0 +1,2 @@ +wget unzip cmake build-essential gettext librsvg2-bin util-linux git ssh +sed astyle libprotobuf-c0-dev protobuf-c-compiler bash diff --git a/scripts/setup_common_requirements.sh b/scripts/setup_common_requirements.sh index 0ca000fa8..0506fff7c 100644 --- a/scripts/setup_common_requirements.sh +++ b/scripts/setup_common_requirements.sh @@ -1,4 +1,6 @@ #!/bin/sh set -e -apt-get update && apt-get install -y wget unzip cmake build-essential gettext librsvg2-bin util-linux git ssh sed astyle libxml2-utils +apt-get update && apt-get install -y wget unzip cmake build-essential \ + gettext librsvg2-bin util-linux git ssh sed astyle \ + libprotobuf-c-dev protobuf-c-compiler |