diff --git a/.swift-version b/.swift-version index 7d5c902..bf77d54 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -4.1 +4.2 diff --git a/CHANGELOG.md b/CHANGELOG.md index 8adcd54..07aa493 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,37 +1,67 @@ # Change Log + All notable changes to this project will be documented in this file. `Localize` adheres to [Semantic Versioning](http://semver.org/). +## [2.1.0](https://github.com/andresilvagomez/Localize/releases/tag/2.1.0) + +Released on 2018-10-24. + +- Added auto localize flag to UI components. + - By [adbqpa](https://github.com/adbqpa) in Pull Request [#44](https://github.com/andresilvagomez/Localize/pull/44). +- Added support for custom providers + - By [Andres Silva](https://github.com/andresilvagomez). + +--- + ## [2.0.5](https://github.com/andresilvagomez/Localize/releases/tag/2.0.5) + +Released on 2018-09-26. + - Swift 4.2 Support. - By [Gustavo Graña](https://github.com/ggrana) in Pull Request [#36](https://github.com/andresilvagomez/Localize/pull/36). -Released on 2018-09-26. + +--- ## [2.0.4](https://github.com/andresilvagomez/Localize/releases/tag/2.0.4) + +Released on 2018-09-20. + - Swift 4.2 Support. - By [Daniel Clelland](https://github.com/dclelland) in Pull Request [#34](https://github.com/andresilvagomez/Localize/pull/34). -Released on 2018-09-20. + +--- ## [2.0.3](https://github.com/andresilvagomez/Localize/releases/tag/2.0.3) + Released on 2018-05-15. -#### Added +### Added + - Fix localize strings when user only has a one string file. - By [Andres Silva](https://github.com/andresilvagomez) in Pull Request [#27](https://github.com/andresilvagomez/Localize/pull/27). +--- + ## [2.0.2](https://github.com/andresilvagomez/Localize/releases/tag/2.0.2) + Released on 2018-05-10. -#### Added +### Added + - Improve strings with extended languajes like to es-mx for defaults localizations. - By [Benjamin Erhart](https://github.com/tladesignz) in Pull Request [#25](https://github.com/andresilvagomez/Localize/pull/25). +--- + ## [2.0.1](https://github.com/andresilvagomez/Localize/releases/tag/2.0.1) + Released on 2018-04-15. -#### Added +### Added + - Include testing with cocoapods. - Code coverage 99+. - General changes to improve test. @@ -42,9 +72,11 @@ Released on 2018-04-15. --- ## [2.0.0](https://github.com/andresilvagomez/Localize/releases/tag/2.0.0) + Released on 2018-04-12. -#### Added +### Added + - Transfer ownership to [andresilvagomez](https://github.com/andresilvagomez/Localize) - Swift 4.1 Support. - Faster. @@ -58,19 +90,23 @@ Released on 2018-04-12. --- ## [1.5.2](https://github.com/andresilvagomez/Localize/releases/tag/1.5.2) + Released on 2017-09-27. -#### Added +### Added + - Swift 4. - - By [Andres Silva](https://github.com/andresilvagomez) in Pull Request +- By [Andres Silva](https://github.com/andresilvagomez) in Pull Request [#18](https://github.com/andresilvagomez/Localize/pull/18). --- ## [1.5.1](https://github.com/andresilvagomez/Localize/releases/tag/1.5.1) + Released on 2017-08-10. -#### Added +### Added + - Fix with country code. - By [Andres Silva](https://github.com/andresilvagomez) in Pull Request [#17](https://github.com/andresilvagomez/Localize/pull/17). @@ -78,30 +114,36 @@ Released on 2017-08-10. --- ## [1.5.0](https://github.com/andresilvagomez/Localize/releases/tag/1.5.0) + Released on 2017-08-08. -#### Added +### Added + - Localize UI elements with @IBInspectable. - By [Andres Silva](https://github.com/andresilvagomez) in Pull Request [#14](https://github.com/andresilvagomez/Localize/pull/14). -#### Deleted - - Delete custom classes for UI elements in favor to @IBInspectable extensions. - - By [Andres Silva](https://github.com/andresilvagomez) in Pull Request +### Deleted + +- Delete custom classes for UI elements in favor to @IBInspectable extensions. + - By [Andres Silva](https://github.com/andresilvagomez) in Pull Request [#14](https://github.com/andresilvagomez/Localize/pull/14). --- ## [1.4.0](https://github.com/andresilvagomez/Localize/releases/tag/1.4.0) + Released on 2017-07-10. -#### Added +### Added + - Dynamic bundle. - Update bundle. - Added by [Benjamin Erhart](https://github.com/tladesignz) in Pull Request [#13](https://github.com/andresilvagomez/Localize/pull/13). -#### Updated +### Updated + - Remove enums for language. - Fixed #localize with placeholder replacement. - Added by [Benjamin Erhart](https://github.com/tladesignz) in Pull Request @@ -110,9 +152,11 @@ Released on 2017-07-10. --- ## [1.3.0](https://github.com/andresilvagomez/Localize/releases/tag/1.3.0) + Released on 2017-02-14. -#### Added +### Added + - Support to Apple Strings. - Get your localized string using different table names. - JSON Provider and Strings Provider. @@ -121,7 +165,8 @@ Released on 2017-02-14. - Added by [Andres Silva](https://github.com/andresilvagomez) in Pull Request [#8](https://github.com/andresilvagomez/Localize/pull/4). -#### Updated +### Updated + - Not use vars to config. - Delete cache json file. - Added by [Andres Silva](https://github.com/andresilvagomez) in Pull Request @@ -130,9 +175,11 @@ Released on 2017-02-14. --- ## [1.2.0](https://github.com/andresilvagomez/Localize/releases/tag/1.2.0) + Released on 2017-01-19. -#### Added +### Added + - Renamed JsonLocalized to Localize, according with the next features. - Static methods. - Config methods. @@ -141,13 +188,15 @@ Released on 2017-01-19. - Added by [Andres Silva](https://github.com/andresilvagomez) in Pull Request [#4](https://github.com/andresilvagomez/Localize/pull/4). -#### Updated +### Updated + - Config methods. - Statics calleds. - Added by [Andres Silva](https://github.com/andresilvagomez) in Pull Request [#4](https://github.com/andresilvagomez/Localize/pull/4). -#### Fixed +### Fixed + - Getting default language key when in current language key no was available. - Added by [Andres Silva](https://github.com/andresilvagomez) in Pull Request [#4](https://github.com/andresilvagomez/Localize/pull/4). @@ -155,9 +204,11 @@ Released on 2017-01-19. --- ## [1.1](https://github.com/andresilvagomez/Localize/releases/tag/1.1) + Released on 2017-01-17. -#### Added +### Added + - Documentation for all methods. - Method to detect all available languages. - Method to localize languages codes. @@ -167,7 +218,8 @@ Released on 2017-01-17. - Added by [Andres Silva](https://github.com/andresilvagomez) in Pull Request [#2](https://github.com/andresilvagomez/Localize/pull/2). -#### Updated +### Updated + - Updated Example. - Added by [Andres Silva](https://github.com/andresilvagomez) in Pull Request [#2](https://github.com/andresilvagomez/Localize/pull/2). diff --git a/Localize.podspec b/Localize.podspec index 0f734ea..f0e4e9c 100644 --- a/Localize.podspec +++ b/Localize.podspec @@ -1,12 +1,12 @@ Pod::Spec.new do |s| s.name = "Localize" - s.version = "2.0.5" + s.version = "2.1.0" s.license = 'MIT' s.summary = "Localize is a framework writed in swift to localize your projects easier improves i18n, including storyboards and strings." s.homepage = "https://github.com/andresilvagomez/Localize" - s.author = { "Andres Silva" => "andresilvagomez@gmail.com" } - s.source = { :git => "https://github.com/andresilvagomez/Localize.git", :tag => "2.0.5" } + s.author = { "Andres Silva" => "me@andresilvagomez.com" } + s.source = { :git => "https://github.com/andresilvagomez/Localize.git", :tag => "2.1.0" } s.ios.deployment_target = '9.0' s.source_files = "Source/*.swift" diff --git a/README.md b/README.md index 4409998..818bc2f 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ ___ [CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command: ```bash -$ gem install cocoapods +gem install cocoapods ``` > CocoaPods 1.1.0+ is required to build Localize 1.+. @@ -55,14 +55,14 @@ platform :ios, '9.0' use_frameworks! target '' do - pod 'Localize' , '~> 2.0.5' + pod 'Localize' , '~> 2.1.0' end ``` Then, run the following command: ```bash -$ pod install +pod install ``` ### Carthage @@ -72,13 +72,13 @@ $ pod install You can install Carthage with [Homebrew](http://brew.sh/) using the following command: ```bash -$ brew update -$ brew install carthage +brew update +brew install carthage ``` To integrate Localize into your Xcode project using Carthage, specify it in your `Cartfile`: -``` +```carthage github "andresilvagomez/Localize" ``` @@ -96,7 +96,7 @@ dependencies: [ ] ``` ---- +___ ## Usage @@ -118,7 +118,7 @@ You can decide if you want use JSON or Apple Strings, we support both, if you de Please create a JSON file in your code with this rule: -``` +```strings {your file name}-{your lang code}.json ``` @@ -148,7 +148,7 @@ If you decide use Apple strings, please follow [Apple Localization Guide](https: String file example -``` +```strings "hello.world" = "Hello world!"; @@ -183,6 +183,7 @@ print( "hello.world".localized ) ``` ### Localize strings, replacing text + Localize use `%` identifier to replace the text ```swift @@ -194,6 +195,7 @@ print( "hello.name".localize(value: "everyone") ) ``` ### Localize strings, replacing many texts + Localize use `%` identifier to replace the text ```swift @@ -205,6 +207,7 @@ print( "values".localize(values: "everyone", "Software Developer") ) ``` ### Localize strings, replacing dictionary values + Localize use `:yourid` to search your id in JSON File ```swift @@ -215,9 +218,9 @@ print( "username".localize(dictionary: ["username": "Localize"]) ) ``` -### Localize strings, using other files. -If you decide use different files use methods with ```tableName``` in the end of each method, for example. +### Localize strings, using other files +If you decide use different files use methods with ```tableName``` in the end of each method, for example. ```swift @@ -230,9 +233,10 @@ print( "values".localize(values: "everyone", "Software Developer", tableName: "Y print( "username".localize(dictionary: ["username": "Localize"], tableName: "YourFileName") ) ``` ---- -### We are amazing with storyboards. +___ + +### We are amazing with storyboards You don't need to import anything in your code, Localize uses extensions to localize your UIView components @@ -266,9 +270,10 @@ You can use extensions for - `UITextField` - `UITextView` ---- +___ ## Updating language + When you change a language, automatically all views update your content to new language ```swift @@ -317,6 +322,7 @@ Implementing internal acction to change a language ``` ### Config + This not is necesary, only if you need different results. ```swift @@ -352,20 +358,20 @@ func application(_ application: UIApplication, didFinishLaunchingWithOptions lau ``` ---- +___ ## Notes for your AppStore release -To make all languages you have localized your app for visible on the AppStore, you must add a language in the project's settings. +To make all languages you have localized your app for visible on the AppStore, you must add a language in the project's settings. -1. For that, click on your project name in the left side bar. +1. For that, click on your project name in the left side bar. 2. Then, choose project, instead of a target. 3. At the bottom, under *Localizations*, press the + button & select a language you want to add 4. On prompt, uncheck all files Xcode wants to add localization for, but keep a single one, that you won't actually localize, such as your launch screen for instance. - if you need to localize all your files, I suggest adding a placeholder storyboard file that you'll then add to localization 5. Done! (You don't actually have to localize the placehodler file.) The AppStore will now show the new language in localizations for your app. ---- +___ ## Credits diff --git a/pull_request_template.md b/pull_request_template.md index 2865ce1..97b9150 100644 --- a/pull_request_template.md +++ b/pull_request_template.md @@ -2,12 +2,12 @@ ℹ Please provide a quick description for this pull request. -## Secutiry Questions +## Security Questions - [ ] You tested your code? - [ ] You keep the code coverage? - [ ] You tested your code? -- [ ] You documented it change if is necesary? +- [ ] You documented it change if is necessary? **Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]