summaryrefslogtreecommitdiff
path: root/platform/macos/DEVELOPING.md
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2016-11-18 10:29:17 -0800
committerMinh Nguyễn <mxn@1ec5.org>2016-11-18 10:38:57 -0800
commite858dba86def62967865856f4dbbe1b24663cb45 (patch)
tree27d58c00cf15560601950817f0fe799b6bea1556 /platform/macos/DEVELOPING.md
parentb4aba87892d8b6fa5c9d5608032bf54db98b6143 (diff)
downloadqtlocation-mapboxgl-e858dba86def62967865856f4dbbe1b24663cb45.tar.gz
[ios, macos] Documented localization workflow
Diffstat (limited to 'platform/macos/DEVELOPING.md')
-rw-r--r--platform/macos/DEVELOPING.md9
1 files changed, 9 insertions, 0 deletions
diff --git a/platform/macos/DEVELOPING.md b/platform/macos/DEVELOPING.md
index cf52a650aa..71eb7995c8 100644
--- a/platform/macos/DEVELOPING.md
+++ b/platform/macos/DEVELOPING.md
@@ -86,6 +86,15 @@ To add or update text that the user may see in the macOS SDK:
1. _(Optional.)_ When dealing with a number followed by a pluralized word, do not split the string. Instead, use a format string and make `val` ambiguous, like `%d file(s)`. Then pluralize for English in the appropriate [.stringsdict file](https://developer.apple.com/library/mac/documentation/MacOSX/Conceptual/BPInternational/StringsdictFileFormat/StringsdictFileFormat.html). See [platform/darwin/resources/en.lproj/Foundation.stringsdict](../darwin/resources/en.lproj/Foundation.stringsdict) for an example. Localizers should do likewise for their languages.
1. Run `make genstrings` and commit any changes it makes to .strings files. The make rule also updates the iOS SDK’s strings tables.
+### Adding a localization
+
+To add a localization to the macOS SDK:
+
+1. In macos.xcworkspace, open the project editor for macos.xcodeproj. Using the project editor’s sidebar or tab bar dropdown, go to the “macos” project; under the Localizations section of the Info tab, click the + button to add your language to the project.
+1. In the sheet that appears, select all the .strings and .stringsdict files but no .xib file. (Most of the XIBs are part of the macosapp example application, which is not localized, while MGLAnnotationCallout.xib contains no localizable strings.)
+1. In the Project navigator, expand each .strings and .stringsdict file in the project. An additional version for your localization should be listed; translate it. Translate everything on the right side of the equals sign. Leave the left side and any comments unmodified. See Apple’s documentation on the [.strings](https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/LoadingResources/Strings/Strings.html) and [.stringsdict](https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPInternational/StringsdictFileFormat/StringsdictFileFormat.html) formats.
+1. You’re already most of the way towards localizing the iOS SDK too – consider [completing that localization](../ios/DEVELOPING.md#adding-a-localization).
+
## Access tokens
The demo applications use Mapbox vector tiles, which require a Mapbox account and API access token. Obtain an access token on the [Mapbox account page](https://www.mapbox.com/studio/account/tokens/). You will be prompted for this access token the first time you launch the demo application.