Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Make iOS and OS X SDKs localizable #4783

Merged
merged 11 commits into from
Apr 25, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -101,25 +109,22 @@ test-ios: ios

ipackage: $(IOS_PROJ_PATH)
BITCODE=$(BITCODE) FORMAT=$(FORMAT) BUILD_DEVICE=$(BUILD_DEVICE) SYMBOLS=$(SYMBOLS) \
BUNDLE_RESOURCES=YES PLACE_RESOURCE_BUNDLES_OUTSIDE_FRAMEWORK=YES \
./platform/ios/scripts/package.sh

ipackage-strip: $(IOS_PROJ_PATH)
BITCODE=$(BITCODE) FORMAT=$(FORMAT) BUILD_DEVICE=$(BUILD_DEVICE) SYMBOLS=NO \
BUNDLE_RESOURCES=YES PLACE_RESOURCE_BUNDLES_OUTSIDE_FRAMEWORK=YES \
./platform/ios/scripts/package.sh

ipackage-sim: $(IOS_PROJ_PATH)
BUILDTYPE=Debug BITCODE=$(BITCODE) FORMAT=dynamic BUILD_DEVICE=false SYMBOLS=$(SYMBOLS) \
BUNDLE_RESOURCES=YES PLACE_RESOURCE_BUNDLES_OUTSIDE_FRAMEWORK=YES \
./platform/ios/scripts/package.sh

iframework: $(IOS_PROJ_PATH)
BITCODE=$(BITCODE) FORMAT=dynamic BUILD_DEVICE=$(BUILD_DEVICE) SYMBOLS=$(SYMBOLS) \
./platform/ios/scripts/package.sh

ifabric: $(IOS_PROJ_PATH)
BITCODE=$(BITCODE) FORMAT=static BUILD_DEVICE=$(BUILD_DEVICE) SYMBOLS=NO BUNDLE_RESOURCES=YES \
BITCODE=$(BITCODE) FORMAT=static BUILD_DEVICE=$(BUILD_DEVICE) SYMBOLS=NO SELF_CONTAINED=YES \
./platform/ios/scripts/package.sh

idocument:
Expand Down
291 changes: 291 additions & 0 deletions platform/darwin/resources/Base.lproj/Foundation.strings
Original file line number Diff line number Diff line change
@@ -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";

54 changes: 54 additions & 0 deletions platform/darwin/resources/en.lproj/Foundation.stringsdict
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>COORD_DEG_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@degrees@</string>
<key>degrees</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d degree</string>
<key>other</key>
<string>%d degrees</string>
</dict>
</dict>
<key>COORD_MIN_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@minutes@</string>
<key>minutes</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d minute</string>
<key>other</key>
<string>%d minutes</string>
</dict>
</dict>
<key>COORD_SEC_LONG</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@seconds@</string>
<key>seconds</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>NSStringFormatValueTypeKey</key>
<string>d</string>
<key>one</key>
<string>%d second</string>
<key>other</key>
<string>%d seconds</string>
</dict>
</dict>
</dict>
</plist>
Loading