Removed 'roundabout' word from notification

This commit is contained in:
Alexey Kulish 2016-11-04 10:25:45 +03:00
parent dc6ee568ec
commit ab0112c3be
4 changed files with 10 additions and 5 deletions

View file

@ -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 PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy
--> -->
<string name="route_roundabout_short">Take %1$d exit and go</string>
<string name="upload_poi">Upload POI</string> <string name="upload_poi">Upload POI</string>
<string name="route_calculation">Route calculation</string> <string name="route_calculation">Route calculation</string>
<string name="gpx_no_tracks_title">You do not have tracks yet</string> <string name="gpx_no_tracks_title">You do not have tracks yet</string>

View file

@ -162,7 +162,7 @@ public class NavigationNotification extends OsmandNotification {
} }
notificationTitle = OsmAndFormatter.getFormattedDistance(nextTurnDistance, app) 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())) { if (ri != null && !Algorithms.isEmpty(ri.getDescriptionRoutePart())) {
notificationText.append(ri.getDescriptionRoutePart()); notificationText.append(ri.getDescriptionRoutePart());
if (nextNextTurnDistance > 0) { if (nextNextTurnDistance > 0) {

View file

@ -260,7 +260,7 @@ public class RouteCalculationResult {
ctx.getSettings().MAP_TRANSLITERATE_NAMES.get(), next.isForwardDirection())); 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)); info.getRef(), info.getDestinationName(), ctx.getString(R.string.towards));
description = description.trim(); description = description.trim();
String[] pointNames = s.getObject().getPointNames(s.getStartPointIndex()); 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()){ if(type.isRoundAbout()){
if (shortName) {
return ctx.getString(R.string.route_roundabout_short, type.getExitOut());
} else {
return ctx.getString(R.string.route_roundabout, type.getExitOut()); return ctx.getString(R.string.route_roundabout, type.getExitOut());
}
} else if(type.getValue() == TurnType.C) { } else if(type.getValue() == TurnType.C) {
return ctx.getString(R.string.route_head); return ctx.getString(R.string.route_head);
} else if(type.getValue() == TurnType.TSLL) { } else if(type.getValue() == TurnType.TSLL) {

View file

@ -97,7 +97,7 @@ public class NextTurnInfoWidget extends TextInfoWidget {
TurnType turnType = getTurnType(); TurnType turnType = getTurnType();
RoutingHelper routingHelper = app.getRoutingHelper(); RoutingHelper routingHelper = app.getRoutingHelper();
if ((turnType != null) && (routingHelper != null)) { if ((turnType != null) && (routingHelper != null)) {
setContentDescription(ds + " " + routingHelper.getRoute().toString(turnType, app)); setContentDescription(ds + " " + routingHelper.getRoute().toString(turnType, app, false));
} else { } else {
setContentDescription(ds); setContentDescription(ds);
} }