Skip to content
This repository has been archived by the owner on Jul 8, 2019. It is now read-only.

Bundle Resources #219

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion FormatterKit.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ Pod::Spec.new do |s|
s.requires_arc = true

s.subspec 'Resources' do |ss|
ss.resources = 'Localizations/**'
ss.resource_bundles = {'FormatterKit' => ['Localizations/**']}
ss.source_files = 'FormatterKit/NSBundle+FormatterKit.{h,m}'
end

s.subspec 'AddressFormatter' do |ss|
Expand Down
12 changes: 12 additions & 0 deletions FormatterKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@
5B08B6B71CA6A26A009541EC /* FormatterKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 5B08B66C1CA69F99009541EC /* FormatterKit.h */; settings = {ATTRIBUTES = (Public, ); }; };
5B31FE411CA6B47800309D75 /* FormatterKit.strings in Resources */ = {isa = PBXBuildFile; fileRef = 5B31FE231CA6B47800309D75 /* FormatterKit.strings */; };
5B31FE421CA6B47800309D75 /* FormatterKit.strings in Resources */ = {isa = PBXBuildFile; fileRef = 5B31FE231CA6B47800309D75 /* FormatterKit.strings */; };
DCBC8EB31CE3D5C2008E89F2 /* NSBundle+FormatterKit.h in Headers */ = {isa = PBXBuildFile; fileRef = DCBC8EB11CE3D5C2008E89F2 /* NSBundle+FormatterKit.h */; };
DCBC8EB41CE3D5C2008E89F2 /* NSBundle+FormatterKit.h in Headers */ = {isa = PBXBuildFile; fileRef = DCBC8EB11CE3D5C2008E89F2 /* NSBundle+FormatterKit.h */; };
DCBC8EB51CE3D5C2008E89F2 /* NSBundle+FormatterKit.m in Sources */ = {isa = PBXBuildFile; fileRef = DCBC8EB21CE3D5C2008E89F2 /* NSBundle+FormatterKit.m */; };
DCBC8EB61CE3D5C2008E89F2 /* NSBundle+FormatterKit.m in Sources */ = {isa = PBXBuildFile; fileRef = DCBC8EB21CE3D5C2008E89F2 /* NSBundle+FormatterKit.m */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand Down Expand Up @@ -103,6 +107,8 @@
5B31FE3E1CA6B47800309D75 /* vi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = vi; path = vi.lproj/FormatterKit.strings; sourceTree = "<group>"; };
5B31FE3F1CA6B47800309D75 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/FormatterKit.strings"; sourceTree = "<group>"; };
5B31FE401CA6B47800309D75 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/FormatterKit.strings"; sourceTree = "<group>"; };
DCBC8EB11CE3D5C2008E89F2 /* NSBundle+FormatterKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSBundle+FormatterKit.h"; sourceTree = "<group>"; };
DCBC8EB21CE3D5C2008E89F2 /* NSBundle+FormatterKit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSBundle+FormatterKit.m"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -164,6 +170,8 @@
5B08B6901CA6A0C3009541EC /* TTTUnitOfInformationFormatter.m */,
5B08B6911CA6A0C3009541EC /* TTTURLRequestFormatter.h */,
5B08B6921CA6A0C3009541EC /* TTTURLRequestFormatter.m */,
DCBC8EB11CE3D5C2008E89F2 /* NSBundle+FormatterKit.h */,
DCBC8EB21CE3D5C2008E89F2 /* NSBundle+FormatterKit.m */,
);
path = FormatterKit;
sourceTree = "<group>";
Expand Down Expand Up @@ -193,6 +201,7 @@
5B08B6931CA6A0C3009541EC /* TTTAddressFormatter.h in Headers */,
5B08B6AF1CA6A0C3009541EC /* TTTUnitOfInformationFormatter.h in Headers */,
5B08B6971CA6A0C3009541EC /* TTTArrayFormatter.h in Headers */,
DCBC8EB31CE3D5C2008E89F2 /* NSBundle+FormatterKit.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -210,6 +219,7 @@
5B08B6A81CA6A0C3009541EC /* TTTOrdinalNumberFormatter.h in Headers */,
5B08B6941CA6A0C3009541EC /* TTTAddressFormatter.h in Headers */,
5B08B69C1CA6A0C3009541EC /* TTTColorFormatter.h in Headers */,
DCBC8EB41CE3D5C2008E89F2 /* NSBundle+FormatterKit.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -345,6 +355,7 @@
5B08B6951CA6A0C3009541EC /* TTTAddressFormatter.m in Sources */,
5B08B6A51CA6A0C3009541EC /* TTTNameFormatter.m in Sources */,
5B08B6991CA6A0C3009541EC /* TTTArrayFormatter.m in Sources */,
DCBC8EB51CE3D5C2008E89F2 /* NSBundle+FormatterKit.m in Sources */,
5B08B6AD1CA6A0C3009541EC /* TTTTimeIntervalFormatter.m in Sources */,
5B08B6B51CA6A0C3009541EC /* TTTURLRequestFormatter.m in Sources */,
5B08B6B11CA6A0C3009541EC /* TTTUnitOfInformationFormatter.m in Sources */,
Expand All @@ -361,6 +372,7 @@
5B08B6961CA6A0C3009541EC /* TTTAddressFormatter.m in Sources */,
5B08B6A61CA6A0C3009541EC /* TTTNameFormatter.m in Sources */,
5B08B69A1CA6A0C3009541EC /* TTTArrayFormatter.m in Sources */,
DCBC8EB61CE3D5C2008E89F2 /* NSBundle+FormatterKit.m in Sources */,
5B08B6AE1CA6A0C3009541EC /* TTTTimeIntervalFormatter.m in Sources */,
5B08B6B61CA6A0C3009541EC /* TTTURLRequestFormatter.m in Sources */,
5B08B6B21CA6A0C3009541EC /* TTTUnitOfInformationFormatter.m in Sources */,
Expand Down
35 changes: 35 additions & 0 deletions FormatterKit/NSBundle+FormatterKit.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// NSBundle+FormatterKit.h
//
// Copyright (c) 2011–2015 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 <Foundation/Foundation.h>

@interface NSBundle (FormatterKit)

/**
Returns the named FormatterKit bundle if it exists else nil

@return Bundle if found else nil
*/
+ (NSBundle *)formatterKitBundle;

@end
40 changes: 40 additions & 0 deletions FormatterKit/NSBundle+FormatterKit.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// NSBundle+FormatterKit.m
//
// Copyright (c) 2011–2015 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 "NSBundle+FormatterKit.h"

@implementation NSBundle (FormatterKit)

+ (NSBundle *)formatterKitBundle {
static NSBundle *fomatterKitBundle = nil;

static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
NSString *bundlePath = [[NSBundle mainBundle] pathForResource:@"FormatterKit" ofType:@"bundle"];
if (bundlePath) fomatterKitBundle = [NSBundle bundleWithPath:bundlePath];
});

return fomatterKitBundle;
}

@end
3 changes: 2 additions & 1 deletion FormatterKit/TTTAddressFormatter.m
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
// THE SOFTWARE.

#import "TTTAddressFormatter.h"
#import "NSBundle+FormatterKit.h"

#import <Availability.h>

Expand Down Expand Up @@ -114,7 +115,7 @@ - (BOOL)getObjectValue:(out __unused __autoreleasing id *)obj
forString:(__unused NSString *)string
errorDescription:(out NSString *__autoreleasing *)error
{
*error = NSLocalizedStringFromTableInBundle(@"Method Not Implemented", @"FormatterKit", [NSBundle bundleForClass:[self class]], nil);
*error = NSLocalizedStringFromTableInBundle(@"Method Not Implemented", @"FormatterKit", [NSBundle formatterKitBundle]?: [NSBundle bundleForClass:[self class]], nil);

return NO;
}
Expand Down
11 changes: 6 additions & 5 deletions FormatterKit/TTTArrayFormatter.m
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
// THE SOFTWARE.

#import "TTTArrayFormatter.h"
#import "NSBundle+FormatterKit.h"

@implementation TTTArrayFormatter
@synthesize arrayStyle = _arrayStyle;
Expand All @@ -37,10 +38,10 @@ - (id)init {
return nil;
}

self.delimiter = NSLocalizedStringFromTableInBundle(@",", @"FormatterKit", [NSBundle bundleForClass:[self class]], @"List delimiter");
self.separator = NSLocalizedStringFromTableInBundle(@" ", @"FormatterKit", [NSBundle bundleForClass:[self class]], @"List separator");
self.conjunction = NSLocalizedStringFromTableInBundle(@"and", @"FormatterKit", [NSBundle bundleForClass:[self class]], @"List conjunction");
self.abbreviatedConjunction = NSLocalizedStringFromTableInBundle(@"&", @"FormatterKit", [NSBundle bundleForClass:[self class]], nil);
self.delimiter = NSLocalizedStringFromTableInBundle(@",", @"FormatterKit", [NSBundle formatterKitBundle]?: [NSBundle bundleForClass:[self class]], @"List delimiter");
self.separator = NSLocalizedStringFromTableInBundle(@" ", @"FormatterKit", [NSBundle formatterKitBundle]?: [NSBundle bundleForClass:[self class]], @"List separator");
self.conjunction = NSLocalizedStringFromTableInBundle(@"and", @"FormatterKit", [NSBundle formatterKitBundle]?: [NSBundle bundleForClass:[self class]], @"List conjunction");
self.abbreviatedConjunction = NSLocalizedStringFromTableInBundle(@"&", @"FormatterKit", [NSBundle formatterKitBundle]?: [NSBundle bundleForClass:[self class]], nil);
self.usesAbbreviatedConjunction = NO;
self.usesSerialDelimiter = YES;

Expand Down Expand Up @@ -146,7 +147,7 @@ - (BOOL)getObjectValue:(out __autoreleasing id *)obj
*obj = [NSArray arrayWithArray:components];
} else {
if (error) {
*error = NSLocalizedStringFromTableInBundle(@"Couldn’t convert to NSArray", @"FormatterKit", [NSBundle bundleForClass:[self class]], @"Error converting to NSArray");
*error = NSLocalizedStringFromTableInBundle(@"Couldn’t convert to NSArray", @"FormatterKit", [NSBundle formatterKitBundle]?: [NSBundle bundleForClass:[self class]], @"Error converting to NSArray");
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion FormatterKit/TTTColorFormatter.m
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
// THE SOFTWARE.

#import "TTTColorFormatter.h"
#import "NSBundle+FormatterKit.h"

#ifdef __IPHONE_OS_VERSION_MIN_REQUIRED

Expand Down Expand Up @@ -240,7 +241,7 @@ - (BOOL)getObjectValue:(out __autoreleasing id *)obj
return YES;
}

*error = NSLocalizedStringFromTableInBundle(@"Color format not recognized", @"FormatterKit", [NSBundle bundleForClass:[self class]], nil);
*error = NSLocalizedStringFromTableInBundle(@"Color format not recognized", @"FormatterKit", [NSBundle formatterKitBundle]?: [NSBundle bundleForClass:[self class]], nil);

return NO;
}
Expand Down
29 changes: 15 additions & 14 deletions FormatterKit/TTTLocationFormatter.m
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
// THE SOFTWARE.

#import "TTTLocationFormatter.h"
#import "NSBundle+FormatterKit.h"

static double const kTTTMetersToKilometersCoefficient = 0.001;
static double const kTTTMetersToFeetCoefficient = 3.2808399;
Expand Down Expand Up @@ -271,10 +272,10 @@ - (NSString *)stringFromDistance:(CLLocationDistance)distance {

if (kilometerDistance >= 1) {
distanceString = [_numberFormatter stringFromNumber:@(kilometerDistance)];
unitString = NSLocalizedStringFromTableInBundle(@"km", @"FormatterKit", [NSBundle bundleForClass:[self class]], @"Kilometer Unit");
unitString = NSLocalizedStringFromTableInBundle(@"km", @"FormatterKit", [NSBundle formatterKitBundle]?: [NSBundle bundleForClass:[self class]], @"Kilometer Unit");
} else {
distanceString = [_numberFormatter stringFromNumber:@(meterDistance)];
unitString = NSLocalizedStringFromTableInBundle(@"m", @"FormatterKit", [NSBundle bundleForClass:[self class]], @"Meter Unit");
unitString = NSLocalizedStringFromTableInBundle(@"m", @"FormatterKit", [NSBundle formatterKitBundle]?: [NSBundle bundleForClass:[self class]], @"Meter Unit");
}
break;
}
Expand All @@ -286,19 +287,19 @@ - (NSString *)stringFromDistance:(CLLocationDistance)distance {

if (feetDistance < 300) {
distanceString = [_numberFormatter stringFromNumber:@(feetDistance)];
unitString = NSLocalizedStringFromTableInBundle(@"ft", @"FormatterKit", [NSBundle bundleForClass:[self class]], @"Feet Unit");
unitString = NSLocalizedStringFromTableInBundle(@"ft", @"FormatterKit", [NSBundle formatterKitBundle]?: [NSBundle bundleForClass:[self class]], @"Feet Unit");
} else if (yardDistance < 500) {
distanceString = [_numberFormatter stringFromNumber:@(yardDistance)];
unitString = NSLocalizedStringFromTableInBundle(@"yds", @"FormatterKit", [NSBundle bundleForClass:[self class]], @"Yard Unit");
unitString = NSLocalizedStringFromTableInBundle(@"yds", @"FormatterKit", [NSBundle formatterKitBundle]?: [NSBundle bundleForClass:[self class]], @"Yard Unit");
} else {
distanceString = [_numberFormatter stringFromNumber:@(milesDistance)];
unitString = (milesDistance > 1.0 && milesDistance < 1.1) ? NSLocalizedStringFromTableInBundle(@"mile", @"FormatterKit", [NSBundle bundleForClass:[self class]], @"Mile Unit (Singular)") : NSLocalizedStringFromTableInBundle(@"miles", @"FormatterKit", [NSBundle bundleForClass:[self class]], @"Mile Unit (Plural)");
unitString = (milesDistance > 1.0 && milesDistance < 1.1) ? NSLocalizedStringFromTableInBundle(@"mile", @"FormatterKit", [NSBundle formatterKitBundle]?: [NSBundle bundleForClass:[self class]], @"Mile Unit (Singular)") : NSLocalizedStringFromTableInBundle(@"miles", @"FormatterKit", [NSBundle formatterKitBundle]?: [NSBundle bundleForClass:[self class]], @"Mile Unit (Plural)");
}
break;
}
}

return [NSString stringWithFormat:NSLocalizedStringWithDefaultValue(@"Distance Format String", @"FormatterKit", [NSBundle bundleForClass:[self class]], @"%@ %@", @"#{Distance} #{Unit}"), distanceString, unitString];
return [NSString stringWithFormat:NSLocalizedStringWithDefaultValue(@"Distance Format String", @"FormatterKit", [NSBundle formatterKitBundle]?: [NSBundle bundleForClass:[self class]], @"%@ %@", @"#{Distance} #{Unit}"), distanceString, unitString];
}

- (NSString *)stringFromBearing:(CLLocationDegrees)bearing {
Expand All @@ -325,10 +326,10 @@ - (NSString *)stringFromSpeed:(CLLocationSpeed)speed {

if (kilometersPerHourSpeed > 1) {
speedString = [self.numberFormatter stringFromNumber:@(kilometersPerHourSpeed)];
unitString = NSLocalizedStringFromTableInBundle(@"km/h", @"FormatterKit", [NSBundle bundleForClass:[self class]], @"Kilometers Per Hour Unit");
unitString = NSLocalizedStringFromTableInBundle(@"km/h", @"FormatterKit", [NSBundle formatterKitBundle]?: [NSBundle bundleForClass:[self class]], @"Kilometers Per Hour Unit");
} else {
speedString = [self.numberFormatter stringFromNumber:@(metersPerSecondSpeed)];
unitString = NSLocalizedStringFromTableInBundle(@"m/s", @"FormatterKit", [NSBundle bundleForClass:[self class]], @"Meters Per Second Unit");
unitString = NSLocalizedStringFromTableInBundle(@"m/s", @"FormatterKit", [NSBundle formatterKitBundle]?: [NSBundle bundleForClass:[self class]], @"Meters Per Second Unit");
}
break;
}
Expand All @@ -339,16 +340,16 @@ - (NSString *)stringFromSpeed:(CLLocationSpeed)speed {

if (milesPerHourSpeed > 1) {
speedString = [self.numberFormatter stringFromNumber:@(milesPerHourSpeed)];
unitString = NSLocalizedStringFromTableInBundle(@"mph", @"FormatterKit", [NSBundle bundleForClass:[self class]], @"Miles Per Hour Unit");
unitString = NSLocalizedStringFromTableInBundle(@"mph", @"FormatterKit", [NSBundle formatterKitBundle]?: [NSBundle bundleForClass:[self class]], @"Miles Per Hour Unit");
} else {
speedString = [self.numberFormatter stringFromNumber:@(feetPerSecondSpeed)];
unitString = NSLocalizedStringFromTableInBundle(@"ft/s", @"FormatterKit", [NSBundle bundleForClass:[self class]], @"Feet Per Second Unit");
unitString = NSLocalizedStringFromTableInBundle(@"ft/s", @"FormatterKit", [NSBundle formatterKitBundle]?: [NSBundle bundleForClass:[self class]], @"Feet Per Second Unit");
}
break;
}
}

return [NSString stringWithFormat:NSLocalizedStringWithDefaultValue(@"Speed Format String", @"FormatterKit", [NSBundle bundleForClass:[self class]], @"%@ %@", @"#{Speed} #{Unit}"), speedString, unitString];
return [NSString stringWithFormat:NSLocalizedStringWithDefaultValue(@"Speed Format String", @"FormatterKit", [NSBundle formatterKitBundle]?: [NSBundle bundleForClass:[self class]], @"%@ %@", @"#{Speed} #{Unit}"), speedString, unitString];
}

- (NSString *)stringFromDistanceFromLocation:(CLLocation *)originLocation
Expand All @@ -366,14 +367,14 @@ - (NSString *)stringFromBearingFromLocation:(CLLocation *)originLocation
- (NSString *)stringFromDistanceAndBearingFromLocation:(CLLocation *)originLocation
toLocation:(CLLocation *)destinationLocation
{
return [NSString stringWithFormat:NSLocalizedStringWithDefaultValue(@"Dimension Format String", @"FormatterKit", [NSBundle bundleForClass:[self class]], @"%@ %@", @"#{Dimensional Quantity} #{Direction}"), [self stringFromDistanceFromLocation:originLocation toLocation:destinationLocation], [self stringFromBearingFromLocation:originLocation toLocation:destinationLocation]];
return [NSString stringWithFormat:NSLocalizedStringWithDefaultValue(@"Dimension Format String", @"FormatterKit", [NSBundle formatterKitBundle]?: [NSBundle bundleForClass:[self class]], @"%@ %@", @"#{Dimensional Quantity} #{Direction}"), [self stringFromDistanceFromLocation:originLocation toLocation:destinationLocation], [self stringFromBearingFromLocation:originLocation toLocation:destinationLocation]];
}

- (NSString *)stringFromVelocityFromLocation:(CLLocation *)originLocation
toLocation:(CLLocation *)destinationLocation
atSpeed:(CLLocationSpeed)speed
{
return [NSString stringWithFormat:NSLocalizedStringWithDefaultValue(@"Dimension Format String", @"FormatterKit", [NSBundle bundleForClass:[self class]], @"%@ %@", @"#{Dimensional Quantity} #{Direction}"), [self stringFromSpeed:speed], [self stringFromBearingFromLocation:originLocation toLocation:destinationLocation]];
return [NSString stringWithFormat:NSLocalizedStringWithDefaultValue(@"Dimension Format String", @"FormatterKit", [NSBundle formatterKitBundle]?: [NSBundle bundleForClass:[self class]], @"%@ %@", @"#{Dimensional Quantity} #{Direction}"), [self stringFromSpeed:speed], [self stringFromBearingFromLocation:originLocation toLocation:destinationLocation]];
}

#pragma mark - NSFormatter
Expand All @@ -390,7 +391,7 @@ - (BOOL)getObjectValue:(out __unused __autoreleasing id *)obj
forString:(__unused NSString *)string
errorDescription:(out NSString *__autoreleasing *)error
{
*error = NSLocalizedStringFromTableInBundle(@"Method Not Implemented", @"FormatterKit", [NSBundle bundleForClass:[self class]], nil);
*error = NSLocalizedStringFromTableInBundle(@"Method Not Implemented", @"FormatterKit", [NSBundle formatterKitBundle]?: [NSBundle bundleForClass:[self class]], nil);

return NO;
}
Expand Down