From ab0112c3be62898fb425a83179961f473ccfd88c Mon Sep 17 00:00:00 2001 From: Alexey Kulish Date: Fri, 4 Nov 2016 10:25:45 +0300 Subject: [PATCH] Removed 'roundabout' word from notification --- OsmAnd/res/values/strings.xml | 1 + .../plus/notifications/NavigationNotification.java | 2 +- .../osmand/plus/routing/RouteCalculationResult.java | 10 +++++++--- .../plus/views/mapwidgets/NextTurnInfoWidget.java | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index babb32ecea..2a96f8aaee 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -10,6 +10,7 @@ PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy --> + Take %1$d exit and go Upload POI Route calculation You do not have tracks yet diff --git a/OsmAnd/src/net/osmand/plus/notifications/NavigationNotification.java b/OsmAnd/src/net/osmand/plus/notifications/NavigationNotification.java index 0c82d147f0..6156b01537 100644 --- a/OsmAnd/src/net/osmand/plus/notifications/NavigationNotification.java +++ b/OsmAnd/src/net/osmand/plus/notifications/NavigationNotification.java @@ -162,7 +162,7 @@ public class NavigationNotification extends OsmandNotification { } notificationTitle = OsmAndFormatter.getFormattedDistance(nextTurnDistance, app) - + (turnType != null ? " • " + RouteCalculationResult.toString(turnType, app) : ""); + + (turnType != null ? " • " + RouteCalculationResult.toString(turnType, app, true) : ""); if (ri != null && !Algorithms.isEmpty(ri.getDescriptionRoutePart())) { notificationText.append(ri.getDescriptionRoutePart()); if (nextNextTurnDistance > 0) { diff --git a/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java b/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java index 97ff20d077..1146f6f9f4 100644 --- a/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java +++ b/OsmAnd/src/net/osmand/plus/routing/RouteCalculationResult.java @@ -260,7 +260,7 @@ public class RouteCalculationResult { ctx.getSettings().MAP_TRANSLITERATE_NAMES.get(), next.isForwardDirection())); } - String description = toString(turn, ctx) + " " + RoutingHelper.formatStreetName(info.getStreetName(), + String description = toString(turn, ctx, false) + " " + RoutingHelper.formatStreetName(info.getStreetName(), info.getRef(), info.getDestinationName(), ctx.getString(R.string.towards)); description = description.trim(); String[] pointNames = s.getObject().getPointNames(s.getStartPointIndex()); @@ -454,9 +454,13 @@ public class RouteCalculationResult { } - public static String toString(TurnType type, Context ctx) { + public static String toString(TurnType type, Context ctx, boolean shortName) { if(type.isRoundAbout()){ - return ctx.getString(R.string.route_roundabout, type.getExitOut()); + if (shortName) { + return ctx.getString(R.string.route_roundabout_short, type.getExitOut()); + } else { + return ctx.getString(R.string.route_roundabout, type.getExitOut()); + } } else if(type.getValue() == TurnType.C) { return ctx.getString(R.string.route_head); } else if(type.getValue() == TurnType.TSLL) { diff --git a/OsmAnd/src/net/osmand/plus/views/mapwidgets/NextTurnInfoWidget.java b/OsmAnd/src/net/osmand/plus/views/mapwidgets/NextTurnInfoWidget.java index 41e9e78c97..e18ed456e1 100644 --- a/OsmAnd/src/net/osmand/plus/views/mapwidgets/NextTurnInfoWidget.java +++ b/OsmAnd/src/net/osmand/plus/views/mapwidgets/NextTurnInfoWidget.java @@ -97,7 +97,7 @@ public class NextTurnInfoWidget extends TextInfoWidget { TurnType turnType = getTurnType(); RoutingHelper routingHelper = app.getRoutingHelper(); if ((turnType != null) && (routingHelper != null)) { - setContentDescription(ds + " " + routingHelper.getRoute().toString(turnType, app)); + setContentDescription(ds + " " + routingHelper.getRoute().toString(turnType, app, false)); } else { setContentDescription(ds); }