diff --git a/ExpressionsLoader.playground/Contents.swift b/ExpressionsLoader.playground/Contents.swift deleted file mode 100644 index 642a8c5..0000000 --- a/ExpressionsLoader.playground/Contents.swift +++ /dev/null @@ -1,11 +0,0 @@ -//: Playground - noun: a place where people can play - -import UIKit - -let expsBase = ExpressionsLoader.loadExpressions("base") -let expsPL = ExpressionsLoader.loadExpressions("pl") -let translations = TranslationsLoader.loadTranslations("base") - -for translation in translations { - println(translation.key) -} \ No newline at end of file diff --git a/ExpressionsLoader.playground/Resources/base.json b/ExpressionsLoader.playground/Resources/base.json deleted file mode 100644 index e0b4524..0000000 --- a/ExpressionsLoader.playground/Resources/base.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "welcome": "welcome", - - "cars": { - "one": "1 car", - "ie:x=2": "2 cars", - "more": "%d cars" - }, - - "forgot-password": { - "@100": "Forgot Password? Help.", - "@200": "Forgot Password? Get password Help.", - "@300": "Forgotten Your Password? Get password Help." - }, - - "car-sentence": { - "one": { - "@100": "one car", - "@200": "just one car", - "@300": "you've got just one car" - }, - - "more": { - "@100": "%d cars", - "@300": "you've got %d cars" - } - } -} diff --git a/ExpressionsLoader.playground/Resources/expressions.json b/ExpressionsLoader.playground/Resources/expressions.json deleted file mode 100644 index 05f0b5d..0000000 --- a/ExpressionsLoader.playground/Resources/expressions.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "base": { - "one": "ie:x=1", - "two": "ie:x=2", - "more": "exp:(^[^1])|(^\\d{2,})" - }, - - "pl": { - "few": "exp:(((?!1).[2-4]{1})$)|(^[2-4]$)" - } -} diff --git a/ExpressionsLoader.playground/Sources/CountryCode.swift b/ExpressionsLoader.playground/Sources/CountryCode.swift deleted file mode 100644 index 05a482c..0000000 --- a/ExpressionsLoader.playground/Sources/CountryCode.swift +++ /dev/null @@ -1,8 +0,0 @@ -import Foundation - -/** -https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 (lowercase) + "base" -Represents country codes in framework. -Country codes are used to get correct user device's language. -*/ -public typealias CountryCode = String diff --git a/ExpressionsLoader.playground/Sources/ExpressionRepresentationType.swift b/ExpressionsLoader.playground/Sources/ExpressionRepresentationType.swift deleted file mode 100644 index 1703518..0000000 --- a/ExpressionsLoader.playground/Sources/ExpressionRepresentationType.swift +++ /dev/null @@ -1,9 +0,0 @@ -import Foundation - -/** -Represents expressions in the framework. -*/ -public protocol ExpressionRepresentationType { - /// Identifier of expression. - var identifier: String {get} -} diff --git a/ExpressionsLoader.playground/Sources/ExpressionsLoader.swift b/ExpressionsLoader.playground/Sources/ExpressionsLoader.swift deleted file mode 100644 index da50f07..0000000 --- a/ExpressionsLoader.playground/Sources/ExpressionsLoader.swift +++ /dev/null @@ -1,27 +0,0 @@ -import Foundation - -/** -Used to load content from `expressions.json` file for specified language. -*/ -public final class ExpressionsLoader: JSONFileLoader { - - /** - Loads expressions for specified language. - - :param: countryCode A country code - - :returns: array of loaded expressions. - */ - public class func loadExpressions(countryCode: CountryCode) -> [ProcessableExpression] { - var expressions = [ProcessableExpression]() - if let json = self.load("expressions", fileType: "json", bundle: NSBundle.mainBundle()), - let expressionsDict = json[countryCode] as? Dictionary { - for (identifier, pattern) in expressionsDict { - expressions.append(ProcessableExpression(identifier: identifier, pattern: pattern)) - } - } else { - println("expressions.json file structure is incorrect.") - } - return expressions - } -} diff --git a/ExpressionsLoader.playground/Sources/ExpressionsPatternType.swift b/ExpressionsLoader.playground/Sources/ExpressionsPatternType.swift deleted file mode 100644 index 7babb8d..0000000 --- a/ExpressionsLoader.playground/Sources/ExpressionsPatternType.swift +++ /dev/null @@ -1,11 +0,0 @@ -import Foundation - -/** -Represents objects that have expression pattern. -Example an expression that contains just pattern, without things like length -variations. -*/ -public protocol ExpressionPatternType { - /// A pattern. - var pattern: String {get} -} \ No newline at end of file diff --git a/ExpressionsLoader.playground/Sources/JSONFileLoader.swift b/ExpressionsLoader.playground/Sources/JSONFileLoader.swift deleted file mode 100644 index e5e4884..0000000 --- a/ExpressionsLoader.playground/Sources/JSONFileLoader.swift +++ /dev/null @@ -1,45 +0,0 @@ -import Foundation - -/** -Simple JSON loader. -*/ -public class JSONFileLoader { - public typealias JSONDictionary = Dictionary - - /** - Load content of file with specified name, type and bundle. - - :param: fileName A name of a file. - :param: fileType A type of a file. - :param: bundle A bundle when file is located. - - :return: JSON or nil. - */ - public final class func load(fileName: String, fileType: String, bundle: NSBundle = NSBundle.mainBundle()) -> JSONDictionary? { - if let fileURL = bundle.URLForResource(fileName, withExtension: fileType) { - return load(fileURL) - } - println("Cannot find file \(fileName).\(fileType).") - return nil - } - - /** - Loads file for specified URL and try to serialize it. - - :params: fileURL url to JSON file. - - :return: Dictionary with content of JSON file or nil. - */ - private class func load(fileURL: NSURL) -> JSONDictionary? { - if let data = NSData(contentsOfURL: fileURL) { - var error: NSError? - if let dictionary = NSJSONSerialization.JSONObjectWithData(data, options: NSJSONReadingOptions.allZeros, error: &error) as? JSONDictionary { - return dictionary - } else { - print("Cannot parse JSON. It might be broken.") - } - } - print("Cannot load content of file.") - return nil - } -} diff --git a/ExpressionsLoader.playground/Sources/LengthVariation.swift b/ExpressionsLoader.playground/Sources/LengthVariation.swift deleted file mode 100644 index beadc32..0000000 --- a/ExpressionsLoader.playground/Sources/LengthVariation.swift +++ /dev/null @@ -1,18 +0,0 @@ -import Foundation - -/** -Struct that represents length variation. -*/ -public struct LengthVariation: LengthVariationType { - /// Length - width of a screen. - public let length: Int - - /// localized string. - public let value: String - - /// Create length variation object. - public init(length: Int, value: String) { - self.length = length - self.value = value - } -} \ No newline at end of file diff --git a/ExpressionsLoader.playground/Sources/LengthVariationType.swift b/ExpressionsLoader.playground/Sources/LengthVariationType.swift deleted file mode 100644 index 0959ff2..0000000 --- a/ExpressionsLoader.playground/Sources/LengthVariationType.swift +++ /dev/null @@ -1,10 +0,0 @@ -import Foundation - -/// Represents length variation. -public protocol LengthVariationType { - /// Length of a screen. - var length: Int {get} - - /// Localized value. - var value: String {get} -} diff --git a/ExpressionsLoader.playground/Sources/Processable.swift b/ExpressionsLoader.playground/Sources/Processable.swift deleted file mode 100644 index 4deef2a..0000000 --- a/ExpressionsLoader.playground/Sources/Processable.swift +++ /dev/null @@ -1,12 +0,0 @@ -import Foundation - -/** -Specifies objects that need processing and are not final objects that can be -used in the framework. An example of such object might be `ProcessableExpression` -that is not ready to be used because it has to be converted into normal kind of -expression that has its fields correctly filled. - -Another good example is `TranslationType` object that contains expression or few -that need to be processed. -*/ -protocol Processable {} \ No newline at end of file diff --git a/ExpressionsLoader.playground/Sources/ProcessableExpression.swift b/ExpressionsLoader.playground/Sources/ProcessableExpression.swift deleted file mode 100644 index a0c0bac..0000000 --- a/ExpressionsLoader.playground/Sources/ProcessableExpression.swift +++ /dev/null @@ -1,18 +0,0 @@ -import Foundation - -/** -Represents loaded expression that will be processed later. -*/ -public struct ProcessableExpression: ExpressionRepresentationType, ExpressionPatternType, Processable { - /// Identifier of expression. - public let identifier: String - - /// Pattern of expression. - public let pattern: String - - /// Creates expression. - public init(identifier: String, pattern: String) { - self.identifier = identifier - self.pattern = pattern - } -} diff --git a/ExpressionsLoader.playground/Sources/ProcessableLengthVariationExpression.swift b/ExpressionsLoader.playground/Sources/ProcessableLengthVariationExpression.swift deleted file mode 100644 index 77c84f5..0000000 --- a/ExpressionsLoader.playground/Sources/ProcessableLengthVariationExpression.swift +++ /dev/null @@ -1,18 +0,0 @@ -import Foundation - -/** -Represents processable expression with length variations. -*/ -public struct ProcessableLengthVariationExpression: ExpressionRepresentationType, Processable { - /// Identifier of expression. - public var identifier: String - - /// Array of length variations - var variations: [LengthVariation] - - /// Creates instance of the class. - public init(identifier: String, variations: [LengthVariation]) { - self.identifier = identifier - self.variations = variations - } -} diff --git a/ExpressionsLoader.playground/Sources/ProcessableTranslation.swift b/ExpressionsLoader.playground/Sources/ProcessableTranslation.swift deleted file mode 100644 index 6c9725d..0000000 --- a/ExpressionsLoader.playground/Sources/ProcessableTranslation.swift +++ /dev/null @@ -1,18 +0,0 @@ -import Foundation - -/** -Represents translation which contains expressions that are not processed yet. -*/ -public struct ProcessableTranslation: TranslationType, Processable { - /// Key that identifies translation. - public let key: String - - /// Array with loaded expressions. - let loadedExpressions: [ProcessableExpression] - - /// Creates instances of the class. - public init(key: String, loadedExpressions: [ProcessableExpression]) { - self.key = key - self.loadedExpressions = loadedExpressions - } -} diff --git a/ExpressionsLoader.playground/Sources/ProcessableTranslationLengthVariationExpression.swift b/ExpressionsLoader.playground/Sources/ProcessableTranslationLengthVariationExpression.swift deleted file mode 100644 index 092aa1f..0000000 --- a/ExpressionsLoader.playground/Sources/ProcessableTranslationLengthVariationExpression.swift +++ /dev/null @@ -1,18 +0,0 @@ -import Foundation - -/** -Represents translation which contains expressions with length variations. -*/ -public struct ProcessableTranslationLengthVariationExpression: TranslationType, Processable { - /// Key that identifies translation. - public let key: String - - /// Array with expressions. - let expressions: [ProcessableLengthVariationExpression] - - /// Creates instances of the class. - public init(key: String, expressions: [ProcessableLengthVariationExpression]) { - self.key = key - self.expressions = expressions - } -} \ No newline at end of file diff --git a/ExpressionsLoader.playground/Sources/Regex.swift b/ExpressionsLoader.playground/Sources/Regex.swift deleted file mode 100644 index 91717ca..0000000 --- a/ExpressionsLoader.playground/Sources/Regex.swift +++ /dev/null @@ -1,106 +0,0 @@ -// -// Regex.swift -// Swifternalization -// -// Created by Tomasz Szulc on 27/06/15. -// Copyright (c) 2015 Tomasz Szulc. All rights reserved. -// - -import Foundation - -/** -Class uses NSRegularExpression internally and simplifies its usability. -*/ -public class Regex { - - /** - Return match in a string. Optionally with index of capturing group - - :param: str A string that will be matched. - :param: pattern A regex pattern. - - :returns: `String` that matches pattern or nil. - */ - public class func matchInString(str: String, pattern: String, capturingGroupIdx: Int?) -> String? { - var resultString: String? - - let range = NSMakeRange(0, count(str)) - regexp(pattern)?.enumerateMatchesInString(str, options: nil, range: range, usingBlock: { result, flags, stop in - if let result = result { - if let capturingGroupIdx = capturingGroupIdx where result.numberOfRanges > capturingGroupIdx { - resultString = self.substring(str, range: result.rangeAtIndex(capturingGroupIdx)) - } else { - resultString = self.substring(str, range: result.range) - } - } - }) - - return resultString - } - - - /** - Return first match in a string. - - :param: str A string that will be matched. - :param: pattern A regexp pattern. - - :returns: `String` that matches pattern or nil. - */ - class func firstMatchInString(str: String, pattern: String) -> String? { - if let result = regexp(pattern)?.firstMatchInString(str, options: .ReportCompletion, range: NSMakeRange(0, count(str))) { - return substring(str, range: result.range) - } - return nil - } - - /** - Return all matches in a string. - - :param: str A string that will be matched. - :param: pattern A regexp pattern. - - :returns: Array of `Strings`s. If nothing found empty array is returned. - */ - class func matchesInString(str: String, pattern: String) -> [String] { - var matches = [String]() - if let results = regexp(pattern)?.matchesInString(str, options: .ReportCompletion, range: NSMakeRange(0, count(str))) as? [NSTextCheckingResult] { - for result in results { - matches.append(substring(str, range: result.range)) - } - } - - return matches - } - - /** - Returns new `NSRegularExpression` object. - - :param: pattern A regexp pattern. - - :returns: `NSRegularExpression` object or nil if it cannot be created. - */ - private class func regexp(pattern: String) -> NSRegularExpression? { - var error: NSError? = nil - var regexp = NSRegularExpression(pattern: pattern, options: .CaseInsensitive, error: &error) - if error != nil { - println(error!) - } - return regexp - } - - /** - Method that substring string with passed range. - - :param: str A string that is source of substraction. - :param: range A range that tells which part of `str` will be substracted. - - :returns: A string contained in `range`. - */ - private class func substring(str: String, range: NSRange) -> String { - let startRange = advance(str.startIndex, range.location) - let endRange = advance(startRange, range.length) - - return str.substringWithRange(Range(start: startRange, end: endRange)) - } -} \ No newline at end of file diff --git a/ExpressionsLoader.playground/Sources/TranslationLengthVariation.swift b/ExpressionsLoader.playground/Sources/TranslationLengthVariation.swift deleted file mode 100644 index 95688c1..0000000 --- a/ExpressionsLoader.playground/Sources/TranslationLengthVariation.swift +++ /dev/null @@ -1,18 +0,0 @@ -import Foundation - -/** -Class represents translation which contains key and length variations. -*/ -public struct TranslationLengthVariation: TranslationType { - /// Key that identifies this translation. - public let key: String - - /// list of variations. - let variations: [LengthVariation] - - /// Creates translation object - public init(key: String, variations: [LengthVariation]) { - self.key = key - self.variations = variations - } -} \ No newline at end of file diff --git a/ExpressionsLoader.playground/Sources/TranslationSimple.swift b/ExpressionsLoader.playground/Sources/TranslationSimple.swift deleted file mode 100644 index 83305cd..0000000 --- a/ExpressionsLoader.playground/Sources/TranslationSimple.swift +++ /dev/null @@ -1,18 +0,0 @@ -import Foundation - -/** -Represents simple key-value translation. -*/ -public struct TranslationSimple: TranslationType { - /// Key that identifies translation. - public let key: String - - /// Localized string. - public let value: String - - /// Creates instance of the class. - public init(key: String, value: String) { - self.key = key - self.value = value - } -} diff --git a/ExpressionsLoader.playground/Sources/TranslationType.swift b/ExpressionsLoader.playground/Sources/TranslationType.swift deleted file mode 100644 index 653d598..0000000 --- a/ExpressionsLoader.playground/Sources/TranslationType.swift +++ /dev/null @@ -1,9 +0,0 @@ -import Foundation - -/** -Represents translation. -*/ -public protocol TranslationType { - /// Key that identifies translation. - var key: String {get} -} diff --git a/ExpressionsLoader.playground/Sources/TranslationsLoader.swift b/ExpressionsLoader.playground/Sources/TranslationsLoader.swift deleted file mode 100644 index 83a97ef..0000000 --- a/ExpressionsLoader.playground/Sources/TranslationsLoader.swift +++ /dev/null @@ -1,103 +0,0 @@ -import Foundation - -/** -Represents translations loader. -Class is looking for json file named as country code. -It parse such file. -*/ -public final class TranslationsLoader: JSONFileLoader { - - typealias DictWithStrings = Dictionary - typealias DictWithDicts = Dictionary - - enum ElementType { - case NotSupported - case TranslationWithLengthVariations - case TranslationWithLoadedExpressions - case TranslationWithLengthVariationsAndLoadedExpressions - } - - /** - Method loads a file and parses it. - - :params: countryCode A country code. - - :return: translations parsed from the file. - */ - public class func loadTranslations(countryCode: CountryCode) -> [TranslationType] { - var loadedTranslations = [TranslationType]() - let json = self.load(countryCode, fileType: "json", bundle: NSBundle.mainBundle()) - if json == nil { return [TranslationType]() } - - for (translationKey, value) in json! { - if let translationValue = value as? String { - loadedTranslations.append(TranslationSimple(key: translationKey, value: translationValue)) - } else { - let dictionary = value as! JSONDictionary - switch detectElementType(dictionary) { - case .TranslationWithLengthVariations: - let variations = parseLengthVariations(dictionary as! DictWithStrings) - loadedTranslations.append(TranslationLengthVariation(key: translationKey, variations: variations)) - - case .TranslationWithLoadedExpressions: - let expressions = parseExpressions(dictionary as! DictWithStrings) - loadedTranslations.append(ProcessableTranslation(key: translationKey, loadedExpressions: expressions)) - - case .TranslationWithLengthVariationsAndLoadedExpressions: - var expressions = [ProcessableLengthVariationExpression]() - for (expressionIdentifier, lengthVariationsDict) in dictionary as! DictWithDicts { - let variations = parseLengthVariations(lengthVariationsDict) - expressions.append(ProcessableLengthVariationExpression(identifier: expressionIdentifier, variations: variations)) - } - loadedTranslations.append(ProcessableTranslationLengthVariationExpression(key: translationKey, expressions: expressions)) - - case .NotSupported: - // Do nothing - continue - } - } - } - - return loadedTranslations - } - - private class func parseLengthVariations(dict: DictWithStrings) -> [LengthVariation] { - var variations = [LengthVariation]() - for (key, translationValue) in dict { - let numberValue = parseNumberFromLengthVariation(key) - variations.append(LengthVariation(length: numberValue, value: translationValue)) - } - return variations - } - - private class func parseExpressions(dict: DictWithStrings) -> [ProcessableExpression] { - var expressions = [ProcessableExpression]() - for (expressionKey, translationValue) in dict { - expressions.append(ProcessableExpression(identifier: expressionKey, pattern: translationValue)) - } - return expressions - } - - private class func detectElementType(element: JSONDictionary) -> ElementType { - - if element is DictWithStrings { - if let key = element.keys.first { - let toIndex = advance(key.startIndex, 1) - let firstCharacter = key.substringToIndex(toIndex) - if firstCharacter == "@" { - return .TranslationWithLengthVariations - } else { - return .TranslationWithLoadedExpressions - } - } - } else if element is DictWithDicts { - return .TranslationWithLengthVariationsAndLoadedExpressions - } - - return .NotSupported - } - - private class func parseNumberFromLengthVariation(string: String) -> Int { - return (Regex.matchInString(string, pattern: "@(\\d+)", capturingGroupIdx: 1)! as NSString).integerValue - } -} diff --git a/ExpressionsLoader.playground/contents.xcplayground b/ExpressionsLoader.playground/contents.xcplayground deleted file mode 100644 index 5da2641..0000000 --- a/ExpressionsLoader.playground/contents.xcplayground +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/ExpressionsLoader.playground/playground.xcworkspace/contents.xcworkspacedata b/ExpressionsLoader.playground/playground.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index c706b0d..0000000 --- a/ExpressionsLoader.playground/playground.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/ExpressionsLoader.playground/playground.xcworkspace/xcuserdata/tomkowz.xcuserdatad/UserInterfaceState.xcuserstate b/ExpressionsLoader.playground/playground.xcworkspace/xcuserdata/tomkowz.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index f98a0d1..0000000 Binary files a/ExpressionsLoader.playground/playground.xcworkspace/xcuserdata/tomkowz.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ diff --git a/ExpressionsLoader.playground/playground.xcworkspace/xcuserdata/tomkowz.xcuserdatad/WorkspaceSettings.xcsettings b/ExpressionsLoader.playground/playground.xcworkspace/xcuserdata/tomkowz.xcuserdatad/WorkspaceSettings.xcsettings deleted file mode 100644 index bfffcfe..0000000 --- a/ExpressionsLoader.playground/playground.xcworkspace/xcuserdata/tomkowz.xcuserdatad/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,10 +0,0 @@ - - - - - HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges - - SnapshotAutomaticallyBeforeSignificantChanges - - - diff --git a/ExpressionsLoader.playground/timeline.xctimeline b/ExpressionsLoader.playground/timeline.xctimeline deleted file mode 100644 index bf468af..0000000 --- a/ExpressionsLoader.playground/timeline.xctimeline +++ /dev/null @@ -1,6 +0,0 @@ - - - - - diff --git a/Swifternalization.xcodeproj/project.pbxproj b/Swifternalization.xcodeproj/project.pbxproj index 7c35ba9..e95c72a 100644 --- a/Swifternalization.xcodeproj/project.pbxproj +++ b/Swifternalization.xcodeproj/project.pbxproj @@ -26,8 +26,6 @@ 6D5BA5F11B6517A6000D7E49 /* TranslationsLoader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DB3CC731B5EBDA600A1220F /* TranslationsLoader.swift */; }; 6D5BA5F31B651809000D7E49 /* LengthVariation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DB3CC6A1B5EBDA600A1220F /* LengthVariation.swift */; }; 6D5BA5FB1B65253B000D7E49 /* SharedExpressionsProcessor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D5BA5FA1B65253B000D7E49 /* SharedExpressionsProcessor.swift */; }; - 6D5BA6001B6526F0000D7E49 /* SharedExpression.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D5BA5FF1B6526F0000D7E49 /* SharedExpression.swift */; }; - 6D5BA6011B65271A000D7E49 /* SharedExpression.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D5BA5FF1B6526F0000D7E49 /* SharedExpression.swift */; }; 6D5BA6041B6537D5000D7E49 /* SharedExpressionsProcessorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D5BA6031B6537D5000D7E49 /* SharedExpressionsProcessorTests.swift */; }; 6D5BA6051B653935000D7E49 /* SharedExpressionsProcessor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D5BA5FA1B65253B000D7E49 /* SharedExpressionsProcessor.swift */; }; 6D5BA6091B655F1D000D7E49 /* Expression.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D5BA6081B655F1D000D7E49 /* Expression.swift */; }; @@ -73,12 +71,14 @@ 6DBB6C521B401B8A002F39A3 /* Swifternalization.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D5004641B3EF92600A54B36 /* Swifternalization.swift */; }; 6DBB6C691B4040F0002F39A3 /* InternalPattern.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DBB6C681B4040F0002F39A3 /* InternalPattern.swift */; }; 6DBB6C6A1B40412D002F39A3 /* InternalPattern.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DBB6C681B4040F0002F39A3 /* InternalPattern.swift */; }; - 6DBB6C8F1B40768A002F39A3 /* SharedBaseExpression.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DBB6C8C1B40768A002F39A3 /* SharedBaseExpression.swift */; }; - 6DBB6C911B40768A002F39A3 /* SharedPolishExpression.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DBB6C8E1B40768A002F39A3 /* SharedPolishExpression.swift */; }; - 6DBB6C921B40769F002F39A3 /* SharedBaseExpression.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DBB6C8C1B40768A002F39A3 /* SharedBaseExpression.swift */; }; - 6DBB6C941B40769F002F39A3 /* SharedPolishExpression.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DBB6C8E1B40768A002F39A3 /* SharedPolishExpression.swift */; }; 6DBB6C961B4076E8002F39A3 /* SharedBaseExpressionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DBB6C951B4076E8002F39A3 /* SharedBaseExpressionTests.swift */; }; 6DBB6C981B4077FA002F39A3 /* SharedPolishExpressionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DBB6C971B4077FA002F39A3 /* SharedPolishExpressionTests.swift */; }; + 6DBFC48D1B6D23E500F52208 /* SharedBaseExpression.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DBFC48A1B6D23E500F52208 /* SharedBaseExpression.swift */; }; + 6DBFC48E1B6D23E500F52208 /* SharedBaseExpression.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DBFC48A1B6D23E500F52208 /* SharedBaseExpression.swift */; }; + 6DBFC48F1B6D23E500F52208 /* SharedExpression.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DBFC48B1B6D23E500F52208 /* SharedExpression.swift */; }; + 6DBFC4901B6D23E500F52208 /* SharedExpression.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DBFC48B1B6D23E500F52208 /* SharedExpression.swift */; }; + 6DBFC4911B6D23E500F52208 /* SharedPolishExpression.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DBFC48C1B6D23E500F52208 /* SharedPolishExpression.swift */; }; + 6DBFC4921B6D23E500F52208 /* SharedPolishExpression.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DBFC48C1B6D23E500F52208 /* SharedPolishExpression.swift */; }; 6DD3B93A1B5ED35200C79EAC /* base.json in Resources */ = {isa = PBXBuildFile; fileRef = 6DD3B9371B5ED35200C79EAC /* base.json */; }; 6DD3B93B1B5ED35200C79EAC /* expressions.json in Resources */ = {isa = PBXBuildFile; fileRef = 6DD3B9381B5ED35200C79EAC /* expressions.json */; }; 6DD3B93C1B5ED35200C79EAC /* pl.json in Resources */ = {isa = PBXBuildFile; fileRef = 6DD3B9391B5ED35200C79EAC /* pl.json */; }; @@ -114,7 +114,6 @@ 6D5004641B3EF92600A54B36 /* Swifternalization.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Swifternalization.swift; sourceTree = ""; }; 6D5BA5EF1B651796000D7E49 /* TranslationsLoaderTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TranslationsLoaderTests.swift; sourceTree = ""; }; 6D5BA5FA1B65253B000D7E49 /* SharedExpressionsProcessor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SharedExpressionsProcessor.swift; sourceTree = ""; }; - 6D5BA5FF1B6526F0000D7E49 /* SharedExpression.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SharedExpression.swift; path = ../SharedExpression.swift; sourceTree = ""; }; 6D5BA6031B6537D5000D7E49 /* SharedExpressionsProcessorTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SharedExpressionsProcessorTests.swift; sourceTree = ""; }; 6D5BA6081B655F1D000D7E49 /* Expression.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Expression.swift; sourceTree = ""; }; 6D6282931B3F052B00E65FCD /* TranslatablePairTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TranslatablePairTests.swift; sourceTree = ""; }; @@ -145,10 +144,11 @@ 6DB3CC731B5EBDA600A1220F /* TranslationsLoader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TranslationsLoader.swift; sourceTree = ""; }; 6DB3CC8F1B5EC29600A1220F /* ExpressionPatternType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExpressionPatternType.swift; sourceTree = ""; }; 6DBB6C681B4040F0002F39A3 /* InternalPattern.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InternalPattern.swift; sourceTree = ""; }; - 6DBB6C8C1B40768A002F39A3 /* SharedBaseExpression.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SharedBaseExpression.swift; sourceTree = ""; }; - 6DBB6C8E1B40768A002F39A3 /* SharedPolishExpression.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SharedPolishExpression.swift; sourceTree = ""; }; 6DBB6C951B4076E8002F39A3 /* SharedBaseExpressionTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SharedBaseExpressionTests.swift; sourceTree = ""; }; 6DBB6C971B4077FA002F39A3 /* SharedPolishExpressionTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SharedPolishExpressionTests.swift; sourceTree = ""; }; + 6DBFC48A1B6D23E500F52208 /* SharedBaseExpression.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SharedBaseExpression.swift; path = Swifternalization/SharedBaseExpression.swift; sourceTree = SOURCE_ROOT; }; + 6DBFC48B1B6D23E500F52208 /* SharedExpression.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SharedExpression.swift; path = Swifternalization/SharedExpression.swift; sourceTree = SOURCE_ROOT; }; + 6DBFC48C1B6D23E500F52208 /* SharedPolishExpression.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SharedPolishExpression.swift; path = Swifternalization/SharedPolishExpression.swift; sourceTree = SOURCE_ROOT; }; 6DD3B9371B5ED35200C79EAC /* base.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = base.json; sourceTree = ""; }; 6DD3B9381B5ED35200C79EAC /* expressions.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = expressions.json; sourceTree = ""; }; 6DD3B9391B5ED35200C79EAC /* pl.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = pl.json; sourceTree = ""; }; @@ -286,9 +286,9 @@ 6DBB6C8B1B40767B002F39A3 /* Shared Expressions */ = { isa = PBXGroup; children = ( - 6D5BA5FF1B6526F0000D7E49 /* SharedExpression.swift */, - 6DBB6C8C1B40768A002F39A3 /* SharedBaseExpression.swift */, - 6DBB6C8E1B40768A002F39A3 /* SharedPolishExpression.swift */, + 6DBFC48A1B6D23E500F52208 /* SharedBaseExpression.swift */, + 6DBFC48B1B6D23E500F52208 /* SharedExpression.swift */, + 6DBFC48C1B6D23E500F52208 /* SharedPolishExpression.swift */, ); path = "Shared Expressions"; sourceTree = ""; @@ -436,21 +436,21 @@ 6D5004661B3EF92600A54B36 /* Swifternalization.swift in Sources */, 6D62829A1B3F17CA00E65FCD /* Regex.swift in Sources */, 6D6282B51B3F3C4100E65FCD /* InequalitySign.swift in Sources */, - 6DBB6C8F1B40768A002F39A3 /* SharedBaseExpression.swift in Sources */, 6D4C4EBD1B6ABE0700B7839A /* Translation.swift in Sources */, 6DB3CC901B5EC29600A1220F /* ExpressionPatternType.swift in Sources */, 6DB3CC7A1B5EBDA600A1220F /* LengthVariation.swift in Sources */, 6DB3CC751B5EBDA600A1220F /* CountryCode.swift in Sources */, 6D4C4EB31B6AAE3200B7839A /* LoadedTranslationsProcessor.swift in Sources */, + 6DBFC48F1B6D23E500F52208 /* SharedExpression.swift in Sources */, 6D4C4EAF1B6AA48F00B7839A /* LoadedTranslation.swift in Sources */, - 6D5BA6001B6526F0000D7E49 /* SharedExpression.swift in Sources */, 6D62829F1B3F1FA000E65FCD /* InequalityExpressionParser.swift in Sources */, + 6DBFC48D1B6D23E500F52208 /* SharedBaseExpression.swift in Sources */, 6D6282A51B3F24A800E65FCD /* ExpressionParser.swift in Sources */, 6D4C4EB81B6AB6DE00B7839A /* LoadedTranslationType.swift in Sources */, 6DB3CC771B5EBDA600A1220F /* SharedExpressionLoader.swift in Sources */, 6DBB6C691B4040F0002F39A3 /* InternalPattern.swift in Sources */, + 6DBFC4911B6D23E500F52208 /* SharedPolishExpression.swift in Sources */, 6D5BA6091B655F1D000D7E49 /* Expression.swift in Sources */, - 6DBB6C911B40768A002F39A3 /* SharedPolishExpression.swift in Sources */, 6D6282C51B3F4ED100E65FCD /* RegexExpressionParser.swift in Sources */, 6D6282C71B3F4F2100E65FCD /* RegexExpressionMatcher.swift in Sources */, 6DB3CC791B5EBDA600A1220F /* JSONFileLoader.swift in Sources */, @@ -471,6 +471,7 @@ 6D6282C11B3F43C600E65FCD /* InequalityExtendedExpressionMatcherTests.swift in Sources */, 6DD3B9451B5ED58A00C79EAC /* SharedExpressionLoader.swift in Sources */, 6D75E6D41B6B6CFE00B370DC /* LoadedTranslationsProcessorTests.swift in Sources */, + 6DBFC4921B6D23E500F52208 /* SharedPolishExpression.swift in Sources */, 6D50045B1B3EF91600A54B36 /* SwifternalizationTests.swift in Sources */, 6D6282A61B3F25B900E65FCD /* InequalityExpressionParser.swift in Sources */, 6D6282B81B3F3E2200E65FCD /* InequalitySign.swift in Sources */, @@ -479,9 +480,9 @@ 6D5BA6051B653935000D7E49 /* SharedExpressionsProcessor.swift in Sources */, 6D6282A71B3F25BE00E65FCD /* ExpressionMatcher.swift in Sources */, 6DD3B94B1B5ED65A00C79EAC /* NSBundle+TestExtension.swift in Sources */, + 6DBFC4901B6D23E500F52208 /* SharedExpression.swift in Sources */, 6D6282C81B3F4F6400E65FCD /* RegexExpressionMatcher.swift in Sources */, 6DD3B9421B5ED3F000C79EAC /* JSONFileLoader.swift in Sources */, - 6D5BA6011B65271A000D7E49 /* SharedExpression.swift in Sources */, 6D4C4EC51B6AD01300B7839A /* LoadedTranslationsProcessor.swift in Sources */, 6DBB6C6A1B40412D002F39A3 /* InternalPattern.swift in Sources */, 6D62F9FC1B6B808400596A7C /* ExpressionJSONs.swift in Sources */, @@ -490,16 +491,15 @@ 6D4C4EB01B6AA54800B7839A /* LoadedTranslation.swift in Sources */, 6DB3CC911B5EC29E00A1220F /* ExpressionPatternType.swift in Sources */, 6D6282941B3F052B00E65FCD /* TranslatablePairTests.swift in Sources */, - 6DBB6C941B40769F002F39A3 /* SharedPolishExpression.swift in Sources */, 6DBB6C521B401B8A002F39A3 /* Swifternalization.swift in Sources */, 6D5BA5F01B651796000D7E49 /* TranslationsLoaderTests.swift in Sources */, 6D4C4EC41B6ACF2C00B7839A /* Translation.swift in Sources */, 6D6282BF1B3F42CA00E65FCD /* InequalityExpressionMatcherTests.swift in Sources */, - 6DBB6C921B40769F002F39A3 /* SharedBaseExpression.swift in Sources */, 6D5BA6041B6537D5000D7E49 /* SharedExpressionsProcessorTests.swift in Sources */, 6D6282B31B3F3C2800E65FCD /* InequalityExtendedExpressionParser.swift in Sources */, 6D140F441B56D03D00359143 /* RandomNumbers.swift in Sources */, 6D6282AD1B3F327C00E65FCD /* InequalityExpressionMatcher.swift in Sources */, + 6DBFC48E1B6D23E500F52208 /* SharedBaseExpression.swift in Sources */, 6D4C4EC61B6AD01D00B7839A /* Expression.swift in Sources */, 6D62829D1B3F19CC00E65FCD /* RegexTests.swift in Sources */, 6D6282CB1B3F508C00E65FCD /* RegexExpressionParserTests.swift in Sources */, diff --git a/Swifternalization/Shared Expressions/SharedBaseExpression.swift b/Swifternalization/SharedBaseExpression.swift similarity index 100% rename from Swifternalization/Shared Expressions/SharedBaseExpression.swift rename to Swifternalization/SharedBaseExpression.swift diff --git a/Swifternalization/Shared Expressions/SharedPolishExpression.swift b/Swifternalization/SharedPolishExpression.swift similarity index 100% rename from Swifternalization/Shared Expressions/SharedPolishExpression.swift rename to Swifternalization/SharedPolishExpression.swift