Skip to content

Commit

Permalink
Merge pull request #8 from andresilvagomez/v1.3
Browse files Browse the repository at this point in the history
V1.3.0
  • Loading branch information
andresilvagomez authored Feb 15, 2017
2 parents 0a4adaf + 2deb359 commit b541a06
Show file tree
Hide file tree
Showing 33 changed files with 1,112 additions and 389 deletions.
43 changes: 41 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,43 @@
language: objective-c
osx_image: xcode8.2
osx_image: xcode8
env:
global:
- LC_CTYPE=en_US.UTF-8
- LANG=en_US.UTF-8
- WORKSPACE=Localize.xcworkspace
- IOS_FRAMEWORK_SCHEME="LocalizeTests"
- IOS_SDK=iphonesimulator10.0
- EXAMPLE_SCHEME="Example"
matrix:
- DESTINATION="OS=10.0,name=iPhone 7 Plus" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="YES"
- DESTINATION="OS=9.0,name=iPhone 6" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="YES" POD_LINT="NO"
before_install:
- gem install cocoapods --pre --no-rdoc --no-ri --no-document --quiet
script:
- xcodebuild -workspace Localize.xcworkspace -scheme LocalizeTests -sdk iphonesimulator10.2 -destination "OS=10.2,name=iPhone 7 Plus" -configuration Debug ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES test | xcpretty;
- set -o pipefail
- xcodebuild -version
- xcodebuild -showsdks

# Build Framework in Debug and Run Tests if specified
- if [ $RUN_TESTS == "YES" ]; then
xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES test | xcpretty;
else
xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty;
fi

# Build Framework in Release and Run Tests if specified
- if [ $RUN_TESTS == "YES" ]; then
xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES test | xcpretty;
else
xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO build | xcpretty;
fi

# Build Example in Debug if specified
- if [ $BUILD_EXAMPLE == "YES" ]; then
xcodebuild -workspace "$WORKSPACE" -scheme "$EXAMPLE_SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty;
fi

# Run `pod lib lint` if specified
- if [ $POD_LINT == "YES" ]; then
pod lib lint;
fi
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,26 @@
All notable changes to this project will be documented in this file.
`Localize` adheres to [Semantic Versioning](http://semver.org/).

## [1.3.0](https://github.com/kekiiwaa/Localize/releases/tag/1.3.0)
Released on 2017-02-14.

#### Added
- Support to Apple Strings.
- Get your localized string using different table names.
- JSON Provider and Strings Provider.
- Testing mode.
- 100% documented using jazzy.
- Added by [Andres Silva](https://github.com/andresilvagomez) in Pull Request
[#8](https://github.com/kekiiwaa/Localize/pull/4).

#### Updated
- Not use vars to config.
- Delete cache json file.
- Added by [Andres Silva](https://github.com/andresilvagomez) in Pull Request
[#8](https://github.com/kekiiwaa/Localize/pull/4).

---

## [1.2.0](https://github.com/kekiiwaa/Localize/releases/tag/1.2.0)
Released on 2017-01-19.

Expand Down
6 changes: 4 additions & 2 deletions Example/Example/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {

let localize = Localize.shared
// Set your localize provider.
localize.update(provider: .json)
// Set your file name
localize.fileName = "lang"
localize.update(fileName: "lang")
// Set your default languaje.
localize.defaultLanguage = .french
localize.update(defaultLanguage: .french)
// If you want change a user language, different to default in phone use this method.
localize.update(language: .english)
// If you want remove storaged languaje use
Expand Down
7 changes: 3 additions & 4 deletions Localize.podspec
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
Pod::Spec.new do |s|

s.name = "Localize"
s.version = "1.2.0"
s.version = "1.3.0"
s.license = 'MIT'
s.summary = "Localize is a framework writed in swift to localize your projects easier, including storyboards and strings."
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/Kekiiwaa/Localize"
s.author = { "Kekiiwaa" => "andresilvagomez@gmail.com" }
s.source = { :git => "https://github.com/Kekiiwaa/Localize.git", :tag => "1.2.0" }
s.source = { :git => "https://github.com/Kekiiwaa/Localize.git", :tag => "1.3.0" }

s.ios.deployment_target = '8.0'

s.source_files = "Source/*.swift"

end
76 changes: 71 additions & 5 deletions Localize.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@

/* Begin PBXBuildFile section */
9F050EF81E2B486C009804A5 /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 9F989F421E2B34E700A19F67 /* Info.plist */; };
9F4570201E31738F008C37D1 /* DefaultKeys.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F45701F1E31738F008C37D1 /* DefaultKeys.swift */; };
9F1677FA1E51DE270022F3F8 /* Strings.strings in Resources */ = {isa = PBXBuildFile; fileRef = 9F1677FC1E51DE270022F3F8 /* Strings.strings */; };
9F1678011E51F33E0022F3F8 /* StringBaseTestInSpanish.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F1678001E51F33E0022F3F8 /* StringBaseTestInSpanish.swift */; };
9F19DFC71E4D2B1D00F953E6 /* StringBaseTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F19DFC61E4D2B1D00F953E6 /* StringBaseTest.swift */; };
9F262D911E525565002DD75A /* LocalizeCommonProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F262D901E525565002DD75A /* LocalizeCommonProtocol.swift */; };
9F2FC5651E4275A300C15610 /* LocalizeProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F2FC5641E4275A300C15610 /* LocalizeProtocol.swift */; };
9F2FC5671E42793B00C15610 /* LocalizeJson.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F2FC5661E42793B00C15610 /* LocalizeJson.swift */; };
9F2FC5691E427AFD00C15610 /* LocalizeStrings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F2FC5681E427AFD00C15610 /* LocalizeStrings.swift */; };
9F4570221E3173A4008C37D1 /* lang-es.json in Resources */ = {isa = PBXBuildFile; fileRef = 9F4570211E3173A4008C37D1 /* lang-es.json */; };
9F761AD71E305B9B00904B4B /* LocalizeStatic.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F761AD61E305B9B00904B4B /* LocalizeStatic.swift */; };
9F761AEC1E3063E400904B4B /* lang-en.json in Resources */ = {isa = PBXBuildFile; fileRef = 9F761AEB1E3063E400904B4B /* lang-en.json */; };
Expand All @@ -27,6 +33,10 @@
9FA3BC4D1E318BDC0054CA92 /* some-it.json in Resources */ = {isa = PBXBuildFile; fileRef = 9FA3BC4C1E318BDC0054CA92 /* some-it.json */; };
9FA3BC4F1E318BED0054CA92 /* file-de.json in Resources */ = {isa = PBXBuildFile; fileRef = 9FA3BC4E1E318BED0054CA92 /* file-de.json */; };
9FA3BC511E318C080054CA92 /* ReadingOtherFiles.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FA3BC501E318C080054CA92 /* ReadingOtherFiles.swift */; };
9FCD8EA01E52A9D800B5909C /* Other.strings in Resources */ = {isa = PBXBuildFile; fileRef = 9FCD8EA21E52A9D800B5909C /* Other.strings */; };
9FCD8EA51E52AD3E00B5909C /* StringsChanginDefaultFileName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FCD8EA41E52AD3E00B5909C /* StringsChanginDefaultFileName.swift */; };
9FCD8EA71E53319900B5909C /* other-es.json in Resources */ = {isa = PBXBuildFile; fileRef = 9FCD8EA61E53319900B5909C /* other-es.json */; };
9FCD8EA91E53327D00B5909C /* JsonChanginFileName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FCD8EA81E53327D00B5909C /* JsonChanginFileName.swift */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand All @@ -41,7 +51,14 @@

/* Begin PBXFileReference section */
69F1B5741D955990000A2B87 /* Localize.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Localize.framework; sourceTree = BUILT_PRODUCTS_DIR; };
9F45701F1E31738F008C37D1 /* DefaultKeys.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DefaultKeys.swift; sourceTree = "<group>"; };
9F1677FB1E51DE270022F3F8 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Strings.strings; sourceTree = "<group>"; };
9F1677FD1E51DE320022F3F8 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Strings.strings; sourceTree = "<group>"; };
9F1678001E51F33E0022F3F8 /* StringBaseTestInSpanish.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StringBaseTestInSpanish.swift; sourceTree = "<group>"; };
9F19DFC61E4D2B1D00F953E6 /* StringBaseTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StringBaseTest.swift; sourceTree = "<group>"; };
9F262D901E525565002DD75A /* LocalizeCommonProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LocalizeCommonProtocol.swift; sourceTree = "<group>"; };
9F2FC5641E4275A300C15610 /* LocalizeProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LocalizeProtocol.swift; sourceTree = "<group>"; };
9F2FC5661E42793B00C15610 /* LocalizeJson.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LocalizeJson.swift; sourceTree = "<group>"; };
9F2FC5681E427AFD00C15610 /* LocalizeStrings.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LocalizeStrings.swift; sourceTree = "<group>"; };
9F4570211E3173A4008C37D1 /* lang-es.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "lang-es.json"; sourceTree = "<group>"; };
9F761AD61E305B9B00904B4B /* LocalizeStatic.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LocalizeStatic.swift; sourceTree = "<group>"; };
9F761AEB1E3063E400904B4B /* lang-en.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "lang-en.json"; sourceTree = "<group>"; };
Expand All @@ -61,6 +78,11 @@
9FA3BC4C1E318BDC0054CA92 /* some-it.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "some-it.json"; sourceTree = "<group>"; };
9FA3BC4E1E318BED0054CA92 /* file-de.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "file-de.json"; sourceTree = "<group>"; };
9FA3BC501E318C080054CA92 /* ReadingOtherFiles.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReadingOtherFiles.swift; sourceTree = "<group>"; };
9FCD8EA11E52A9D800B5909C /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Other.strings; sourceTree = "<group>"; };
9FCD8EA31E52A9D900B5909C /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Other.strings; sourceTree = "<group>"; };
9FCD8EA41E52AD3E00B5909C /* StringsChanginDefaultFileName.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StringsChanginDefaultFileName.swift; sourceTree = "<group>"; };
9FCD8EA61E53319900B5909C /* other-es.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "other-es.json"; sourceTree = "<group>"; };
9FCD8EA81E53327D00B5909C /* JsonChanginFileName.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JsonChanginFileName.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -109,6 +131,10 @@
9F93453D1E29192300C400F7 /* LocalizeString.swift */,
9F93453A1E29192300C400F7 /* LocalizeExtensions.swift */,
9F93453B1E29192300C400F7 /* LocalizeUIElements.swift */,
9F2FC5641E4275A300C15610 /* LocalizeProtocol.swift */,
9F262D901E525565002DD75A /* LocalizeCommonProtocol.swift */,
9F2FC5661E42793B00C15610 /* LocalizeJson.swift */,
9F2FC5681E427AFD00C15610 /* LocalizeStrings.swift */,
9F9345461E291A1800C400F7 /* Suporting Files */,
);
path = Source;
Expand All @@ -128,9 +154,12 @@
children = (
9F989F411E2B34E700A19F67 /* BaseTest.swift */,
9FA3BC481E3174980054CA92 /* BaseTestInSpanish.swift */,
9FCD8EA81E53327D00B5909C /* JsonChanginFileName.swift */,
9F989F441E2B34E700A19F67 /* OtherLangTest.swift */,
9F45701F1E31738F008C37D1 /* DefaultKeys.swift */,
9FA3BC501E318C080054CA92 /* ReadingOtherFiles.swift */,
9F19DFC61E4D2B1D00F953E6 /* StringBaseTest.swift */,
9F1678001E51F33E0022F3F8 /* StringBaseTestInSpanish.swift */,
9FCD8EA41E52AD3E00B5909C /* StringsChanginDefaultFileName.swift */,
9F989F4A1E2B3B5600A19F67 /* Supporting Files */,
);
path = Tests;
Expand All @@ -142,9 +171,12 @@
9F761AEB1E3063E400904B4B /* lang-en.json */,
9F4570211E3173A4008C37D1 /* lang-es.json */,
9FA3BC4A1E318BCB0054CA92 /* other-en.json */,
9FCD8EA61E53319900B5909C /* other-es.json */,
9FA3BC4C1E318BDC0054CA92 /* some-it.json */,
9FA3BC4E1E318BED0054CA92 /* file-de.json */,
9F989F421E2B34E700A19F67 /* Info.plist */,
9F1677FC1E51DE270022F3F8 /* Strings.strings */,
9FCD8EA21E52A9D800B5909C /* Other.strings */,
);
name = "Supporting Files";
sourceTree = "<group>";
Expand Down Expand Up @@ -195,7 +227,7 @@
9F93455A1E291D4E00C400F7 /* PBXTargetDependency */,
);
name = LocalizeTests;
productName = "LocalizeTests";
productName = LocalizeTests;
productReference = 9F9345531E291D4E00C400F7 /* LocalizeTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
Expand Down Expand Up @@ -226,6 +258,7 @@
hasScannedForEncodings = 0;
knownRegions = (
en,
es,
);
mainGroup = 69F1B56A1D955990000A2B87;
productRefGroup = 69F1B5751D955990000A2B87 /* Products */;
Expand All @@ -244,11 +277,14 @@
buildActionMask = 2147483647;
files = (
9FA3BC4F1E318BED0054CA92 /* file-de.json in Resources */,
9FCD8EA71E53319900B5909C /* other-es.json in Resources */,
9F761AEC1E3063E400904B4B /* lang-en.json in Resources */,
9F93454A1E291A2700C400F7 /* Info.plist in Resources */,
9F4570221E3173A4008C37D1 /* lang-es.json in Resources */,
9F1677FA1E51DE270022F3F8 /* Strings.strings in Resources */,
9FA3BC4D1E318BDC0054CA92 /* some-it.json in Resources */,
9FA3BC4B1E318BCB0054CA92 /* other-en.json in Resources */,
9FCD8EA01E52A9D800B5909C /* Other.strings in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -267,24 +303,31 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
9F2FC5691E427AFD00C15610 /* LocalizeStrings.swift in Sources */,
9F262D911E525565002DD75A /* LocalizeCommonProtocol.swift in Sources */,
9F93453F1E29192300C400F7 /* LocalizeExtensions.swift in Sources */,
9F9345401E29192300C400F7 /* LocalizeUIElements.swift in Sources */,
9F2FC5671E42793B00C15610 /* LocalizeJson.swift in Sources */,
9F9345411E29192300C400F7 /* Localize.swift in Sources */,
9F9345421E29192300C400F7 /* LocalizeString.swift in Sources */,
9F761AD71E305B9B00904B4B /* LocalizeStatic.swift in Sources */,
9F93453E1E29192300C400F7 /* Languages.swift in Sources */,
9F2FC5651E4275A300C15610 /* LocalizeProtocol.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
9F93454F1E291D4E00C400F7 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
9F1678011E51F33E0022F3F8 /* StringBaseTestInSpanish.swift in Sources */,
9F989F4C1E2B3B8200A19F67 /* BaseTest.swift in Sources */,
9FCD8EA51E52AD3E00B5909C /* StringsChanginDefaultFileName.swift in Sources */,
9F989F4D1E2B3B8300A19F67 /* OtherLangTest.swift in Sources */,
9FA3BC511E318C080054CA92 /* ReadingOtherFiles.swift in Sources */,
9F19DFC71E4D2B1D00F953E6 /* StringBaseTest.swift in Sources */,
9FA3BC491E3174980054CA92 /* BaseTestInSpanish.swift in Sources */,
9F4570201E31738F008C37D1 /* DefaultKeys.swift in Sources */,
9FCD8EA91E53327D00B5909C /* JsonChanginFileName.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -298,11 +341,33 @@
};
/* End PBXTargetDependency section */

/* Begin PBXVariantGroup section */
9F1677FC1E51DE270022F3F8 /* Strings.strings */ = {
isa = PBXVariantGroup;
children = (
9F1677FB1E51DE270022F3F8 /* en */,
9F1677FD1E51DE320022F3F8 /* es */,
);
name = Strings.strings;
sourceTree = "<group>";
};
9FCD8EA21E52A9D800B5909C /* Other.strings */ = {
isa = PBXVariantGroup;
children = (
9FCD8EA11E52A9D800B5909C /* en */,
9FCD8EA31E52A9D900B5909C /* es */,
);
name = Other.strings;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */

/* Begin XCBuildConfiguration section */
69F1B5861D955990000A2B87 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
Expand Down Expand Up @@ -357,6 +422,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "0"
version = "2.0">
</Bucket>
Loading

0 comments on commit b541a06

Please sign in to comment.