-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[ios, macos] Enable localizations in iosapp & macosapp #8105
Conversation
@friedbunny, thanks for your PR! By analyzing this pull request, we identified @1ec5 and @tmcw to be potential reviewers. |
bf81441
to
55b0960
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm about 80% sure about base localization being the way to go here. The extra stub files for each language aren't terrible, but they're just one more step that can be missed when adding a new locale.
@@ -0,0 +1,8 @@ | |||
|
|||
/* | |||
File.strings |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move this file to Base.lproj. A base localization will be reused by all localizations without the need to a separate stub file for each localization.
@@ -119,6 +119,7 @@ Once you’ve finished translating the SDK into a new language in Transifex, per | |||
1. In ios.xcworkspace, open the project editor for ios.xcodeproj. Using the project editor’s sidebar or tab bar dropdown, go to the “ios” 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 not the .storyboard file. (LaunchScreen.storyboard is part of the iosapp example application, which is not localized.) If your language lacks declension and pluralization, as in the case of Chinese, omit the .stringsdict files. | |||
1. In the Project navigator, expand each .stringsdict file in the project. An additional version for your localization should be listed; translate it. See Apple’s documentation on the [.stringsdict format](https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPInternational/StringsdictFileFormat/StringsdictFileFormat.html). | |||
1. In the Project navigator, select Demo App/Localizable.strings and then, in the File Inspector, check the box for your new localization. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As long as you use a base localization, the Localizable.strings for iosapp will be localized as part of the step before last.
More languages are being added in #8113. |
cd0c814
to
b937b4a
Compare
Rebased on master and fixed a conflict in the macOS project. Not sure if rebasing will fix the consistently failing Node macOS test, though... |
b937b4a
to
5a63f98
Compare
After another rebase, tests are finally passing. Needs a 👍 before it can be merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#8113 also added Lithuanian, Polish, Russian, Spanish, and Ukrainian. Note that the list of localizations for iOS and macOS don’t quite line up, because some translators prioritized one platform over another.
5a63f98
to
e30de34
Compare
Added the new localizations from #8113, rebased and squashed. |
e30de34
to
4f91e70
Compare
Adds blank
Localizable.strings
to iosapp and macapp, so that our SDK localizations will be used in those apps.