Skip to content

Commit 2fc3a46

Browse files
Adding an empty variant to the alternatives list template on CarPlay (#4374)
* Adding empty variant to the alternatives list template * Ran extract_localizable script
1 parent 7d623c7 commit 2fc3a46

File tree

3 files changed

+34
-2
lines changed

3 files changed

+34
-2
lines changed

Example/en.lproj/Localizable.strings

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,18 @@
2828
/* Title of alert confirming waypoint removal */
2929
"REMOVE_WAYPOINT_CONFIRM_TITLE" = "Remove Waypoint?";
3030

31+
/* No comment provided by engineer. */
32+
"Start Cycling" = "Start Cycling";
33+
34+
/* No comment provided by engineer. */
35+
"Start Driving" = "Start Driving";
36+
37+
/* No comment provided by engineer. */
38+
"Start Driving Avoiding Traffic" = "Start Driving Avoiding Traffic";
39+
40+
/* No comment provided by engineer. */
41+
"Start Navigation" = "Start Navigation";
42+
43+
/* No comment provided by engineer. */
44+
"Start Walking" = "Start Walking";
45+

Sources/MapboxNavigation/CarPlayNavigationViewController.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,16 @@ open class CarPlayNavigationViewController: UIViewController, BuildingHighlighti
177177
let template = CPListTemplate(title: alternativesTitle,
178178
sections: variants)
179179
template.delegate = self
180+
181+
if #available(iOS 14.0, *) {
182+
let alternativesEmptyVariantsSubtitle = NSLocalizedString("CARPLAY_ALTERNATIVES_EMPTY_SUBTITLE",
183+
bundle: .mapboxNavigation,
184+
value: "No alternative routes found.",
185+
comment: "Subtitle for the alternative list template empty variants")
186+
187+
template.emptyViewSubtitleVariants = [alternativesEmptyVariantsSubtitle]
188+
}
189+
180190
return template
181191
}
182192

Sources/MapboxNavigation/Resources/en.lproj/Localizable.strings

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
/* Combined alternatives selection notes about duration (first slot position) and distance (second slot position) delta. */
22
"ALTERNATIVE_NOTES" = "%1$@ / %2$@";
33

4+
/* Title of the back button. */
5+
"BACK" = "BACK";
6+
47
/* Title for alternatives selection list button */
58
"CARPLAY_ALTERNATIVES" = "Alternatives";
69

10+
/* Subtitle for the alternative list template empty variants */
11+
"CARPLAY_ALTERNATIVES_EMPTY_SUBTITLE" = "No alternative routes found.";
12+
713
/* Title on arrival action sheet */
814
"CARPLAY_ARRIVED" = "You have arrived";
915

@@ -40,6 +46,9 @@
4046
/* Title for overview button in CPTripPreviewTextConfiguration */
4147
"CARPLAY_OVERVIEW" = "Overview";
4248

49+
/* Title for trip preview back button */
50+
"CARPLAY_PREVIEW_BACK" = "BACK";
51+
4352
/* Title for rating template in CarPlay */
4453
"CARPLAY_RATE_RIDE" = "Rate your ride";
4554

@@ -265,5 +274,3 @@
265274
/* Format for displaying start and endpoint for leg; 1 = source ; 2 = destination */
266275
"WAYPOINT_SOURCE_DESTINATION_FORMAT" = "%1$@ and %2$@";
267276

268-
/* Button title for back button in preview . */
269-
"BACK" = "Back";

0 commit comments

Comments
 (0)