From 95613bd7dde7c15669022f69b7f9e611054873c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguye=CC=82=CC=83n?= Date: Sun, 24 Apr 2016 09:45:00 -0700 Subject: [ios, osx] Made OS X SDK localizable Replaced the iOS-specific ilocalize make rule with a genstrings make rule that creates iOS, OS X, and shared strings files. Moved the override English .stringsdict file under darwin/resources/. Made the default OS X callout view XIB localizable. Made some hard-coded strings in the OS X SDK source localizable. --- Makefile | 14 +- .../darwin/resources/Base.lproj/Foundation.strings | 291 +++++++++++++++++++++ .../resources/en.lproj/Foundation.stringsdict | 54 ++++ platform/ios/ios.xcodeproj/project.pbxproj | 61 +++-- .../ios/resources/Base.lproj/Foundation.strings | 291 --------------------- .../ios/resources/en.lproj/Foundation.stringsdict | 54 ---- platform/osx/osx.xcodeproj/project.pbxproj | 75 +++++- platform/osx/sdk/Base.lproj/Localizable.strings | 30 +++ .../osx/sdk/Base.lproj/MGLAnnotationCallout.xib | 69 +++++ platform/osx/sdk/MGLAnnotationCallout.xib | 53 ---- platform/osx/src/MGLAttributionButton.m | 5 +- platform/osx/src/MGLMapView.mm | 20 +- 12 files changed, 571 insertions(+), 446 deletions(-) create mode 100644 platform/darwin/resources/Base.lproj/Foundation.strings create mode 100644 platform/darwin/resources/en.lproj/Foundation.stringsdict delete mode 100644 platform/ios/resources/Base.lproj/Foundation.strings delete mode 100644 platform/ios/resources/en.lproj/Foundation.stringsdict create mode 100644 platform/osx/sdk/Base.lproj/Localizable.strings create mode 100644 platform/osx/sdk/Base.lproj/MGLAnnotationCallout.xib delete mode 100644 platform/osx/sdk/MGLAnnotationCallout.xib diff --git a/Makefile b/Makefile index 96598011a9..6c2e58ff94 100644 --- a/Makefile +++ b/Makefile @@ -60,6 +60,14 @@ test-osx: osx node_modules/express -configuration $(BUILDTYPE) \ -workspace $(OSX_WORK_PATH) -scheme CI test | xcpretty +genstrings: + genstrings -u -o platform/osx/sdk/Base.lproj platform/darwin/src/*.{m,mm} + genstrings -u -o platform/osx/sdk/Base.lproj platform/osx/src/*.{m,mm} + genstrings -u -o platform/ios/resources/Base.lproj platform/ios/src/*.{m,mm} + mv platform/osx/sdk/Base.lproj/Foundation.strings platform/darwin/resources/Base.lproj/ + -find platform/{darwin,ios,osx}/ -path '*/Base.lproj/*.strings' -exec \ + textutil -convert txt -extension strings -inputencoding UTF-16 -encoding UTF-8 {} \; + #### iOS targets ############################################################## IOS_OUTPUT_PATH = build/ios @@ -125,12 +133,6 @@ ifabric: $(IOS_PROJ_PATH) idocument: OUTPUT=$(OUTPUT) ./platform/ios/scripts/document.sh -ilocalize: - genstrings -u -o platform/ios/resources/Base.lproj platform/darwin/src/*.{m,mm} - genstrings -u -o platform/ios/resources/Base.lproj platform/ios/src/*.{m,mm} - -find platform/ios/ -path '*/Base.lproj/*.strings' -exec \ - textutil -convert txt -extension strings -inputencoding UTF-16 -encoding UTF-8 {} \; - #### Android targets ##################################################### # Builds a particular android architecture. diff --git a/platform/darwin/resources/Base.lproj/Foundation.strings b/platform/darwin/resources/Base.lproj/Foundation.strings new file mode 100644 index 0000000000..9d63dfa697 --- /dev/null +++ b/platform/darwin/resources/Base.lproj/Foundation.strings @@ -0,0 +1,291 @@ +/* Clock position format, long: {hours} o’clock */ +"CLOCK_FMT_LONG" = "%@ o’clock"; + +/* Clock position format, medium: {hours} o’clock */ +"CLOCK_FMT_MEDIUM" = "%@ o’clock"; + +/* Clock position format, short: {hours}:00 */ +"CLOCK_FMT_SHORT" = "%@:00"; + +/* East, long */ +"COMPASS_E_LONG" = "east"; + +/* East, short */ +"COMPASS_E_SHORT" = "E"; + +/* East by north, long */ +"COMPASS_EbN_LONG" = "east by north"; + +/* East by north, short */ +"COMPASS_EbN_SHORT" = "EbN"; + +/* East by south, long */ +"COMPASS_EbS_LONG" = "east by south"; + +/* East by south, short */ +"COMPASS_EbS_SHORT" = "EbS"; + +/* East-northeast, long */ +"COMPASS_ENE_LONG" = "east-northeast"; + +/* East-northeast, short */ +"COMPASS_ENE_SHORT" = "ENE"; + +/* East-southeast, long */ +"COMPASS_ESE_LONG" = "east-southeast"; + +/* East-southeast, short */ +"COMPASS_ESE_SHORT" = "ESE"; + +/* North, long */ +"COMPASS_N_LONG" = "north"; + +/* North, short */ +"COMPASS_N_SHORT" = "N"; + +/* North by east, long */ +"COMPASS_NbE_LONG" = "north by east"; + +/* North by east, short */ +"COMPASS_NbE_SHORT" = "NbE"; + +/* North by west, long */ +"COMPASS_NbW_LONG" = "north by west"; + +/* North by west, short */ +"COMPASS_NbW_SHORT" = "NbW"; + +/* Northeast, long */ +"COMPASS_NE_LONG" = "northeast"; + +/* Northeast, short */ +"COMPASS_NE_SHORT" = "NE"; + +/* Northeast by east, long */ +"COMPASS_NEbE_LONG" = "northeast by east"; + +/* Northeast by east, short */ +"COMPASS_NEbE_SHORT" = "NEbE"; + +/* Northeast by north, long */ +"COMPASS_NEbN_LONG" = "northeast by north"; + +/* Northeast by north, short */ +"COMPASS_NEbN_SHORT" = "NEbN"; + +/* North-northeast, long */ +"COMPASS_NNE_LONG" = "north-northeast"; + +/* North-northeast, short */ +"COMPASS_NNE_SHORT" = "NNE"; + +/* North-northwest, long */ +"COMPASS_NNW_LONG" = "north-northwest"; + +/* North-northwest, short */ +"COMPASS_NNW_SHORT" = "NNW"; + +/* Northwest, long */ +"COMPASS_NW_LONG" = "northwest"; + +/* Northwest, short */ +"COMPASS_NW_SHORT" = "NW"; + +/* Northwest by north, long */ +"COMPASS_NWbN_LONG" = "northwest by north"; + +/* Northwest by north, short */ +"COMPASS_NWbN_SHORT" = "NWbN"; + +/* Northwest by west, long */ +"COMPASS_NWbW_LONG" = "northwest by west"; + +/* Northwest by west, short */ +"COMPASS_NWbW_SHORT" = "NWbW"; + +/* South, long */ +"COMPASS_S_LONG" = "south"; + +/* South, short */ +"COMPASS_S_SHORT" = "S"; + +/* South by east, long */ +"COMPASS_SbE_LONG" = "south by east"; + +/* South by east, short */ +"COMPASS_SbE_SHORT" = "SbE"; + +/* South by west, long */ +"COMPASS_SbW_LONG" = "south by west"; + +/* South by west, short */ +"COMPASS_SbW_SHORT" = "SbW"; + +/* Southeast, long */ +"COMPASS_SE_LONG" = "southeast"; + +/* Southeast, short */ +"COMPASS_SE_SHORT" = "SE"; + +/* Southeast by east, long */ +"COMPASS_SEbE_LONG" = "southeast by east"; + +/* Southeast by east, short */ +"COMPASS_SEbE_SHORT" = "SEbE"; + +/* Southeast by south, long */ +"COMPASS_SEbS_LONG" = "southeast by south"; + +/* Southeast by south, short */ +"COMPASS_SEbS_SHORT" = "SEbS"; + +/* South-southeast, long */ +"COMPASS_SSE_LONG" = "south-southeast"; + +/* South-southeast, short */ +"COMPASS_SSE_SHORT" = "SSE"; + +/* South-southwest, long */ +"COMPASS_SSW_LONG" = "south-southwest"; + +/* South-southwest, short */ +"COMPASS_SSW_SHORT" = "SSW"; + +/* Southwest, long */ +"COMPASS_SW_LONG" = "southwest"; + +/* Southwest, short */ +"COMPASS_SW_SHORT" = "SW"; + +/* Southwest by south, long */ +"COMPASS_SWbS_LONG" = "southwest by south"; + +/* Southwest by south, short */ +"COMPASS_SWbS_SHORT" = "SWbS"; + +/* Southwest by west, long */ +"COMPASS_SWbW_LONG" = "southwest by west"; + +/* Southwest by west, short */ +"COMPASS_SWbW_SHORT" = "SWbW"; + +/* West, long */ +"COMPASS_W_LONG" = "west"; + +/* West, short */ +"COMPASS_W_SHORT" = "W"; + +/* West by north, long */ +"COMPASS_WbN_LONG" = "west by north"; + +/* West by north, short */ +"COMPASS_WbN_SHORT" = "WbN"; + +/* West by south, long */ +"COMPASS_WbS_LONG" = "west by south"; + +/* West by south, short */ +"COMPASS_WbS_SHORT" = "WbS"; + +/* West-northwest, long */ +"COMPASS_WNW_LONG" = "west-northwest"; + +/* West-northwest, short */ +"COMPASS_WNW_SHORT" = "WNW"; + +/* West-southwest, long */ +"COMPASS_WSW_LONG" = "west-southwest"; + +/* West-southwest, short */ +"COMPASS_WSW_SHORT" = "WSW"; + +/* Degrees format, long */ +"COORD_DEG_LONG" = "%d degree(s)"; + +/* Degrees format, medium: {degrees} */ +"COORD_DEG_MEDIUM" = "%d°"; + +/* Degrees format, short: {degrees} */ +"COORD_DEG_SHORT" = "%d°"; + +/* Coordinate format, long: {degrees}{minutes} */ +"COORD_DM_LONG" = "%1$@ and %2$@"; + +/* Coordinate format, medium: {degrees}{minutes} */ +"COORD_DM_MEDIUM" = "%1$@%2$@"; + +/* Coordinate format, short: {degrees}{minutes} */ +"COORD_DM_SHORT" = "%1$@%2$@"; + +/* Coordinate format, long: {degrees}{minutes}{seconds} */ +"COORD_DMS_LONG" = "%1$@, %2$@, and %3$@"; + +/* Coordinate format, medium: {degrees}{minutes}{seconds} */ +"COORD_DMS_MEDIUM" = "%1$@%2$@%3$@"; + +/* Coordinate format, short: {degrees}{minutes}{seconds} */ +"COORD_DMS_SHORT" = "%1$@%2$@%3$@"; + +/* East longitude format, long: {longitude} */ +"COORD_E_LONG" = "%@ east"; + +/* East longitude format, medium: {longitude} */ +"COORD_E_MEDIUM" = "%@ east"; + +/* East longitude format, short: {longitude} */ +"COORD_E_SHORT" = "%@E"; + +/* Coordinate pair format, long: {latitude}, {longitude} */ +"COORD_FMT_LONG" = "%1$@ by %2$@"; + +/* Coordinate pair format, medium: {latitude}, {longitude} */ +"COORD_FMT_MEDIUM" = "%1$@, %2$@"; + +/* Coordinate pair format, short: {latitude}, {longitude} */ +"COORD_FMT_SHORT" = "%1$@, %2$@"; + +/* Minutes format, long */ +"COORD_MIN_LONG" = "%d minute(s)"; + +/* Minutes format, medium: {minutes} */ +"COORD_MIN_MEDIUM" = "%d′"; + +/* Minutes format, short: {minutes} */ +"COORD_MIN_SHORT" = "%d′"; + +/* North latitude format, long: {latitude} */ +"COORD_N_LONG" = "%@ north"; + +/* North latitude format, medium: {latitude} */ +"COORD_N_MEDIUM" = "%@ north"; + +/* North latitude format, short: {latitude} */ +"COORD_N_SHORT" = "%@N"; + +/* South latitude format, long: {latitude} */ +"COORD_S_LONG" = "%@ south"; + +/* South latitude format, medium: {latitude} */ +"COORD_S_MEDIUM" = "%@ south"; + +/* South latitude format, short: {latitude} */ +"COORD_S_SHORT" = "%@S"; + +/* Seconds format, long */ +"COORD_SEC_LONG" = "%d second(s)"; + +/* Seconds format, medium: {seconds} */ +"COORD_SEC_MEDIUM" = "%d″"; + +/* Seconds format, short: {seconds} */ +"COORD_SEC_SHORT" = "%d″"; + +/* West longitude format, long: {longitude} */ +"COORD_W_LONG" = "%@ west"; + +/* West longitude format, medium: {longitude} */ +"COORD_W_MEDIUM" = "%@ west"; + +/* West longitude format, short: {longitude} */ +"COORD_W_SHORT" = "%@W"; + diff --git a/platform/darwin/resources/en.lproj/Foundation.stringsdict b/platform/darwin/resources/en.lproj/Foundation.stringsdict new file mode 100644 index 0000000000..5f23fff93b --- /dev/null +++ b/platform/darwin/resources/en.lproj/Foundation.stringsdict @@ -0,0 +1,54 @@ + + + + + COORD_DEG_LONG + + NSStringLocalizedFormatKey + %#@degrees@ + degrees + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + one + %d degree + other + %d degrees + + + COORD_MIN_LONG + + NSStringLocalizedFormatKey + %#@minutes@ + minutes + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + one + %d minute + other + %d minutes + + + COORD_SEC_LONG + + NSStringLocalizedFormatKey + %#@seconds@ + seconds + + NSStringFormatSpecTypeKey + NSStringPluralRuleType + NSStringFormatValueTypeKey + d + one + %d second + other + %d seconds + + + + diff --git a/platform/ios/ios.xcodeproj/project.pbxproj b/platform/ios/ios.xcodeproj/project.pbxproj index 978bf364ba..e12f36b237 100644 --- a/platform/ios/ios.xcodeproj/project.pbxproj +++ b/platform/ios/ios.xcodeproj/project.pbxproj @@ -135,7 +135,8 @@ DA88488E1CBB047F00AB86E3 /* reachability.h in Headers */ = {isa = PBXBuildFile; fileRef = DA88488D1CBB047F00AB86E3 /* reachability.h */; }; DA8848901CBB048E00AB86E3 /* reachability.m in Sources */ = {isa = PBXBuildFile; fileRef = DA88488F1CBB048E00AB86E3 /* reachability.m */; }; DA8933A31CCC95B000E68420 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = DA89339F1CCC951200E68420 /* Localizable.strings */; }; - DA8933A41CCC95B000E68420 /* Foundation.strings in Resources */ = {isa = PBXBuildFile; fileRef = DA89339D1CCC951200E68420 /* Foundation.strings */; }; + DA8933BC1CCD2CA100E68420 /* Foundation.strings in Resources */ = {isa = PBXBuildFile; fileRef = DA8933BA1CCD2CA100E68420 /* Foundation.strings */; }; + DA8933BF1CCD2CAD00E68420 /* Foundation.stringsdict in Resources */ = {isa = PBXBuildFile; fileRef = DA8933BD1CCD2CAD00E68420 /* Foundation.stringsdict */; }; DA8963371CC549A100684375 /* glyphs in Resources */ = {isa = PBXBuildFile; fileRef = DA8963331CC549A100684375 /* glyphs */; }; DA8963381CC549A100684375 /* sprites in Resources */ = {isa = PBXBuildFile; fileRef = DA8963341CC549A100684375 /* sprites */; }; DA8963391CC549A100684375 /* styles in Resources */ = {isa = PBXBuildFile; fileRef = DA8963351CC549A100684375 /* styles */; }; @@ -201,7 +202,6 @@ DABFB8711CBE9A0F00D62B32 /* MGLMapView+MGLCustomStyleLayerAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = DA8848381CBAFB8500AB86E3 /* MGLMapView+MGLCustomStyleLayerAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; DABFB8721CBE9A0F00D62B32 /* MGLUserLocation.h in Headers */ = {isa = PBXBuildFile; fileRef = DA8848391CBAFB8500AB86E3 /* MGLUserLocation.h */; settings = {ATTRIBUTES = (Public, ); }; }; DABFB8731CBE9A9900D62B32 /* Mapbox.h in Headers */ = {isa = PBXBuildFile; fileRef = DA88485E1CBAFC2E00AB86E3 /* Mapbox.h */; settings = {ATTRIBUTES = (Public, ); }; }; - DAF9E8931CCBFA03004C7E73 /* Foundation.stringsdict in Resources */ = {isa = PBXBuildFile; fileRef = DAF9E8911CCBFA03004C7E73 /* Foundation.stringsdict */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -390,8 +390,9 @@ DA88488A1CBB037E00AB86E3 /* SMCalloutView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SMCalloutView.m; sourceTree = ""; }; DA88488D1CBB047F00AB86E3 /* reachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = reachability.h; path = ../../include/mbgl/platform/darwin/reachability.h; sourceTree = ""; }; DA88488F1CBB048E00AB86E3 /* reachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = reachability.m; path = src/reachability.m; sourceTree = ""; }; - DA89339E1CCC951200E68420 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/Foundation.strings; sourceTree = ""; }; DA8933A01CCC951200E68420 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/Localizable.strings; sourceTree = ""; }; + DA8933BB1CCD2CA100E68420 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/Foundation.strings; sourceTree = ""; }; + DA8933BE1CCD2CAD00E68420 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = en; path = en.lproj/Foundation.stringsdict; sourceTree = ""; }; DA8963331CC549A100684375 /* glyphs */ = {isa = PBXFileReference; lastKnownFileType = folder; path = glyphs; sourceTree = ""; }; DA8963341CC549A100684375 /* sprites */ = {isa = PBXFileReference; lastKnownFileType = folder; path = sprites; sourceTree = ""; }; DA8963351CC549A100684375 /* styles */ = {isa = PBXFileReference; lastKnownFileType = folder; path = styles; sourceTree = ""; }; @@ -414,7 +415,6 @@ DABCABBF1CB80717000A7C39 /* locations.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = locations.cpp; sourceTree = ""; }; DABCABC01CB80717000A7C39 /* locations.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = locations.hpp; sourceTree = ""; }; DAC07C961CBB2CD6000CB309 /* mbgl.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = mbgl.xcconfig; path = ../../build/ios/mbgl.xcconfig; sourceTree = ""; }; - DAF9E8921CCBFA03004C7E73 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = en; path = en.lproj/Foundation.stringsdict; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -559,8 +559,9 @@ children = ( DA88485E1CBAFC2E00AB86E3 /* Mapbox.h */, DA8847DE1CBAFA3E00AB86E3 /* Foundation */, + DA8933B91CCD2C6700E68420 /* Foundation Resources */, DA8848331CBAFB2A00AB86E3 /* Kit */, - DA8848621CBAFCC100AB86E3 /* Resources */, + DA8848621CBAFCC100AB86E3 /* Kit Resources */, DA8847D61CBAF91600AB86E3 /* Info.plist */, ); name = SDK; @@ -658,14 +659,10 @@ path = src; sourceTree = SOURCE_ROOT; }; - DA8848621CBAFCC100AB86E3 /* Resources */ = { + DA8848621CBAFCC100AB86E3 /* Kit Resources */ = { isa = PBXGroup; children = ( DA89339F1CCC951200E68420 /* Localizable.strings */, - DA89339D1CCC951200E68420 /* Foundation.strings */, - DAF9E8911CCBFA03004C7E73 /* Foundation.stringsdict */, - DA8848771CBAFD5C00AB86E3 /* api_mapbox_com-digicert.der */, - DA8848781CBAFD5C00AB86E3 /* api_mapbox_com-geotrust.der */, DA8848631CBAFCC100AB86E3 /* Compass.png */, DA8848641CBAFCC100AB86E3 /* Compass@2x.png */, DA8848651CBAFCC100AB86E3 /* Compass@3x.png */, @@ -675,9 +672,8 @@ DA8848691CBAFCC100AB86E3 /* mapbox.png */, DA88486A1CBAFCC100AB86E3 /* mapbox@2x.png */, DA88486B1CBAFCC100AB86E3 /* mapbox@3x.png */, - DA8848791CBAFD5C00AB86E3 /* star_tilestream_net.der */, ); - name = Resources; + name = "Kit Resources"; path = resources; sourceTree = SOURCE_ROOT; }; @@ -713,6 +709,19 @@ path = ..; sourceTree = ""; }; + DA8933B91CCD2C6700E68420 /* Foundation Resources */ = { + isa = PBXGroup; + children = ( + DA8933BA1CCD2CA100E68420 /* Foundation.strings */, + DA8933BD1CCD2CAD00E68420 /* Foundation.stringsdict */, + DA8848771CBAFD5C00AB86E3 /* api_mapbox_com-digicert.der */, + DA8848781CBAFD5C00AB86E3 /* api_mapbox_com-geotrust.der */, + DA8848791CBAFD5C00AB86E3 /* star_tilestream_net.der */, + ); + name = "Foundation Resources"; + path = ../../darwin/resources; + sourceTree = ""; + }; DA8963321CC5498400684375 /* Fixtures */ = { isa = PBXGroup; children = ( @@ -1029,12 +1038,11 @@ buildActionMask = 2147483647; files = ( DA8848731CBAFCC100AB86E3 /* mapbox.png in Resources */, + DA8933BC1CCD2CA100E68420 /* Foundation.strings in Resources */, DA8848741CBAFCC100AB86E3 /* mapbox@2x.png in Resources */, DA88487A1CBAFD5C00AB86E3 /* api_mapbox_com-digicert.der in Resources */, DA8933A31CCC95B000E68420 /* Localizable.strings in Resources */, - DA8933A41CCC95B000E68420 /* Foundation.strings in Resources */, DA88486D1CBAFCC100AB86E3 /* Compass.png in Resources */, - DAF9E8931CCBFA03004C7E73 /* Foundation.stringsdict in Resources */, DA8848721CBAFCC100AB86E3 /* default_marker@3x.png in Resources */, DA88487C1CBAFD5C00AB86E3 /* star_tilestream_net.der in Resources */, DA88486F1CBAFCC100AB86E3 /* Compass@3x.png in Resources */, @@ -1043,6 +1051,7 @@ DA8848711CBAFCC100AB86E3 /* default_marker@2x.png in Resources */, DA8848751CBAFCC100AB86E3 /* mapbox@3x.png in Resources */, DA88487B1CBAFD5C00AB86E3 /* api_mapbox_com-geotrust.der in Resources */, + DA8933BF1CCD2CAD00E68420 /* Foundation.stringsdict in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1195,36 +1204,36 @@ /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ - DA89339D1CCC951200E68420 /* Foundation.strings */ = { + DA89339F1CCC951200E68420 /* Localizable.strings */ = { isa = PBXVariantGroup; children = ( - DA89339E1CCC951200E68420 /* Base */, + DA8933A01CCC951200E68420 /* Base */, ); - name = Foundation.strings; + name = Localizable.strings; sourceTree = ""; }; - DA89339F1CCC951200E68420 /* Localizable.strings */ = { + DA8933BA1CCD2CA100E68420 /* Foundation.strings */ = { isa = PBXVariantGroup; children = ( - DA8933A01CCC951200E68420 /* Base */, + DA8933BB1CCD2CA100E68420 /* Base */, ); - name = Localizable.strings; + name = Foundation.strings; sourceTree = ""; }; - DABCABB81CB80692000A7C39 /* LaunchScreen.storyboard */ = { + DA8933BD1CCD2CAD00E68420 /* Foundation.stringsdict */ = { isa = PBXVariantGroup; children = ( - DABCABB91CB80692000A7C39 /* Base */, + DA8933BE1CCD2CAD00E68420 /* en */, ); - name = LaunchScreen.storyboard; + name = Foundation.stringsdict; sourceTree = ""; }; - DAF9E8911CCBFA03004C7E73 /* Foundation.stringsdict */ = { + DABCABB81CB80692000A7C39 /* LaunchScreen.storyboard */ = { isa = PBXVariantGroup; children = ( - DAF9E8921CCBFA03004C7E73 /* en */, + DABCABB91CB80692000A7C39 /* Base */, ); - name = Foundation.stringsdict; + name = LaunchScreen.storyboard; sourceTree = ""; }; /* End PBXVariantGroup section */ diff --git a/platform/ios/resources/Base.lproj/Foundation.strings b/platform/ios/resources/Base.lproj/Foundation.strings deleted file mode 100644 index 9d63dfa697..0000000000 --- a/platform/ios/resources/Base.lproj/Foundation.strings +++ /dev/null @@ -1,291 +0,0 @@ -/* Clock position format, long: {hours} o’clock */ -"CLOCK_FMT_LONG" = "%@ o’clock"; - -/* Clock position format, medium: {hours} o’clock */ -"CLOCK_FMT_MEDIUM" = "%@ o’clock"; - -/* Clock position format, short: {hours}:00 */ -"CLOCK_FMT_SHORT" = "%@:00"; - -/* East, long */ -"COMPASS_E_LONG" = "east"; - -/* East, short */ -"COMPASS_E_SHORT" = "E"; - -/* East by north, long */ -"COMPASS_EbN_LONG" = "east by north"; - -/* East by north, short */ -"COMPASS_EbN_SHORT" = "EbN"; - -/* East by south, long */ -"COMPASS_EbS_LONG" = "east by south"; - -/* East by south, short */ -"COMPASS_EbS_SHORT" = "EbS"; - -/* East-northeast, long */ -"COMPASS_ENE_LONG" = "east-northeast"; - -/* East-northeast, short */ -"COMPASS_ENE_SHORT" = "ENE"; - -/* East-southeast, long */ -"COMPASS_ESE_LONG" = "east-southeast"; - -/* East-southeast, short */ -"COMPASS_ESE_SHORT" = "ESE"; - -/* North, long */ -"COMPASS_N_LONG" = "north"; - -/* North, short */ -"COMPASS_N_SHORT" = "N"; - -/* North by east, long */ -"COMPASS_NbE_LONG" = "north by east"; - -/* North by east, short */ -"COMPASS_NbE_SHORT" = "NbE"; - -/* North by west, long */ -"COMPASS_NbW_LONG" = "north by west"; - -/* North by west, short */ -"COMPASS_NbW_SHORT" = "NbW"; - -/* Northeast, long */ -"COMPASS_NE_LONG" = "northeast"; - -/* Northeast, short */ -"COMPASS_NE_SHORT" = "NE"; - -/* Northeast by east, long */ -"COMPASS_NEbE_LONG" = "northeast by east"; - -/* Northeast by east, short */ -"COMPASS_NEbE_SHORT" = "NEbE"; - -/* Northeast by north, long */ -"COMPASS_NEbN_LONG" = "northeast by north"; - -/* Northeast by north, short */ -"COMPASS_NEbN_SHORT" = "NEbN"; - -/* North-northeast, long */ -"COMPASS_NNE_LONG" = "north-northeast"; - -/* North-northeast, short */ -"COMPASS_NNE_SHORT" = "NNE"; - -/* North-northwest, long */ -"COMPASS_NNW_LONG" = "north-northwest"; - -/* North-northwest, short */ -"COMPASS_NNW_SHORT" = "NNW"; - -/* Northwest, long */ -"COMPASS_NW_LONG" = "northwest"; - -/* Northwest, short */ -"COMPASS_NW_SHORT" = "NW"; - -/* Northwest by north, long */ -"COMPASS_NWbN_LONG" = "northwest by north"; - -/* Northwest by north, short */ -"COMPASS_NWbN_SHORT" = "NWbN"; - -/* Northwest by west, long */ -"COMPASS_NWbW_LONG" = "northwest by west"; - -/* Northwest by west, short */ -"COMPASS_NWbW_SHORT" = "NWbW"; - -/* South, long */ -"COMPASS_S_LONG" = "south"; - -/* South, short */ -"COMPASS_S_SHORT" = "S"; - -/* South by east, long */ -"COMPASS_SbE_LONG" = "south by east"; - -/* South by east, short */ -"COMPASS_SbE_SHORT" = "SbE"; - -/* South by west, long */ -"COMPASS_SbW_LONG" = "south by west"; - -/* South by west, short */ -"COMPASS_SbW_SHORT" = "SbW"; - -/* Southeast, long */ -"COMPASS_SE_LONG" = "southeast"; - -/* Southeast, short */ -"COMPASS_SE_SHORT" = "SE"; - -/* Southeast by east, long */ -"COMPASS_SEbE_LONG" = "southeast by east"; - -/* Southeast by east, short */ -"COMPASS_SEbE_SHORT" = "SEbE"; - -/* Southeast by south, long */ -"COMPASS_SEbS_LONG" = "southeast by south"; - -/* Southeast by south, short */ -"COMPASS_SEbS_SHORT" = "SEbS"; - -/* South-southeast, long */ -"COMPASS_SSE_LONG" = "south-southeast"; - -/* South-southeast, short */ -"COMPASS_SSE_SHORT" = "SSE"; - -/* South-southwest, long */ -"COMPASS_SSW_LONG" = "south-southwest"; - -/* South-southwest, short */ -"COMPASS_SSW_SHORT" = "SSW"; - -/* Southwest, long */ -"COMPASS_SW_LONG" = "southwest"; - -/* Southwest, short */ -"COMPASS_SW_SHORT" = "SW"; - -/* Southwest by south, long */ -"COMPASS_SWbS_LONG" = "southwest by south"; - -/* Southwest by south, short */ -"COMPASS_SWbS_SHORT" = "SWbS"; - -/* Southwest by west, long */ -"COMPASS_SWbW_LONG" = "southwest by west"; - -/* Southwest by west, short */ -"COMPASS_SWbW_SHORT" = "SWbW"; - -/* West, long */ -"COMPASS_W_LONG" = "west"; - -/* West, short */ -"COMPASS_W_SHORT" = "W"; - -/* West by north, long */ -"COMPASS_WbN_LONG" = "west by north"; - -/* West by north, short */ -"COMPASS_WbN_SHORT" = "WbN"; - -/* West by south, long */ -"COMPASS_WbS_LONG" = "west by south"; - -/* West by south, short */ -"COMPASS_WbS_SHORT" = "WbS"; - -/* West-northwest, long */ -"COMPASS_WNW_LONG" = "west-northwest"; - -/* West-northwest, short */ -"COMPASS_WNW_SHORT" = "WNW"; - -/* West-southwest, long */ -"COMPASS_WSW_LONG" = "west-southwest"; - -/* West-southwest, short */ -"COMPASS_WSW_SHORT" = "WSW"; - -/* Degrees format, long */ -"COORD_DEG_LONG" = "%d degree(s)"; - -/* Degrees format, medium: {degrees} */ -"COORD_DEG_MEDIUM" = "%d°"; - -/* Degrees format, short: {degrees} */ -"COORD_DEG_SHORT" = "%d°"; - -/* Coordinate format, long: {degrees}{minutes} */ -"COORD_DM_LONG" = "%1$@ and %2$@"; - -/* Coordinate format, medium: {degrees}{minutes} */ -"COORD_DM_MEDIUM" = "%1$@%2$@"; - -/* Coordinate format, short: {degrees}{minutes} */ -"COORD_DM_SHORT" = "%1$@%2$@"; - -/* Coordinate format, long: {degrees}{minutes}{seconds} */ -"COORD_DMS_LONG" = "%1$@, %2$@, and %3$@"; - -/* Coordinate format, medium: {degrees}{minutes}{seconds} */ -"COORD_DMS_MEDIUM" = "%1$@%2$@%3$@"; - -/* Coordinate format, short: {degrees}{minutes}{seconds} */ -"COORD_DMS_SHORT" = "%1$@%2$@%3$@"; - -/* East longitude format, long: {longitude} */ -"COORD_E_LONG" = "%@ east"; - -/* East longitude format, medium: {longitude} */ -"COORD_E_MEDIUM" = "%@ east"; - -/* East longitude format, short: {longitude} */ -"COORD_E_SHORT" = "%@E"; - -/* Coordinate pair format, long: {latitude}, {longitude} */ -"COORD_FMT_LONG" = "%1$@ by %2$@"; - -/* Coordinate pair format, medium: {latitude}, {longitude} */ -"COORD_FMT_MEDIUM" = "%1$@, %2$@"; - -/* Coordinate pair format, short: {latitude}, {longitude} */ -"COORD_FMT_SHORT" = "%1$@, %2$@"; - -/* Minutes format, long */ -"COORD_MIN_LONG" = "%d minute(s)"; - -/* Minutes format, medium: {minutes} */ -"COORD_MIN_MEDIUM" = "%d′"; - -/* Minutes format, short: {minutes} */ -"COORD_MIN_SHORT" = "%d′"; - -/* North latitude format, long: {latitude} */ -"COORD_N_LONG" = "%@ north"; - -/* North latitude format, medium: {latitude} */ -"COORD_N_MEDIUM" = "%@ north"; - -/* North latitude format, short: {latitude} */ -"COORD_N_SHORT" = "%@N"; - -/* South latitude format, long: {latitude} */ -"COORD_S_LONG" = "%@ south"; - -/* South latitude format, medium: {latitude} */ -"COORD_S_MEDIUM" = "%@ south"; - -/* South latitude format, short: {latitude} */ -"COORD_S_SHORT" = "%@S"; - -/* Seconds format, long */ -"COORD_SEC_LONG" = "%d second(s)"; - -/* Seconds format, medium: {seconds} */ -"COORD_SEC_MEDIUM" = "%d″"; - -/* Seconds format, short: {seconds} */ -"COORD_SEC_SHORT" = "%d″"; - -/* West longitude format, long: {longitude} */ -"COORD_W_LONG" = "%@ west"; - -/* West longitude format, medium: {longitude} */ -"COORD_W_MEDIUM" = "%@ west"; - -/* West longitude format, short: {longitude} */ -"COORD_W_SHORT" = "%@W"; - diff --git a/platform/ios/resources/en.lproj/Foundation.stringsdict b/platform/ios/resources/en.lproj/Foundation.stringsdict deleted file mode 100644 index 5f23fff93b..0000000000 --- a/platform/ios/resources/en.lproj/Foundation.stringsdict +++ /dev/null @@ -1,54 +0,0 @@ - - - - - COORD_DEG_LONG - - NSStringLocalizedFormatKey - %#@degrees@ - degrees - - NSStringFormatSpecTypeKey - NSStringPluralRuleType - NSStringFormatValueTypeKey - d - one - %d degree - other - %d degrees - - - COORD_MIN_LONG - - NSStringLocalizedFormatKey - %#@minutes@ - minutes - - NSStringFormatSpecTypeKey - NSStringPluralRuleType - NSStringFormatValueTypeKey - d - one - %d minute - other - %d minutes - - - COORD_SEC_LONG - - NSStringLocalizedFormatKey - %#@seconds@ - seconds - - NSStringFormatSpecTypeKey - NSStringPluralRuleType - NSStringFormatValueTypeKey - d - one - %d second - other - %d seconds - - - - diff --git a/platform/osx/osx.xcodeproj/project.pbxproj b/platform/osx/osx.xcodeproj/project.pbxproj index d3c2f8c9bb..4a74f352f9 100644 --- a/platform/osx/osx.xcodeproj/project.pbxproj +++ b/platform/osx/osx.xcodeproj/project.pbxproj @@ -25,6 +25,10 @@ DA839EA01CC2E3400062CAFB /* MapDocument.xib in Resources */ = {isa = PBXBuildFile; fileRef = DA839E9E1CC2E3400062CAFB /* MapDocument.xib */; }; DA839EA21CC2E3400062CAFB /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DA839EA11CC2E3400062CAFB /* Assets.xcassets */; }; DA839EA51CC2E3400062CAFB /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = DA839EA31CC2E3400062CAFB /* MainMenu.xib */; }; + DA8933A51CCD287300E68420 /* MGLAnnotationCallout.xib in Resources */ = {isa = PBXBuildFile; fileRef = DA8933A71CCD287300E68420 /* MGLAnnotationCallout.xib */; }; + DA8933AE1CCD290700E68420 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = DA8933AB1CCD290700E68420 /* Localizable.strings */; }; + DA8933B51CCD2C2500E68420 /* Foundation.strings in Resources */ = {isa = PBXBuildFile; fileRef = DA8933B31CCD2C2500E68420 /* Foundation.strings */; }; + DA8933B81CCD2C2D00E68420 /* Foundation.stringsdict in Resources */ = {isa = PBXBuildFile; fileRef = DA8933B61CCD2C2D00E68420 /* Foundation.stringsdict */; }; DAC2ABC51CC6D343006D18C4 /* MGLAnnotationImage_Private.h in Headers */ = {isa = PBXBuildFile; fileRef = DAC2ABC41CC6D343006D18C4 /* MGLAnnotationImage_Private.h */; }; DAE6C2E21CC304F900DB3429 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = DAE6C2E11CC304F900DB3429 /* Credits.rtf */; }; DAE6C2ED1CC3050F00DB3429 /* DroppedPinAnnotation.m in Sources */ = {isa = PBXBuildFile; fileRef = DAE6C2E41CC3050F00DB3429 /* DroppedPinAnnotation.m */; }; @@ -94,7 +98,6 @@ DAE6C3BA1CC31EF300DB3429 /* MGLOpenGLLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = DAE6C3B01CC31EF300DB3429 /* MGLOpenGLLayer.mm */; }; DAE6C3BE1CC31F2E00DB3429 /* default_marker.pdf in Resources */ = {isa = PBXBuildFile; fileRef = DAE6C3BB1CC31F2E00DB3429 /* default_marker.pdf */; }; DAE6C3BF1CC31F2E00DB3429 /* mapbox.pdf in Resources */ = {isa = PBXBuildFile; fileRef = DAE6C3BC1CC31F2E00DB3429 /* mapbox.pdf */; }; - DAE6C3C01CC31F2E00DB3429 /* MGLAnnotationCallout.xib in Resources */ = {isa = PBXBuildFile; fileRef = DAE6C3BD1CC31F2E00DB3429 /* MGLAnnotationCallout.xib */; }; DAE6C3C21CC31F4500DB3429 /* Mapbox.h in Headers */ = {isa = PBXBuildFile; fileRef = DAE6C3C11CC31F4500DB3429 /* Mapbox.h */; settings = {ATTRIBUTES = (Public, ); }; }; DAE6C3C71CC3499100DB3429 /* libsqlite3.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = DAE6C3C61CC3499100DB3429 /* libsqlite3.tbd */; }; DAE6C3D21CC34C9900DB3429 /* MGLGeometryTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = DAE6C3C81CC34BD800DB3429 /* MGLGeometryTests.mm */; }; @@ -165,6 +168,10 @@ DA839EA11CC2E3400062CAFB /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; DA839EA41CC2E3400062CAFB /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; DA839EA61CC2E3400062CAFB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + DA8933A61CCD287300E68420 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MGLAnnotationCallout.xib; sourceTree = ""; }; + DA8933AC1CCD290700E68420 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/Localizable.strings; sourceTree = ""; }; + DA8933B41CCD2C2500E68420 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/Foundation.strings; sourceTree = ""; }; + DA8933B71CCD2C2D00E68420 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.stringsdict; name = en; path = en.lproj/Foundation.stringsdict; sourceTree = ""; }; DAC2ABC41CC6D343006D18C4 /* MGLAnnotationImage_Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLAnnotationImage_Private.h; sourceTree = ""; }; DAE6C2E11CC304F900DB3429 /* Credits.rtf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.rtf; path = Credits.rtf; sourceTree = ""; }; DAE6C2E31CC3050F00DB3429 /* DroppedPinAnnotation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DroppedPinAnnotation.h; sourceTree = ""; }; @@ -238,8 +245,7 @@ DAE6C3AF1CC31EF300DB3429 /* MGLOpenGLLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGLOpenGLLayer.h; sourceTree = ""; }; DAE6C3B01CC31EF300DB3429 /* MGLOpenGLLayer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLOpenGLLayer.mm; sourceTree = ""; }; DAE6C3BB1CC31F2E00DB3429 /* default_marker.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = default_marker.pdf; sourceTree = ""; }; - DAE6C3BC1CC31F2E00DB3429 /* mapbox.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; name = mapbox.pdf; path = sdk/mapbox.pdf; sourceTree = SOURCE_ROOT; }; - DAE6C3BD1CC31F2E00DB3429 /* MGLAnnotationCallout.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = MGLAnnotationCallout.xib; path = sdk/MGLAnnotationCallout.xib; sourceTree = SOURCE_ROOT; }; + DAE6C3BC1CC31F2E00DB3429 /* mapbox.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = mapbox.pdf; sourceTree = ""; }; DAE6C3C11CC31F4500DB3429 /* Mapbox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Mapbox.h; path = src/Mapbox.h; sourceTree = SOURCE_ROOT; }; DAE6C3C51CC31F9100DB3429 /* mbgl.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = mbgl.xcconfig; path = ../../build/osx/mbgl.xcconfig; sourceTree = ""; }; DAE6C3C61CC3499100DB3429 /* libsqlite3.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libsqlite3.tbd; path = usr/lib/libsqlite3.tbd; sourceTree = SDKROOT; }; @@ -337,6 +343,27 @@ name = "Supporting Files"; sourceTree = ""; }; + DA8933A81CCD28D100E68420 /* Kit Resources */ = { + isa = PBXGroup; + children = ( + DA8933AB1CCD290700E68420 /* Localizable.strings */, + DAE6C3BB1CC31F2E00DB3429 /* default_marker.pdf */, + DAE6C3BC1CC31F2E00DB3429 /* mapbox.pdf */, + DA8933A71CCD287300E68420 /* MGLAnnotationCallout.xib */, + ); + name = "Kit Resources"; + sourceTree = ""; + }; + DA8933B21CCD2C0700E68420 /* Foundation Resources */ = { + isa = PBXGroup; + children = ( + DA8933B31CCD2C2500E68420 /* Foundation.strings */, + DA8933B61CCD2C2D00E68420 /* Foundation.stringsdict */, + ); + name = "Foundation Resources"; + path = ../../darwin/resources; + sourceTree = ""; + }; DAE6C31E1CC308BC00DB3429 /* Frameworks */ = { isa = PBXGroup; children = ( @@ -353,10 +380,9 @@ children = ( DAE6C3C11CC31F4500DB3429 /* Mapbox.h */, DAE6C3491CC31DF500DB3429 /* Foundation */, + DA8933B21CCD2C0700E68420 /* Foundation Resources */, DAE6C39E1CC31E7C00DB3429 /* Kit */, - DAE6C3BB1CC31F2E00DB3429 /* default_marker.pdf */, - DAE6C3BC1CC31F2E00DB3429 /* mapbox.pdf */, - DAE6C3BD1CC31F2E00DB3429 /* MGLAnnotationCallout.xib */, + DA8933A81CCD28D100E68420 /* Kit Resources */, DAE6C32C1CC30DB200DB3429 /* Info.plist */, ); name = SDK; @@ -635,9 +661,12 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + DA8933AE1CCD290700E68420 /* Localizable.strings in Resources */, DAE6C3BE1CC31F2E00DB3429 /* default_marker.pdf in Resources */, DAE6C3BF1CC31F2E00DB3429 /* mapbox.pdf in Resources */, - DAE6C3C01CC31F2E00DB3429 /* MGLAnnotationCallout.xib in Resources */, + DA8933A51CCD287300E68420 /* MGLAnnotationCallout.xib in Resources */, + DA8933B51CCD2C2500E68420 /* Foundation.strings in Resources */, + DA8933B81CCD2C2D00E68420 /* Foundation.stringsdict in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -750,6 +779,38 @@ name = MainMenu.xib; sourceTree = ""; }; + DA8933A71CCD287300E68420 /* MGLAnnotationCallout.xib */ = { + isa = PBXVariantGroup; + children = ( + DA8933A61CCD287300E68420 /* Base */, + ); + name = MGLAnnotationCallout.xib; + sourceTree = ""; + }; + DA8933AB1CCD290700E68420 /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + DA8933AC1CCD290700E68420 /* Base */, + ); + name = Localizable.strings; + sourceTree = ""; + }; + DA8933B31CCD2C2500E68420 /* Foundation.strings */ = { + isa = PBXVariantGroup; + children = ( + DA8933B41CCD2C2500E68420 /* Base */, + ); + name = Foundation.strings; + sourceTree = ""; + }; + DA8933B61CCD2C2D00E68420 /* Foundation.stringsdict */ = { + isa = PBXVariantGroup; + children = ( + DA8933B71CCD2C2D00E68420 /* en */, + ); + name = Foundation.stringsdict; + sourceTree = ""; + }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ diff --git a/platform/osx/sdk/Base.lproj/Localizable.strings b/platform/osx/sdk/Base.lproj/Localizable.strings new file mode 100644 index 0000000000..818c82b2ec --- /dev/null +++ b/platform/osx/sdk/Base.lproj/Localizable.strings @@ -0,0 +1,30 @@ +/* Linked part of copyright notice */ +"COPYRIGHT_MAPBOX" = "Mapbox"; + +/* Copyright notice link */ +"COPYRIGHT_MAPBOX_LINK" = "https://www.mapbox.com/about/maps/"; + +/* Linked part of copyright notice */ +"COPYRIGHT_OSM" = "OpenStreetMap"; + +/* Copyright notice link */ +"COPYRIGHT_OSM_LINK" = "http://www.openstreetmap.org/about/"; + +/* Copyright notice prefix */ +"COPYRIGHT_PREFIX" = "© "; + +/* Accessibility title */ +"MAP_A11Y_TITLE" = "Mapbox"; + +/* Label of Zoom In button */ +"ZOOM_IN_LABEL" = "+"; + +/* Tooltip of Zoom In button */ +"ZOOM_IN_TOOLTIP" = "Zoom In"; + +/* Label of Zoom Out button; U+2212 MINUS SIGN */ +"ZOOM_OUT_LABEL" = "−"; + +/* Tooltip of Zoom Out button */ +"ZOOM_OUT_TOOLTIP" = "Zoom Out"; + diff --git a/platform/osx/sdk/Base.lproj/MGLAnnotationCallout.xib b/platform/osx/sdk/Base.lproj/MGLAnnotationCallout.xib new file mode 100644 index 0000000000..c8e29bc29e --- /dev/null +++ b/platform/osx/sdk/Base.lproj/MGLAnnotationCallout.xib @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/platform/osx/sdk/MGLAnnotationCallout.xib b/platform/osx/sdk/MGLAnnotationCallout.xib deleted file mode 100644 index edf84a26a7..0000000000 --- a/platform/osx/sdk/MGLAnnotationCallout.xib +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/platform/osx/src/MGLAttributionButton.m b/platform/osx/src/MGLAttributionButton.m index b14d36cffd..e21b860794 100644 --- a/platform/osx/src/MGLAttributionButton.m +++ b/platform/osx/src/MGLAttributionButton.m @@ -1,5 +1,7 @@ #import "MGLAttributionButton.h" +#import "NSBundle+MGLAdditions.h" + @implementation MGLAttributionButton { NSTrackingRectTag _trackingAreaTag; } @@ -10,8 +12,7 @@ self.bezelStyle = NSRegularSquareBezelStyle; // Start with a copyright symbol. The whole string will be mini. - NSMutableAttributedString *attributedTitle = [[NSMutableAttributedString alloc] initWithString:@"© " - attributes:@{ + NSMutableAttributedString *attributedTitle = [[NSMutableAttributedString alloc] initWithString:NSLocalizedStringWithDefaultValue(@"COPYRIGHT_PREFIX", nil, nil, @"© ", @"Copyright notice prefix") attributes:@{ NSFontAttributeName: [NSFont systemFontOfSize:[NSFont systemFontSizeForControlSize:NSMiniControlSize]], }]; // Append the specified title, underlining it like a hyperlink. diff --git a/platform/osx/src/MGLMapView.mm b/platform/osx/src/MGLMapView.mm index 280706b798..767bcb81a8 100644 --- a/platform/osx/src/MGLMapView.mm +++ b/platform/osx/src/MGLMapView.mm @@ -80,8 +80,14 @@ struct MGLAttribution { /// URL to open when the attribution button is clicked. NSString *urlString; } MGLAttributions[] = { - { .title = @"Mapbox", .urlString = @"https://www.mapbox.com/about/maps/" }, - { .title = @"OpenStreetMap", .urlString = @"http://www.openstreetmap.org/about/" }, + { + .title = NSLocalizedStringWithDefaultValue(@"COPYRIGHT_MAPBOX", nil, nil, @"Mapbox", @"Linked part of copyright notice"), + .urlString = NSLocalizedStringWithDefaultValue(@"COPYRIGHT_MAPBOX_LINK", nil, nil, @"https://www.mapbox.com/about/maps/", @"Copyright notice link"), + }, + { + .title = NSLocalizedStringWithDefaultValue(@"COPYRIGHT_OSM", nil, nil, @"OpenStreetMap", @"Linked part of copyright notice"), + .urlString = NSLocalizedStringWithDefaultValue(@"COPYRIGHT_OSM_LINK", nil, nil, @"http://www.openstreetmap.org/about/", @"Copyright notice link"), + }, }; /// Unique identifier representing a single annotation in mbgl. @@ -302,12 +308,12 @@ public: [(NSSegmentedCell *)_zoomControls.cell setTrackingMode:NSSegmentSwitchTrackingMomentary]; _zoomControls.continuous = YES; _zoomControls.segmentCount = 2; - [_zoomControls setLabel:@"−" forSegment:0]; // U+2212 MINUS SIGN + [_zoomControls setLabel:NSLocalizedStringWithDefaultValue(@"ZOOM_OUT_LABEL", nil, nil, @"−", @"Label of Zoom Out button; U+2212 MINUS SIGN") forSegment:0]; [(NSSegmentedCell *)_zoomControls.cell setTag:0 forSegment:0]; - [(NSSegmentedCell *)_zoomControls.cell setToolTip:@"Zoom Out" forSegment:0]; - [_zoomControls setLabel:@"+" forSegment:1]; + [(NSSegmentedCell *)_zoomControls.cell setToolTip:NSLocalizedStringWithDefaultValue(@"ZOOM_OUT_TOOLTIP", nil, nil, @"Zoom Out", @"Tooltip of Zoom Out button") forSegment:0]; + [_zoomControls setLabel:NSLocalizedStringWithDefaultValue(@"ZOOM_IN_LABEL", nil, nil, @"+", @"Label of Zoom In button") forSegment:1]; [(NSSegmentedCell *)_zoomControls.cell setTag:1 forSegment:1]; - [(NSSegmentedCell *)_zoomControls.cell setToolTip:@"Zoom In" forSegment:1]; + [(NSSegmentedCell *)_zoomControls.cell setToolTip:NSLocalizedStringWithDefaultValue(@"ZOOM_IN_TOOLTIP", nil, nil, @"Zoom In", @"Tooltip of Zoom In button") forSegment:1]; _zoomControls.target = self; _zoomControls.action = @selector(zoomInOrOut:); _zoomControls.controlSize = NSRegularControlSize; @@ -340,7 +346,7 @@ public: logoImage.alignmentRect = NSInsetRect(logoImage.alignmentRect, 3, 3); _logoView.image = logoImage; _logoView.translatesAutoresizingMaskIntoConstraints = NO; - _logoView.accessibilityTitle = @"Mapbox"; + _logoView.accessibilityTitle = NSLocalizedStringWithDefaultValue(@"MAP_A11Y_TITLE", nil, nil, @"Mapbox", @"Accessibility title"); [self addSubview:_logoView]; } -- cgit v1.2.1