From e845119fafbf184a967a47b8ac95e2d70fa33f4c Mon Sep 17 00:00:00 2001 From: Andrew Podkovyrin Date: Wed, 29 Jan 2014 02:06:44 +0400 Subject: [PATCH 1/2] Added Russian (ru) localization support --- .../project.pbxproj | 3 + Example/ru.lproj/TesterViewController.xib | 326 ++++++++++++++++++ .../SORelativeDateTransformer.strings | Bin 0 -> 2034 bytes .../SORelativeDateTransformer.m | 41 ++- 4 files changed, 367 insertions(+), 3 deletions(-) create mode 100644 Example/ru.lproj/TesterViewController.xib create mode 100644 SORelativeDateTransformer/SORelativeDateTransformer.bundle/ru.lproj/SORelativeDateTransformer.strings diff --git a/Example/RelativeDateDemo.xcodeproj/project.pbxproj b/Example/RelativeDateDemo.xcodeproj/project.pbxproj index 006f8d1..dda53b3 100755 --- a/Example/RelativeDateDemo.xcodeproj/project.pbxproj +++ b/Example/RelativeDateDemo.xcodeproj/project.pbxproj @@ -25,6 +25,7 @@ 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 288765A40DF7441C002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 2AB6AD091898590300882679 /* ru */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = ru; path = ru.lproj/TesterViewController.xib; sourceTree = ""; }; 32CA4F630368D1EE00C91783 /* RelativeDateDemo_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RelativeDateDemo_Prefix.pch; sourceTree = ""; }; 3A188B56173989EB00EF631C /* pt */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = pt; path = pt.lproj/TesterViewController.xib; sourceTree = ""; }; 6143EE561631527000AF766F /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = "zh-Hans"; path = "zh-Hans.lproj/TesterViewController.xib"; sourceTree = ""; }; @@ -182,6 +183,7 @@ nb, it, ca, + ru, ); mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; projectDirPath = ""; @@ -235,6 +237,7 @@ AD146F5C17412FC300205BB9 /* nb */, C00164F21741524100F26B56 /* it */, A0B5915C17A2572C000DC886 /* ca */, + 2AB6AD091898590300882679 /* ru */, ); name = TesterViewController.xib; sourceTree = ""; diff --git a/Example/ru.lproj/TesterViewController.xib b/Example/ru.lproj/TesterViewController.xib new file mode 100644 index 0000000..531ec19 --- /dev/null +++ b/Example/ru.lproj/TesterViewController.xib @@ -0,0 +1,326 @@ + + + + 1280 + 12C54 + 2843 + 1187.34 + 625.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 1929 + + + IBProxyObject + IBUIDatePicker + IBUILabel + IBUIView + + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + PluginDependencyRecalculationVersion + + + + + IBFilesOwner + IBCocoaTouchFramework + + + IBFirstResponder + IBCocoaTouchFramework + + + + 274 + + + + 290 + {{0, 91}, {320, 216}} + + + + IBCocoaTouchFramework + 0 + 0 + + en_US + + + America/Los_Angeles + + VFppZgAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAC5AAAABAAAABCepkign7sVkKCGKqChmveQ +y4kaoNIj9HDSYSYQ1v50INiArZDa/tGg28CQENzes6DdqayQ3r6VoN+JjpDgnneg4WlwkOJ+WaDjSVKQ +5F47oOUpNJDmR1gg5xJREOgnOiDo8jMQ6gccIOrSFRDr5v4g7LH3EO3G4CDukdkQ76/8oPBxuxDxj96g +8n/BkPNvwKD0X6OQ9U+ioPY/hZD3L4Sg+CiiEPkPZqD6CIQQ+viDIPvoZhD82GUg/chIEP64RyD/qCoQ +AJgpIAGIDBACeAsgA3EokARhJ6AFUQqQBkEJoAcw7JAHjUOgCRDOkAmtvyAK8LCQC+CvoAzZzRANwJGg +DrmvEA+priAQmZEQEYmQIBJ5cxATaXIgFFlVEBVJVCAWOTcQFyk2IBgiU5AZCRggGgI1kBryNKAb4heQ +HNIWoB3B+ZAesfigH6HbkCB2KyAhgb2QIlYNICNq2hAkNe8gJUq8ECYV0SAnKp4QJ/7toCkKgBAp3s+g +KupiECu+saAs036QLZ6ToC6zYJAvfnWgMJNCkDFnkiAycySQM0d0IDRTBpA1J1YgNjLokDcHOCA4HAUQ +OOcaIDn75xA6xvwgO9vJEDywGKA9u6sQPo/6oD+bjRBAb9ygQYSpkEJPvqBDZIuQRC+goEVEbZBF89Mg +Ry2KEEfTtSBJDWwQSbOXIErtThBLnLOgTNZqkE18laBOtkyQT1x3oFCWLpBRPFmgUnYQkFMcO6BUVfKQ +VPwdoFY11JBW5TogWB7xEFjFHCBZ/tMQWqT+IFvetRBchOAgXb6XEF5kwiBfnnkQYE3eoGGHlZBiLcCg +Y2d3kGQNoqBlR1mQZe2EoGcnO5BnzWagaQcdkGmtSKBq5v+Qa5ZlIGzQHBBtdkcgbq/+EG9WKSBwj+AQ +cTYLIHJvwhBzFe0gdE+kEHT/CaB2OMCQdt7roHgYopB4vs2gefiEkHqer6B72GaQfH6RoH24SJB+XnOg +f5gqkAABAAECAwEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA +AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA +AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA +AQABAAEAAQAB//+dkAEA//+PgAAE//+dkAEI//+dkAEMUERUAFBTVABQV1QAUFBUAAAAAAEAAAABA + + + + 313357145.26907599 + + 5 + + + + 292 + {{20, 334}, {280, 61}} + + + + 1 + MC40MDAwMDAwMDYgMC40MDAwMDAwMDYgMC40MDAwMDAwMDYAA + + YES + 7 + NO + IBCocoaTouchFramework + Relative To Now + + 1 + MC45MDE5NjA3OTAyIDAuOTAxOTYwNzkwMiAwLjkwMTk2MDc5MDIAA + + + 3 + MQA + + + 1 + MC4wOTgwMzkyMTcyOSAwLjA5ODAzOTIxNzI5IDAuMDk4MDM5MjE3MjkgMC41AA + + {0, 1} + 1 + 10 + 2 + 1 + + 1 + 17 + + + Helvetica + 17 + 16 + + 280 + + + + 292 + {{20, 20}, {275, 45}} + + + + NO + YES + 7 + NO + IBCocoaTouchFramework + SORelativeDateTransformer Demo + + 1 + MC44MDAwMDAwMTE5IDAuODAwMDAwMDExOSAwLjgwMDAwMDAxMTkAA + + + + 1 + MC4yMDAwMDAwMDMgMC4yMDAwMDAwMDMgMC4yMDAwMDAwMDMAA + + {0, 1} + 1 + 14 + 2 + 1 + + Helvetica-Bold + Helvetica + 2 + 17 + + + Helvetica-Bold + 17 + 16 + + NO + 275 + + + {{0, 20}, {320, 460}} + + + + + 1 + MC4xMzM2NDY1OTMxIDAuMjEwNjIxODQzNCAwLjE1OTgwNDQ2NgA + + NO + + IBCocoaTouchFramework + + + + + + + view + + + + 7 + + + + relativeDateLabel + + + + 12 + + + + datePicker + + + + 13 + + + + datePickerChangedValue: + + + 13 + + 14 + + + + + + 0 + + + + + + -1 + + + File's Owner + + + -2 + + + + + 6 + + + + + + + + + + 9 + + + + + 10 + + + + + 11 + + + + + + + TesterViewController + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + UIResponder + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + + + 14 + + + + + TesterViewController + UIViewController + + datePickerChangedValue: + id + + + datePickerChangedValue: + + datePickerChangedValue: + id + + + + UIDatePicker + UILabel + + + + datePicker + UIDatePicker + + + relativeDateLabel + UILabel + + + + IBProjectSource + ./Classes/TesterViewController.h + + + + + 0 + IBCocoaTouchFramework + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + YES + 3 + 1929 + + diff --git a/SORelativeDateTransformer/SORelativeDateTransformer.bundle/ru.lproj/SORelativeDateTransformer.strings b/SORelativeDateTransformer/SORelativeDateTransformer.bundle/ru.lproj/SORelativeDateTransformer.strings new file mode 100644 index 0000000000000000000000000000000000000000..babf2dd84ccd2080d6c6f30773941e41fe44e449 GIT binary patch literal 2034 zcmcgt+iuf95S@p8%2%u`@lsVZ4e14PQG+3UpduCJ2TJ0k5wTM_E}{K+;GA9CJBh2l zAdt12wdc&7nK@(U_pc*45GyS#UN13JWWd98Df8vN5@de3@kbBm+-WRm0>@YjvUD;*0Hn^waO@l{T`lV zSje68=m0?!^DSIXGweCy+MUQZ@SOv(b=E`)RzR#q$EQkvLz^pU4KuO4T0UkhsBt^ZnyzfoYUYI|9QOLJl_u+9v%s1(^%VFi_^ z&~$~$pD+PLg-L&Dp8V`)&f^~b>^9?6?^236vGt^7;Mrm_stFk(ueatBb1^FCBElDf z-PYTlm*ZUfgy0?RGZ^)((#K=s{_!*RD3%I}-;%Ux+JTaX* z>J}9y@?9|xz}&^^na>TBW)8UX22S$^+*OUEo{x%?d;_y@*KA$bCwu;yg?8%aXDLE2 z*G~V?(OqRLyXNqS(8mg+c|2yQI;g*%fvs=Okx>kl<2ome)Vu-v=~=Ai57??w{#)>^ f;M@m(PV+l(51?hpKx1_V8Xa=bXq|&b`z-zd=szxo literal 0 HcmV?d00001 diff --git a/SORelativeDateTransformer/SORelativeDateTransformer.m b/SORelativeDateTransformer/SORelativeDateTransformer.m index fd031dd..a4ec1af 100644 --- a/SORelativeDateTransformer/SORelativeDateTransformer.m +++ b/SORelativeDateTransformer/SORelativeDateTransformer.m @@ -25,6 +25,15 @@ + (NSBundle *)bundle { return bundle; } ++ (NSString *)currentLanguageID { + static NSString *languageID = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + languageID = [[[NSBundle mainBundle] preferredLocalizations] firstObject]; + }); + return languageID; +} + static inline NSString *SORelativeDateLocalizedString(NSString *key, NSString *comment) { return [[SORelativeDateTransformer bundle] localizedStringForKey:key value:nil table:@"SORelativeDateTransformer"]; } @@ -112,9 +121,35 @@ - (id) transformedValue:(id)value // E.g. @selector(year) ==> "year", @selector(month) ==> "month" NSString *localizedDateComponentKey = selectorName; - if (labs (relativeDifference) > 1) { - localizedDateComponentKey = [NSString stringWithFormat:@"%@s", selectorName]; - } + + // Support languages with complex plural form (ex. russian) + if ([[SORelativeDateTransformer currentLanguageID] isEqualToString:@"ru"]) { + long n = labs(relativeDifference); + char form = 0; + int p = n % 100; + int t = n % 10; + if (p >= 11 && p <= 14) { + form = 2; + } else { + if (t == 1) { + form = 0; + } else if (t >= 2 && t <= 4) { + form = 1; + } else { + form = 2; + } + } + + if (form == 1) { + localizedDateComponentKey = [NSString stringWithFormat:@"%@s", selectorName]; + } else if (form == 2) { + localizedDateComponentKey = [NSString stringWithFormat:@"%@z", selectorName]; + } + } else { + if (labs (relativeDifference) > 1) { + localizedDateComponentKey = [NSString stringWithFormat:@"%@s", selectorName]; + } + } localizedDateComponentName = SORelativeDateLocalizedString(localizedDateComponentKey, nil); } From b2552927dc4fecc9fcdaa99298efb509562dd6e7 Mon Sep 17 00:00:00 2001 From: Andrew Podkovyrin Date: Sun, 16 Feb 2014 12:53:00 +0400 Subject: [PATCH 2/2] Added TTTLocalizedPluralString dependency --- Example/Podfile | 3 + Example/Podfile.lock | 10 + .../TTTLocalizedPluralString.h | 1 + .../TTTLocalizedPluralString.h | 1 + Example/Pods/Manifest.lock | 10 + ...-TTTLocalizedPluralString-Private.xcconfig | 5 + .../Pods-TTTLocalizedPluralString-dummy.m | 5 + .../Pods-TTTLocalizedPluralString-prefix.pch | 5 + .../Pods-TTTLocalizedPluralString.xcconfig | 0 Example/Pods/Pods-acknowledgements.markdown | 26 + Example/Pods/Pods-acknowledgements.plist | 56 + Example/Pods/Pods-dummy.m | 5 + Example/Pods/Pods-environment.h | 14 + Example/Pods/Pods-resources.sh | 68 + Example/Pods/Pods.xcconfig | 5 + Example/Pods/Pods.xcodeproj/project.pbxproj | 964 +++++++++++++ Example/Pods/TTTLocalizedPluralString/LICENSE | 19 + .../Pods/TTTLocalizedPluralString/README.md | 87 ++ .../TTTLocalizedPluralString.h | 41 + .../TTTLocalizedPluralString.m | 526 +++++++ .../project.pbxproj | 1260 ++++++++++++----- SORelativeDateTransformer.podspec | 1 + 22 files changed, 2788 insertions(+), 324 deletions(-) create mode 100644 Example/Podfile create mode 100644 Example/Podfile.lock create mode 120000 Example/Pods/BuildHeaders/TTTLocalizedPluralString/TTTLocalizedPluralString.h create mode 120000 Example/Pods/Headers/TTTLocalizedPluralString/TTTLocalizedPluralString.h create mode 100644 Example/Pods/Manifest.lock create mode 100644 Example/Pods/Pods-TTTLocalizedPluralString-Private.xcconfig create mode 100644 Example/Pods/Pods-TTTLocalizedPluralString-dummy.m create mode 100644 Example/Pods/Pods-TTTLocalizedPluralString-prefix.pch create mode 100644 Example/Pods/Pods-TTTLocalizedPluralString.xcconfig create mode 100644 Example/Pods/Pods-acknowledgements.markdown create mode 100644 Example/Pods/Pods-acknowledgements.plist create mode 100644 Example/Pods/Pods-dummy.m create mode 100644 Example/Pods/Pods-environment.h create mode 100755 Example/Pods/Pods-resources.sh create mode 100644 Example/Pods/Pods.xcconfig create mode 100644 Example/Pods/Pods.xcodeproj/project.pbxproj create mode 100644 Example/Pods/TTTLocalizedPluralString/LICENSE create mode 100644 Example/Pods/TTTLocalizedPluralString/README.md create mode 100644 Example/Pods/TTTLocalizedPluralString/TTTLocalizedPluralString.h create mode 100644 Example/Pods/TTTLocalizedPluralString/TTTLocalizedPluralString.m diff --git a/Example/Podfile b/Example/Podfile new file mode 100644 index 0000000..c1fab94 --- /dev/null +++ b/Example/Podfile @@ -0,0 +1,3 @@ +platform :ios, '4.3' + +pod 'TTTLocalizedPluralString' diff --git a/Example/Podfile.lock b/Example/Podfile.lock new file mode 100644 index 0000000..b8165cd --- /dev/null +++ b/Example/Podfile.lock @@ -0,0 +1,10 @@ +PODS: + - TTTLocalizedPluralString (0.0.9) + +DEPENDENCIES: + - TTTLocalizedPluralString + +SPEC CHECKSUMS: + TTTLocalizedPluralString: 9813ed30d6babe01440a758cbf2bef85a2138913 + +COCOAPODS: 0.29.0 diff --git a/Example/Pods/BuildHeaders/TTTLocalizedPluralString/TTTLocalizedPluralString.h b/Example/Pods/BuildHeaders/TTTLocalizedPluralString/TTTLocalizedPluralString.h new file mode 120000 index 0000000..e1693b0 --- /dev/null +++ b/Example/Pods/BuildHeaders/TTTLocalizedPluralString/TTTLocalizedPluralString.h @@ -0,0 +1 @@ +../../TTTLocalizedPluralString/TTTLocalizedPluralString.h \ No newline at end of file diff --git a/Example/Pods/Headers/TTTLocalizedPluralString/TTTLocalizedPluralString.h b/Example/Pods/Headers/TTTLocalizedPluralString/TTTLocalizedPluralString.h new file mode 120000 index 0000000..e1693b0 --- /dev/null +++ b/Example/Pods/Headers/TTTLocalizedPluralString/TTTLocalizedPluralString.h @@ -0,0 +1 @@ +../../TTTLocalizedPluralString/TTTLocalizedPluralString.h \ No newline at end of file diff --git a/Example/Pods/Manifest.lock b/Example/Pods/Manifest.lock new file mode 100644 index 0000000..b8165cd --- /dev/null +++ b/Example/Pods/Manifest.lock @@ -0,0 +1,10 @@ +PODS: + - TTTLocalizedPluralString (0.0.9) + +DEPENDENCIES: + - TTTLocalizedPluralString + +SPEC CHECKSUMS: + TTTLocalizedPluralString: 9813ed30d6babe01440a758cbf2bef85a2138913 + +COCOAPODS: 0.29.0 diff --git a/Example/Pods/Pods-TTTLocalizedPluralString-Private.xcconfig b/Example/Pods/Pods-TTTLocalizedPluralString-Private.xcconfig new file mode 100644 index 0000000..24ae185 --- /dev/null +++ b/Example/Pods/Pods-TTTLocalizedPluralString-Private.xcconfig @@ -0,0 +1,5 @@ +#include "Pods-TTTLocalizedPluralString.xcconfig" +GCC_PREPROCESSOR_DEFINITIONS = COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/BuildHeaders" "${PODS_ROOT}/BuildHeaders/TTTLocalizedPluralString" "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/TTTLocalizedPluralString" +OTHER_LDFLAGS = -ObjC +PODS_ROOT = ${SRCROOT} \ No newline at end of file diff --git a/Example/Pods/Pods-TTTLocalizedPluralString-dummy.m b/Example/Pods/Pods-TTTLocalizedPluralString-dummy.m new file mode 100644 index 0000000..9d17fb6 --- /dev/null +++ b/Example/Pods/Pods-TTTLocalizedPluralString-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_TTTLocalizedPluralString : NSObject +@end +@implementation PodsDummy_Pods_TTTLocalizedPluralString +@end diff --git a/Example/Pods/Pods-TTTLocalizedPluralString-prefix.pch b/Example/Pods/Pods-TTTLocalizedPluralString-prefix.pch new file mode 100644 index 0000000..95cf11d --- /dev/null +++ b/Example/Pods/Pods-TTTLocalizedPluralString-prefix.pch @@ -0,0 +1,5 @@ +#ifdef __OBJC__ +#import +#endif + +#import "Pods-environment.h" diff --git a/Example/Pods/Pods-TTTLocalizedPluralString.xcconfig b/Example/Pods/Pods-TTTLocalizedPluralString.xcconfig new file mode 100644 index 0000000..e69de29 diff --git a/Example/Pods/Pods-acknowledgements.markdown b/Example/Pods/Pods-acknowledgements.markdown new file mode 100644 index 0000000..f068e5f --- /dev/null +++ b/Example/Pods/Pods-acknowledgements.markdown @@ -0,0 +1,26 @@ +# Acknowledgements +This application makes use of the following third party libraries: + +## TTTLocalizedPluralString + +Copyright (c) 2011 Mattt Thompson (http://mattt.me/) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +Generated by CocoaPods - http://cocoapods.org diff --git a/Example/Pods/Pods-acknowledgements.plist b/Example/Pods/Pods-acknowledgements.plist new file mode 100644 index 0000000..9976048 --- /dev/null +++ b/Example/Pods/Pods-acknowledgements.plist @@ -0,0 +1,56 @@ + + + + + PreferenceSpecifiers + + + FooterText + This application makes use of the following third party libraries: + Title + Acknowledgements + Type + PSGroupSpecifier + + + FooterText + Copyright (c) 2011 Mattt Thompson (http://mattt.me/) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + Title + TTTLocalizedPluralString + Type + PSGroupSpecifier + + + FooterText + Generated by CocoaPods - http://cocoapods.org + Title + + Type + PSGroupSpecifier + + + StringsTable + Acknowledgements + Title + Acknowledgements + + diff --git a/Example/Pods/Pods-dummy.m b/Example/Pods/Pods-dummy.m new file mode 100644 index 0000000..ade64bd --- /dev/null +++ b/Example/Pods/Pods-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods : NSObject +@end +@implementation PodsDummy_Pods +@end diff --git a/Example/Pods/Pods-environment.h b/Example/Pods/Pods-environment.h new file mode 100644 index 0000000..621f297 --- /dev/null +++ b/Example/Pods/Pods-environment.h @@ -0,0 +1,14 @@ + +// To check if a library is compiled with CocoaPods you +// can use the `COCOAPODS` macro definition which is +// defined in the xcconfigs so it is available in +// headers also when they are imported in the client +// project. + + +// TTTLocalizedPluralString +#define COCOAPODS_POD_AVAILABLE_TTTLocalizedPluralString +#define COCOAPODS_VERSION_MAJOR_TTTLocalizedPluralString 0 +#define COCOAPODS_VERSION_MINOR_TTTLocalizedPluralString 0 +#define COCOAPODS_VERSION_PATCH_TTTLocalizedPluralString 9 + diff --git a/Example/Pods/Pods-resources.sh b/Example/Pods/Pods-resources.sh new file mode 100755 index 0000000..6fff7a0 --- /dev/null +++ b/Example/Pods/Pods-resources.sh @@ -0,0 +1,68 @@ +#!/bin/sh +set -e + +RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt +> "$RESOURCES_TO_COPY" + +install_resource() +{ + case $1 in + *.storyboard) + echo "ibtool --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}" + ibtool --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" + ;; + *.xib) + echo "ibtool --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}" + ibtool --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" + ;; + *.framework) + echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "rsync -av ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + rsync -av "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + ;; + *.xcdatamodel) + echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\"" + xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom" + ;; + *.xcdatamodeld) + echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\"" + xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd" + ;; + *.xcassets) + ;; + /*) + echo "$1" + echo "$1" >> "$RESOURCES_TO_COPY" + ;; + *) + echo "${PODS_ROOT}/$1" + echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY" + ;; + esac +} + +rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +if [[ "${ACTION}" == "install" ]]; then + rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi +rm -f "$RESOURCES_TO_COPY" + +if [[ -n "${WRAPPER_EXTENSION}" ]] && [ `xcrun --find actool` ] && [ `find . -name '*.xcassets' | wc -l` -ne 0 ] +then + case "${TARGETED_DEVICE_FAMILY}" in + 1,2) + TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" + ;; + 1) + TARGET_DEVICE_ARGS="--target-device iphone" + ;; + 2) + TARGET_DEVICE_ARGS="--target-device ipad" + ;; + *) + TARGET_DEVICE_ARGS="--target-device mac" + ;; + esac + find "${PWD}" -name "*.xcassets" -print0 | xargs -0 actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi diff --git a/Example/Pods/Pods.xcconfig b/Example/Pods/Pods.xcconfig new file mode 100644 index 0000000..010b411 --- /dev/null +++ b/Example/Pods/Pods.xcconfig @@ -0,0 +1,5 @@ +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/TTTLocalizedPluralString" +OTHER_CFLAGS = $(inherited) "-isystem${PODS_ROOT}/Headers" "-isystem${PODS_ROOT}/Headers/TTTLocalizedPluralString" +OTHER_LDFLAGS = -ObjC +PODS_ROOT = ${SRCROOT}/Pods \ No newline at end of file diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj new file mode 100644 index 0000000..45b440c --- /dev/null +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -0,0 +1,964 @@ + + + + + archiveVersion + 1 + classes + + objectVersion + 46 + objects + + 069F6226D14C4E3BA4F9226F + + children + + B3BD6A99BBC64F54BF7A7F7F + + isa + PBXGroup + name + Targets Support Files + sourceTree + <group> + + 107989690B5448F196F75E17 + + children + + BF8CE47ED6AA4BEDA179D180 + 95D4BD3852E344FBA22ECA83 + 4C68C9DDBD1E4DE4A4E9762B + + isa + PBXGroup + name + TTTLocalizedPluralString + path + TTTLocalizedPluralString + sourceTree + <group> + + 14DAF18F419B4005BB9404CC + + buildConfigurationList + 6E1EF87EA10549A9B5DF89CA + buildPhases + + AF3BE3C327D546C4B3889057 + 7E650C1938134ABBB7B79AD4 + + buildRules + + dependencies + + E123062E6B2C4C51A5DEFDD8 + + isa + PBXNativeTarget + name + Pods + productName + Pods + productReference + 616F7AEAF9FB42879B33123D + productType + com.apple.product-type.library.static + + 1618462F35F84C78982710D4 + + children + + 107989690B5448F196F75E17 + + isa + PBXGroup + name + Pods + sourceTree + <group> + + 171A0571518A4B53B2722E14 + + containerPortal + 9641970916594587A10F7F0C + isa + PBXContainerItemProxy + proxyType + 1 + remoteGlobalIDString + 30EA988CE32E4414991BBFFE + remoteInfo + Pods-TTTLocalizedPluralString + + 176B05F020034DC58CB0F389 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text.plist.xml + path + Pods-acknowledgements.plist + sourceTree + <group> + + 30EA988CE32E4414991BBFFE + + buildConfigurationList + 626EB00F0D824615BA35CC97 + buildPhases + + 3E4171D8614248C2B3BFD105 + AC75E2BE96854FB4A57DD886 + B6ACE0E85B92410B8D0571CB + + buildRules + + dependencies + + isa + PBXNativeTarget + name + Pods-TTTLocalizedPluralString + productName + Pods-TTTLocalizedPluralString + productReference + 418923F1D93B4D71828C444E + productType + com.apple.product-type.library.static + + 332553B3D7104BB68B495575 + + baseConfigurationReference + 6C89C21D8F994C74A93803A6 + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + ARCHS + $(ARCHS_STANDARD_32_BIT) + COPY_PHASE_STRIP + NO + DSTROOT + /tmp/xcodeproj.dst + GCC_C_LANGUAGE_STANDARD + gnu99 + GCC_DYNAMIC_NO_PIC + NO + GCC_OPTIMIZATION_LEVEL + 0 + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_PREFIX_HEADER + Pods-TTTLocalizedPluralString-prefix.pch + GCC_PREPROCESSOR_DEFINITIONS + + DEBUG=1 + $(inherited) + + GCC_SYMBOLS_PRIVATE_EXTERN + NO + GCC_VERSION + com.apple.compilers.llvm.clang.1_0 + INSTALL_PATH + $(BUILT_PRODUCTS_DIR) + IPHONEOS_DEPLOYMENT_TARGET + 4.3 + OTHER_LDFLAGS + + PRODUCT_NAME + $(TARGET_NAME) + PUBLIC_HEADERS_FOLDER_PATH + $(TARGET_NAME) + SDKROOT + iphoneos + SKIP_INSTALL + YES + + isa + XCBuildConfiguration + name + Debug + + 375C061C57694BEA8F4F5BD0 + + children + + 616F7AEAF9FB42879B33123D + 418923F1D93B4D71828C444E + + isa + PBXGroup + name + Products + sourceTree + <group> + + 3E4171D8614248C2B3BFD105 + + buildActionMask + 2147483647 + files + + A0BAA2EBB1CF41F0B22C42DA + EB42714CE6894CDC87E482E2 + + isa + PBXSourcesBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 418923F1D93B4D71828C444E + + explicitFileType + archive.ar + includeInIndex + 0 + isa + PBXFileReference + path + libPods-TTTLocalizedPluralString.a + sourceTree + BUILT_PRODUCTS_DIR + + 426190A1B6FF4DA2B401230D + + fileRef + C9009AADDD4C42C7A07EAE71 + isa + PBXBuildFile + + 44A609BCF4A04EFE8E197B1C + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text.xcconfig + path + Pods.xcconfig + sourceTree + <group> + + 4C68C9DDBD1E4DE4A4E9762B + + children + + B4D13D82766A4D40B1558351 + 6C89C21D8F994C74A93803A6 + FA5EDCD47B5A4FB197DCF673 + C50FBC2199B440C2B954CADD + + isa + PBXGroup + name + Support Files + sourceTree + SOURCE_ROOT + + 5849C0614A904EDFB0A091F2 + + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + CLANG_CXX_LANGUAGE_STANDARD + gnu++0x + CLANG_CXX_LIBRARY + libc++ + CLANG_ENABLE_MODULES + YES + CLANG_ENABLE_OBJC_ARC + NO + CLANG_WARN_BOOL_CONVERSION + YES + CLANG_WARN_CONSTANT_CONVERSION + YES + CLANG_WARN_DIRECT_OBJC_ISA_USAGE + YES_ERROR + CLANG_WARN_EMPTY_BODY + YES + CLANG_WARN_ENUM_CONVERSION + YES + CLANG_WARN_INT_CONVERSION + YES + CLANG_WARN_OBJC_ROOT_CLASS + YES_ERROR + COPY_PHASE_STRIP + NO + ENABLE_NS_ASSERTIONS + NO + GCC_C_LANGUAGE_STANDARD + gnu99 + GCC_WARN_64_TO_32_BIT_CONVERSION + YES + GCC_WARN_ABOUT_RETURN_TYPE + YES_ERROR + GCC_WARN_UNDECLARED_SELECTOR + YES + GCC_WARN_UNINITIALIZED_AUTOS + YES + GCC_WARN_UNUSED_FUNCTION + YES + GCC_WARN_UNUSED_VARIABLE + YES + IPHONEOS_DEPLOYMENT_TARGET + 4.3 + STRIP_INSTALLED_PRODUCT + NO + VALIDATE_PRODUCT + YES + + isa + XCBuildConfiguration + name + Release + + 594E55B0F04A4038BA13D5E2 + + isa + PBXFileReference + lastKnownFileType + wrapper.framework + name + Foundation.framework + path + Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/Foundation.framework + sourceTree + DEVELOPER_DIR + + 616F7AEAF9FB42879B33123D + + explicitFileType + archive.ar + includeInIndex + 0 + isa + PBXFileReference + path + libPods.a + sourceTree + BUILT_PRODUCTS_DIR + + 626EB00F0D824615BA35CC97 + + buildConfigurations + + 332553B3D7104BB68B495575 + 72CD377EF1B445E293925555 + + defaultConfigurationIsVisible + 0 + defaultConfigurationName + Release + isa + XCConfigurationList + + 6561254B73A3463483EAACD2 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text + path + Pods-acknowledgements.markdown + sourceTree + <group> + + 6C89C21D8F994C74A93803A6 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text.xcconfig + path + Pods-TTTLocalizedPluralString-Private.xcconfig + sourceTree + <group> + + 6E1EF87EA10549A9B5DF89CA + + buildConfigurations + + B31EF7616F51479C96CAA743 + F7B392BF410646F99DDEDB0E + + defaultConfigurationIsVisible + 0 + defaultConfigurationName + Release + isa + XCConfigurationList + + 72843961987A402791B22D3B + + fileRef + 594E55B0F04A4038BA13D5E2 + isa + PBXBuildFile + + 72CD377EF1B445E293925555 + + baseConfigurationReference + 6C89C21D8F994C74A93803A6 + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + ARCHS + $(ARCHS_STANDARD_32_BIT) + COPY_PHASE_STRIP + YES + DSTROOT + /tmp/xcodeproj.dst + GCC_C_LANGUAGE_STANDARD + gnu99 + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_PREFIX_HEADER + Pods-TTTLocalizedPluralString-prefix.pch + GCC_VERSION + com.apple.compilers.llvm.clang.1_0 + INSTALL_PATH + $(BUILT_PRODUCTS_DIR) + IPHONEOS_DEPLOYMENT_TARGET + 4.3 + OTHER_CFLAGS + + -DNS_BLOCK_ASSERTIONS=1 + $(inherited) + + OTHER_CPLUSPLUSFLAGS + + -DNS_BLOCK_ASSERTIONS=1 + $(inherited) + + OTHER_LDFLAGS + + PRODUCT_NAME + $(TARGET_NAME) + PUBLIC_HEADERS_FOLDER_PATH + $(TARGET_NAME) + SDKROOT + iphoneos + SKIP_INSTALL + YES + VALIDATE_PRODUCT + YES + + isa + XCBuildConfiguration + name + Release + + 7E650C1938134ABBB7B79AD4 + + buildActionMask + 2147483647 + files + + 72843961987A402791B22D3B + C739E18179CD4663B3CB4BAF + + isa + PBXFrameworksBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 8359EA586A3F4E068E43DF25 + + children + + A8701C86E30B465BA4A6BB77 + 910317B02DF94174A26EC418 + 1618462F35F84C78982710D4 + 375C061C57694BEA8F4F5BD0 + 069F6226D14C4E3BA4F9226F + + isa + PBXGroup + sourceTree + <group> + + 90EE258010404C51900EF6D0 + + buildConfigurations + + 929647DDCAF94DD9A3B3AF39 + 5849C0614A904EDFB0A091F2 + + defaultConfigurationIsVisible + 0 + defaultConfigurationName + Release + isa + XCConfigurationList + + 910317B02DF94174A26EC418 + + children + + B6698B3FA21B4D429C027D36 + + isa + PBXGroup + name + Frameworks + sourceTree + <group> + + 929647DDCAF94DD9A3B3AF39 + + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + CLANG_CXX_LANGUAGE_STANDARD + gnu++0x + CLANG_CXX_LIBRARY + libc++ + CLANG_ENABLE_MODULES + YES + CLANG_ENABLE_OBJC_ARC + NO + CLANG_WARN_BOOL_CONVERSION + YES + CLANG_WARN_CONSTANT_CONVERSION + YES + CLANG_WARN_DIRECT_OBJC_ISA_USAGE + YES_ERROR + CLANG_WARN_EMPTY_BODY + YES + CLANG_WARN_ENUM_CONVERSION + YES + CLANG_WARN_INT_CONVERSION + YES + CLANG_WARN_OBJC_ROOT_CLASS + YES_ERROR + COPY_PHASE_STRIP + YES + GCC_C_LANGUAGE_STANDARD + gnu99 + GCC_DYNAMIC_NO_PIC + NO + GCC_OPTIMIZATION_LEVEL + 0 + GCC_PREPROCESSOR_DEFINITIONS + + DEBUG=1 + $(inherited) + + GCC_SYMBOLS_PRIVATE_EXTERN + NO + GCC_WARN_64_TO_32_BIT_CONVERSION + YES + GCC_WARN_ABOUT_RETURN_TYPE + YES_ERROR + GCC_WARN_UNDECLARED_SELECTOR + YES + GCC_WARN_UNINITIALIZED_AUTOS + YES + GCC_WARN_UNUSED_FUNCTION + YES + GCC_WARN_UNUSED_VARIABLE + YES + IPHONEOS_DEPLOYMENT_TARGET + 4.3 + ONLY_ACTIVE_ARCH + YES + STRIP_INSTALLED_PRODUCT + NO + + isa + XCBuildConfiguration + name + Debug + + 95D4BD3852E344FBA22ECA83 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + TTTLocalizedPluralString.m + sourceTree + <group> + + 9641970916594587A10F7F0C + + attributes + + LastUpgradeCheck + 0500 + + buildConfigurationList + 90EE258010404C51900EF6D0 + compatibilityVersion + Xcode 3.2 + developmentRegion + English + hasScannedForEncodings + 0 + isa + PBXProject + knownRegions + + en + + mainGroup + 8359EA586A3F4E068E43DF25 + productRefGroup + 375C061C57694BEA8F4F5BD0 + projectDirPath + + projectReferences + + projectRoot + + targets + + 14DAF18F419B4005BB9404CC + 30EA988CE32E4414991BBFFE + + + A0BAA2EBB1CF41F0B22C42DA + + fileRef + FA5EDCD47B5A4FB197DCF673 + isa + PBXBuildFile + + A12507DB3C68499896290F6A + + fileRef + 594E55B0F04A4038BA13D5E2 + isa + PBXBuildFile + + A8701C86E30B465BA4A6BB77 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text + name + Podfile + path + ../Podfile + sourceTree + SOURCE_ROOT + xcLanguageSpecificationIdentifier + xcode.lang.ruby + + AC75E2BE96854FB4A57DD886 + + buildActionMask + 2147483647 + files + + A12507DB3C68499896290F6A + + isa + PBXFrameworksBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + AE1D90A29D1947EC8F3B1A8F + + fileRef + BF8CE47ED6AA4BEDA179D180 + isa + PBXBuildFile + + AF3BE3C327D546C4B3889057 + + buildActionMask + 2147483647 + files + + 426190A1B6FF4DA2B401230D + + isa + PBXSourcesBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + B31EF7616F51479C96CAA743 + + baseConfigurationReference + 44A609BCF4A04EFE8E197B1C + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + ARCHS + $(ARCHS_STANDARD_32_BIT) + COPY_PHASE_STRIP + NO + DSTROOT + /tmp/xcodeproj.dst + GCC_C_LANGUAGE_STANDARD + gnu99 + GCC_DYNAMIC_NO_PIC + NO + GCC_OPTIMIZATION_LEVEL + 0 + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_PREPROCESSOR_DEFINITIONS + + DEBUG=1 + $(inherited) + + GCC_SYMBOLS_PRIVATE_EXTERN + NO + GCC_VERSION + com.apple.compilers.llvm.clang.1_0 + INSTALL_PATH + $(BUILT_PRODUCTS_DIR) + IPHONEOS_DEPLOYMENT_TARGET + 4.3 + OTHER_LDFLAGS + + PRODUCT_NAME + $(TARGET_NAME) + PUBLIC_HEADERS_FOLDER_PATH + $(TARGET_NAME) + SDKROOT + iphoneos + SKIP_INSTALL + YES + + isa + XCBuildConfiguration + name + Debug + + B3BD6A99BBC64F54BF7A7F7F + + children + + 44A609BCF4A04EFE8E197B1C + 6561254B73A3463483EAACD2 + 176B05F020034DC58CB0F389 + C9009AADDD4C42C7A07EAE71 + F8C591865D634C37ABA90308 + BA09BF1D822B4184B9458BD6 + + isa + PBXGroup + name + Pods + sourceTree + <group> + + B4D13D82766A4D40B1558351 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text.xcconfig + path + Pods-TTTLocalizedPluralString.xcconfig + sourceTree + <group> + + B6698B3FA21B4D429C027D36 + + children + + 594E55B0F04A4038BA13D5E2 + + isa + PBXGroup + name + iOS + sourceTree + <group> + + B6ACE0E85B92410B8D0571CB + + buildActionMask + 2147483647 + files + + AE1D90A29D1947EC8F3B1A8F + + isa + PBXHeadersBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + BA09BF1D822B4184B9458BD6 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text.script.sh + path + Pods-resources.sh + sourceTree + <group> + + BF8CE47ED6AA4BEDA179D180 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + path + TTTLocalizedPluralString.h + sourceTree + <group> + + C50FBC2199B440C2B954CADD + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + path + Pods-TTTLocalizedPluralString-prefix.pch + sourceTree + <group> + + C739E18179CD4663B3CB4BAF + + fileRef + 418923F1D93B4D71828C444E + isa + PBXBuildFile + + C9009AADDD4C42C7A07EAE71 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + Pods-dummy.m + sourceTree + <group> + + E123062E6B2C4C51A5DEFDD8 + + isa + PBXTargetDependency + target + 30EA988CE32E4414991BBFFE + targetProxy + 171A0571518A4B53B2722E14 + + EB42714CE6894CDC87E482E2 + + fileRef + 95D4BD3852E344FBA22ECA83 + isa + PBXBuildFile + + F7B392BF410646F99DDEDB0E + + baseConfigurationReference + 44A609BCF4A04EFE8E197B1C + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + ARCHS + $(ARCHS_STANDARD_32_BIT) + COPY_PHASE_STRIP + YES + DSTROOT + /tmp/xcodeproj.dst + GCC_C_LANGUAGE_STANDARD + gnu99 + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_VERSION + com.apple.compilers.llvm.clang.1_0 + INSTALL_PATH + $(BUILT_PRODUCTS_DIR) + IPHONEOS_DEPLOYMENT_TARGET + 4.3 + OTHER_CFLAGS + + -DNS_BLOCK_ASSERTIONS=1 + $(inherited) + + OTHER_CPLUSPLUSFLAGS + + -DNS_BLOCK_ASSERTIONS=1 + $(inherited) + + OTHER_LDFLAGS + + PRODUCT_NAME + $(TARGET_NAME) + PUBLIC_HEADERS_FOLDER_PATH + $(TARGET_NAME) + SDKROOT + iphoneos + SKIP_INSTALL + YES + VALIDATE_PRODUCT + YES + + isa + XCBuildConfiguration + name + Release + + F8C591865D634C37ABA90308 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + path + Pods-environment.h + sourceTree + <group> + + FA5EDCD47B5A4FB197DCF673 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + Pods-TTTLocalizedPluralString-dummy.m + sourceTree + <group> + + + rootObject + 9641970916594587A10F7F0C + + diff --git a/Example/Pods/TTTLocalizedPluralString/LICENSE b/Example/Pods/TTTLocalizedPluralString/LICENSE new file mode 100644 index 0000000..11028ca --- /dev/null +++ b/Example/Pods/TTTLocalizedPluralString/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2011 Mattt Thompson (http://mattt.me/) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/Example/Pods/TTTLocalizedPluralString/README.md b/Example/Pods/TTTLocalizedPluralString/README.md new file mode 100644 index 0000000..5f2df74 --- /dev/null +++ b/Example/Pods/TTTLocalizedPluralString/README.md @@ -0,0 +1,87 @@ +# TTTLocalizedPluralString +## NSLocalizedString with a Count Argument + +> As of iOS 7 and Mac OS X 10.9 Mavericks, Foundation has the ability to specify localized strings according to pluralization and grammar rules. You can find more information about it in the [Localized Property List File](https://developer.apple.com/library/mac/releasenotes/Foundation/RN-Foundation/#//apple_ref/doc/uid/TP30000742-CH2-SW56) section of the Foundation release notes. + +`NSLocalizedString` and its related macros are make localizing Mac and iOS applications relatively straight-forward and simple. It falls down, however, when having to deal with strings whose conjugations change based on a dynamic count value. In such cases, you may have seen code like this: + +``` objective-c +if (count == 1) { + return NSLocalizedString(@"1 Person", nil); +} else { + return [NSString stringWithFormat:NSLocalizedString(@"%d People", nil), count]; +} +``` + +While this works alright for English, you run into problems when targeting other locales. Consider some examples as described in the [Unicode Language Plural Rules](http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html): + +* Many Asian languages, like Japanese, Korean, Thai, and Simplified Chinese, do not have plural forms of nouns +* Arabic has several plural forms, including rules for zero, one, two, as well as few, many, and other, which are determined using a rather complicated base 10 divmod operation to determine the parity. + +Fortunately, `TTTLocalizedPluralString` figures all of this out for you. You can use it just as you would `NSLocalizedString`, only in this case, you also have an argument for count. Here is the example from before, this time using `TTTLocalizedPluralString`. + +``` objective-c +return TTTLocalizedPluralString(count, @"Person", nil); +``` + +This macro points to a function that determines the plural rule for the current locale, and then does an `NSBundle` localized string lookup for the corresponding value. In this case, `en.lproj/Localizable.strings` would have two keys for this: `%d Person (plural rule: one)` and `%d Person (plural rule: other)`. Other localizations would only require the keys used by that language (e.g. 1 for Japanese, and 6 for Arabic). + +Here is the full list of plural rules: + +* `zero` +* `one` +* `two` +* `few` +* `many` +* `other` + +## Supported Locales + +- Arabic (`ar`) +- Catalan (`ca`) +- Chinese (Simplified) (`zh-Hans`) +- Chinese (Traditional) (`zh-Hant`) +- Croatian (`cr`) +- Czech (`cs`) +- Danish (`da`) +- Dutch (`nl`) +- English (`en`) +- German (`de`) +- Finish (`fi`) +- Greek (`el`) +- French (`fr`) +- Hebrew (`he`) +- Hungarian (`hu`) +- Indonesian (`id`) +- Italian (`it`) +- Japanese (`ja`) +- Korean (`ko`) +- Latvian (`lv`) +- Malay (`ms`) +- Norwegian Bokmål (`nb`) +- Norwegian Nynorsk (`nn`) +- Polish (`pl`) +- Portuguese (`pt`) +- Romanian (`ro`) +- Russian (`ru`) +- Spanish (`es`) +- Slovak (`sk`) +- Swedish (`sv`) +- Thai (`th`) +- Turkish (`tr`) +- Ukrainian (`uk`) +- Vietnamese (`vi`) + +--- + +## Contact + +Mattt Thompson + +- http://github.com/mattt +- http://twitter.com/mattt +- m@mattt.me + +## License + +TTTLocalizedPluralString is available under the MIT license. See the LICENSE file for more info. diff --git a/Example/Pods/TTTLocalizedPluralString/TTTLocalizedPluralString.h b/Example/Pods/TTTLocalizedPluralString/TTTLocalizedPluralString.h new file mode 100644 index 0000000..15db371 --- /dev/null +++ b/Example/Pods/TTTLocalizedPluralString/TTTLocalizedPluralString.h @@ -0,0 +1,41 @@ +// TTTLocalizedPluralString.h +// +// Copyright (c) 2011 Mattt Thompson (http://mattt.me) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +extern NSString * TTTLocalizedPluralStringKeyForCountAndSingularNoun(NSUInteger count, NSString *singular); +extern NSString * TTTLocalizedPluralStringKeyForCountAndSingularNounForLanguage(NSUInteger count, NSString *singular, NSString *languageCode); + +#define TTTLocalizedPluralString(count, singular, comment) \ +[NSString stringWithFormat:[[NSBundle mainBundle] localizedStringForKey:TTTLocalizedPluralStringKeyForCountAndSingularNoun(count, singular) value:@"" table:nil], count] + +#define TTTLocalizedPluralStringForLanguage(count, singular, languageCode) \ +[NSString stringWithFormat:[[NSBundle mainBundle] localizedStringForKey:TTTLocalizedPluralStringKeyForCountAndSingularNounForLanguage(count, singular, languageCode) value:@"" table:nil], count] + +#define TTTLocalizedPluralStringFromTable(count, singular, tbl, comment) \ +[NSString stringWithFormat:[[NSBundle mainBundle] localizedStringForKey:TTTLocalizedPluralStringKeyForCountAndSingularNoun(count, singular) value:@"" table:(tbl)], count] + +#define TTTLocalizedPluralStringFromTableInBundle(count, singular, tbl, bundle, comment) \ +[NSString stringWithFormat:[bundle localizedStringForKey:TTTLocalizedPluralStringKeyForCountAndSingularNoun(count, singular) value:@"" table:(tbl)], count] + +#define TTTLocalizedPluralStringWithDefaultValue(count, singular, tbl, bundle, val, comment) \ +[NSString stringWithFormat:[bundle localizedStringForKey:TTTLocalizedPluralStringKeyForCountAndSingularNoun(count, singular) value:(val) table:(tbl)], count] diff --git a/Example/Pods/TTTLocalizedPluralString/TTTLocalizedPluralString.m b/Example/Pods/TTTLocalizedPluralString/TTTLocalizedPluralString.m new file mode 100644 index 0000000..0e55d9b --- /dev/null +++ b/Example/Pods/TTTLocalizedPluralString/TTTLocalizedPluralString.m @@ -0,0 +1,526 @@ +// TTTLocalizedPluralString.h +// +// Copyright (c) 2011 Mattt Thompson (http://mattt.me) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "TTTLocalizedPluralString.h" + +// Source: Unicode Common Locale Data Repository Plural Rules +// http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html + +static NSString * const kTTTZeroPluralRule = @"zero"; +static NSString * const kTTTOnePluralRule = @"one"; +static NSString * const kTTTTwoPluralRule = @"two"; +static NSString * const kTTTFewPluralRule = @"few"; +static NSString * const kTTTManyPluralRule = @"many"; +static NSString * const kTTTOtherPluralRule = @"other"; + +static NSString * TTTArabicPluralRuleForCount(NSUInteger count) { + switch (count) { + case 0: + return kTTTZeroPluralRule; + case 1: + return kTTTOnePluralRule; + case 2: + return kTTTTwoPluralRule; + default: { + NSUInteger mod100 = count % 100; + if (mod100 >= 3 && mod100 <= 10) { + return kTTTFewPluralRule; + } else if (mod100 >= 11) { + return kTTTManyPluralRule; + } else { + return kTTTOtherPluralRule; + } + } + } +} + +static NSString * TTTSimplifiedChinesePluralRuleForCount(NSUInteger count) { + return kTTTOtherPluralRule; +} + +static NSString * TTTTraditionalChinesePluralRuleForCount(NSUInteger count) { + return kTTTOtherPluralRule; +} + +static NSString * TTTCatalanPluralRuleForCount(NSUInteger count) { + switch (count) { + case 1: + return kTTTOnePluralRule; + default: + return kTTTOtherPluralRule; + } +} + +static NSString * TTTCroatianPluralRuleForCount(NSUInteger count) { + NSUInteger mod10 = count % 10; + NSUInteger mod100 = count % 100; + + switch (mod10) { + case 1: + switch (mod100) { + case 11: + break; + default: + return kTTTOnePluralRule; + } + case 2: + case 3: + case 4: + switch (mod100) { + case 12: + case 13: + case 14: + break; + default: + return kTTTFewPluralRule; + } + + break; + default: + break; + } + + return kTTTManyPluralRule; +} + +static NSString * TTTCzechPluralRuleForCount(NSUInteger count) { + switch (count) { + case 1: + return kTTTOnePluralRule; + case 2: + case 3: + case 4: + return kTTTFewPluralRule; + default: + return kTTTOtherPluralRule; + } +} + +static NSString * TTTEnglishPluralRuleForCount(NSUInteger count) { + switch (count) { + case 1: + return kTTTOnePluralRule; + default: + return kTTTOtherPluralRule; + } +} + +static NSString * TTTFrenchPluralRuleForCount(NSUInteger count) { + switch (count) { + case 0: + case 1: + return kTTTOnePluralRule; + default: + return kTTTOtherPluralRule; + } +} + +static NSString * TTTGermanPluralRuleForCount(NSUInteger count) { + switch (count) { + case 1: + return kTTTOnePluralRule; + default: + return kTTTOtherPluralRule; + } +} + +static NSString * TTTDanishPluralRuleForCount(NSUInteger count) { + switch (count) { + case 1: + return kTTTOnePluralRule; + default: + return kTTTOtherPluralRule; + } +} + +static NSString * TTTDutchPluralRuleForCount(NSUInteger count) { + switch (count) { + case 1: + return kTTTOnePluralRule; + default: + return kTTTOtherPluralRule; + } +} + +static NSString * TTTFinnishPluralRuleForCount(NSUInteger count) { + switch (count) { + case 1: + return kTTTOnePluralRule; + default: + return kTTTOtherPluralRule; + } +} + +static NSString * TTTGreekPluralRuleForCount(NSUInteger count) { + switch (count) { + case 1: + return kTTTOnePluralRule; + default: + return kTTTOtherPluralRule; + } +} + +static NSString * TTTHebrewPluralRuleForCount(NSUInteger count) { + NSUInteger mod10 = count % 10; + + switch (count) { + case 1: + return kTTTOnePluralRule; + case 2: + return kTTTTwoPluralRule; + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + break; + default: + switch (mod10) { + case 0: + return kTTTManyPluralRule; + default: + break; + } + } + + return kTTTOtherPluralRule; +} + +static NSString * TTTHungarianPluralRuleForCount(NSUInteger count) { + switch (count) { + case 1: + return kTTTOnePluralRule; + default: + return kTTTOtherPluralRule; + } +} + +static NSString * TTTIndonesianPluralRuleForCount(NSUInteger count) { + return kTTTOtherPluralRule; +} + +static NSString * TTTItalianPluralRuleForCount(NSUInteger count) { + switch (count) { + case 1: + return kTTTOnePluralRule; + default: + return kTTTOtherPluralRule; + } +} + +static NSString * TTTJapanesePluralRuleForCount(NSUInteger count) { + return kTTTOtherPluralRule; +} + +static NSString * TTTKoreanPluralRuleForCount(NSUInteger count) { + return kTTTOtherPluralRule; +} + +static NSString * TTTLatvianPluralRuleForCount(NSUInteger count) { + NSUInteger mod10 = count % 10; + NSUInteger mod100 = count % 100; + + if (count == 0) { + return kTTTZeroPluralRule; + } + + if (count == 1) { + return kTTTOnePluralRule; + } + + switch (mod10) { + case 1: + if (mod100 != 11) { + return kTTTOnePluralRule; + } + break; + default: + break; + } + + return kTTTManyPluralRule; +} + +static NSString * TTTMalayPluralRuleForCount(NSUInteger count) { + return kTTTOtherPluralRule; +} + +static NSString * TTTNorwegianBokmalPluralRuleForCount(NSUInteger count) { + switch (count) { + case 1: + return kTTTOnePluralRule; + default: + return kTTTOtherPluralRule; + } +} + +static NSString * TTTNorwegianNynorskPluralRuleForCount(NSUInteger count) { + switch (count) { + case 1: + return kTTTOnePluralRule; + default: + return kTTTOtherPluralRule; + } +} + +static NSString * TTTPolishPluralRuleForCount(NSUInteger count) { + NSUInteger mod10 = count % 10; + NSUInteger mod100 = count % 100; + + if (count == 1) { + return kTTTOnePluralRule; + } + + switch (mod10) { + case 2: + case 3: + case 4: + switch (mod100) { + case 12: + case 13: + case 14: + break; + default: + return kTTTFewPluralRule; + } + + break; + default: + break; + } + + return kTTTManyPluralRule; +} + +static NSString * TTTPortuguesePluralRuleForCount(NSUInteger count) { + switch (count) { + case 1: + return kTTTOnePluralRule; + default: + return kTTTOtherPluralRule; + } +} + +static NSString * TTTRomanianPluralRuleForCount(NSUInteger count) { + NSUInteger mod100 = count % 100; + + switch (count) { + case 0: + return kTTTFewPluralRule; + case 1: + return kTTTOnePluralRule; + default: + if (mod100 > 1 && mod100 <= 19) { + return kTTTFewPluralRule; + } + break; + } + + return kTTTOtherPluralRule; +} + +static NSString * TTTRussianPluralRuleForCount(NSUInteger count) { + NSUInteger mod10 = count % 10; + NSUInteger mod100 = count % 100; + + switch (mod100) { + case 11: + case 12: + case 13: + case 14: + break; + + default: + switch (mod10) { + case 1: + return kTTTOnePluralRule; + case 2: + case 3: + case 4: + return kTTTFewPluralRule; + default: + break; + } + + } + + return kTTTManyPluralRule; +} + +static NSString * TTTSlovakPluralRuleForCount(NSUInteger count) { + switch (count) { + case 1: + return kTTTOnePluralRule; + case 2: + case 3: + case 4: + return kTTTFewPluralRule; + default: + return kTTTOtherPluralRule; + } +} + +static NSString * TTTSpanishPluralRuleForCount(NSUInteger count) { + switch (count) { + case 1: + return kTTTOnePluralRule; + default: + return kTTTOtherPluralRule; + } +} + +static NSString * TTTSwedishPluralRuleForCount(NSUInteger count) { + switch (count) { + case 1: + return kTTTOnePluralRule; + default: + return kTTTOtherPluralRule; + } +} + +static NSString * TTTThaiPluralRuleForCount(NSUInteger count) { + return kTTTOtherPluralRule; +} + +static NSString * TTTTurkishPluralRuleForCount(NSUInteger count) { + return kTTTOtherPluralRule; +} + +static NSString * TTTUkrainianPluralRuleForCount(NSUInteger count) { + NSUInteger mod10 = count % 10; + NSUInteger mod100 = count % 100; + + switch (mod100) { + case 11: + case 12: + case 13: + case 14: + break; + + default: + switch (mod10) { + case 1: + return kTTTOnePluralRule; + case 2: + case 3: + case 4: + return kTTTFewPluralRule; + default: + break; + } + + } + + return kTTTManyPluralRule; +} + +static NSString * TTTVietnamesePluralRuleForCount(NSUInteger count) { + return kTTTOtherPluralRule; +} + +NSString * TTTLocalizedPluralStringKeyForCountAndSingularNoun(NSUInteger count, NSString *singular) { + NSString *languageCode = [[[NSBundle mainBundle] preferredLocalizations] objectAtIndex:0]; + return TTTLocalizedPluralStringKeyForCountAndSingularNounForLanguage(count, singular, languageCode); +} + +NSString * TTTLocalizedPluralStringKeyForCountAndSingularNounForLanguage(NSUInteger count, NSString *singular, NSString *languageCode) { + NSString *pluralRule = nil; + + // Because -hasPrefix is being used here, any three-letter ISO 639-2/3 codes must come before two-letter ISO 639-1 codes in order to prevent, for instance, Konkani (kok) from having Korean (ko) pluralization applied + if ([languageCode hasPrefix:@"ar"]) { + pluralRule = TTTArabicPluralRuleForCount(count); + } else if ([languageCode hasPrefix:@"ca"]) { + pluralRule = TTTCatalanPluralRuleForCount(count); + } else if ([languageCode hasPrefix:@"zh-Hans"]) { + pluralRule = TTTSimplifiedChinesePluralRuleForCount(count); + } else if ([languageCode hasPrefix:@"zh-Hant"]) { + pluralRule = TTTTraditionalChinesePluralRuleForCount(count); + } else if ([languageCode hasPrefix:@"cr"]) { + pluralRule = TTTCroatianPluralRuleForCount(count); + } else if ([languageCode hasPrefix:@"cs"]) { + pluralRule = TTTCzechPluralRuleForCount(count); + } else if ([languageCode hasPrefix:@"da"]) { + pluralRule = TTTDanishPluralRuleForCount(count); + } else if ([languageCode hasPrefix:@"nl"]) { + pluralRule = TTTDutchPluralRuleForCount(count); + } else if ([languageCode hasPrefix:@"en"]) { + pluralRule = TTTEnglishPluralRuleForCount(count); + } else if ([languageCode hasPrefix:@"fr"]) { + pluralRule = TTTFrenchPluralRuleForCount(count); + } else if ([languageCode hasPrefix:@"de"]) { + pluralRule = TTTGermanPluralRuleForCount(count); + } else if ([languageCode hasPrefix:@"fi"]) { + pluralRule = TTTFinnishPluralRuleForCount(count); + } else if ([languageCode hasPrefix:@"el"]) { + pluralRule = TTTGreekPluralRuleForCount(count); + } else if ([languageCode hasPrefix:@"he"]) { + pluralRule = TTTHebrewPluralRuleForCount(count); + } else if ([languageCode hasPrefix:@"hu"]) { + pluralRule = TTTHungarianPluralRuleForCount(count); + } else if ([languageCode hasPrefix:@"id"]) { + pluralRule = TTTIndonesianPluralRuleForCount(count); + } else if ([languageCode hasPrefix:@"it"]) { + pluralRule = TTTItalianPluralRuleForCount(count); + } else if ([languageCode hasPrefix:@"ja"]) { + pluralRule = TTTJapanesePluralRuleForCount(count); + } else if ([languageCode hasPrefix:@"ko"]) { + pluralRule = TTTKoreanPluralRuleForCount(count); + } else if ([languageCode hasPrefix:@"lv"]) { + pluralRule = TTTLatvianPluralRuleForCount(count); + } else if ([languageCode hasPrefix:@"ms"]) { + pluralRule = TTTMalayPluralRuleForCount(count); + } else if ([languageCode hasPrefix:@"nb"]) { + pluralRule = TTTNorwegianBokmalPluralRuleForCount(count); + } else if ([languageCode hasPrefix:@"nn"]) { + pluralRule = TTTNorwegianNynorskPluralRuleForCount(count); + } else if ([languageCode hasPrefix:@"pl"]) { + pluralRule = TTTPolishPluralRuleForCount(count); + } else if ([languageCode hasPrefix:@"pt"]) { + pluralRule = TTTPortuguesePluralRuleForCount(count); + } else if ([languageCode hasPrefix:@"ro"]) { + pluralRule = TTTRomanianPluralRuleForCount(count); + } else if ([languageCode hasPrefix:@"ru"]) { + pluralRule = TTTRussianPluralRuleForCount(count); + } else if ([languageCode hasPrefix:@"es"]) { + pluralRule = TTTSpanishPluralRuleForCount(count); + } else if ([languageCode hasPrefix:@"sk"]) { + pluralRule = TTTSlovakPluralRuleForCount(count); + } else if ([languageCode hasPrefix:@"sv"]) { + pluralRule = TTTSwedishPluralRuleForCount(count); + } else if ([languageCode hasPrefix:@"th"]) { + pluralRule = TTTThaiPluralRuleForCount(count); + } else if ([languageCode hasPrefix:@"tr"]) { + pluralRule = TTTTurkishPluralRuleForCount(count); + } else if ([languageCode hasPrefix:@"uk"]) { + pluralRule = TTTUkrainianPluralRuleForCount(count); + } else if ([languageCode hasPrefix:@"vi"]) { + pluralRule = TTTVietnamesePluralRuleForCount(count); + } else { + NSLog(@"Unsupported language: %@", languageCode); + return nil; + } + + return [NSString stringWithFormat:@"%%d %@ (plural rule: %@)", singular, pluralRule]; +} diff --git a/Example/RelativeDateDemo.xcodeproj/project.pbxproj b/Example/RelativeDateDemo.xcodeproj/project.pbxproj index 006f8d1..5f17208 100755 --- a/Example/RelativeDateDemo.xcodeproj/project.pbxproj +++ b/Example/RelativeDateDemo.xcodeproj/project.pbxproj @@ -1,324 +1,936 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; - 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765A40DF7441C002DB57D /* CoreGraphics.framework */; }; - DAD012DC16C8311E00AF7B51 /* SORelativeDateTransformer.bundle in Resources */ = {isa = PBXBuildFile; fileRef = DAD012DB16C8311E00AF7B51 /* SORelativeDateTransformer.bundle */; }; - F202C6FE15DAE09A0090BD6C /* TesterViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F202C70015DAE09A0090BD6C /* TesterViewController.xib */; }; - F2A33B3F12AD9CA400459019 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = F2A33B3A12AD9CA400459019 /* AppDelegate.m */; }; - F2A33B4012AD9CA400459019 /* SORelativeDateTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = F2A33B3C12AD9CA400459019 /* SORelativeDateTransformer.m */; }; - F2A33B4112AD9CA400459019 /* TesterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F2A33B3E12AD9CA400459019 /* TesterViewController.m */; }; - F2CD10D2166402F8004A81F3 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = F2CD10D1166402F8004A81F3 /* Default-568h@2x.png */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 1D6058910D05DD3D006BFB54 /* RelativeDateDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RelativeDateDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 288765A40DF7441C002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 32CA4F630368D1EE00C91783 /* RelativeDateDemo_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RelativeDateDemo_Prefix.pch; sourceTree = ""; }; - 3A188B56173989EB00EF631C /* pt */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = pt; path = pt.lproj/TesterViewController.xib; sourceTree = ""; }; - 6143EE561631527000AF766F /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = "zh-Hans"; path = "zh-Hans.lproj/TesterViewController.xib"; sourceTree = ""; }; - 6143EE571631527500AF766F /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = "zh-Hant"; path = "zh-Hant.lproj/TesterViewController.xib"; sourceTree = ""; }; - 8D1107310486CEB800E47090 /* RelativeDateDemo-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "RelativeDateDemo-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; - A0B5915C17A2572C000DC886 /* ca */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = ca; path = ca.lproj/TesterViewController.xib; sourceTree = ""; }; - AD146F5C17412FC300205BB9 /* nb */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = nb; path = nb.lproj/TesterViewController.xib; sourceTree = ""; }; - C00164F21741524100F26B56 /* it */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = it; path = it.lproj/TesterViewController.xib; sourceTree = ""; }; - DA300D8F16C8326F002E4C04 /* ja */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = ja; path = ja.lproj/TesterViewController.xib; sourceTree = ""; }; - DAD012DB16C8311E00AF7B51 /* SORelativeDateTransformer.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = SORelativeDateTransformer.bundle; path = ../SORelativeDateTransformer/SORelativeDateTransformer.bundle; sourceTree = ""; }; - F202C6FF15DAE09A0090BD6C /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/TesterViewController.xib; sourceTree = ""; }; - F202C70115DAE0C90090BD6C /* fr */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = fr; path = fr.lproj/TesterViewController.xib; sourceTree = ""; }; - F202C70215DAE0D00090BD6C /* de */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = de; path = de.lproj/TesterViewController.xib; sourceTree = ""; }; - F202C70315DAE0D50090BD6C /* es */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = es; path = es.lproj/TesterViewController.xib; sourceTree = ""; }; - F202C70415DAE1490090BD6C /* nl */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = nl; path = nl.lproj/TesterViewController.xib; sourceTree = ""; }; - F2A33B3912AD9CA400459019 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - F2A33B3A12AD9CA400459019 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - F2A33B3B12AD9CA400459019 /* SORelativeDateTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SORelativeDateTransformer.h; path = ../SORelativeDateTransformer/SORelativeDateTransformer.h; sourceTree = ""; }; - F2A33B3C12AD9CA400459019 /* SORelativeDateTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SORelativeDateTransformer.m; path = ../SORelativeDateTransformer/SORelativeDateTransformer.m; sourceTree = ""; }; - F2A33B3D12AD9CA400459019 /* TesterViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TesterViewController.h; sourceTree = ""; }; - F2A33B3E12AD9CA400459019 /* TesterViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TesterViewController.m; sourceTree = ""; }; - F2B5377617761D7F00C54F38 /* LICENSE.md */ = {isa = PBXFileReference; lastKnownFileType = text; name = LICENSE.md; path = ../LICENSE.md; sourceTree = ""; }; - F2CD10CF166401CA004A81F3 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = text; name = README.md; path = ../README.md; sourceTree = ""; }; - F2CD10D1166402F8004A81F3 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, - 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, - 288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 1D6058910D05DD3D006BFB54 /* RelativeDateDemo.app */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { - isa = PBXGroup; - children = ( - F2CD10CF166401CA004A81F3 /* README.md */, - F2B5377617761D7F00C54F38 /* LICENSE.md */, - F2A33B3B12AD9CA400459019 /* SORelativeDateTransformer.h */, - F2A33B3C12AD9CA400459019 /* SORelativeDateTransformer.m */, - DAD012DB16C8311E00AF7B51 /* SORelativeDateTransformer.bundle */, - F2A33B3412AD9C7C00459019 /* Tester App Source */, - 29B97315FDCFA39411CA2CEA /* Other Sources */, - 29B97317FDCFA39411CA2CEA /* Resources */, - 29B97323FDCFA39411CA2CEA /* Frameworks */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = CustomTemplate; - sourceTree = ""; - }; - 29B97315FDCFA39411CA2CEA /* Other Sources */ = { - isa = PBXGroup; - children = ( - 32CA4F630368D1EE00C91783 /* RelativeDateDemo_Prefix.pch */, - 29B97316FDCFA39411CA2CEA /* main.m */, - ); - name = "Other Sources"; - sourceTree = ""; - }; - 29B97317FDCFA39411CA2CEA /* Resources */ = { - isa = PBXGroup; - children = ( - F2CD10D1166402F8004A81F3 /* Default-568h@2x.png */, - F202C70015DAE09A0090BD6C /* TesterViewController.xib */, - 8D1107310486CEB800E47090 /* RelativeDateDemo-Info.plist */, - ); - name = Resources; - sourceTree = ""; - }; - 29B97323FDCFA39411CA2CEA /* Frameworks */ = { - isa = PBXGroup; - children = ( - 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, - 1D30AB110D05D00D00671497 /* Foundation.framework */, - 288765A40DF7441C002DB57D /* CoreGraphics.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - F2A33B3412AD9C7C00459019 /* Tester App Source */ = { - isa = PBXGroup; - children = ( - F2A33B3912AD9CA400459019 /* AppDelegate.h */, - F2A33B3A12AD9CA400459019 /* AppDelegate.m */, - F2A33B3D12AD9CA400459019 /* TesterViewController.h */, - F2A33B3E12AD9CA400459019 /* TesterViewController.m */, - ); - name = "Tester App Source"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 1D6058900D05DD3D006BFB54 /* RelativeDateDemo */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "RelativeDateDemo" */; - buildPhases = ( - 1D60588E0D05DD3D006BFB54 /* Sources */, - 1D60588F0D05DD3D006BFB54 /* Frameworks */, - 1D60588D0D05DD3D006BFB54 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = RelativeDateDemo; - productName = SORelativeDateTransformerTester; - productReference = 1D6058910D05DD3D006BFB54 /* RelativeDateDemo.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0440; - }; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "RelativeDateDemo" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - Klingon, - Spanish, - de, - es, - fr, - klingon, - Base, - nl, - "zh-Hans", - "zh-Hant", - ja, - pt, - nb, - it, - ca, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 1D6058900D05DD3D006BFB54 /* RelativeDateDemo */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 1D60588D0D05DD3D006BFB54 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - F202C6FE15DAE09A0090BD6C /* TesterViewController.xib in Resources */, - F2CD10D2166402F8004A81F3 /* Default-568h@2x.png in Resources */, - DAD012DC16C8311E00AF7B51 /* SORelativeDateTransformer.bundle in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 1D60588E0D05DD3D006BFB54 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589B0D05DD56006BFB54 /* main.m in Sources */, - F2A33B3F12AD9CA400459019 /* AppDelegate.m in Sources */, - F2A33B4012AD9CA400459019 /* SORelativeDateTransformer.m in Sources */, - F2A33B4112AD9CA400459019 /* TesterViewController.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - F202C70015DAE09A0090BD6C /* TesterViewController.xib */ = { - isa = PBXVariantGroup; - children = ( - F202C6FF15DAE09A0090BD6C /* en */, - F202C70115DAE0C90090BD6C /* fr */, - F202C70215DAE0D00090BD6C /* de */, - F202C70315DAE0D50090BD6C /* es */, - F202C70415DAE1490090BD6C /* nl */, - 6143EE561631527000AF766F /* zh-Hans */, - 6143EE571631527500AF766F /* zh-Hant */, - DA300D8F16C8326F002E4C04 /* ja */, - 3A188B56173989EB00EF631C /* pt */, - AD146F5C17412FC300205BB9 /* nb */, - C00164F21741524100F26B56 /* it */, - A0B5915C17A2572C000DC886 /* ca */, - ); - name = TesterViewController.xib; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 1D6058940D05DD3E006BFB54 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = RelativeDateDemo_Prefix.pch; - GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1"; - INFOPLIST_FILE = "$(SRCROOT)/RelativeDateDemo-Info.plist"; - PRODUCT_NAME = RelativeDateDemo; - }; - name = Debug; - }; - 1D6058950D05DD3E006BFB54 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = YES; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = RelativeDateDemo_Prefix.pch; - INFOPLIST_FILE = "$(SRCROOT)/RelativeDateDemo-Info.plist"; - PRODUCT_NAME = RelativeDateDemo; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 5.1; - SDKROOT = iphoneos; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 5.1; - OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; - SDKROOT = iphoneos; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "RelativeDateDemo" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1D6058940D05DD3E006BFB54 /* Debug */, - 1D6058950D05DD3E006BFB54 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "RelativeDateDemo" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} + + + + + archiveVersion + 1 + classes + + objectVersion + 46 + objects + + 12B6BD49055141619D02BF85 + + fileRef + 310461E1E033431E997F45F9 + isa + PBXBuildFile + + 19C28FACFE9D520D11CA2CBB + + children + + 1D6058910D05DD3D006BFB54 + + isa + PBXGroup + name + Products + sourceTree + <group> + + 1D30AB110D05D00D00671497 + + isa + PBXFileReference + lastKnownFileType + wrapper.framework + name + Foundation.framework + path + System/Library/Frameworks/Foundation.framework + sourceTree + SDKROOT + + 1D60588D0D05DD3D006BFB54 + + buildActionMask + 2147483647 + files + + F202C6FE15DAE09A0090BD6C + F2CD10D2166402F8004A81F3 + DAD012DC16C8311E00AF7B51 + + isa + PBXResourcesBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 1D60588E0D05DD3D006BFB54 + + buildActionMask + 2147483647 + files + + 1D60589B0D05DD56006BFB54 + F2A33B3F12AD9CA400459019 + F2A33B4012AD9CA400459019 + F2A33B4112AD9CA400459019 + + isa + PBXSourcesBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 1D60588F0D05DD3D006BFB54 + + buildActionMask + 2147483647 + files + + 1D60589F0D05DD5A006BFB54 + 1DF5F4E00D08C38300B7A737 + 288765A50DF7441C002DB57D + 12B6BD49055141619D02BF85 + + isa + PBXFrameworksBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 1D6058900D05DD3D006BFB54 + + buildConfigurationList + 1D6058960D05DD3E006BFB54 + buildPhases + + 7DA36FD2DB6D4F5690647E67 + 1D60588E0D05DD3D006BFB54 + 1D60588F0D05DD3D006BFB54 + 1D60588D0D05DD3D006BFB54 + 5803D7EE007F45E8A8249BE5 + + buildRules + + dependencies + + isa + PBXNativeTarget + name + RelativeDateDemo + productName + SORelativeDateTransformerTester + productReference + 1D6058910D05DD3D006BFB54 + productType + com.apple.product-type.application + + 1D6058910D05DD3D006BFB54 + + explicitFileType + wrapper.application + includeInIndex + 0 + isa + PBXFileReference + path + RelativeDateDemo.app + sourceTree + BUILT_PRODUCTS_DIR + + 1D6058940D05DD3E006BFB54 + + baseConfigurationReference + DAF87D503CEC4175A959BAAF + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + COPY_PHASE_STRIP + NO + GCC_DYNAMIC_NO_PIC + NO + GCC_OPTIMIZATION_LEVEL + 0 + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_PREFIX_HEADER + RelativeDateDemo_Prefix.pch + INFOPLIST_FILE + $(SRCROOT)/RelativeDateDemo-Info.plist + PRODUCT_NAME + RelativeDateDemo + + isa + XCBuildConfiguration + name + Debug + + 1D6058950D05DD3E006BFB54 + + baseConfigurationReference + DAF87D503CEC4175A959BAAF + buildSettings + + ALWAYS_SEARCH_USER_PATHS + NO + COPY_PHASE_STRIP + YES + GCC_PRECOMPILE_PREFIX_HEADER + YES + GCC_PREFIX_HEADER + RelativeDateDemo_Prefix.pch + INFOPLIST_FILE + $(SRCROOT)/RelativeDateDemo-Info.plist + PRODUCT_NAME + RelativeDateDemo + VALIDATE_PRODUCT + YES + + isa + XCBuildConfiguration + name + Release + + 1D6058960D05DD3E006BFB54 + + buildConfigurations + + 1D6058940D05DD3E006BFB54 + 1D6058950D05DD3E006BFB54 + + defaultConfigurationIsVisible + 0 + defaultConfigurationName + Release + isa + XCConfigurationList + + 1D60589B0D05DD56006BFB54 + + fileRef + 29B97316FDCFA39411CA2CEA + isa + PBXBuildFile + + 1D60589F0D05DD5A006BFB54 + + fileRef + 1D30AB110D05D00D00671497 + isa + PBXBuildFile + + 1DF5F4DF0D08C38300B7A737 + + isa + PBXFileReference + lastKnownFileType + wrapper.framework + name + UIKit.framework + path + System/Library/Frameworks/UIKit.framework + sourceTree + SDKROOT + + 1DF5F4E00D08C38300B7A737 + + fileRef + 1DF5F4DF0D08C38300B7A737 + isa + PBXBuildFile + + 288765A40DF7441C002DB57D + + isa + PBXFileReference + lastKnownFileType + wrapper.framework + name + CoreGraphics.framework + path + System/Library/Frameworks/CoreGraphics.framework + sourceTree + SDKROOT + + 288765A50DF7441C002DB57D + + fileRef + 288765A40DF7441C002DB57D + isa + PBXBuildFile + + 29B97313FDCFA39411CA2CEA + + attributes + + LastUpgradeCheck + 0440 + + buildConfigurationList + C01FCF4E08A954540054247B + compatibilityVersion + Xcode 3.2 + developmentRegion + English + hasScannedForEncodings + 1 + isa + PBXProject + knownRegions + + English + Japanese + French + German + Klingon + Spanish + de + es + fr + klingon + Base + nl + zh-Hans + zh-Hant + ja + pt + nb + it + ca + + mainGroup + 29B97314FDCFA39411CA2CEA + projectDirPath + + projectReferences + + projectRoot + + targets + + 1D6058900D05DD3D006BFB54 + + + 29B97314FDCFA39411CA2CEA + + children + + F2CD10CF166401CA004A81F3 + F2B5377617761D7F00C54F38 + F2A33B3B12AD9CA400459019 + F2A33B3C12AD9CA400459019 + DAD012DB16C8311E00AF7B51 + F2A33B3412AD9C7C00459019 + 29B97315FDCFA39411CA2CEA + 29B97317FDCFA39411CA2CEA + 29B97323FDCFA39411CA2CEA + 19C28FACFE9D520D11CA2CBB + DAF87D503CEC4175A959BAAF + + isa + PBXGroup + name + CustomTemplate + sourceTree + <group> + + 29B97315FDCFA39411CA2CEA + + children + + 32CA4F630368D1EE00C91783 + 29B97316FDCFA39411CA2CEA + + isa + PBXGroup + name + Other Sources + sourceTree + <group> + + 29B97316FDCFA39411CA2CEA + + fileEncoding + 4 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + main.m + sourceTree + <group> + + 29B97317FDCFA39411CA2CEA + + children + + F2CD10D1166402F8004A81F3 + F202C70015DAE09A0090BD6C + 8D1107310486CEB800E47090 + + isa + PBXGroup + name + Resources + sourceTree + <group> + + 29B97323FDCFA39411CA2CEA + + children + + 1DF5F4DF0D08C38300B7A737 + 1D30AB110D05D00D00671497 + 288765A40DF7441C002DB57D + 310461E1E033431E997F45F9 + + isa + PBXGroup + name + Frameworks + sourceTree + <group> + + 310461E1E033431E997F45F9 + + explicitFileType + archive.ar + includeInIndex + 0 + isa + PBXFileReference + path + libPods.a + sourceTree + BUILT_PRODUCTS_DIR + + 32CA4F630368D1EE00C91783 + + fileEncoding + 4 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + path + RelativeDateDemo_Prefix.pch + sourceTree + <group> + + 3A188B56173989EB00EF631C + + isa + PBXFileReference + lastKnownFileType + file.xib + name + pt + path + pt.lproj/TesterViewController.xib + sourceTree + <group> + + 5803D7EE007F45E8A8249BE5 + + buildActionMask + 2147483647 + files + + inputPaths + + isa + PBXShellScriptBuildPhase + name + Copy Pods Resources + outputPaths + + runOnlyForDeploymentPostprocessing + 0 + shellPath + /bin/sh + shellScript + "${SRCROOT}/Pods/Pods-resources.sh" + + showEnvVarsInLog + 0 + + 6143EE561631527000AF766F + + isa + PBXFileReference + lastKnownFileType + file.xib + name + zh-Hans + path + zh-Hans.lproj/TesterViewController.xib + sourceTree + <group> + + 6143EE571631527500AF766F + + isa + PBXFileReference + lastKnownFileType + file.xib + name + zh-Hant + path + zh-Hant.lproj/TesterViewController.xib + sourceTree + <group> + + 7DA36FD2DB6D4F5690647E67 + + buildActionMask + 2147483647 + files + + inputPaths + + isa + PBXShellScriptBuildPhase + name + Check Pods Manifest.lock + outputPaths + + runOnlyForDeploymentPostprocessing + 0 + shellPath + /bin/sh + shellScript + diff "${PODS_ROOT}/../Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null +if [[ $? != 0 ]] ; then + cat << EOM +error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation. +EOM + exit 1 +fi + + showEnvVarsInLog + 0 + + 8D1107310486CEB800E47090 + + fileEncoding + 4 + isa + PBXFileReference + lastKnownFileType + text.plist.xml + path + RelativeDateDemo-Info.plist + plistStructureDefinitionIdentifier + com.apple.xcode.plist.structure-definition.iphone.info-plist + sourceTree + <group> + + A0B5915C17A2572C000DC886 + + isa + PBXFileReference + lastKnownFileType + file.xib + name + ca + path + ca.lproj/TesterViewController.xib + sourceTree + <group> + + AD146F5C17412FC300205BB9 + + isa + PBXFileReference + lastKnownFileType + file.xib + name + nb + path + nb.lproj/TesterViewController.xib + sourceTree + <group> + + C00164F21741524100F26B56 + + isa + PBXFileReference + lastKnownFileType + file.xib + name + it + path + it.lproj/TesterViewController.xib + sourceTree + <group> + + C01FCF4E08A954540054247B + + buildConfigurations + + C01FCF4F08A954540054247B + C01FCF5008A954540054247B + + defaultConfigurationIsVisible + 0 + defaultConfigurationName + Release + isa + XCConfigurationList + + C01FCF4F08A954540054247B + + buildSettings + + ARCHS + $(ARCHS_STANDARD_32_BIT) + CODE_SIGN_IDENTITY[sdk=iphoneos*] + iPhone Developer + GCC_C_LANGUAGE_STANDARD + c99 + GCC_WARN_ABOUT_RETURN_TYPE + YES + GCC_WARN_UNUSED_VARIABLE + YES + IPHONEOS_DEPLOYMENT_TARGET + 5.1 + SDKROOT + iphoneos + + isa + XCBuildConfiguration + name + Debug + + C01FCF5008A954540054247B + + buildSettings + + ARCHS + $(ARCHS_STANDARD_32_BIT) + CODE_SIGN_IDENTITY[sdk=iphoneos*] + iPhone Developer + GCC_C_LANGUAGE_STANDARD + c99 + GCC_WARN_ABOUT_RETURN_TYPE + YES + GCC_WARN_UNUSED_VARIABLE + YES + IPHONEOS_DEPLOYMENT_TARGET + 5.1 + OTHER_CFLAGS + -DNS_BLOCK_ASSERTIONS=1 + SDKROOT + iphoneos + + isa + XCBuildConfiguration + name + Release + + DA300D8F16C8326F002E4C04 + + isa + PBXFileReference + lastKnownFileType + file.xib + name + ja + path + ja.lproj/TesterViewController.xib + sourceTree + <group> + + DAD012DB16C8311E00AF7B51 + + isa + PBXFileReference + lastKnownFileType + wrapper.plug-in + name + SORelativeDateTransformer.bundle + path + ../SORelativeDateTransformer/SORelativeDateTransformer.bundle + sourceTree + <group> + + DAD012DC16C8311E00AF7B51 + + fileRef + DAD012DB16C8311E00AF7B51 + isa + PBXBuildFile + + DAF87D503CEC4175A959BAAF + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text.xcconfig + name + Pods.xcconfig + path + Pods/Pods.xcconfig + sourceTree + <group> + + F202C6FE15DAE09A0090BD6C + + fileRef + F202C70015DAE09A0090BD6C + isa + PBXBuildFile + + F202C6FF15DAE09A0090BD6C + + isa + PBXFileReference + lastKnownFileType + file.xib + name + en + path + en.lproj/TesterViewController.xib + sourceTree + <group> + + F202C70015DAE09A0090BD6C + + children + + F202C6FF15DAE09A0090BD6C + F202C70115DAE0C90090BD6C + F202C70215DAE0D00090BD6C + F202C70315DAE0D50090BD6C + F202C70415DAE1490090BD6C + 6143EE561631527000AF766F + 6143EE571631527500AF766F + DA300D8F16C8326F002E4C04 + 3A188B56173989EB00EF631C + AD146F5C17412FC300205BB9 + C00164F21741524100F26B56 + A0B5915C17A2572C000DC886 + + isa + PBXVariantGroup + name + TesterViewController.xib + sourceTree + <group> + + F202C70115DAE0C90090BD6C + + isa + PBXFileReference + lastKnownFileType + file.xib + name + fr + path + fr.lproj/TesterViewController.xib + sourceTree + <group> + + F202C70215DAE0D00090BD6C + + isa + PBXFileReference + lastKnownFileType + file.xib + name + de + path + de.lproj/TesterViewController.xib + sourceTree + <group> + + F202C70315DAE0D50090BD6C + + isa + PBXFileReference + lastKnownFileType + file.xib + name + es + path + es.lproj/TesterViewController.xib + sourceTree + <group> + + F202C70415DAE1490090BD6C + + isa + PBXFileReference + lastKnownFileType + file.xib + name + nl + path + nl.lproj/TesterViewController.xib + sourceTree + <group> + + F2A33B3412AD9C7C00459019 + + children + + F2A33B3912AD9CA400459019 + F2A33B3A12AD9CA400459019 + F2A33B3D12AD9CA400459019 + F2A33B3E12AD9CA400459019 + + isa + PBXGroup + name + Tester App Source + sourceTree + <group> + + F2A33B3912AD9CA400459019 + + fileEncoding + 4 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + path + AppDelegate.h + sourceTree + <group> + + F2A33B3A12AD9CA400459019 + + fileEncoding + 4 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + AppDelegate.m + sourceTree + <group> + + F2A33B3B12AD9CA400459019 + + fileEncoding + 4 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + name + SORelativeDateTransformer.h + path + ../SORelativeDateTransformer/SORelativeDateTransformer.h + sourceTree + <group> + + F2A33B3C12AD9CA400459019 + + fileEncoding + 4 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + name + SORelativeDateTransformer.m + path + ../SORelativeDateTransformer/SORelativeDateTransformer.m + sourceTree + <group> + + F2A33B3D12AD9CA400459019 + + fileEncoding + 4 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + path + TesterViewController.h + sourceTree + <group> + + F2A33B3E12AD9CA400459019 + + fileEncoding + 4 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + TesterViewController.m + sourceTree + <group> + + F2A33B3F12AD9CA400459019 + + fileRef + F2A33B3A12AD9CA400459019 + isa + PBXBuildFile + + F2A33B4012AD9CA400459019 + + fileRef + F2A33B3C12AD9CA400459019 + isa + PBXBuildFile + + F2A33B4112AD9CA400459019 + + fileRef + F2A33B3E12AD9CA400459019 + isa + PBXBuildFile + + F2B5377617761D7F00C54F38 + + isa + PBXFileReference + lastKnownFileType + text + name + LICENSE.md + path + ../LICENSE.md + sourceTree + <group> + + F2CD10CF166401CA004A81F3 + + isa + PBXFileReference + lastKnownFileType + text + name + README.md + path + ../README.md + sourceTree + <group> + + F2CD10D1166402F8004A81F3 + + isa + PBXFileReference + lastKnownFileType + image.png + path + Default-568h@2x.png + sourceTree + <group> + + F2CD10D2166402F8004A81F3 + + fileRef + F2CD10D1166402F8004A81F3 + isa + PBXBuildFile + + + rootObject + 29B97313FDCFA39411CA2CEA + + diff --git a/SORelativeDateTransformer.podspec b/SORelativeDateTransformer.podspec index 78a7436..6fc4ddc 100644 --- a/SORelativeDateTransformer.podspec +++ b/SORelativeDateTransformer.podspec @@ -14,5 +14,6 @@ Pod::Spec.new do |s| s.requires_arc = false s.ios.deployment_target = '4.3' s.osx.deployment_target = '10.7' + s.dependency 'TTTLocalizedPluralString' end