diff options
author | Julian Rex <julian.rex@mapbox.com> | 2018-11-19 10:53:19 -0500 |
---|---|---|
committer | Julian Rex <julian.rex@mapbox.com> | 2018-11-19 18:22:25 -0500 |
commit | 61dd7de18a0a62dbd76c82d10f8ddcde03a6079f (patch) | |
tree | 5169ef1c1b6d0218ef8985c3ab05a85e5553dc1d | |
parent | 4696a8dda03dc332c72bd7bd4cdafab12308bba9 (diff) | |
download | qtlocation-mapboxgl-upstream/jrex/9692-remove-in-use-source.tar.gz |
Updated strings file.upstream/jrex/9692-remove-in-use-source
-rw-r--r-- | platform/darwin/resources/Base.lproj/Foundation.strings | 6 | ||||
-rw-r--r-- | platform/darwin/src/MGLSource.mm | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/platform/darwin/resources/Base.lproj/Foundation.strings b/platform/darwin/resources/Base.lproj/Foundation.strings index 19bfe750e6..360e3c8562 100644 --- a/platform/darwin/resources/Base.lproj/Foundation.strings +++ b/platform/darwin/resources/Base.lproj/Foundation.strings @@ -298,3 +298,9 @@ /* OpenStreetMap short name attribution */ "OSM_SHORT_NAME" = "OSM"; +/* User-friendly error description */ +"REMOVE_SRC_FAIL_IN_USE_FMT" = "Source '%@' is in use, cannot remove."; + +/* User-friendly error description */ +"REMOVE_SRC_FAIL_MISMATCH_FMT" = "Identifier '%1$@' does not match source identifier '%2$s'"; + diff --git a/platform/darwin/src/MGLSource.mm b/platform/darwin/src/MGLSource.mm index 3403868d84..62d3cfa808 100644 --- a/platform/darwin/src/MGLSource.mm +++ b/platform/darwin/src/MGLSource.mm @@ -70,7 +70,7 @@ _pendingSource = std::move(removedSource); _mapView = nil; } else if (outError) { - NSString *format = NSLocalizedStringWithDefaultValue(@"REMOVE_SRC_FAIL_IN_USE_FMT", nil, nil, @"Source '%@' is in use, cannot remove.", @"User-friendly error description"); + NSString *format = NSLocalizedStringWithDefaultValue(@"REMOVE_SRC_FAIL_IN_USE_FMT", @"Foundation", nil, @"Source '%@' is in use, cannot remove.", @"User-friendly error description"); NSString *localizedDescription = [NSString stringWithFormat:format, self.identifier]; *outError = [NSError errorWithDomain:MGLErrorDomain @@ -80,7 +80,7 @@ } else if (outError) { // Consider raising an exception here - NSString *format = NSLocalizedStringWithDefaultValue(@"REMOVE_SRC_FAIL_MISMATCH_FMT", nil, nil, @"Identifier '%@' does not match source identifier '%s'", @"User-friendly error description"); + NSString *format = NSLocalizedStringWithDefaultValue(@"REMOVE_SRC_FAIL_MISMATCH_FMT", @"Foundation", nil, @"Identifier '%@' does not match source identifier '%s'", @"User-friendly error description"); NSString *localizedDescription = [NSString stringWithFormat:format, self.identifier, self.rawSource ? self.rawSource->getID().c_str() : "(null)"]; |