├── .gitignore ├── Example OSX ├── Example OSX.xcodeproj │ └── project.pbxproj └── Source │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Base.lproj │ └── Main.storyboard │ ├── Info.plist │ ├── Localizable.strings │ └── ViewController.swift ├── Example iOS ├── Example iOS.xcodeproj │ └── project.pbxproj └── Source │ ├── AppDelegate.swift │ ├── Base.lproj │ ├── LaunchScreen.xib │ └── Main.storyboard │ ├── Images.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── Info.plist │ ├── Localizable.strings │ └── ViewController.swift ├── LICENSE ├── Polyglot.xcworkspace ├── contents.xcworkspacedata └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── Polyglot ├── Polyglot.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata └── Source │ ├── Info.plist │ ├── NSButton+Polyglot.swift │ ├── NSComboBox+Polyglot.swift │ ├── NSFormCell+Polyglot.swift │ ├── NSMenu+Polyglot.swift │ ├── NSMenuItem+Polyglot.swift │ ├── NSSegmentedControl+Polyglot.swift │ ├── NSTabViewItem+Polyglot.swift │ ├── NSTableColumn+Polyglot.swift │ ├── NSTextField+Polyglot.swift │ ├── NSTextFieldCell+Polyglot.swift │ ├── NSViewController+Polyglot.swift │ ├── Polyglot.swift │ ├── UIBarItem+Polyglot.swift │ ├── UIButton+Polyglot.swift │ ├── UILabel+Polyglot.swift │ ├── UINavigationItem+Polyglot.swift │ ├── UISearchBar+Polyglot.swift │ ├── UISegmentedControl+Polyglot.swift │ ├── UITextField+Polyglot.swift │ └── UITextView+Polyglot.swift ├── PolyglotLocalization.podspec └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Mac OS X 2 | .DS_Store 3 | 4 | # Xcode 5 | build/ 6 | *.pbxuser 7 | !default.pbxuser 8 | *.mode1v3 9 | !default.mode1v3 10 | *.mode2v3 11 | !default.mode2v3 12 | *.perspectivev3 13 | !default.perspectivev3 14 | xcuserdata 15 | *.xccheckout 16 | *.moved-aside 17 | DerivedData 18 | *.hmap 19 | *.ipa 20 | *.xcuserstate 21 | -------------------------------------------------------------------------------- /Example OSX/Example OSX.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 8861BEA01BAD5EF90067DECF /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8861BE9F1BAD5EF90067DECF /* AppDelegate.swift */; }; 11 | 8861BEA21BAD5EF90067DECF /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8861BEA11BAD5EF90067DECF /* ViewController.swift */; }; 12 | 8861BEA41BAD5EF90067DECF /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8861BEA31BAD5EF90067DECF /* Assets.xcassets */; }; 13 | 8861BEA71BAD5EF90067DECF /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8861BEA51BAD5EF90067DECF /* Main.storyboard */; }; 14 | 8861BEB31BAD64BE0067DECF /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 8861BEB21BAD64BE0067DECF /* Localizable.strings */; }; 15 | 88C9D3E51D9CAE130096EF1E /* Polyglot.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 88C9D3E41D9CAE130096EF1E /* Polyglot.framework */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXFileReference section */ 19 | 8861BE9C1BAD5EF90067DECF /* Polyglot Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Polyglot Example.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 20 | 8861BE9F1BAD5EF90067DECF /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 21 | 8861BEA11BAD5EF90067DECF /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 22 | 8861BEA31BAD5EF90067DECF /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 23 | 8861BEA61BAD5EF90067DECF /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 24 | 8861BEA81BAD5EF90067DECF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 25 | 8861BEB21BAD64BE0067DECF /* Localizable.strings */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; path = Localizable.strings; sourceTree = ""; }; 26 | 88C9D3E41D9CAE130096EF1E /* Polyglot.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Polyglot.framework; path = "../../../Library/Developer/Xcode/DerivedData/Polyglot-emifmlotymflpiaunmfguwudjbcl/Build/Products/Debug/Polyglot.framework"; sourceTree = ""; }; 27 | /* End PBXFileReference section */ 28 | 29 | /* Begin PBXFrameworksBuildPhase section */ 30 | 8861BE991BAD5EF90067DECF /* Frameworks */ = { 31 | isa = PBXFrameworksBuildPhase; 32 | buildActionMask = 2147483647; 33 | files = ( 34 | 88C9D3E51D9CAE130096EF1E /* Polyglot.framework in Frameworks */, 35 | ); 36 | runOnlyForDeploymentPostprocessing = 0; 37 | }; 38 | /* End PBXFrameworksBuildPhase section */ 39 | 40 | /* Begin PBXGroup section */ 41 | 8861BE931BAD5EF90067DECF = { 42 | isa = PBXGroup; 43 | children = ( 44 | 8861BE9E1BAD5EF90067DECF /* Source */, 45 | 8861BE9D1BAD5EF90067DECF /* Products */, 46 | 88C9D3E31D9CAE130096EF1E /* Frameworks */, 47 | ); 48 | sourceTree = ""; 49 | }; 50 | 8861BE9D1BAD5EF90067DECF /* Products */ = { 51 | isa = PBXGroup; 52 | children = ( 53 | 8861BE9C1BAD5EF90067DECF /* Polyglot Example.app */, 54 | ); 55 | name = Products; 56 | sourceTree = ""; 57 | }; 58 | 8861BE9E1BAD5EF90067DECF /* Source */ = { 59 | isa = PBXGroup; 60 | children = ( 61 | 8861BE9F1BAD5EF90067DECF /* AppDelegate.swift */, 62 | 8861BEA11BAD5EF90067DECF /* ViewController.swift */, 63 | 8861BEA31BAD5EF90067DECF /* Assets.xcassets */, 64 | 8861BEA51BAD5EF90067DECF /* Main.storyboard */, 65 | 8861BEA81BAD5EF90067DECF /* Info.plist */, 66 | 8861BEB21BAD64BE0067DECF /* Localizable.strings */, 67 | ); 68 | path = Source; 69 | sourceTree = ""; 70 | }; 71 | 88C9D3E31D9CAE130096EF1E /* Frameworks */ = { 72 | isa = PBXGroup; 73 | children = ( 74 | 88C9D3E41D9CAE130096EF1E /* Polyglot.framework */, 75 | ); 76 | name = Frameworks; 77 | sourceTree = ""; 78 | }; 79 | /* End PBXGroup section */ 80 | 81 | /* Begin PBXNativeTarget section */ 82 | 8861BE9B1BAD5EF90067DECF /* Example OSX */ = { 83 | isa = PBXNativeTarget; 84 | buildConfigurationList = 8861BEAB1BAD5EF90067DECF /* Build configuration list for PBXNativeTarget "Example OSX" */; 85 | buildPhases = ( 86 | 8861BE981BAD5EF90067DECF /* Sources */, 87 | 8861BE991BAD5EF90067DECF /* Frameworks */, 88 | 8861BE9A1BAD5EF90067DECF /* Resources */, 89 | ); 90 | buildRules = ( 91 | ); 92 | dependencies = ( 93 | ); 94 | name = "Example OSX"; 95 | productName = "Example OSX"; 96 | productReference = 8861BE9C1BAD5EF90067DECF /* Polyglot Example.app */; 97 | productType = "com.apple.product-type.application"; 98 | }; 99 | /* End PBXNativeTarget section */ 100 | 101 | /* Begin PBXProject section */ 102 | 8861BE941BAD5EF90067DECF /* Project object */ = { 103 | isa = PBXProject; 104 | attributes = { 105 | LastSwiftUpdateCheck = 0700; 106 | LastUpgradeCheck = 1020; 107 | ORGANIZATIONNAME = "NEGU Soft"; 108 | TargetAttributes = { 109 | 8861BE9B1BAD5EF90067DECF = { 110 | CreatedOnToolsVersion = 7.0; 111 | LastSwiftMigration = 1020; 112 | }; 113 | }; 114 | }; 115 | buildConfigurationList = 8861BE971BAD5EF90067DECF /* Build configuration list for PBXProject "Example OSX" */; 116 | compatibilityVersion = "Xcode 3.2"; 117 | developmentRegion = en; 118 | hasScannedForEncodings = 0; 119 | knownRegions = ( 120 | en, 121 | Base, 122 | ); 123 | mainGroup = 8861BE931BAD5EF90067DECF; 124 | productRefGroup = 8861BE9D1BAD5EF90067DECF /* Products */; 125 | projectDirPath = ""; 126 | projectRoot = ""; 127 | targets = ( 128 | 8861BE9B1BAD5EF90067DECF /* Example OSX */, 129 | ); 130 | }; 131 | /* End PBXProject section */ 132 | 133 | /* Begin PBXResourcesBuildPhase section */ 134 | 8861BE9A1BAD5EF90067DECF /* Resources */ = { 135 | isa = PBXResourcesBuildPhase; 136 | buildActionMask = 2147483647; 137 | files = ( 138 | 8861BEA41BAD5EF90067DECF /* Assets.xcassets in Resources */, 139 | 8861BEB31BAD64BE0067DECF /* Localizable.strings in Resources */, 140 | 8861BEA71BAD5EF90067DECF /* Main.storyboard in Resources */, 141 | ); 142 | runOnlyForDeploymentPostprocessing = 0; 143 | }; 144 | /* End PBXResourcesBuildPhase section */ 145 | 146 | /* Begin PBXSourcesBuildPhase section */ 147 | 8861BE981BAD5EF90067DECF /* Sources */ = { 148 | isa = PBXSourcesBuildPhase; 149 | buildActionMask = 2147483647; 150 | files = ( 151 | 8861BEA21BAD5EF90067DECF /* ViewController.swift in Sources */, 152 | 8861BEA01BAD5EF90067DECF /* AppDelegate.swift in Sources */, 153 | ); 154 | runOnlyForDeploymentPostprocessing = 0; 155 | }; 156 | /* End PBXSourcesBuildPhase section */ 157 | 158 | /* Begin PBXVariantGroup section */ 159 | 8861BEA51BAD5EF90067DECF /* Main.storyboard */ = { 160 | isa = PBXVariantGroup; 161 | children = ( 162 | 8861BEA61BAD5EF90067DECF /* Base */, 163 | ); 164 | name = Main.storyboard; 165 | sourceTree = ""; 166 | }; 167 | /* End PBXVariantGroup section */ 168 | 169 | /* Begin XCBuildConfiguration section */ 170 | 8861BEA91BAD5EF90067DECF /* Debug */ = { 171 | isa = XCBuildConfiguration; 172 | buildSettings = { 173 | ALWAYS_SEARCH_USER_PATHS = NO; 174 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 175 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 176 | CLANG_CXX_LIBRARY = "libc++"; 177 | CLANG_ENABLE_MODULES = YES; 178 | CLANG_ENABLE_OBJC_ARC = YES; 179 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 180 | CLANG_WARN_BOOL_CONVERSION = YES; 181 | CLANG_WARN_COMMA = YES; 182 | CLANG_WARN_CONSTANT_CONVERSION = YES; 183 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 184 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 185 | CLANG_WARN_EMPTY_BODY = YES; 186 | CLANG_WARN_ENUM_CONVERSION = YES; 187 | CLANG_WARN_INFINITE_RECURSION = YES; 188 | CLANG_WARN_INT_CONVERSION = YES; 189 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 190 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 191 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 192 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 193 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 194 | CLANG_WARN_STRICT_PROTOTYPES = YES; 195 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 196 | CLANG_WARN_UNREACHABLE_CODE = YES; 197 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 198 | CODE_SIGN_IDENTITY = "-"; 199 | COPY_PHASE_STRIP = NO; 200 | DEBUG_INFORMATION_FORMAT = dwarf; 201 | ENABLE_STRICT_OBJC_MSGSEND = YES; 202 | ENABLE_TESTABILITY = YES; 203 | GCC_C_LANGUAGE_STANDARD = gnu99; 204 | GCC_DYNAMIC_NO_PIC = NO; 205 | GCC_NO_COMMON_BLOCKS = YES; 206 | GCC_OPTIMIZATION_LEVEL = 0; 207 | GCC_PREPROCESSOR_DEFINITIONS = ( 208 | "DEBUG=1", 209 | "$(inherited)", 210 | ); 211 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 212 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 213 | GCC_WARN_UNDECLARED_SELECTOR = YES; 214 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 215 | GCC_WARN_UNUSED_FUNCTION = YES; 216 | GCC_WARN_UNUSED_VARIABLE = YES; 217 | MACOSX_DEPLOYMENT_TARGET = 10.10; 218 | MTL_ENABLE_DEBUG_INFO = YES; 219 | ONLY_ACTIVE_ARCH = YES; 220 | SDKROOT = macosx; 221 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 222 | }; 223 | name = Debug; 224 | }; 225 | 8861BEAA1BAD5EF90067DECF /* Release */ = { 226 | isa = XCBuildConfiguration; 227 | buildSettings = { 228 | ALWAYS_SEARCH_USER_PATHS = NO; 229 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 230 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 231 | CLANG_CXX_LIBRARY = "libc++"; 232 | CLANG_ENABLE_MODULES = YES; 233 | CLANG_ENABLE_OBJC_ARC = YES; 234 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 235 | CLANG_WARN_BOOL_CONVERSION = YES; 236 | CLANG_WARN_COMMA = YES; 237 | CLANG_WARN_CONSTANT_CONVERSION = YES; 238 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 239 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 240 | CLANG_WARN_EMPTY_BODY = YES; 241 | CLANG_WARN_ENUM_CONVERSION = YES; 242 | CLANG_WARN_INFINITE_RECURSION = YES; 243 | CLANG_WARN_INT_CONVERSION = YES; 244 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 245 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 246 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 247 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 248 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 249 | CLANG_WARN_STRICT_PROTOTYPES = YES; 250 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 251 | CLANG_WARN_UNREACHABLE_CODE = YES; 252 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 253 | CODE_SIGN_IDENTITY = "-"; 254 | COPY_PHASE_STRIP = NO; 255 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 256 | ENABLE_NS_ASSERTIONS = NO; 257 | ENABLE_STRICT_OBJC_MSGSEND = YES; 258 | GCC_C_LANGUAGE_STANDARD = gnu99; 259 | GCC_NO_COMMON_BLOCKS = YES; 260 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 261 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 262 | GCC_WARN_UNDECLARED_SELECTOR = YES; 263 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 264 | GCC_WARN_UNUSED_FUNCTION = YES; 265 | GCC_WARN_UNUSED_VARIABLE = YES; 266 | MACOSX_DEPLOYMENT_TARGET = 10.10; 267 | MTL_ENABLE_DEBUG_INFO = NO; 268 | SDKROOT = macosx; 269 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 270 | }; 271 | name = Release; 272 | }; 273 | 8861BEAC1BAD5EF90067DECF /* Debug */ = { 274 | isa = XCBuildConfiguration; 275 | buildSettings = { 276 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 277 | COMBINE_HIDPI_IMAGES = YES; 278 | INFOPLIST_FILE = Source/Info.plist; 279 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 280 | PRODUCT_BUNDLE_IDENTIFIER = "com.negusoft.Polyglot-OSX"; 281 | PRODUCT_NAME = "Polyglot Example"; 282 | SWIFT_VERSION = 5.0; 283 | }; 284 | name = Debug; 285 | }; 286 | 8861BEAD1BAD5EF90067DECF /* Release */ = { 287 | isa = XCBuildConfiguration; 288 | buildSettings = { 289 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 290 | COMBINE_HIDPI_IMAGES = YES; 291 | INFOPLIST_FILE = Source/Info.plist; 292 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 293 | PRODUCT_BUNDLE_IDENTIFIER = "com.negusoft.Polyglot-OSX"; 294 | PRODUCT_NAME = "Polyglot Example"; 295 | SWIFT_VERSION = 5.0; 296 | }; 297 | name = Release; 298 | }; 299 | /* End XCBuildConfiguration section */ 300 | 301 | /* Begin XCConfigurationList section */ 302 | 8861BE971BAD5EF90067DECF /* Build configuration list for PBXProject "Example OSX" */ = { 303 | isa = XCConfigurationList; 304 | buildConfigurations = ( 305 | 8861BEA91BAD5EF90067DECF /* Debug */, 306 | 8861BEAA1BAD5EF90067DECF /* Release */, 307 | ); 308 | defaultConfigurationIsVisible = 0; 309 | defaultConfigurationName = Release; 310 | }; 311 | 8861BEAB1BAD5EF90067DECF /* Build configuration list for PBXNativeTarget "Example OSX" */ = { 312 | isa = XCConfigurationList; 313 | buildConfigurations = ( 314 | 8861BEAC1BAD5EF90067DECF /* Debug */, 315 | 8861BEAD1BAD5EF90067DECF /* Release */, 316 | ); 317 | defaultConfigurationIsVisible = 0; 318 | defaultConfigurationName = Release; 319 | }; 320 | /* End XCConfigurationList section */ 321 | }; 322 | rootObject = 8861BE941BAD5EF90067DECF /* Project object */; 323 | } 324 | -------------------------------------------------------------------------------- /Example OSX/Source/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Example OSX 4 | // 5 | // Created by borja lopez urkidi on 19/09/15. 6 | // Copyright © 2015 NEGU Soft. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | 15 | 16 | func applicationDidFinishLaunching(_ aNotification: Notification) { 17 | // Insert code here to initialize your application 18 | } 19 | 20 | func applicationWillTerminate(_ aNotification: Notification) { 21 | // Insert code here to tear down your application 22 | } 23 | 24 | 25 | } 26 | 27 | -------------------------------------------------------------------------------- /Example OSX/Source/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "mac", 5 | "size" : "16x16", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "mac", 10 | "size" : "16x16", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "mac", 15 | "size" : "32x32", 16 | "scale" : "1x" 17 | }, 18 | { 19 | "idiom" : "mac", 20 | "size" : "32x32", 21 | "scale" : "2x" 22 | }, 23 | { 24 | "idiom" : "mac", 25 | "size" : "128x128", 26 | "scale" : "1x" 27 | }, 28 | { 29 | "idiom" : "mac", 30 | "size" : "128x128", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "idiom" : "mac", 35 | "size" : "256x256", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "mac", 40 | "size" : "256x256", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "mac", 45 | "size" : "512x512", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "mac", 50 | "size" : "512x512", 51 | "scale" : "2x" 52 | } 53 | ], 54 | "info" : { 55 | "version" : 1, 56 | "author" : "xcode" 57 | } 58 | } -------------------------------------------------------------------------------- /Example OSX/Source/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | NSAllRomanInputSourcesLocaleIdentifier 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 294 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 334 | 344 | 354 | 364 | 374 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | Item 1 437 | Item 2 438 | Item 3 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 |
460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | 510 | 511 | 512 | 513 | 514 | 515 | 516 | 517 | 518 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | 537 | 538 | 539 | 540 | 541 | 542 | 543 | 544 | 545 | 546 | 547 | 548 | 549 | 550 | 551 | 552 | 553 | 554 | 555 | 556 | 557 | 558 | 559 | 560 | 561 | 562 | 563 | 564 | 565 | 566 | 567 | 568 | 569 | 570 | 571 | 572 | 573 | 574 | 575 | 576 | 577 | 578 | 579 | 580 | 581 | 582 | 583 | 584 | 585 | 586 | 587 | 588 | 589 | 590 | 591 | 592 | 593 | 597 | 601 | 602 | 603 | 604 | 605 | 606 |
607 | 608 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 616 | 617 |
618 | 619 | 620 | 621 |
622 | 623 |
624 | 625 |
626 |
627 |
628 | -------------------------------------------------------------------------------- /Example OSX/Source/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | Polyglot 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSMinimumSystemVersion 26 | $(MACOSX_DEPLOYMENT_TARGET) 27 | NSHumanReadableCopyright 28 | Copyright © 2015 NEGU Soft. All rights reserved. 29 | NSMainStoryboardFile 30 | Main 31 | NSPrincipalClass 32 | NSApplication 33 | 34 | 35 | -------------------------------------------------------------------------------- /Example OSX/Source/Localizable.strings: -------------------------------------------------------------------------------- 1 | "viewcontroller_textfields_title" = "TextFields"; 2 | "viewcontroller_buttons_title" = "Buttons"; 3 | "viewcontroller_misc_title" = "Miscellaneous"; 4 | 5 | "textfield_label_title" = "Hello world"; 6 | "textfield_editable_placeholder" = "Placeholder editable"; 7 | "textfield_search_placeholder" = "Placeholder search"; 8 | "textfield_token_placeholder" = "Placeholder token"; 9 | "textfield_secure_placeholder" = "Placeholder secure"; 10 | "textfield_numberformatter_placeholder" = "Placeholder number formatter"; 11 | "textfield_multiline_title" = "Hello multiline"; 12 | "textfield_wrapping_placeholder" = "Placeholder wrapping"; 13 | 14 | "buttons_push_title" = "Push Button"; 15 | "buttons_textured_rounded_title" = "Textured Rounded"; 16 | "buttons_popup_title" = "Pop up"; 17 | "buttons_check_title" = "Check"; 18 | "buttons_radio_title" = "Radio"; 19 | "buttons_roundrect_title" = "Round Rect"; 20 | "buttons_recessed_title" = "Recessed"; 21 | "buttons_inline_title" = "Inline"; 22 | "buttons_image_title" = "Image"; 23 | 24 | "combobox_item_1" = "Item One"; 25 | "combobox_item_2" = "Item Two"; 26 | "combobox_item_3" = "Item Three"; 27 | 28 | "segmented_control_item_1" = "One"; 29 | "segmented_control_item_2" = "Two"; 30 | "segmented_control_item_3" = "Three"; 31 | 32 | "form_field_title_1" = "Field A"; 33 | "form_field_title_2" = "Field B"; 34 | "form_field_title_3" = "Field C"; 35 | "form_field_placeholder_1" = "Placeholder A"; 36 | "form_field_placeholder_2" = "Placeholder B"; 37 | "form_field_placeholder_3" = "Placeholder C"; 38 | 39 | "table_column_title_1" = "Column 1"; 40 | "table_column_title_2" = "Column 2"; 41 | 42 | "menu_item_about" = "About Polyglot"; 43 | "menu_submenu" = "Submenu"; 44 | "menu_item_submenu" = "Submenu item"; 45 | "menu_item_quit" = "Quit Polyglot"; 46 | "menu_help" = "Help"; 47 | "menu_item_help" = "Polyglot Help"; -------------------------------------------------------------------------------- /Example OSX/Source/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // Example OSX 4 | // 5 | // Created by borja lopez urkidi on 19/09/15. 6 | // Copyright © 2015 NEGU Soft. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class ViewController: NSViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | 16 | // Do any additional setup after loading the view. 17 | } 18 | 19 | } 20 | 21 | -------------------------------------------------------------------------------- /Example iOS/Example iOS.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 22F496A21BA3110600EE5EBA /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22F496A11BA3110600EE5EBA /* AppDelegate.swift */; }; 11 | 22F496A41BA3110600EE5EBA /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22F496A31BA3110600EE5EBA /* ViewController.swift */; }; 12 | 22F496A71BA3110600EE5EBA /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 22F496A51BA3110600EE5EBA /* Main.storyboard */; }; 13 | 22F496A91BA3110600EE5EBA /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 22F496A81BA3110600EE5EBA /* Images.xcassets */; }; 14 | 22F496AC1BA3110600EE5EBA /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 22F496AA1BA3110600EE5EBA /* LaunchScreen.xib */; }; 15 | 22F496C81BA3235D00EE5EBA /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 22F496C71BA3235D00EE5EBA /* Localizable.strings */; }; 16 | 88C9D3E21D9CAC780096EF1E /* Polyglot.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 88C9D3E11D9CAC780096EF1E /* Polyglot.framework */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXFileReference section */ 20 | 22F4969C1BA3110600EE5EBA /* Example iOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Example iOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 21 | 22F496A01BA3110600EE5EBA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 22 | 22F496A11BA3110600EE5EBA /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 23 | 22F496A31BA3110600EE5EBA /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 24 | 22F496A61BA3110600EE5EBA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 25 | 22F496A81BA3110600EE5EBA /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 26 | 22F496AB1BA3110600EE5EBA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 27 | 22F496C71BA3235D00EE5EBA /* Localizable.strings */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; path = Localizable.strings; sourceTree = ""; }; 28 | 88C9D3E11D9CAC780096EF1E /* Polyglot.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Polyglot.framework; path = "../../../Library/Developer/Xcode/DerivedData/Polyglot-emifmlotymflpiaunmfguwudjbcl/Build/Products/Debug-iphonesimulator/Polyglot.framework"; sourceTree = ""; }; 29 | /* End PBXFileReference section */ 30 | 31 | /* Begin PBXFrameworksBuildPhase section */ 32 | 22F496991BA3110600EE5EBA /* Frameworks */ = { 33 | isa = PBXFrameworksBuildPhase; 34 | buildActionMask = 2147483647; 35 | files = ( 36 | 88C9D3E21D9CAC780096EF1E /* Polyglot.framework in Frameworks */, 37 | ); 38 | runOnlyForDeploymentPostprocessing = 0; 39 | }; 40 | /* End PBXFrameworksBuildPhase section */ 41 | 42 | /* Begin PBXGroup section */ 43 | 22F496931BA3110600EE5EBA = { 44 | isa = PBXGroup; 45 | children = ( 46 | 22F4969E1BA3110600EE5EBA /* Source */, 47 | 22F4969D1BA3110600EE5EBA /* Products */, 48 | 88C9D3E01D9CAC780096EF1E /* Frameworks */, 49 | ); 50 | sourceTree = ""; 51 | }; 52 | 22F4969D1BA3110600EE5EBA /* Products */ = { 53 | isa = PBXGroup; 54 | children = ( 55 | 22F4969C1BA3110600EE5EBA /* Example iOS.app */, 56 | ); 57 | name = Products; 58 | sourceTree = ""; 59 | }; 60 | 22F4969E1BA3110600EE5EBA /* Source */ = { 61 | isa = PBXGroup; 62 | children = ( 63 | 22F496A11BA3110600EE5EBA /* AppDelegate.swift */, 64 | 22F496A31BA3110600EE5EBA /* ViewController.swift */, 65 | 22F496A51BA3110600EE5EBA /* Main.storyboard */, 66 | 22F496A81BA3110600EE5EBA /* Images.xcassets */, 67 | 22F496AA1BA3110600EE5EBA /* LaunchScreen.xib */, 68 | 22F496C71BA3235D00EE5EBA /* Localizable.strings */, 69 | 22F4969F1BA3110600EE5EBA /* Supporting Files */, 70 | ); 71 | path = Source; 72 | sourceTree = ""; 73 | }; 74 | 22F4969F1BA3110600EE5EBA /* Supporting Files */ = { 75 | isa = PBXGroup; 76 | children = ( 77 | 22F496A01BA3110600EE5EBA /* Info.plist */, 78 | ); 79 | name = "Supporting Files"; 80 | sourceTree = ""; 81 | }; 82 | 88C9D3E01D9CAC780096EF1E /* Frameworks */ = { 83 | isa = PBXGroup; 84 | children = ( 85 | 88C9D3E11D9CAC780096EF1E /* Polyglot.framework */, 86 | ); 87 | name = Frameworks; 88 | sourceTree = ""; 89 | }; 90 | /* End PBXGroup section */ 91 | 92 | /* Begin PBXNativeTarget section */ 93 | 22F4969B1BA3110600EE5EBA /* Example iOS */ = { 94 | isa = PBXNativeTarget; 95 | buildConfigurationList = 22F496BB1BA3110600EE5EBA /* Build configuration list for PBXNativeTarget "Example iOS" */; 96 | buildPhases = ( 97 | 22F496981BA3110600EE5EBA /* Sources */, 98 | 22F496991BA3110600EE5EBA /* Frameworks */, 99 | 22F4969A1BA3110600EE5EBA /* Resources */, 100 | ); 101 | buildRules = ( 102 | ); 103 | dependencies = ( 104 | ); 105 | name = "Example iOS"; 106 | productName = "Polyglot Example iOS"; 107 | productReference = 22F4969C1BA3110600EE5EBA /* Example iOS.app */; 108 | productType = "com.apple.product-type.application"; 109 | }; 110 | /* End PBXNativeTarget section */ 111 | 112 | /* Begin PBXProject section */ 113 | 22F496941BA3110600EE5EBA /* Project object */ = { 114 | isa = PBXProject; 115 | attributes = { 116 | LastSwiftUpdateCheck = 0700; 117 | LastUpgradeCheck = 1020; 118 | ORGANIZATIONNAME = "NEGU Soft"; 119 | TargetAttributes = { 120 | 22F4969B1BA3110600EE5EBA = { 121 | CreatedOnToolsVersion = 6.4; 122 | LastSwiftMigration = 1020; 123 | }; 124 | }; 125 | }; 126 | buildConfigurationList = 22F496971BA3110600EE5EBA /* Build configuration list for PBXProject "Example iOS" */; 127 | compatibilityVersion = "Xcode 3.2"; 128 | developmentRegion = en; 129 | hasScannedForEncodings = 0; 130 | knownRegions = ( 131 | en, 132 | Base, 133 | ); 134 | mainGroup = 22F496931BA3110600EE5EBA; 135 | productRefGroup = 22F4969D1BA3110600EE5EBA /* Products */; 136 | projectDirPath = ""; 137 | projectRoot = ""; 138 | targets = ( 139 | 22F4969B1BA3110600EE5EBA /* Example iOS */, 140 | ); 141 | }; 142 | /* End PBXProject section */ 143 | 144 | /* Begin PBXResourcesBuildPhase section */ 145 | 22F4969A1BA3110600EE5EBA /* Resources */ = { 146 | isa = PBXResourcesBuildPhase; 147 | buildActionMask = 2147483647; 148 | files = ( 149 | 22F496A71BA3110600EE5EBA /* Main.storyboard in Resources */, 150 | 22F496C81BA3235D00EE5EBA /* Localizable.strings in Resources */, 151 | 22F496AC1BA3110600EE5EBA /* LaunchScreen.xib in Resources */, 152 | 22F496A91BA3110600EE5EBA /* Images.xcassets in Resources */, 153 | ); 154 | runOnlyForDeploymentPostprocessing = 0; 155 | }; 156 | /* End PBXResourcesBuildPhase section */ 157 | 158 | /* Begin PBXSourcesBuildPhase section */ 159 | 22F496981BA3110600EE5EBA /* Sources */ = { 160 | isa = PBXSourcesBuildPhase; 161 | buildActionMask = 2147483647; 162 | files = ( 163 | 22F496A41BA3110600EE5EBA /* ViewController.swift in Sources */, 164 | 22F496A21BA3110600EE5EBA /* AppDelegate.swift in Sources */, 165 | ); 166 | runOnlyForDeploymentPostprocessing = 0; 167 | }; 168 | /* End PBXSourcesBuildPhase section */ 169 | 170 | /* Begin PBXVariantGroup section */ 171 | 22F496A51BA3110600EE5EBA /* Main.storyboard */ = { 172 | isa = PBXVariantGroup; 173 | children = ( 174 | 22F496A61BA3110600EE5EBA /* Base */, 175 | ); 176 | name = Main.storyboard; 177 | sourceTree = ""; 178 | }; 179 | 22F496AA1BA3110600EE5EBA /* LaunchScreen.xib */ = { 180 | isa = PBXVariantGroup; 181 | children = ( 182 | 22F496AB1BA3110600EE5EBA /* Base */, 183 | ); 184 | name = LaunchScreen.xib; 185 | sourceTree = ""; 186 | }; 187 | /* End PBXVariantGroup section */ 188 | 189 | /* Begin XCBuildConfiguration section */ 190 | 22F496B91BA3110600EE5EBA /* Debug */ = { 191 | isa = XCBuildConfiguration; 192 | buildSettings = { 193 | ALWAYS_SEARCH_USER_PATHS = NO; 194 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 195 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 196 | CLANG_CXX_LIBRARY = "libc++"; 197 | CLANG_ENABLE_MODULES = YES; 198 | CLANG_ENABLE_OBJC_ARC = YES; 199 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 200 | CLANG_WARN_BOOL_CONVERSION = YES; 201 | CLANG_WARN_COMMA = YES; 202 | CLANG_WARN_CONSTANT_CONVERSION = YES; 203 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 204 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 205 | CLANG_WARN_EMPTY_BODY = YES; 206 | CLANG_WARN_ENUM_CONVERSION = YES; 207 | CLANG_WARN_INFINITE_RECURSION = YES; 208 | CLANG_WARN_INT_CONVERSION = YES; 209 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 210 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 211 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 212 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 213 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 214 | CLANG_WARN_STRICT_PROTOTYPES = YES; 215 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 216 | CLANG_WARN_UNREACHABLE_CODE = YES; 217 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 218 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 219 | COPY_PHASE_STRIP = NO; 220 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 221 | ENABLE_STRICT_OBJC_MSGSEND = YES; 222 | ENABLE_TESTABILITY = YES; 223 | GCC_C_LANGUAGE_STANDARD = gnu99; 224 | GCC_DYNAMIC_NO_PIC = NO; 225 | GCC_NO_COMMON_BLOCKS = YES; 226 | GCC_OPTIMIZATION_LEVEL = 0; 227 | GCC_PREPROCESSOR_DEFINITIONS = ( 228 | "DEBUG=1", 229 | "$(inherited)", 230 | ); 231 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 232 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 233 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 234 | GCC_WARN_UNDECLARED_SELECTOR = YES; 235 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 236 | GCC_WARN_UNUSED_FUNCTION = YES; 237 | GCC_WARN_UNUSED_VARIABLE = YES; 238 | IPHONEOS_DEPLOYMENT_TARGET = 8.4; 239 | MTL_ENABLE_DEBUG_INFO = YES; 240 | ONLY_ACTIVE_ARCH = YES; 241 | SDKROOT = iphoneos; 242 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 243 | TARGETED_DEVICE_FAMILY = "1,2"; 244 | }; 245 | name = Debug; 246 | }; 247 | 22F496BA1BA3110600EE5EBA /* Release */ = { 248 | isa = XCBuildConfiguration; 249 | buildSettings = { 250 | ALWAYS_SEARCH_USER_PATHS = NO; 251 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 252 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 253 | CLANG_CXX_LIBRARY = "libc++"; 254 | CLANG_ENABLE_MODULES = YES; 255 | CLANG_ENABLE_OBJC_ARC = YES; 256 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 257 | CLANG_WARN_BOOL_CONVERSION = YES; 258 | CLANG_WARN_COMMA = YES; 259 | CLANG_WARN_CONSTANT_CONVERSION = YES; 260 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 261 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 262 | CLANG_WARN_EMPTY_BODY = YES; 263 | CLANG_WARN_ENUM_CONVERSION = YES; 264 | CLANG_WARN_INFINITE_RECURSION = YES; 265 | CLANG_WARN_INT_CONVERSION = YES; 266 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 267 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 268 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 269 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 270 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 271 | CLANG_WARN_STRICT_PROTOTYPES = YES; 272 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 273 | CLANG_WARN_UNREACHABLE_CODE = YES; 274 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 275 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 276 | COPY_PHASE_STRIP = NO; 277 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 278 | ENABLE_NS_ASSERTIONS = NO; 279 | ENABLE_STRICT_OBJC_MSGSEND = YES; 280 | GCC_C_LANGUAGE_STANDARD = gnu99; 281 | GCC_NO_COMMON_BLOCKS = YES; 282 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 283 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 284 | GCC_WARN_UNDECLARED_SELECTOR = YES; 285 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 286 | GCC_WARN_UNUSED_FUNCTION = YES; 287 | GCC_WARN_UNUSED_VARIABLE = YES; 288 | IPHONEOS_DEPLOYMENT_TARGET = 8.4; 289 | MTL_ENABLE_DEBUG_INFO = NO; 290 | SDKROOT = iphoneos; 291 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 292 | TARGETED_DEVICE_FAMILY = "1,2"; 293 | VALIDATE_PRODUCT = YES; 294 | }; 295 | name = Release; 296 | }; 297 | 22F496BC1BA3110600EE5EBA /* Debug */ = { 298 | isa = XCBuildConfiguration; 299 | buildSettings = { 300 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 301 | FRAMEWORK_SEARCH_PATHS = "$(inherited)"; 302 | INFOPLIST_FILE = Source/Info.plist; 303 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 304 | PRODUCT_BUNDLE_IDENTIFIER = "com.negusoft.Polyglot-iOS"; 305 | PRODUCT_NAME = "Example iOS"; 306 | SWIFT_VERSION = 5.0; 307 | }; 308 | name = Debug; 309 | }; 310 | 22F496BD1BA3110600EE5EBA /* Release */ = { 311 | isa = XCBuildConfiguration; 312 | buildSettings = { 313 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 314 | FRAMEWORK_SEARCH_PATHS = "$(inherited)"; 315 | INFOPLIST_FILE = Source/Info.plist; 316 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 317 | PRODUCT_BUNDLE_IDENTIFIER = "com.negusoft.Polyglot-iOS"; 318 | PRODUCT_NAME = "Example iOS"; 319 | SWIFT_VERSION = 5.0; 320 | }; 321 | name = Release; 322 | }; 323 | /* End XCBuildConfiguration section */ 324 | 325 | /* Begin XCConfigurationList section */ 326 | 22F496971BA3110600EE5EBA /* Build configuration list for PBXProject "Example iOS" */ = { 327 | isa = XCConfigurationList; 328 | buildConfigurations = ( 329 | 22F496B91BA3110600EE5EBA /* Debug */, 330 | 22F496BA1BA3110600EE5EBA /* Release */, 331 | ); 332 | defaultConfigurationIsVisible = 0; 333 | defaultConfigurationName = Release; 334 | }; 335 | 22F496BB1BA3110600EE5EBA /* Build configuration list for PBXNativeTarget "Example iOS" */ = { 336 | isa = XCConfigurationList; 337 | buildConfigurations = ( 338 | 22F496BC1BA3110600EE5EBA /* Debug */, 339 | 22F496BD1BA3110600EE5EBA /* Release */, 340 | ); 341 | defaultConfigurationIsVisible = 0; 342 | defaultConfigurationName = Release; 343 | }; 344 | /* End XCConfigurationList section */ 345 | }; 346 | rootObject = 22F496941BA3110600EE5EBA /* Project object */; 347 | } 348 | -------------------------------------------------------------------------------- /Example iOS/Source/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2015 NEGU Soft 3 | // 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy 5 | // of this software and associated documentation files (the "Software"), to deal 6 | // in the Software without restriction, including without limitation the rights 7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | // copies of the Software, and to permit persons to whom the Software is 9 | // furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | // THE SOFTWARE. 21 | 22 | import UIKit 23 | import Polyglot 24 | 25 | @UIApplicationMain 26 | class AppDelegate: UIResponder, UIApplicationDelegate { 27 | 28 | var window: UIWindow? 29 | 30 | 31 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 32 | // Override point for customization after application launch. 33 | return true 34 | } 35 | 36 | func applicationWillResignActive(_ application: UIApplication) { 37 | // 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. 38 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 39 | } 40 | 41 | func applicationDidEnterBackground(_ application: UIApplication) { 42 | // 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. 43 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 44 | } 45 | 46 | func applicationWillEnterForeground(_ application: UIApplication) { 47 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 48 | } 49 | 50 | func applicationDidBecomeActive(_ application: UIApplication) { 51 | // 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. 52 | } 53 | 54 | func applicationWillTerminate(_ application: UIApplication) { 55 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 56 | } 57 | 58 | 59 | } 60 | 61 | -------------------------------------------------------------------------------- /Example iOS/Source/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 21 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Example iOS/Source/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 149 | 150 | 151 | 152 | 153 | 154 | Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda. 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | -------------------------------------------------------------------------------- /Example iOS/Source/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /Example iOS/Source/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | Polyglot 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UIRequiredDeviceCapabilities 32 | 33 | armv7 34 | 35 | UISupportedInterfaceOrientations 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationLandscapeLeft 39 | UIInterfaceOrientationLandscapeRight 40 | 41 | UISupportedInterfaceOrientations~ipad 42 | 43 | UIInterfaceOrientationPortrait 44 | UIInterfaceOrientationPortraitUpsideDown 45 | UIInterfaceOrientationLandscapeLeft 46 | UIInterfaceOrientationLandscapeRight 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /Example iOS/Source/Localizable.strings: -------------------------------------------------------------------------------- 1 | "example_label_text" = "Hello UILabel"; 2 | "example_button_text" = "Hello UIButton"; 3 | "example_textfield_placeholder" = "Hello UITextField"; 4 | "example_textview_text" = "Hello Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."; 5 | 6 | "barbuttonitem_title" = "Hello BarButtonItem"; 7 | 8 | "example_segment_one" = "One"; 9 | "example_segment_two" = "Two"; 10 | "example_segment_three" = "Three"; 11 | 12 | "tab_one" = "One"; 13 | "tab_two" = "Two"; 14 | 15 | "navigation_title" = "Title"; 16 | "navigation_prompt" = "Prompt"; 17 | "navigation_back" = "Back"; 18 | 19 | "searchbar_navigation_placeholder" = "Search Title"; 20 | "searchbar_content_placeholder" = "Search content"; 21 | "searchbar_content_prompt" = "Search field:"; 22 | -------------------------------------------------------------------------------- /Example iOS/Source/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2015 NEGU Soft 3 | // 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy 5 | // of this software and associated documentation files (the "Software"), to deal 6 | // in the Software without restriction, including without limitation the rights 7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | // copies of the Software, and to permit persons to whom the Software is 9 | // furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | // THE SOFTWARE. 21 | 22 | import UIKit 23 | 24 | class ViewController: UIViewController { 25 | 26 | override func viewDidLoad() { 27 | super.viewDidLoad() 28 | // Do any additional setup after loading the view, typically from a nib. 29 | } 30 | 31 | override func didReceiveMemoryWarning() { 32 | super.didReceiveMemoryWarning() 33 | // Dispose of any resources that can be recreated. 34 | } 35 | 36 | 37 | } 38 | 39 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 NEGU Soft 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /Polyglot.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /Polyglot.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Polyglot/Polyglot.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 2237DC371BB9773B005BB873 /* NSTextFieldCell+Polyglot.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2237DC361BB9773B005BB873 /* NSTextFieldCell+Polyglot.swift */; }; 11 | 2237DC391BB97A66005BB873 /* NSMenu+Polyglot.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2237DC381BB97A66005BB873 /* NSMenu+Polyglot.swift */; }; 12 | 2237DC3B1BB98218005BB873 /* NSMenuItem+Polyglot.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2237DC3A1BB98218005BB873 /* NSMenuItem+Polyglot.swift */; }; 13 | 224D58EB1BAC36B80040B007 /* UISearchBar+Polyglot.swift in Sources */ = {isa = PBXBuildFile; fileRef = 224D58EA1BAC36B80040B007 /* UISearchBar+Polyglot.swift */; }; 14 | 225FD6941BA98D86006AAF6F /* UITextView+Polyglot.swift in Sources */ = {isa = PBXBuildFile; fileRef = 225FD6931BA98D86006AAF6F /* UITextView+Polyglot.swift */; }; 15 | 22E71C361BA80657000B39D3 /* UIButton+Polyglot.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22E71C351BA80657000B39D3 /* UIButton+Polyglot.swift */; }; 16 | 22E71C381BA8082E000B39D3 /* UISegmentedControl+Polyglot.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22E71C371BA8082E000B39D3 /* UISegmentedControl+Polyglot.swift */; }; 17 | 22E71C3A1BA815AF000B39D3 /* UITextField+Polyglot.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22E71C391BA815AF000B39D3 /* UITextField+Polyglot.swift */; }; 18 | 22E990441BAAF9E40084D941 /* UIBarItem+Polyglot.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22E990431BAAF9E40084D941 /* UIBarItem+Polyglot.swift */; }; 19 | 22E990461BAB13820084D941 /* UINavigationItem+Polyglot.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22E990451BAB13820084D941 /* UINavigationItem+Polyglot.swift */; }; 20 | 22F496C41BA3195A00EE5EBA /* UILabel+Polyglot.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22F496C31BA3195A00EE5EBA /* UILabel+Polyglot.swift */; }; 21 | 49D53F791ED71FAB00C99548 /* (null) in Sources */ = {isa = PBXBuildFile; }; 22 | 880EDB8E1F7E2C4000C29559 /* Polyglot.swift in Sources */ = {isa = PBXBuildFile; fileRef = 880EDB8D1F7E2C4000C29559 /* Polyglot.swift */; }; 23 | 880EDB8F1F7E2C4000C29559 /* Polyglot.swift in Sources */ = {isa = PBXBuildFile; fileRef = 880EDB8D1F7E2C4000C29559 /* Polyglot.swift */; }; 24 | 88490D591BAEDCF500469D4B /* NSViewController+Polyglot.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88490D581BAEDCF500469D4B /* NSViewController+Polyglot.swift */; }; 25 | 88490D5D1BAEE20E00469D4B /* NSButton+Polyglot.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88490D5C1BAEE20E00469D4B /* NSButton+Polyglot.swift */; }; 26 | 8861BEAF1BAD63850067DECF /* NSTextField+Polyglot.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8861BEAE1BAD63850067DECF /* NSTextField+Polyglot.swift */; }; 27 | 88A4AD011BB48EC90030C15C /* NSTabViewItem+Polyglot.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88A4AD001BB48EC90030C15C /* NSTabViewItem+Polyglot.swift */; }; 28 | 88A4AD031BB490850030C15C /* NSComboBox+Polyglot.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88A4AD021BB490850030C15C /* NSComboBox+Polyglot.swift */; }; 29 | 88A4AD051BB699640030C15C /* NSSegmentedControl+Polyglot.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88A4AD041BB699640030C15C /* NSSegmentedControl+Polyglot.swift */; }; 30 | 88A4AD071BB6A14B0030C15C /* NSFormCell+Polyglot.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88A4AD061BB6A14B0030C15C /* NSFormCell+Polyglot.swift */; }; 31 | 88A4AD091BB6A7570030C15C /* NSTableColumn+Polyglot.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88A4AD081BB6A7570030C15C /* NSTableColumn+Polyglot.swift */; }; 32 | /* End PBXBuildFile section */ 33 | 34 | /* Begin PBXFileReference section */ 35 | 2237DC361BB9773B005BB873 /* NSTextFieldCell+Polyglot.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSTextFieldCell+Polyglot.swift"; sourceTree = ""; }; 36 | 2237DC381BB97A66005BB873 /* NSMenu+Polyglot.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSMenu+Polyglot.swift"; sourceTree = ""; }; 37 | 2237DC3A1BB98218005BB873 /* NSMenuItem+Polyglot.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSMenuItem+Polyglot.swift"; sourceTree = ""; }; 38 | 224D58EA1BAC36B80040B007 /* UISearchBar+Polyglot.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UISearchBar+Polyglot.swift"; sourceTree = ""; }; 39 | 225FD6931BA98D86006AAF6F /* UITextView+Polyglot.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UITextView+Polyglot.swift"; sourceTree = ""; }; 40 | 22C288761BA2D4590004AED4 /* Polyglot.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Polyglot.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 41 | 22E71C351BA80657000B39D3 /* UIButton+Polyglot.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIButton+Polyglot.swift"; sourceTree = ""; }; 42 | 22E71C371BA8082E000B39D3 /* UISegmentedControl+Polyglot.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UISegmentedControl+Polyglot.swift"; sourceTree = ""; }; 43 | 22E71C391BA815AF000B39D3 /* UITextField+Polyglot.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UITextField+Polyglot.swift"; sourceTree = ""; }; 44 | 22E990431BAAF9E40084D941 /* UIBarItem+Polyglot.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIBarItem+Polyglot.swift"; sourceTree = ""; }; 45 | 22E990451BAB13820084D941 /* UINavigationItem+Polyglot.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UINavigationItem+Polyglot.swift"; sourceTree = ""; }; 46 | 22F4968B1BA2DB0900EE5EBA /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = Source/Info.plist; sourceTree = SOURCE_ROOT; }; 47 | 22F496C31BA3195A00EE5EBA /* UILabel+Polyglot.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UILabel+Polyglot.swift"; sourceTree = ""; }; 48 | 880EDB8D1F7E2C4000C29559 /* Polyglot.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Polyglot.swift; sourceTree = ""; }; 49 | 88490D581BAEDCF500469D4B /* NSViewController+Polyglot.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSViewController+Polyglot.swift"; sourceTree = ""; }; 50 | 88490D5C1BAEE20E00469D4B /* NSButton+Polyglot.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSButton+Polyglot.swift"; sourceTree = ""; }; 51 | 8861BE7B1BAD5AF20067DECF /* Polyglot.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Polyglot.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 52 | 8861BEAE1BAD63850067DECF /* NSTextField+Polyglot.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSTextField+Polyglot.swift"; sourceTree = ""; }; 53 | 88A4AD001BB48EC90030C15C /* NSTabViewItem+Polyglot.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSTabViewItem+Polyglot.swift"; sourceTree = ""; }; 54 | 88A4AD021BB490850030C15C /* NSComboBox+Polyglot.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSComboBox+Polyglot.swift"; sourceTree = ""; }; 55 | 88A4AD041BB699640030C15C /* NSSegmentedControl+Polyglot.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSSegmentedControl+Polyglot.swift"; sourceTree = ""; }; 56 | 88A4AD061BB6A14B0030C15C /* NSFormCell+Polyglot.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSFormCell+Polyglot.swift"; sourceTree = ""; }; 57 | 88A4AD081BB6A7570030C15C /* NSTableColumn+Polyglot.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSTableColumn+Polyglot.swift"; sourceTree = ""; }; 58 | /* End PBXFileReference section */ 59 | 60 | /* Begin PBXFrameworksBuildPhase section */ 61 | 22C288721BA2D4590004AED4 /* Frameworks */ = { 62 | isa = PBXFrameworksBuildPhase; 63 | buildActionMask = 2147483647; 64 | files = ( 65 | ); 66 | runOnlyForDeploymentPostprocessing = 0; 67 | }; 68 | 8861BE771BAD5AF20067DECF /* Frameworks */ = { 69 | isa = PBXFrameworksBuildPhase; 70 | buildActionMask = 2147483647; 71 | files = ( 72 | ); 73 | runOnlyForDeploymentPostprocessing = 0; 74 | }; 75 | /* End PBXFrameworksBuildPhase section */ 76 | 77 | /* Begin PBXGroup section */ 78 | 22C288421BA2D01C0004AED4 = { 79 | isa = PBXGroup; 80 | children = ( 81 | 22C2884D1BA2D01C0004AED4 /* Source */, 82 | 22C2884C1BA2D01C0004AED4 /* Products */, 83 | ); 84 | sourceTree = ""; 85 | }; 86 | 22C2884C1BA2D01C0004AED4 /* Products */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | 22C288761BA2D4590004AED4 /* Polyglot.framework */, 90 | 8861BE7B1BAD5AF20067DECF /* Polyglot.framework */, 91 | ); 92 | name = Products; 93 | sourceTree = ""; 94 | }; 95 | 22C2884D1BA2D01C0004AED4 /* Source */ = { 96 | isa = PBXGroup; 97 | children = ( 98 | 880EDB8D1F7E2C4000C29559 /* Polyglot.swift */, 99 | 22F496C31BA3195A00EE5EBA /* UILabel+Polyglot.swift */, 100 | 22E71C351BA80657000B39D3 /* UIButton+Polyglot.swift */, 101 | 22E71C371BA8082E000B39D3 /* UISegmentedControl+Polyglot.swift */, 102 | 22E71C391BA815AF000B39D3 /* UITextField+Polyglot.swift */, 103 | 225FD6931BA98D86006AAF6F /* UITextView+Polyglot.swift */, 104 | 22E990431BAAF9E40084D941 /* UIBarItem+Polyglot.swift */, 105 | 22E990451BAB13820084D941 /* UINavigationItem+Polyglot.swift */, 106 | 224D58EA1BAC36B80040B007 /* UISearchBar+Polyglot.swift */, 107 | 8861BEAE1BAD63850067DECF /* NSTextField+Polyglot.swift */, 108 | 2237DC361BB9773B005BB873 /* NSTextFieldCell+Polyglot.swift */, 109 | 88490D581BAEDCF500469D4B /* NSViewController+Polyglot.swift */, 110 | 88490D5C1BAEE20E00469D4B /* NSButton+Polyglot.swift */, 111 | 88A4AD001BB48EC90030C15C /* NSTabViewItem+Polyglot.swift */, 112 | 88A4AD021BB490850030C15C /* NSComboBox+Polyglot.swift */, 113 | 88A4AD041BB699640030C15C /* NSSegmentedControl+Polyglot.swift */, 114 | 88A4AD061BB6A14B0030C15C /* NSFormCell+Polyglot.swift */, 115 | 88A4AD081BB6A7570030C15C /* NSTableColumn+Polyglot.swift */, 116 | 2237DC381BB97A66005BB873 /* NSMenu+Polyglot.swift */, 117 | 2237DC3A1BB98218005BB873 /* NSMenuItem+Polyglot.swift */, 118 | 22C2884E1BA2D01C0004AED4 /* Supporting Files */, 119 | ); 120 | path = Source; 121 | sourceTree = ""; 122 | }; 123 | 22C2884E1BA2D01C0004AED4 /* Supporting Files */ = { 124 | isa = PBXGroup; 125 | children = ( 126 | 22F4968B1BA2DB0900EE5EBA /* Info.plist */, 127 | ); 128 | name = "Supporting Files"; 129 | sourceTree = ""; 130 | }; 131 | /* End PBXGroup section */ 132 | 133 | /* Begin PBXHeadersBuildPhase section */ 134 | 22C288731BA2D4590004AED4 /* Headers */ = { 135 | isa = PBXHeadersBuildPhase; 136 | buildActionMask = 2147483647; 137 | files = ( 138 | ); 139 | runOnlyForDeploymentPostprocessing = 0; 140 | }; 141 | 8861BE781BAD5AF20067DECF /* Headers */ = { 142 | isa = PBXHeadersBuildPhase; 143 | buildActionMask = 2147483647; 144 | files = ( 145 | ); 146 | runOnlyForDeploymentPostprocessing = 0; 147 | }; 148 | /* End PBXHeadersBuildPhase section */ 149 | 150 | /* Begin PBXNativeTarget section */ 151 | 22C288751BA2D4590004AED4 /* Polyglot iOS */ = { 152 | isa = PBXNativeTarget; 153 | buildConfigurationList = 22C288891BA2D4590004AED4 /* Build configuration list for PBXNativeTarget "Polyglot iOS" */; 154 | buildPhases = ( 155 | 22C288711BA2D4590004AED4 /* Sources */, 156 | 22C288721BA2D4590004AED4 /* Frameworks */, 157 | 22C288731BA2D4590004AED4 /* Headers */, 158 | 22C288741BA2D4590004AED4 /* Resources */, 159 | ); 160 | buildRules = ( 161 | ); 162 | dependencies = ( 163 | ); 164 | name = "Polyglot iOS"; 165 | productName = "Polyglot iOS"; 166 | productReference = 22C288761BA2D4590004AED4 /* Polyglot.framework */; 167 | productType = "com.apple.product-type.framework"; 168 | }; 169 | 8861BE7A1BAD5AF20067DECF /* Polyglot OSX */ = { 170 | isa = PBXNativeTarget; 171 | buildConfigurationList = 8861BE901BAD5AF20067DECF /* Build configuration list for PBXNativeTarget "Polyglot OSX" */; 172 | buildPhases = ( 173 | 8861BE761BAD5AF20067DECF /* Sources */, 174 | 8861BE771BAD5AF20067DECF /* Frameworks */, 175 | 8861BE781BAD5AF20067DECF /* Headers */, 176 | 8861BE791BAD5AF20067DECF /* Resources */, 177 | ); 178 | buildRules = ( 179 | ); 180 | dependencies = ( 181 | ); 182 | name = "Polyglot OSX"; 183 | productName = "Polyglot OSX"; 184 | productReference = 8861BE7B1BAD5AF20067DECF /* Polyglot.framework */; 185 | productType = "com.apple.product-type.framework"; 186 | }; 187 | /* End PBXNativeTarget section */ 188 | 189 | /* Begin PBXProject section */ 190 | 22C288431BA2D01C0004AED4 /* Project object */ = { 191 | isa = PBXProject; 192 | attributes = { 193 | LastSwiftUpdateCheck = 0700; 194 | LastUpgradeCheck = 1020; 195 | ORGANIZATIONNAME = "NEGU Soft"; 196 | TargetAttributes = { 197 | 22C288751BA2D4590004AED4 = { 198 | CreatedOnToolsVersion = 6.4; 199 | DevelopmentTeam = 7J7VFMUW63; 200 | LastSwiftMigration = 0900; 201 | }; 202 | 8861BE7A1BAD5AF20067DECF = { 203 | CreatedOnToolsVersion = 7.0; 204 | LastSwiftMigration = 0900; 205 | }; 206 | }; 207 | }; 208 | buildConfigurationList = 22C288461BA2D01C0004AED4 /* Build configuration list for PBXProject "Polyglot" */; 209 | compatibilityVersion = "Xcode 3.2"; 210 | developmentRegion = en; 211 | hasScannedForEncodings = 0; 212 | knownRegions = ( 213 | en, 214 | Base, 215 | ); 216 | mainGroup = 22C288421BA2D01C0004AED4; 217 | productRefGroup = 22C2884C1BA2D01C0004AED4 /* Products */; 218 | projectDirPath = ""; 219 | projectRoot = ""; 220 | targets = ( 221 | 22C288751BA2D4590004AED4 /* Polyglot iOS */, 222 | 8861BE7A1BAD5AF20067DECF /* Polyglot OSX */, 223 | ); 224 | }; 225 | /* End PBXProject section */ 226 | 227 | /* Begin PBXResourcesBuildPhase section */ 228 | 22C288741BA2D4590004AED4 /* Resources */ = { 229 | isa = PBXResourcesBuildPhase; 230 | buildActionMask = 2147483647; 231 | files = ( 232 | ); 233 | runOnlyForDeploymentPostprocessing = 0; 234 | }; 235 | 8861BE791BAD5AF20067DECF /* Resources */ = { 236 | isa = PBXResourcesBuildPhase; 237 | buildActionMask = 2147483647; 238 | files = ( 239 | ); 240 | runOnlyForDeploymentPostprocessing = 0; 241 | }; 242 | /* End PBXResourcesBuildPhase section */ 243 | 244 | /* Begin PBXSourcesBuildPhase section */ 245 | 22C288711BA2D4590004AED4 /* Sources */ = { 246 | isa = PBXSourcesBuildPhase; 247 | buildActionMask = 2147483647; 248 | files = ( 249 | 880EDB8E1F7E2C4000C29559 /* Polyglot.swift in Sources */, 250 | 22F496C41BA3195A00EE5EBA /* UILabel+Polyglot.swift in Sources */, 251 | 49D53F791ED71FAB00C99548 /* (null) in Sources */, 252 | 22E990461BAB13820084D941 /* UINavigationItem+Polyglot.swift in Sources */, 253 | 22E71C3A1BA815AF000B39D3 /* UITextField+Polyglot.swift in Sources */, 254 | 224D58EB1BAC36B80040B007 /* UISearchBar+Polyglot.swift in Sources */, 255 | 22E990441BAAF9E40084D941 /* UIBarItem+Polyglot.swift in Sources */, 256 | 22E71C381BA8082E000B39D3 /* UISegmentedControl+Polyglot.swift in Sources */, 257 | 22E71C361BA80657000B39D3 /* UIButton+Polyglot.swift in Sources */, 258 | 225FD6941BA98D86006AAF6F /* UITextView+Polyglot.swift in Sources */, 259 | ); 260 | runOnlyForDeploymentPostprocessing = 0; 261 | }; 262 | 8861BE761BAD5AF20067DECF /* Sources */ = { 263 | isa = PBXSourcesBuildPhase; 264 | buildActionMask = 2147483647; 265 | files = ( 266 | 88A4AD071BB6A14B0030C15C /* NSFormCell+Polyglot.swift in Sources */, 267 | 2237DC391BB97A66005BB873 /* NSMenu+Polyglot.swift in Sources */, 268 | 88A4AD031BB490850030C15C /* NSComboBox+Polyglot.swift in Sources */, 269 | 880EDB8F1F7E2C4000C29559 /* Polyglot.swift in Sources */, 270 | 8861BEAF1BAD63850067DECF /* NSTextField+Polyglot.swift in Sources */, 271 | 88A4AD091BB6A7570030C15C /* NSTableColumn+Polyglot.swift in Sources */, 272 | 88490D591BAEDCF500469D4B /* NSViewController+Polyglot.swift in Sources */, 273 | 88A4AD051BB699640030C15C /* NSSegmentedControl+Polyglot.swift in Sources */, 274 | 88A4AD011BB48EC90030C15C /* NSTabViewItem+Polyglot.swift in Sources */, 275 | 88490D5D1BAEE20E00469D4B /* NSButton+Polyglot.swift in Sources */, 276 | 2237DC3B1BB98218005BB873 /* NSMenuItem+Polyglot.swift in Sources */, 277 | 2237DC371BB9773B005BB873 /* NSTextFieldCell+Polyglot.swift in Sources */, 278 | ); 279 | runOnlyForDeploymentPostprocessing = 0; 280 | }; 281 | /* End PBXSourcesBuildPhase section */ 282 | 283 | /* Begin XCBuildConfiguration section */ 284 | 22C288681BA2D01C0004AED4 /* Debug */ = { 285 | isa = XCBuildConfiguration; 286 | buildSettings = { 287 | ALWAYS_SEARCH_USER_PATHS = NO; 288 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 289 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 290 | CLANG_CXX_LIBRARY = "libc++"; 291 | CLANG_ENABLE_MODULES = YES; 292 | CLANG_ENABLE_OBJC_ARC = YES; 293 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 294 | CLANG_WARN_BOOL_CONVERSION = YES; 295 | CLANG_WARN_COMMA = YES; 296 | CLANG_WARN_CONSTANT_CONVERSION = YES; 297 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 298 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 299 | CLANG_WARN_EMPTY_BODY = YES; 300 | CLANG_WARN_ENUM_CONVERSION = YES; 301 | CLANG_WARN_INFINITE_RECURSION = YES; 302 | CLANG_WARN_INT_CONVERSION = YES; 303 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 304 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 305 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 306 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 307 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 308 | CLANG_WARN_STRICT_PROTOTYPES = YES; 309 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 310 | CLANG_WARN_UNREACHABLE_CODE = YES; 311 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 312 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 313 | COPY_PHASE_STRIP = NO; 314 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 315 | ENABLE_STRICT_OBJC_MSGSEND = YES; 316 | ENABLE_TESTABILITY = YES; 317 | GCC_C_LANGUAGE_STANDARD = gnu99; 318 | GCC_DYNAMIC_NO_PIC = NO; 319 | GCC_NO_COMMON_BLOCKS = YES; 320 | GCC_OPTIMIZATION_LEVEL = 0; 321 | GCC_PREPROCESSOR_DEFINITIONS = ( 322 | "DEBUG=1", 323 | "$(inherited)", 324 | ); 325 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 326 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 327 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 328 | GCC_WARN_UNDECLARED_SELECTOR = YES; 329 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 330 | GCC_WARN_UNUSED_FUNCTION = YES; 331 | GCC_WARN_UNUSED_VARIABLE = YES; 332 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 333 | MTL_ENABLE_DEBUG_INFO = YES; 334 | ONLY_ACTIVE_ARCH = YES; 335 | SDKROOT = iphoneos; 336 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 337 | SWIFT_VERSION = 5.0; 338 | TARGETED_DEVICE_FAMILY = "1,2"; 339 | }; 340 | name = Debug; 341 | }; 342 | 22C288691BA2D01C0004AED4 /* Release */ = { 343 | isa = XCBuildConfiguration; 344 | buildSettings = { 345 | ALWAYS_SEARCH_USER_PATHS = NO; 346 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 347 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 348 | CLANG_CXX_LIBRARY = "libc++"; 349 | CLANG_ENABLE_MODULES = YES; 350 | CLANG_ENABLE_OBJC_ARC = YES; 351 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 352 | CLANG_WARN_BOOL_CONVERSION = YES; 353 | CLANG_WARN_COMMA = YES; 354 | CLANG_WARN_CONSTANT_CONVERSION = YES; 355 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 356 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 357 | CLANG_WARN_EMPTY_BODY = YES; 358 | CLANG_WARN_ENUM_CONVERSION = YES; 359 | CLANG_WARN_INFINITE_RECURSION = YES; 360 | CLANG_WARN_INT_CONVERSION = YES; 361 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 362 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 363 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 364 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 365 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 366 | CLANG_WARN_STRICT_PROTOTYPES = YES; 367 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 368 | CLANG_WARN_UNREACHABLE_CODE = YES; 369 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 370 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 371 | COPY_PHASE_STRIP = NO; 372 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 373 | ENABLE_NS_ASSERTIONS = NO; 374 | ENABLE_STRICT_OBJC_MSGSEND = YES; 375 | GCC_C_LANGUAGE_STANDARD = gnu99; 376 | GCC_NO_COMMON_BLOCKS = YES; 377 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 378 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 379 | GCC_WARN_UNDECLARED_SELECTOR = YES; 380 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 381 | GCC_WARN_UNUSED_FUNCTION = YES; 382 | GCC_WARN_UNUSED_VARIABLE = YES; 383 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 384 | MTL_ENABLE_DEBUG_INFO = NO; 385 | SDKROOT = iphoneos; 386 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 387 | SWIFT_VERSION = 5.0; 388 | TARGETED_DEVICE_FAMILY = "1,2"; 389 | VALIDATE_PRODUCT = YES; 390 | }; 391 | name = Release; 392 | }; 393 | 22C2888A1BA2D4590004AED4 /* Debug */ = { 394 | isa = XCBuildConfiguration; 395 | buildSettings = { 396 | CLANG_ENABLE_MODULES = YES; 397 | CODE_SIGN_IDENTITY = "iPhone Developer"; 398 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 399 | CURRENT_PROJECT_VERSION = 1; 400 | DEFINES_MODULE = YES; 401 | DYLIB_COMPATIBILITY_VERSION = 1; 402 | DYLIB_CURRENT_VERSION = 1; 403 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 404 | GCC_PREPROCESSOR_DEFINITIONS = ( 405 | "DEBUG=1", 406 | "$(inherited)", 407 | ); 408 | INFOPLIST_FILE = Source/Info.plist; 409 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 410 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 411 | PRODUCT_BUNDLE_IDENTIFIER = "com.negusoft.$(PRODUCT_NAME:rfc1034identifier)"; 412 | PRODUCT_NAME = Polyglot; 413 | PROVISIONING_PROFILE = ""; 414 | SKIP_INSTALL = YES; 415 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 416 | VERSIONING_SYSTEM = "apple-generic"; 417 | VERSION_INFO_PREFIX = ""; 418 | }; 419 | name = Debug; 420 | }; 421 | 22C2888B1BA2D4590004AED4 /* Release */ = { 422 | isa = XCBuildConfiguration; 423 | buildSettings = { 424 | CLANG_ENABLE_MODULES = YES; 425 | CODE_SIGN_IDENTITY = "iPhone Developer"; 426 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 427 | CURRENT_PROJECT_VERSION = 1; 428 | DEFINES_MODULE = YES; 429 | DYLIB_COMPATIBILITY_VERSION = 1; 430 | DYLIB_CURRENT_VERSION = 1; 431 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 432 | INFOPLIST_FILE = Source/Info.plist; 433 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 434 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 435 | PRODUCT_BUNDLE_IDENTIFIER = "com.negusoft.$(PRODUCT_NAME:rfc1034identifier)"; 436 | PRODUCT_NAME = Polyglot; 437 | PROVISIONING_PROFILE = ""; 438 | SKIP_INSTALL = YES; 439 | VERSIONING_SYSTEM = "apple-generic"; 440 | VERSION_INFO_PREFIX = ""; 441 | }; 442 | name = Release; 443 | }; 444 | 8861BE8C1BAD5AF20067DECF /* Debug */ = { 445 | isa = XCBuildConfiguration; 446 | buildSettings = { 447 | CLANG_ENABLE_MODULES = YES; 448 | COMBINE_HIDPI_IMAGES = YES; 449 | CURRENT_PROJECT_VERSION = 1; 450 | DEBUG_INFORMATION_FORMAT = dwarf; 451 | DEFINES_MODULE = YES; 452 | DYLIB_COMPATIBILITY_VERSION = 1; 453 | DYLIB_CURRENT_VERSION = 1; 454 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 455 | ENABLE_TESTABILITY = YES; 456 | FRAMEWORK_VERSION = A; 457 | INFOPLIST_FILE = Source/Info.plist; 458 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 459 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; 460 | MACOSX_DEPLOYMENT_TARGET = 10.10; 461 | PRODUCT_BUNDLE_IDENTIFIER = com.negusoft.Polyglot; 462 | PRODUCT_NAME = Polyglot; 463 | SDKROOT = macosx; 464 | SKIP_INSTALL = YES; 465 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 466 | VERSIONING_SYSTEM = "apple-generic"; 467 | VERSION_INFO_PREFIX = ""; 468 | }; 469 | name = Debug; 470 | }; 471 | 8861BE8D1BAD5AF20067DECF /* Release */ = { 472 | isa = XCBuildConfiguration; 473 | buildSettings = { 474 | CLANG_ENABLE_MODULES = YES; 475 | COMBINE_HIDPI_IMAGES = YES; 476 | CURRENT_PROJECT_VERSION = 1; 477 | DEFINES_MODULE = YES; 478 | DYLIB_COMPATIBILITY_VERSION = 1; 479 | DYLIB_CURRENT_VERSION = 1; 480 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 481 | FRAMEWORK_VERSION = A; 482 | INFOPLIST_FILE = Source/Info.plist; 483 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 484 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; 485 | MACOSX_DEPLOYMENT_TARGET = 10.10; 486 | PRODUCT_BUNDLE_IDENTIFIER = com.negusoft.Polyglot; 487 | PRODUCT_NAME = Polyglot; 488 | SDKROOT = macosx; 489 | SKIP_INSTALL = YES; 490 | VERSIONING_SYSTEM = "apple-generic"; 491 | VERSION_INFO_PREFIX = ""; 492 | }; 493 | name = Release; 494 | }; 495 | /* End XCBuildConfiguration section */ 496 | 497 | /* Begin XCConfigurationList section */ 498 | 22C288461BA2D01C0004AED4 /* Build configuration list for PBXProject "Polyglot" */ = { 499 | isa = XCConfigurationList; 500 | buildConfigurations = ( 501 | 22C288681BA2D01C0004AED4 /* Debug */, 502 | 22C288691BA2D01C0004AED4 /* Release */, 503 | ); 504 | defaultConfigurationIsVisible = 0; 505 | defaultConfigurationName = Release; 506 | }; 507 | 22C288891BA2D4590004AED4 /* Build configuration list for PBXNativeTarget "Polyglot iOS" */ = { 508 | isa = XCConfigurationList; 509 | buildConfigurations = ( 510 | 22C2888A1BA2D4590004AED4 /* Debug */, 511 | 22C2888B1BA2D4590004AED4 /* Release */, 512 | ); 513 | defaultConfigurationIsVisible = 0; 514 | defaultConfigurationName = Release; 515 | }; 516 | 8861BE901BAD5AF20067DECF /* Build configuration list for PBXNativeTarget "Polyglot OSX" */ = { 517 | isa = XCConfigurationList; 518 | buildConfigurations = ( 519 | 8861BE8C1BAD5AF20067DECF /* Debug */, 520 | 8861BE8D1BAD5AF20067DECF /* Release */, 521 | ); 522 | defaultConfigurationIsVisible = 0; 523 | defaultConfigurationName = Release; 524 | }; 525 | /* End XCConfigurationList section */ 526 | }; 527 | rootObject = 22C288431BA2D01C0004AED4 /* Project object */; 528 | } 529 | -------------------------------------------------------------------------------- /Polyglot/Polyglot.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Polyglot/Source/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 0.8.1 19 | CFBundleSignature 20 | NEGU 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Polyglot/Source/NSButton+Polyglot.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2015 NEGU Soft 3 | // 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy 5 | // of this software and associated documentation files (the "Software"), to deal 6 | // in the Software without restriction, including without limitation the rights 7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | // copies of the Software, and to permit persons to whom the Software is 9 | // furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | // THE SOFTWARE. 21 | 22 | import AppKit 23 | 24 | @IBDesignable 25 | public extension NSButton { 26 | 27 | @IBInspectable 28 | var titleKey: String { 29 | get { return "" } 30 | set { 31 | self.title = Polyglot.localizedString(newValue) 32 | } 33 | } 34 | 35 | @IBInspectable 36 | var alternateTitleKey: String { 37 | get { return "" } 38 | set { 39 | self.alternateTitle = Polyglot.localizedString(newValue) 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Polyglot/Source/NSComboBox+Polyglot.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2015 NEGU Soft 3 | // 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy 5 | // of this software and associated documentation files (the "Software"), to deal 6 | // in the Software without restriction, including without limitation the rights 7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | // copies of the Software, and to permit persons to whom the Software is 9 | // furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | // THE SOFTWARE. 21 | 22 | import AppKit 23 | 24 | @IBDesignable 25 | public extension NSComboBox { 26 | 27 | /// Comma separated keys to set the corresponding items with the localized string. 28 | /// Note that each key is trimed to remove leading and trailing spaces. 29 | /// You may as well leave a key empty not to change that specific item. 30 | @IBInspectable 31 | var titleKeysCSV: String { 32 | get { return "" } 33 | set { 34 | let keys = newValue.components(separatedBy: CharacterSet(charactersIn: ",")) 35 | 36 | var items = [AnyObject]() 37 | for index in 0.. AnyObject { 48 | if index >= keys.count { 49 | return self.itemObjectValue(at: index) as AnyObject 50 | } 51 | 52 | let spaceCharacterSet = CharacterSet(charactersIn: " ") 53 | let key = keys[index].trimmingCharacters(in: spaceCharacterSet) 54 | let item = self.itemObjectValue(at: index) 55 | if key.isEmpty { 56 | return item as AnyObject 57 | } 58 | if item is String { 59 | return Polyglot.localizedString(key) as AnyObject 60 | } 61 | return item as AnyObject 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /Polyglot/Source/NSFormCell+Polyglot.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2015 NEGU Soft 3 | // 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy 5 | // of this software and associated documentation files (the "Software"), to deal 6 | // in the Software without restriction, including without limitation the rights 7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | // copies of the Software, and to permit persons to whom the Software is 9 | // furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | // THE SOFTWARE. 21 | 22 | import AppKit 23 | 24 | @IBDesignable 25 | public extension NSFormCell { 26 | 27 | @IBInspectable 28 | var titleKey: String { 29 | get { return "" } 30 | set { 31 | self.title = Polyglot.localizedString(newValue) 32 | } 33 | } 34 | 35 | @IBInspectable 36 | var stringValueKey: String { 37 | get { return "" } 38 | set { 39 | self.stringValue = Polyglot.localizedString(newValue) 40 | } 41 | } 42 | 43 | @IBInspectable 44 | var placeholderKey: String { 45 | get { return "" } 46 | set { 47 | self.placeholderString = Polyglot.localizedString(newValue) 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Polyglot/Source/NSMenu+Polyglot.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2015 NEGU Soft 3 | // 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy 5 | // of this software and associated documentation files (the "Software"), to deal 6 | // in the Software without restriction, including without limitation the rights 7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | // copies of the Software, and to permit persons to whom the Software is 9 | // furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | // THE SOFTWARE. 21 | 22 | import AppKit 23 | 24 | @IBDesignable 25 | public extension NSMenu { 26 | 27 | @IBInspectable 28 | var titleKey: String { 29 | get { return "" } 30 | set { 31 | self.title = Polyglot.localizedString(newValue) 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Polyglot/Source/NSMenuItem+Polyglot.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2015 NEGU Soft 3 | // 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy 5 | // of this software and associated documentation files (the "Software"), to deal 6 | // in the Software without restriction, including without limitation the rights 7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | // copies of the Software, and to permit persons to whom the Software is 9 | // furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | // THE SOFTWARE. 21 | 22 | import AppKit 23 | 24 | @IBDesignable 25 | public extension NSMenuItem { 26 | 27 | @IBInspectable 28 | var titleKey: String { 29 | get { return "" } 30 | set { 31 | self.title = Polyglot.localizedString(newValue) 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Polyglot/Source/NSSegmentedControl+Polyglot.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2015 NEGU Soft 3 | // 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy 5 | // of this software and associated documentation files (the "Software"), to deal 6 | // in the Software without restriction, including without limitation the rights 7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | // copies of the Software, and to permit persons to whom the Software is 9 | // furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | // THE SOFTWARE. 21 | 22 | import AppKit 23 | 24 | @IBDesignable 25 | public extension NSSegmentedControl { 26 | 27 | /// Comma separated keys to set the corresponding items with the localized string. 28 | /// Note that each key is trimed to remove leading and trailing spaces. 29 | /// You may as well leave a key empty not to change that specific item. 30 | @IBInspectable 31 | var labelKeysCSV: String { 32 | get { return "" } 33 | set { 34 | let keys = newValue.components(separatedBy: CharacterSet(charactersIn: ",")) 35 | let spaceCharacterSet = CharacterSet(charactersIn: " ") 36 | 37 | for index in 0..= keys.count { 39 | break 40 | } 41 | let key = keys[index].trimmingCharacters(in: spaceCharacterSet) 42 | if (!key.isEmpty) { 43 | let label = Polyglot.localizedString(key) 44 | self.setLabel(label, forSegment: index) 45 | } 46 | } 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /Polyglot/Source/NSTabViewItem+Polyglot.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2015 NEGU Soft 3 | // 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy 5 | // of this software and associated documentation files (the "Software"), to deal 6 | // in the Software without restriction, including without limitation the rights 7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | // copies of the Software, and to permit persons to whom the Software is 9 | // furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | // THE SOFTWARE. 21 | 22 | import AppKit 23 | 24 | @IBDesignable 25 | public extension NSTabViewItem { 26 | 27 | @IBInspectable 28 | var labelKey: String { 29 | get { return "" } 30 | set { 31 | self.label = Polyglot.localizedString(newValue) 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Polyglot/Source/NSTableColumn+Polyglot.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2015 NEGU Soft 3 | // 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy 5 | // of this software and associated documentation files (the "Software"), to deal 6 | // in the Software without restriction, including without limitation the rights 7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | // copies of the Software, and to permit persons to whom the Software is 9 | // furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | // THE SOFTWARE. 21 | 22 | import AppKit 23 | 24 | @IBDesignable 25 | public extension NSTableColumn { 26 | 27 | @IBInspectable 28 | var titleKey: String { 29 | get { return "" } 30 | set { 31 | self.title = Polyglot.localizedString(newValue) 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Polyglot/Source/NSTextField+Polyglot.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2015 NEGU Soft 3 | // 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy 5 | // of this software and associated documentation files (the "Software"), to deal 6 | // in the Software without restriction, including without limitation the rights 7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | // copies of the Software, and to permit persons to whom the Software is 9 | // furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | // THE SOFTWARE. 21 | 22 | import AppKit 23 | 24 | @IBDesignable 25 | public extension NSTextField { 26 | 27 | @IBInspectable 28 | var titleKey: String { 29 | get { return "" } 30 | set { 31 | self.stringValue = Polyglot.localizedString(newValue) 32 | } 33 | } 34 | 35 | @IBInspectable 36 | var placeholderKey: String { 37 | get { return "" } 38 | set { 39 | if #available(OSX 10.10, *) { 40 | self.placeholderString = Polyglot.localizedString(newValue) 41 | } else { 42 | if let cell = self.cell as? NSTextFieldCell { 43 | cell.placeholderString = Polyglot.localizedString(newValue) 44 | } 45 | } 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Polyglot/Source/NSTextFieldCell+Polyglot.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2015 NEGU Soft 3 | // 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy 5 | // of this software and associated documentation files (the "Software"), to deal 6 | // in the Software without restriction, including without limitation the rights 7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | // copies of the Software, and to permit persons to whom the Software is 9 | // furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | // THE SOFTWARE. 21 | 22 | import AppKit 23 | 24 | @IBDesignable 25 | public extension NSTextFieldCell { 26 | 27 | @IBInspectable 28 | var titleKey: String { 29 | get { return "" } 30 | set { 31 | self.stringValue = Polyglot.localizedString(newValue) 32 | } 33 | } 34 | 35 | @IBInspectable 36 | var placeholderKey: String { 37 | get { return "" } 38 | set { 39 | self.placeholderString = Polyglot.localizedString(newValue) 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Polyglot/Source/NSViewController+Polyglot.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2015 NEGU Soft 3 | // 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy 5 | // of this software and associated documentation files (the "Software"), to deal 6 | // in the Software without restriction, including without limitation the rights 7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | // copies of the Software, and to permit persons to whom the Software is 9 | // furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | // THE SOFTWARE. 21 | 22 | import AppKit 23 | 24 | @IBDesignable 25 | public extension NSViewController { 26 | 27 | @IBInspectable 28 | var titleKey: String { 29 | get { return "" } 30 | set { 31 | self.title = Polyglot.localizedString(newValue) 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Polyglot/Source/Polyglot.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2015 NEGU Soft 3 | // 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy 5 | // of this software and associated documentation files (the "Software"), to deal 6 | // in the Software without restriction, including without limitation the rights 7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | // copies of the Software, and to permit persons to whom the Software is 9 | // furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | // THE SOFTWARE. 21 | 22 | import Foundation 23 | 24 | /** Represents a class that can map localization keys to a strings. */ 25 | public protocol Localizer { 26 | func localizeString(_ key: String) -> String 27 | } 28 | 29 | /** Class to expose the Polyglot configuration. */ 30 | public class Polyglot { 31 | 32 | private static let tableNameDelimiters = (start: Character("["), end: "].") 33 | 34 | public static var localizer: Localizer = TabledLocalizer() 35 | 36 | static func localizedString(_ key: String) -> String { 37 | return localizer.localizeString(key) 38 | } 39 | } 40 | 41 | /** Default localizer. Parses the "[TABLE]KEY" to define the table and the translation key. */ 42 | public class TabledLocalizer : Localizer { 43 | 44 | public typealias LocalizeFunc = (String, String?) -> String 45 | 46 | private static let tableNameDelimiters = (start: Character("["), end: "].") 47 | public static var defaultLocalizer: LocalizeFunc { 48 | return { key, tableName in 49 | return NSLocalizedString(key, tableName: tableName, comment: key) 50 | } 51 | } 52 | 53 | private let localizeFunc: LocalizeFunc 54 | 55 | public init(_ localizeFunc: @escaping LocalizeFunc = defaultLocalizer) { 56 | self.localizeFunc = localizeFunc 57 | } 58 | 59 | public func localizeString(_ key: String) -> String { 60 | // If the key conforms to the "[TABLE]KEY" format -> use table based localization 61 | if let open = key.first, open == TabledLocalizer.tableNameDelimiters.start, let close = key.range(of: TabledLocalizer.tableNameDelimiters.end) { 62 | return localizeFunc( 63 | String(key[close.upperBound..= keys.count { 39 | break 40 | } 41 | let key = keys[index].trimmingCharacters(in: spaceCharacterSet) 42 | if (!key.isEmpty) { 43 | let title = Polyglot.localizedString(key) 44 | self.setTitle(title, forSegmentAt: index) 45 | } 46 | } 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /Polyglot/Source/UITextField+Polyglot.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2015 NEGU Soft 3 | // 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy 5 | // of this software and associated documentation files (the "Software"), to deal 6 | // in the Software without restriction, including without limitation the rights 7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | // copies of the Software, and to permit persons to whom the Software is 9 | // furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | // THE SOFTWARE. 21 | 22 | import UIKit 23 | 24 | @IBDesignable 25 | public extension UITextField { 26 | 27 | @IBInspectable 28 | var textKey: String { 29 | get { return "" } 30 | set { 31 | self.text = Polyglot.localizedString(newValue) 32 | } 33 | } 34 | 35 | @IBInspectable 36 | var placeholderKey: String { 37 | get { return "" } 38 | set { 39 | self.placeholder = Polyglot.localizedString(newValue) 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Polyglot/Source/UITextView+Polyglot.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2015 NEGU Soft 3 | // 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy 5 | // of this software and associated documentation files (the "Software"), to deal 6 | // in the Software without restriction, including without limitation the rights 7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | // copies of the Software, and to permit persons to whom the Software is 9 | // furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | // THE SOFTWARE. 21 | 22 | import UIKit 23 | 24 | @IBDesignable 25 | public extension UITextView { 26 | 27 | @IBInspectable 28 | var textKey: String { 29 | get { return "" } 30 | set { 31 | self.text = Polyglot.localizedString(newValue) 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /PolyglotLocalization.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = 'PolyglotLocalization' 3 | s.version = '0.8.1' 4 | s.license = 'MIT' 5 | s.summary = 'Localize straight from the Storyboard/XIB' 6 | s.homepage = 'https://github.com/negusoft/polyglot' 7 | s.social_media_url = 'http://twitter.com/negusoft' 8 | s.authors = { 'Borja Lopez Urkidi' => 'blurkidi@negusoft.com' } 9 | s.source = { :git => 'https://github.com/negusoft/polyglot.git', :tag => s.version } 10 | s.swift_version = '5.0' 11 | 12 | s.ios.deployment_target = '8.0' 13 | s.osx.deployment_target = '10.9' 14 | 15 | s.source_files = 'Polyglot/Source/Polyglot.swift' 16 | s.ios.source_files = 'Polyglot/Source/UI*.swift' 17 | s.osx.source_files = 'Polyglot/Source/NS*.swift' 18 | 19 | s.requires_arc = true 20 | end 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | **Polyglot** allows localizing the user interface straight from the Storyboard/XIB files in Interface Builder. 2 | 3 | It provides extensions to common UI elements to set the localized text in Interface Builder. For instance, a UILabel will display a _"Text Key"_ property. When a value is set, Polyglot will call NSLocalizedString using the given value and set it to the label's text property. 4 | 5 | 6 | ## Why Polyglot? 7 | 8 | There are already several ways to internationalize the UI: 9 | - Traditionally, we would duplicate each **storyboard for every locale**. This makes the storyboards really hard to maintain. 10 | - It is a common practice to define **outlets** for every UI element and set the text using **NSLocalizedString**. It adds unnecessary outlets and lots of boilerplate code. 11 | - **_Base internationalization_** is a powerful tool to localize the UI, but let's face it, it is not the optimal solution. The generated _string files_ are hard to maintain and it is not developer friendly when making changes to the storyboard. 12 | 13 | **Polyglot** doesn't try to replace these tools, but provide a complementary approach to the localization process. It is a clean and simple solution compared to creating outlets. It is also easy to maintain, while keeping control of the _strings file_. 14 | 15 | 16 | ## Requirements 17 | 18 | - iOS 8.0+ / Mac OS X 10.9+ 19 | - Xcode 7.0+ 20 | 21 | 22 | ## Setup 23 | 24 | ### CocoaPods 25 | 26 | Make sure that you are using the latest [CocoaPods](http://cocoapods.org) version. 27 | 28 | Then add Polyglot pod to your podfile. This is an example of a podfile for an iOS app: 29 | 30 | ```ruby 31 | platform :ios, '8.0' 32 | use_frameworks! 33 | 34 | pod 'PolyglotLocalization' 35 | ``` 36 | 37 | Notice the _use_frameworks!_ line, it is important that you include it. Note also that the minimum platform versions needs to be respected as specified in the Requirements above. 38 | 39 | Finally, don't forget to update your pods and open the generated _xcworkspace_ file: 40 | 41 | ```bash 42 | $ pod install 43 | ``` 44 | 45 | 46 | ### Other 47 | 48 | There are other ways to include Polyglot in your project. Polyglot is a set of extensions written in Swift so you may as well copy the files to your project (not recommended), or add the project as a dependency... 49 | 50 | Just note that the project can not be included as a _static library_ since Interface Builder will not recognize the _inspectable_ properties in that case. 51 | 52 | 53 | ## Usage 54 | 55 | ### Basics 56 | 57 | Once Polyglot is set up, open your Storyboard of XIB file. Select a UI element that displays some text (a UILabel for example), you will see a property named "Text Key" in the property inspector. Set the following value to the "Text Key" property: _hello_wolrd_. 58 | 59 | Now you will have to add the corresponding value to the _Localizable.strings_ file: 60 | ``` 61 | "hello_wolrd" = "Hello World"; 62 | ``` 63 | 64 | You can now run the app and the label should display _Hello World_. 65 | 66 | 67 | ### Property naming 68 | 69 | The properties that can be localized with Polyglot are named as the original properties followed by _key_: 70 | 71 | - Text -> Text Key 72 | - Title -> Title Key 73 | - Placeholder -> Placeholder Key 74 | 75 | This way, it is easy to recognize what properties will be localized in each case. 76 | 77 | 78 | ### Table-based keys 79 | 80 | _NSLocalizedString()_ has a _tableName_ attribute that allows using a specific '.strings file'. Polyglot provides the following format in order to specify the table name: 81 | ``` 82 | [table_name].string_key 83 | ``` 84 | 85 | So if you want to use the 'field_title' key from the 'Common.strings' file, you can set the following in Interface Builder: 86 | ``` 87 | [Common].field_title 88 | ``` 89 | 90 | 91 | ### CSV Properties 92 | 93 | When a list of elements needs to be localized, the keys are specified in CSV (Comma Separated Values). This is the case for _segmented controls_ for example. The corresponding properties are named accordingly: _Title KeysCSV_. 94 | 95 | The list of keys is obtained by taking the comma separated values. The values are trimmed, so spaces next to the commas are ignored. 96 | 97 | Then, each of the keys is used to localize the corresponding element. For instance, the fist key will be used to localize the fist segment and so on. The following example would modify the titles of the fist three segments: 98 | ``` 99 | segment_one, segment_two, segment_three 100 | ``` 101 | 102 | In case there were more than three segments, the reset would not be modified. The same way, we can leave empty elements to ignore certain elements. The following example will only modify the first and the third segments' title: 103 | ``` 104 | segment_one, , segment_three 105 | ``` 106 | 107 | 108 | ### UIButton 109 | 110 | UIButton allows setting a title text for each state. In response to this, Polyglot provides one property for each state: default, highlighted, selected and disabled. 111 | 112 | If we just need to assign one title for all states, we will only assign _Default Title Key_ and leave the rest empty. 113 | 114 | 115 | ## Advanced 116 | 117 | ### Custom key management 118 | 119 | Polyglot allows you to configure how keys are handled. You need to modify the _Polyglot.localizer_ to set up your own implementation. 120 | 121 | By default, it parses the table and the key as specified above in "Table-based keys". This is implemented in the _TabledLocalizer_ class. 122 | 123 | Let's say we want to verify that every key is actually translated and throw a fatal error otherwise. We configure Polyglot like this: 124 | ```swift 125 | Polyglot.localizer = TabledLocalizer { key, tableName in 126 | let result = NSLocalizedString(key, tableName: tableName, value: "{NOTFOUND}", comment: key) 127 | if result == "{NOTFOUND}" { 128 | fatalError("Poliglot: Key '\(key)' not found") 129 | } 130 | return result 131 | } 132 | ``` 133 | 134 | We need to run this code when the app is launched, before the UI is loaded. For iOS, it will typically go in the _UIApplicationDelegate.application(application, didFinishLaunchingWithOptions)_ implementation. While for MacOS apps, you should override _awakeFromNib_ in your _NSApplicationDelegate_ and place the code there. 135 | ```swift 136 | override func awakeFromNib() { 137 | Polyglot.localizer = ... 138 | } 139 | ``` 140 | 141 | And don't forget to import the module: 142 | ```swift 143 | import PolyglotLocalization 144 | ``` 145 | 146 | 147 | ## One More Thing... 148 | 149 | If you like this library, make sure to share it! 150 | 151 | ## License 152 | 153 | Polyglot is released under the MIT license. See LICENSE for details. --------------------------------------------------------------------------------