Skip to content

Commit

Permalink
Release 1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
marmelroy committed Sep 18, 2016
1 parent 65a1209 commit b4dd9c2
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 174 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@ script: ./build.sh $MODE
branches:
only:
- master
- swift3.0
25 changes: 15 additions & 10 deletions Localize_Swift.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,9 @@
CreatedOnToolsVersion = 7.2;
LastSwiftMigration = 0800;
};
343A6DEA1D152E5A0081AA37 = {
LastSwiftMigration = 0800;
};
};
};
buildConfigurationList = 3433F2301C518AF7003AE34D /* Build configuration list for PBXProject "Localize_Swift" */;
Expand Down Expand Up @@ -414,7 +417,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 10;
CURRENT_PROJECT_VERSION = 11;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
Expand Down Expand Up @@ -464,7 +467,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 10;
CURRENT_PROJECT_VERSION = 11;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
Expand Down Expand Up @@ -494,7 +497,7 @@
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 10;
DYLIB_CURRENT_VERSION = 11;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Localize_Swift/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
Expand All @@ -516,7 +519,7 @@
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 10;
DYLIB_CURRENT_VERSION = 11;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Localize_Swift/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
Expand Down Expand Up @@ -557,7 +560,7 @@
CLANG_ENABLE_MODULES = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 10;
DYLIB_CURRENT_VERSION = 11;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Localize_Swift/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
Expand All @@ -578,7 +581,7 @@
CLANG_ENABLE_MODULES = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 10;
DYLIB_CURRENT_VERSION = 11;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Localize_Swift/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
Expand All @@ -598,7 +601,7 @@
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 10;
DYLIB_CURRENT_VERSION = 11;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "$(SRCROOT)/Localize_Swift-tvOS.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
Expand All @@ -620,7 +623,7 @@
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 10;
DYLIB_CURRENT_VERSION = 11;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "$(SRCROOT)/Localize_Swift-tvOS.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
Expand All @@ -640,7 +643,7 @@
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 10;
DYLIB_CURRENT_VERSION = 11;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "$(SRCROOT)/Localize_Swift/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
Expand All @@ -652,6 +655,7 @@
SDKROOT = watchos;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
};
name = Debug;
};
Expand All @@ -662,7 +666,7 @@
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 10;
DYLIB_CURRENT_VERSION = 11;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "$(SRCROOT)/Localize_Swift/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
Expand All @@ -672,6 +676,7 @@
PRODUCT_NAME = Localize_Swift;
SDKROOT = watchos;
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
};
name = Release;
};
Expand Down
4 changes: 2 additions & 2 deletions Localize_Swift/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.5</string>
<string>1.6</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>10</string>
<string>11</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
Expand Down
4 changes: 2 additions & 2 deletions Localize_SwiftTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.5</string>
<string>1.6</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>10</string>
<string>11</string>
</dict>
</plist>
15 changes: 5 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Localize.setCurrentLanguage("fr")

To update the UI in the viewcontroller where a language change can take place, observe LCLLanguageChangeNotification :
```
NSNotificationCenter.defaultCenter().addObserver(self, selector: "setText", name: LCLLanguageChangeNotification, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(setText), name: NSNotification.Name( LCLLanguageChangeNotification), object: nil)
```

To reset back to the default app language:
Expand All @@ -50,22 +50,17 @@ Localize.resetCurrentLanguageToDefault()

## genstrings

To support this new i18n syntax, Localize-Swift includes custom genstrings swift and python scripts.
To support this new i18n syntax, Localize-Swift includes custom genstrings swift script.

Copy the genstrings file (either .swift or .py) into your project's root folder and run with
Copy the genstrings.swift file into your project's root folder and run with

```
./genstrings.swift
```
or

```
python genstrings.py
```

This will print the collected strings in the terminal. Select and copy to your default Localizable.strings.

The swift genstrings includes the ability to specify excluded directories and files (by editing the script).
The script includes the ability to specify excluded directories and files (by editing the script).

### Setting up with Carthage

Expand All @@ -87,5 +82,5 @@ github "marmelroy/Localize-Swift"
### Setting up with [CocoaPods](http://cocoapods.org/?q=Localize-Swift)
```
source 'https://github.com/CocoaPods/Specs.git'
pod 'Localize-Swift', '~> 1.5'
pod 'Localize-Swift', '~> 1.6'
```
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# **** Update me when new Xcode versions are released! ****
PLATFORM="platform=iOS Simulator,OS=10.0,name=iPhone 6s"
PLATFORM="platform=iOS Simulator,OS=10.0,name=iPhone 7"
SDK="iphonesimulator"


Expand Down
2 changes: 1 addition & 1 deletion examples/LanguageSwitch/Sample/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class ViewController: UIViewController {
// Add an observer for LCLLanguageChangeNotification on viewWillAppear. This is posted whenever a language changes and allows the viewcontroller to make the necessary UI updated. Very useful for places in your app when a language change might happen.
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
NotificationCenter.default.addObserver(self, selector: #selector(setText), name: NSNotification.Name(rawValue: LCLLanguageChangeNotification), object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(setText), name: NSNotification.Name( LCLLanguageChangeNotification), object: nil)
}

// Remove the LCLLanguageChangeNotification on viewWillDisappear
Expand Down
147 changes: 0 additions & 147 deletions genstrings.py

This file was deleted.

0 comments on commit b4dd9c2

Please sign in to comment.