Skip to content

Commit

Permalink
Fix misuse of the word “voice” (#191)
Browse files Browse the repository at this point in the history
  • Loading branch information
1ec5 authored and Bobby Sudekum committed Oct 13, 2017
1 parent 0948f3b commit c7a50d1
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 43 deletions.
38 changes: 19 additions & 19 deletions MapboxDirections.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
C52CE38F1F6AF63C0069963D /* MBSpokenInstruction.swift in Sources */ = {isa = PBXBuildFile; fileRef = C55FB44A1F6AEBF6006BD1E9 /* MBSpokenInstruction.swift */; };
C52CE3901F6AF63D0069963D /* MBSpokenInstruction.swift in Sources */ = {isa = PBXBuildFile; fileRef = C55FB44A1F6AEBF6006BD1E9 /* MBSpokenInstruction.swift */; };
C52CE3911F6AF63E0069963D /* MBSpokenInstruction.swift in Sources */ = {isa = PBXBuildFile; fileRef = C55FB44A1F6AEBF6006BD1E9 /* MBSpokenInstruction.swift */; };
C52CE3931F6AF6E70069963D /* VoiceInstructions.swift in Sources */ = {isa = PBXBuildFile; fileRef = C52CE3921F6AF6E70069963D /* VoiceInstructions.swift */; };
C52CE3931F6AF6E70069963D /* SpokenInstructionsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C52CE3921F6AF6E70069963D /* SpokenInstructionsTests.swift */; };
C53A02261E92C26E009837BD /* MBAttribute.swift in Sources */ = {isa = PBXBuildFile; fileRef = C51538CB1E807FF00093FF3E /* MBAttribute.swift */; };
C53A02271E92C26F009837BD /* MBAttribute.swift in Sources */ = {isa = PBXBuildFile; fileRef = C51538CB1E807FF00093FF3E /* MBAttribute.swift */; };
C53A02281E92C271009837BD /* MBAttribute.swift in Sources */ = {isa = PBXBuildFile; fileRef = C51538CB1E807FF00093FF3E /* MBAttribute.swift */; };
Expand Down Expand Up @@ -58,11 +58,11 @@
C58EA7AD1E9D7F75008F98CE /* MBCongestion.swift in Sources */ = {isa = PBXBuildFile; fileRef = C58EA7A91E9D7EAD008F98CE /* MBCongestion.swift */; };
C59426071F1EA6C400C8E59C /* MBRoadClasses.swift in Sources */ = {isa = PBXBuildFile; fileRef = C59426061F1EA6C400C8E59C /* MBRoadClasses.swift */; };
C5A3D3981E8188FE00D494A0 /* annotation.json in Resources */ = {isa = PBXBuildFile; fileRef = C5A3D3971E8188FE00D494A0 /* annotation.json */; };
C5D1D7F01F6AF91700A1C4F1 /* voiceInstructions.json in Resources */ = {isa = PBXBuildFile; fileRef = C5D1D7EF1F6AF91700A1C4F1 /* voiceInstructions.json */; };
C5D1D7F11F6AF92500A1C4F1 /* voiceInstructions.json in Resources */ = {isa = PBXBuildFile; fileRef = C5D1D7EF1F6AF91700A1C4F1 /* voiceInstructions.json */; };
C5D1D7F21F6AF92600A1C4F1 /* voiceInstructions.json in Resources */ = {isa = PBXBuildFile; fileRef = C5D1D7EF1F6AF91700A1C4F1 /* voiceInstructions.json */; };
C5D1D7F31F6AFBD600A1C4F1 /* VoiceInstructions.swift in Sources */ = {isa = PBXBuildFile; fileRef = C52CE3921F6AF6E70069963D /* VoiceInstructions.swift */; };
C5D1D7F41F6AFBD600A1C4F1 /* VoiceInstructions.swift in Sources */ = {isa = PBXBuildFile; fileRef = C52CE3921F6AF6E70069963D /* VoiceInstructions.swift */; };
C5D1D7F01F6AF91700A1C4F1 /* spokenInstructions.json in Resources */ = {isa = PBXBuildFile; fileRef = C5D1D7EF1F6AF91700A1C4F1 /* spokenInstructions.json */; };
C5D1D7F11F6AF92500A1C4F1 /* spokenInstructions.json in Resources */ = {isa = PBXBuildFile; fileRef = C5D1D7EF1F6AF91700A1C4F1 /* spokenInstructions.json */; };
C5D1D7F21F6AF92600A1C4F1 /* spokenInstructions.json in Resources */ = {isa = PBXBuildFile; fileRef = C5D1D7EF1F6AF91700A1C4F1 /* spokenInstructions.json */; };
C5D1D7F31F6AFBD600A1C4F1 /* SpokenInstructionsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C52CE3921F6AF6E70069963D /* SpokenInstructionsTests.swift */; };
C5D1D7F41F6AFBD600A1C4F1 /* SpokenInstructionsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C52CE3921F6AF6E70069963D /* SpokenInstructionsTests.swift */; };
DA1A10C61D00F969009F82FA /* MapboxDirections.h in Headers */ = {isa = PBXBuildFile; fileRef = DA6C9D8A1CAE442B00094FBC /* MapboxDirections.h */; settings = {ATTRIBUTES = (Public, ); }; };
DA1A10C71D00F969009F82FA /* MBDirections.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD6254731AE70CB700017857 /* MBDirections.swift */; };
DA1A10C81D00F969009F82FA /* MBRoute.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAC05F171CFC075300FA0071 /* MBRoute.swift */; };
Expand Down Expand Up @@ -186,7 +186,7 @@
358D48851E2EAB4500F32A65 /* MBRouteOptions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MBRouteOptions.m; sourceTree = "<group>"; };
C51538CB1E807FF00093FF3E /* MBAttribute.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MBAttribute.swift; sourceTree = "<group>"; };
C5247D701E818A24004B6154 /* AnnotationTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnnotationTests.swift; sourceTree = "<group>"; };
C52CE3921F6AF6E70069963D /* VoiceInstructions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VoiceInstructions.swift; sourceTree = "<group>"; };
C52CE3921F6AF6E70069963D /* SpokenInstructionsTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SpokenInstructionsTests.swift; sourceTree = "<group>"; };
C558C58B1E94181A00617B37 /* MBAttribute.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MBAttribute.h; sourceTree = "<group>"; };
C55FB44A1F6AEBF6006BD1E9 /* MBSpokenInstruction.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MBSpokenInstruction.swift; sourceTree = "<group>"; };
C57B2E951DB8171300E9123A /* MBLaneIndication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MBLaneIndication.h; sourceTree = "<group>"; };
Expand All @@ -196,7 +196,7 @@
C58EA7A91E9D7EAD008F98CE /* MBCongestion.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MBCongestion.swift; sourceTree = "<group>"; };
C59426061F1EA6C400C8E59C /* MBRoadClasses.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MBRoadClasses.swift; sourceTree = "<group>"; };
C5A3D3971E8188FE00D494A0 /* annotation.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = annotation.json; path = v5/annotation.json; sourceTree = "<group>"; };
C5D1D7EF1F6AF91700A1C4F1 /* voiceInstructions.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = voiceInstructions.json; sourceTree = "<group>"; };
C5D1D7EF1F6AF91700A1C4F1 /* spokenInstructions.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = spokenInstructions.json; sourceTree = "<group>"; };
DA1A10AF1D00F8FF009F82FA /* MapboxDirections.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MapboxDirections.framework; sourceTree = BUILT_PRODUCTS_DIR; };
DA1A10B81D00F8FF009F82FA /* MapboxDirectionsTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MapboxDirectionsTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
DA1A10D51D0101ED009F82FA /* MapboxDirections.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MapboxDirections.framework; sourceTree = BUILT_PRODUCTS_DIR; };
Expand Down Expand Up @@ -345,12 +345,12 @@
name = annotation;
sourceTree = "<group>";
};
C5D1D7EE1F6AF8FA00A1C4F1 /* voiceInstructions */ = {
C5D1D7EE1F6AF8FA00A1C4F1 /* spokenInstructions */ = {
isa = PBXGroup;
children = (
C5D1D7EF1F6AF91700A1C4F1 /* voiceInstructions.json */,
C5D1D7EF1F6AF91700A1C4F1 /* spokenInstructions.json */,
);
name = voiceInstructions;
name = spokenInstructions;
sourceTree = "<group>";
};
DA6C9D891CAE442B00094FBC /* MapboxDirections */ = {
Expand Down Expand Up @@ -391,7 +391,7 @@
DA6C9DB11CAECA0E00094FBC /* Fixture.swift */,
C5247D701E818A24004B6154 /* AnnotationTests.swift */,
DAE33A1A1F215DF600C06039 /* IntersectionTests.swift */,
C52CE3921F6AF6E70069963D /* VoiceInstructions.swift */,
C52CE3921F6AF6E70069963D /* SpokenInstructionsTests.swift */,
DA6C9D9A1CAE442B00094FBC /* Info.plist */,
DA6C9DAD1CAEC93800094FBC /* Fixtures */,
);
Expand All @@ -401,7 +401,7 @@
DA6C9DAD1CAEC93800094FBC /* Fixtures */ = {
isa = PBXGroup;
children = (
C5D1D7EE1F6AF8FA00A1C4F1 /* voiceInstructions */,
C5D1D7EE1F6AF8FA00A1C4F1 /* spokenInstructions */,
C5247D721E818A8D004B6154 /* annotation */,
DA737EEC1D061514005BDA16 /* V4 */,
DA737EEB1D0614FA005BDA16 /* V5 */,
Expand Down Expand Up @@ -833,7 +833,7 @@
DA737EF31D061AA2005BDA16 /* v4_driving_dc_polyline.json in Resources */,
DA737EE51D05F91E005BDA16 /* v5_driving_dc_geojson.json in Resources */,
DA1A10CF1D00F975009F82FA /* v5_driving_dc_polyline.json in Resources */,
C5D1D7F11F6AF92500A1C4F1 /* voiceInstructions.json in Resources */,
C5D1D7F11F6AF92500A1C4F1 /* spokenInstructions.json in Resources */,
DA737EEF1D06175B005BDA16 /* v4_driving_dc_geojson.json in Resources */,
C53A022B1E92C281009837BD /* annotation.json in Resources */,
);
Expand All @@ -853,7 +853,7 @@
DA737EF41D061AA2005BDA16 /* v4_driving_dc_polyline.json in Resources */,
DA737EE61D05F91E005BDA16 /* v5_driving_dc_geojson.json in Resources */,
DA1A10F31D010251009F82FA /* v5_driving_dc_polyline.json in Resources */,
C5D1D7F21F6AF92600A1C4F1 /* voiceInstructions.json in Resources */,
C5D1D7F21F6AF92600A1C4F1 /* spokenInstructions.json in Resources */,
DA737EF01D06175B005BDA16 /* v4_driving_dc_geojson.json in Resources */,
C53A022C1E92C281009837BD /* annotation.json in Resources */,
);
Expand All @@ -880,7 +880,7 @@
DA737EF21D061AA2005BDA16 /* v4_driving_dc_polyline.json in Resources */,
DA737EE41D05F91E005BDA16 /* v5_driving_dc_geojson.json in Resources */,
DAC05F1C1CFC1E5300FA0071 /* v5_driving_dc_polyline.json in Resources */,
C5D1D7F01F6AF91700A1C4F1 /* voiceInstructions.json in Resources */,
C5D1D7F01F6AF91700A1C4F1 /* spokenInstructions.json in Resources */,
DA737EEE1D06175B005BDA16 /* v4_driving_dc_geojson.json in Resources */,
C5A3D3981E8188FE00D494A0 /* annotation.json in Resources */,
);
Expand Down Expand Up @@ -972,7 +972,7 @@
DAE33A1C1F215DF600C06039 /* IntersectionTests.swift in Sources */,
DA1A10CE1D00F972009F82FA /* Fixture.swift in Sources */,
DA1A110C1D01045E009F82FA /* DirectionsTests.swift in Sources */,
C5D1D7F31F6AFBD600A1C4F1 /* VoiceInstructions.swift in Sources */,
C5D1D7F31F6AFBD600A1C4F1 /* SpokenInstructionsTests.swift in Sources */,
F4D785F01DDD82C100FF4665 /* RouteStepTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -1009,7 +1009,7 @@
DAE33A1D1F215DF600C06039 /* IntersectionTests.swift in Sources */,
DA1A10F51D010251009F82FA /* Fixture.swift in Sources */,
DA1A110D1D01045E009F82FA /* DirectionsTests.swift in Sources */,
C5D1D7F41F6AFBD600A1C4F1 /* VoiceInstructions.swift in Sources */,
C5D1D7F41F6AFBD600A1C4F1 /* SpokenInstructionsTests.swift in Sources */,
F4D785F11DDD82C100FF4665 /* RouteStepTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -1067,7 +1067,7 @@
DAE33A1B1F215DF600C06039 /* IntersectionTests.swift in Sources */,
DA6C9DB21CAECA0E00094FBC /* Fixture.swift in Sources */,
DA1A110B1D01045E009F82FA /* DirectionsTests.swift in Sources */,
C52CE3931F6AF6E70069963D /* VoiceInstructions.swift in Sources */,
C52CE3931F6AF6E70069963D /* SpokenInstructionsTests.swift in Sources */,
F4D785EF1DDD82C100FF4665 /* RouteStepTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down
10 changes: 5 additions & 5 deletions MapboxDirections/MBRouteOptions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ open class RouteOptions: NSObject, NSSecureCoding {

locale = decoder.decodeObject(of: NSLocale.self, forKey: "locale") as Locale?

includesVoiceInstructions = decoder.decodeBool(forKey: "includeVoiceInstructions")
includesSpokenInstructions = decoder.decodeBool(forKey: "includesSpokenInstructions")
}

open static var supportsSecureCoding = true
Expand All @@ -243,7 +243,7 @@ open class RouteOptions: NSObject, NSSecureCoding {
coder.encode(attributeOptions.description, forKey: "attributeOptions")
coder.encode(includesExitRoundaboutManeuver, forKey: "includesExitRoundaboutManeuver")
coder.encode(locale, forKey: "locale")
coder.encode(includesVoiceInstructions, forKey: "includeVoiceInstructions")
coder.encode(includesSpokenInstructions, forKey: "includesSpokenInstructions")
}

// MARK: Specifying the Path of the Route
Expand Down Expand Up @@ -376,7 +376,7 @@ open class RouteOptions: NSObject, NSSecureCoding {
If this option is set to true, the `RouteStep.instructionsSpokenAlongStep` property is set to an array of `SpokenInstructions`.
*/
open var includesVoiceInstructions = false
open var includesSpokenInstructions = false

/**
The measurement system used in spoken instructions included in route steps.
Expand Down Expand Up @@ -408,8 +408,8 @@ open class RouteOptions: NSObject, NSSecureCoding {
params.append(URLQueryItem(name: "language", value: locale.identifier))
}

if includesVoiceInstructions {
params.append(URLQueryItem(name: "voice_instructions", value: String(includesVoiceInstructions)))
if includesSpokenInstructions {
params.append(URLQueryItem(name: "voice_instructions", value: String(includesSpokenInstructions)))
params.append(URLQueryItem(name: "voice_units", value: String(describing: distanceMeasurementSystem)))
}

Expand Down
8 changes: 4 additions & 4 deletions MapboxDirections/MBRouteStep.swift
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ open class RouteStep: NSObject, NSSecureCoding {

intersections = decoder.decodeObject(of: [NSArray.self, Intersection.self], forKey: "intersections") as? [Intersection]

instructionsSpokenAlongStep = decoder.decodeObject(of: [NSArray.self, SpokenInstruction.self], forKey: "voiceInstructions") as? [SpokenInstruction]
instructionsSpokenAlongStep = decoder.decodeObject(of: [NSArray.self, SpokenInstruction.self], forKey: "instructionsSpokenAlongStep") as? [SpokenInstruction]
}

open static var supportsSecureCoding = true
Expand Down Expand Up @@ -673,7 +673,7 @@ open class RouteStep: NSObject, NSSecureCoding {
coder.encode(codes, forKey: "codes")
coder.encode(destinationCodes, forKey: "destinationCodes")
coder.encode(destinations, forKey: "destinations")
coder.encode(instructionsSpokenAlongStep, forKey: "voiceInstructions")
coder.encode(instructionsSpokenAlongStep, forKey: "instructionsSpokenAlongStep")
}

// MARK: Getting the Step Geometry
Expand Down Expand Up @@ -728,7 +728,7 @@ open class RouteStep: NSObject, NSSecureCoding {
/**
A string with instructions explaining how to perform the step’s maneuver.
You can display this string or read it aloud to the user. The string does not include the distance to or from the maneuver. For instructions optimized for real-time delivery during turn-by-turn navigation, set the `RouteOptions.includesVoiceInstructions` option and use the `instructionsSpokenAlongStep` property. If you need customized instructions, you can construct them yourself from the step’s other properties or use [OSRM Text Instructions](https://github.com/Project-OSRM/osrm-text-instructions.swift/).
You can display this string or read it aloud to the user. The string does not include the distance to or from the maneuver. For instructions optimized for real-time delivery during turn-by-turn navigation, set the `RouteOptions.includesSpokenInstructions` option and use the `instructionsSpokenAlongStep` property. If you need customized instructions, you can construct them yourself from the step’s other properties or use [OSRM Text Instructions](https://github.com/Project-OSRM/osrm-text-instructions.swift/).
- note: If you use MapboxDirections.swift with the Mapbox Directions API, this property is formatted and localized for display to the user. If you use OSRM directly, this property contains a basic string that only includes the maneuver type and direction. Use [OSRM Text Instructions](https://github.com/Project-OSRM/osrm-text-instructions.swift/) to construct a complete, localized instruction string for display.
*/
Expand All @@ -739,7 +739,7 @@ open class RouteStep: NSObject, NSSecureCoding {
As the user traverses this step, you can give them advance notice of the upcoming maneuver by reading aloud each item in this array in order as the user reaches the specified distances along this step. The text of the spoken instructions refers to the details in the next step, but the distances are measured from the beginning of this step.
This property is non-`nil` if the `RouteOptions.includesVoiceInstructions` option is set to `true`. For instructions designed for display, use the `instructions` property.
This property is non-`nil` if the `RouteOptions.includesSpokenInstructions` option is set to `true`. For instructions designed for display, use the `instructions` property.
*/
open let instructionsSpokenAlongStep: [SpokenInstruction]?

Expand Down
2 changes: 1 addition & 1 deletion MapboxDirectionsTests/RouteOptionsTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class RouteOptionsTests: XCTestCase {

XCTAssertEqual(unarchivedOptions.profileIdentifier, options.profileIdentifier)
XCTAssertEqual(unarchivedOptions.locale, options.locale)
XCTAssertEqual(unarchivedOptions.includesVoiceInstructions, options.includesVoiceInstructions)
XCTAssertEqual(unarchivedOptions.includesSpokenInstructions, options.includesSpokenInstructions)
XCTAssertEqual(unarchivedOptions.distanceMeasurementSystem, options.distanceMeasurementSystem)
}
}
Loading

0 comments on commit c7a50d1

Please sign in to comment.