Skip to content

Commit

Permalink
adding first version that support localize storyBoard
Browse files Browse the repository at this point in the history
  • Loading branch information
LapStore committed Jan 6, 2019
1 parent e1cd7fa commit db3c164
Show file tree
Hide file tree
Showing 35 changed files with 1,331 additions and 26 deletions.
119 changes: 117 additions & 2 deletions LanguageChange.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@
objects = {

/* Begin PBXBuildFile section */
D3F86207C3C88362D69E4666 /* Pods_LanguageChange.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BD54821B31041C61103FFA4C /* Pods_LanguageChange.framework */; };
E52A293121E0192B0034167C /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E52A293021E0192B0034167C /* AppDelegate.swift */; };
E52A293321E0192B0034167C /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E52A293221E0192B0034167C /* ViewController.swift */; };
E52A293621E0192B0034167C /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E52A293421E0192B0034167C /* Main.storyboard */; };
E52A293821E0192D0034167C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = E52A293721E0192D0034167C /* Assets.xcassets */; };
E52A293B21E0192D0034167C /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = E52A293921E0192D0034167C /* LaunchScreen.storyboard */; };
E52A294621E0192D0034167C /* LanguageChangeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E52A294521E0192D0034167C /* LanguageChangeTests.swift */; };
E52A295121E0192D0034167C /* LanguageChangeUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E52A295021E0192D0034167C /* LanguageChangeUITests.swift */; };
E52A296121E01F8E0034167C /* MoLocalization.swift in Sources */ = {isa = PBXBuildFile; fileRef = E52A295F21E01F8E0034167C /* MoLocalization.swift */; };
E52A296221E01F8E0034167C /* ExtensionUIView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E52A296021E01F8E0034167C /* ExtensionUIView.swift */; };
E5F95B2621E13AFB00A2154F /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = E5F95B2821E13AFB00A2154F /* Localizable.strings */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand All @@ -34,6 +38,9 @@
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
25776B0E4917E2C23DB5368C /* Pods-LanguageChange.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LanguageChange.debug.xcconfig"; path = "Target Support Files/Pods-LanguageChange/Pods-LanguageChange.debug.xcconfig"; sourceTree = "<group>"; };
322B5B79CA91F5533FCA6C58 /* Pods-LanguageChange.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LanguageChange.release.xcconfig"; path = "Target Support Files/Pods-LanguageChange/Pods-LanguageChange.release.xcconfig"; sourceTree = "<group>"; };
BD54821B31041C61103FFA4C /* Pods_LanguageChange.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_LanguageChange.framework; sourceTree = BUILT_PRODUCTS_DIR; };
E52A292D21E0192A0034167C /* LanguageChange.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LanguageChange.app; sourceTree = BUILT_PRODUCTS_DIR; };
E52A293021E0192B0034167C /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
E52A293221E0192B0034167C /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
Expand All @@ -47,13 +54,20 @@
E52A294C21E0192D0034167C /* LanguageChangeUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LanguageChangeUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
E52A295021E0192D0034167C /* LanguageChangeUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LanguageChangeUITests.swift; sourceTree = "<group>"; };
E52A295221E0192D0034167C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
E52A295F21E01F8E0034167C /* MoLocalization.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MoLocalization.swift; sourceTree = "<group>"; };
E52A296021E01F8E0034167C /* ExtensionUIView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExtensionUIView.swift; sourceTree = "<group>"; };
E5F95B2421E13AEA00A2154F /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/Main.strings; sourceTree = "<group>"; };
E5F95B2521E13AEB00A2154F /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/LaunchScreen.strings; sourceTree = "<group>"; };
E5F95B2721E13AFB00A2154F /* ar */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ar; path = ar.lproj/Localizable.strings; sourceTree = "<group>"; };
E5F95B2921E13AFD00A2154F /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
E52A292A21E0192A0034167C /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
D3F86207C3C88362D69E4666 /* Pods_LanguageChange.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -74,13 +88,32 @@
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
950A44D43E21F54FE99032E2 /* Frameworks */ = {
isa = PBXGroup;
children = (
BD54821B31041C61103FFA4C /* Pods_LanguageChange.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
D745CD082EDBBB5BF153B5D2 /* Pods */ = {
isa = PBXGroup;
children = (
25776B0E4917E2C23DB5368C /* Pods-LanguageChange.debug.xcconfig */,
322B5B79CA91F5533FCA6C58 /* Pods-LanguageChange.release.xcconfig */,
);
path = Pods;
sourceTree = "<group>";
};
E52A292421E0192A0034167C = {
isa = PBXGroup;
children = (
E52A292F21E0192B0034167C /* LanguageChange */,
E52A294421E0192D0034167C /* LanguageChangeTests */,
E52A294F21E0192D0034167C /* LanguageChangeUITests */,
E52A292E21E0192A0034167C /* Products */,
D745CD082EDBBB5BF153B5D2 /* Pods */,
950A44D43E21F54FE99032E2 /* Frameworks */,
);
sourceTree = "<group>";
};
Expand All @@ -97,6 +130,8 @@
E52A292F21E0192B0034167C /* LanguageChange */ = {
isa = PBXGroup;
children = (
E5F95B2121E13A4600A2154F /* Resources */,
E52A295E21E01A520034167C /* Localization */,
E52A293021E0192B0034167C /* AppDelegate.swift */,
E52A293221E0192B0034167C /* ViewController.swift */,
E52A293421E0192B0034167C /* Main.storyboard */,
Expand Down Expand Up @@ -125,16 +160,36 @@
path = LanguageChangeUITests;
sourceTree = "<group>";
};
E52A295E21E01A520034167C /* Localization */ = {
isa = PBXGroup;
children = (
E52A296021E01F8E0034167C /* ExtensionUIView.swift */,
E52A295F21E01F8E0034167C /* MoLocalization.swift */,
);
name = Localization;
path = Language;
sourceTree = "<group>";
};
E5F95B2121E13A4600A2154F /* Resources */ = {
isa = PBXGroup;
children = (
E5F95B2821E13AFB00A2154F /* Localizable.strings */,
);
path = Resources;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
E52A292C21E0192A0034167C /* LanguageChange */ = {
isa = PBXNativeTarget;
buildConfigurationList = E52A295521E0192D0034167C /* Build configuration list for PBXNativeTarget "LanguageChange" */;
buildPhases = (
94268497D057C3F162D3F570 /* [CP] Check Pods Manifest.lock */,
E52A292921E0192A0034167C /* Sources */,
E52A292A21E0192A0034167C /* Frameworks */,
E52A292B21E0192A0034167C /* Resources */,
E52A296321E020610034167C /* ShellScript */,
);
buildRules = (
);
Expand Down Expand Up @@ -230,6 +285,7 @@
buildActionMask = 2147483647;
files = (
E52A293B21E0192D0034167C /* LaunchScreen.storyboard in Resources */,
E5F95B2621E13AFB00A2154F /* Localizable.strings in Resources */,
E52A293821E0192D0034167C /* Assets.xcassets in Resources */,
E52A293621E0192B0034167C /* Main.storyboard in Resources */,
);
Expand All @@ -251,12 +307,56 @@
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
94268497D057C3F162D3F570 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-LanguageChange-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
E52A296321E020610034167C /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/SwiftLint/swiftlint\"\n";
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
E52A292921E0192A0034167C /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
E52A296121E01F8E0034167C /* MoLocalization.swift in Sources */,
E52A293321E0192B0034167C /* ViewController.swift in Sources */,
E52A296221E01F8E0034167C /* ExtensionUIView.swift in Sources */,
E52A293121E0192B0034167C /* AppDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -297,6 +397,7 @@
isa = PBXVariantGroup;
children = (
E52A293521E0192B0034167C /* Base */,
E5F95B2421E13AEA00A2154F /* ar */,
);
name = Main.storyboard;
sourceTree = "<group>";
Expand All @@ -305,17 +406,28 @@
isa = PBXVariantGroup;
children = (
E52A293A21E0192D0034167C /* Base */,
E5F95B2521E13AEB00A2154F /* ar */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
};
E5F95B2821E13AFB00A2154F /* Localizable.strings */ = {
isa = PBXVariantGroup;
children = (
E5F95B2721E13AFB00A2154F /* ar */,
E5F95B2921E13AFD00A2154F /* en */,
);
name = Localizable.strings;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */

/* Begin XCBuildConfiguration section */
E52A295321E0192D0034167C /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
Expand Down Expand Up @@ -377,6 +489,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
Expand Down Expand Up @@ -430,6 +543,7 @@
};
E52A295621E0192D0034167C /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 25776B0E4917E2C23DB5368C /* Pods-LanguageChange.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
Expand All @@ -439,7 +553,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = shaat.LanguageChange;
PRODUCT_BUNDLE_IDENTIFIER = shaat.languageChange;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
Expand All @@ -448,6 +562,7 @@
};
E52A295721E0192D0034167C /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 322B5B79CA91F5533FCA6C58 /* Pods-LanguageChange.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
Expand All @@ -457,7 +572,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = shaat.LanguageChange;
PRODUCT_BUNDLE_IDENTIFIER = shaat.languageChange;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
TARGETED_DEVICE_FAMILY = "1,2";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@
<dict>
<key>SchemeUserState</key>
<dict>
<key>LanguageChange.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>2</integer>
</dict>
<key>LanguageChange.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
<integer>2</integer>
</dict>
</dict>
</dict>
Expand Down
10 changes: 10 additions & 0 deletions LanguageChange.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?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>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
21 changes: 7 additions & 14 deletions LanguageChange/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// AppDelegate.swift
// LanguageChange
//
// Created by LapStore on 1/5/19.
// Copyright © 2019 shaat. All rights reserved.
// Created by MOHAMED MAHMOUD on 1/5/19.
// Copyright © 2019 MOHAMED MAHMOUD. All rights reserved.
//

import UIKit
Expand All @@ -12,35 +12,28 @@ import UIKit
class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?


func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}

func applicationWillResignActive(_ application: UIApplication) {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.

}

func applicationDidEnterBackground(_ application: UIApplication) {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.

}

func applicationWillEnterForeground(_ application: UIApplication) {
// Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.

}

func applicationDidBecomeActive(_ application: UIApplication) {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.

}

func applicationWillTerminate(_ application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.

}


}

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"info" : {
"author" : "xcode",
"version" : "1"
},
"images" : [
{
"idiom" : "universal",
"scale" : "1x",
"filename" : "ic_more_arrow_1.png"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "[email protected]"
},
{
"idiom" : "universal",
"scale" : "3x",
"filename" : "[email protected]"
}
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit db3c164

Please sign in to comment.