aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Foundation/GTMLocalizedString.h23
-rw-r--r--Foundation/GTMLocalizedStringTest.m23
-rw-r--r--GTM.xcodeproj/project.pbxproj4
3 files changed, 36 insertions, 14 deletions
diff --git a/Foundation/GTMLocalizedString.h b/Foundation/GTMLocalizedString.h
index c5fcde6..cbfbec1 100644
--- a/Foundation/GTMLocalizedString.h
+++ b/Foundation/GTMLocalizedString.h
@@ -40,8 +40,8 @@
NSLocalizedStringWithDefaultValue
#endif
-GTM_INLINE NSString *GTMLocalizedString(NSString *key,
- NSString *comment) NS_FORMAT_ARGUMENT(1) {
+GTM_INLINE NS_FORMAT_ARGUMENT(1) NSString *GTMLocalizedString(
+ NSString *key, NSString *comment) {
return GTMLocalizedStringWithDefaultValueInternal(key,
nil,
[NSBundle mainBundle],
@@ -49,9 +49,8 @@ GTM_INLINE NSString *GTMLocalizedString(NSString *key,
comment);
}
-GTM_INLINE NSString *GTMLocalizedStringFromTable(NSString *key,
- NSString *tableName,
- NSString *comment) NS_FORMAT_ARGUMENT(1) {
+GTM_INLINE NS_FORMAT_ARGUMENT(1) NSString *GTMLocalizedStringFromTable(
+ NSString *key, NSString *tableName, NSString *comment) {
return GTMLocalizedStringWithDefaultValueInternal(key,
tableName,
[NSBundle mainBundle],
@@ -59,10 +58,8 @@ GTM_INLINE NSString *GTMLocalizedStringFromTable(NSString *key,
comment);
}
-GTM_INLINE NSString *GTMLocalizedStringFromTableInBundle(NSString *key,
- NSString *tableName,
- NSBundle *bundle,
- NSString *comment) NS_FORMAT_ARGUMENT(1) {
+GTM_INLINE NS_FORMAT_ARGUMENT(1) NSString *GTMLocalizedStringFromTableInBundle(
+ NSString *key, NSString *tableName, NSBundle *bundle, NSString *comment) {
return GTMLocalizedStringWithDefaultValueInternal(key,
tableName,
bundle,
@@ -70,11 +67,9 @@ GTM_INLINE NSString *GTMLocalizedStringFromTableInBundle(NSString *key,
comment);
}
-GTM_INLINE NSString *GTMLocalizedStringWithDefaultValue(NSString *key,
- NSString *tableName,
- NSBundle *bundle,
- NSString *value,
- NSString *comment) NS_FORMAT_ARGUMENT(1) {
+GTM_INLINE NS_FORMAT_ARGUMENT(1) NSString *GTMLocalizedStringWithDefaultValue(
+ NSString *key, NSString *tableName, NSBundle *bundle, NSString *value,
+ NSString *comment) {
return GTMLocalizedStringWithDefaultValueInternal(key,
tableName,
bundle,
diff --git a/Foundation/GTMLocalizedStringTest.m b/Foundation/GTMLocalizedStringTest.m
new file mode 100644
index 0000000..40eae38
--- /dev/null
+++ b/Foundation/GTMLocalizedStringTest.m
@@ -0,0 +1,23 @@
+//
+// GTMLocalizedStringTest.m
+//
+// Copyright (c) 2010 Google Inc. All rights reserved.
+//
+//
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not
+// use this file except in compliance with the License. You may obtain a copy
+// of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations under
+// the License.
+//
+
+#import "GTMLocalizedString.h"
+
+// No real test here, just verification that GTMLocalizedString.h will compile
+// without errors.
diff --git a/GTM.xcodeproj/project.pbxproj b/GTM.xcodeproj/project.pbxproj
index abae17e..ed23309 100644
--- a/GTM.xcodeproj/project.pbxproj
+++ b/GTM.xcodeproj/project.pbxproj
@@ -131,6 +131,7 @@
8B409F060F95341E00DF540E /* GTMUILocalizerTestView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8B409F050F95341E00DF540E /* GTMUILocalizerTestView.xib */; };
8B409F130F95352500DF540E /* GTMUILocalizerView2State.gtmUTState in Resources */ = {isa = PBXBuildFile; fileRef = 8B409F110F95352500DF540E /* GTMUILocalizerView2State.gtmUTState */; };
8B409F140F95352500DF540E /* GTMUILocalizerView1State.gtmUTState in Resources */ = {isa = PBXBuildFile; fileRef = 8B409F120F95352500DF540E /* GTMUILocalizerView1State.gtmUTState */; };
+ 8B455F5E1193870A00ABD707 /* GTMLocalizedStringTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B455F5D1193870A00ABD707 /* GTMLocalizedStringTest.m */; };
8B45A03A0DA46A2A001148C5 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0867D69BFE84028FC02AAC07 /* Foundation.framework */; };
8B45A0B80DA46A2F001148C5 /* SenTestingKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F42E089B0D199B1800D5DDE0 /* SenTestingKit.framework */; };
8B45A0D50DA46A57001148C5 /* GTMNSObject+UnitTesting.m in Sources */ = {isa = PBXBuildFile; fileRef = F48FE29C0D198D36009257D2 /* GTMNSObject+UnitTesting.m */; };
@@ -597,6 +598,7 @@
8B409F050F95341E00DF540E /* GTMUILocalizerTestView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GTMUILocalizerTestView.xib; sourceTree = "<group>"; };
8B409F110F95352500DF540E /* GTMUILocalizerView2State.gtmUTState */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = GTMUILocalizerView2State.gtmUTState; sourceTree = "<group>"; };
8B409F120F95352500DF540E /* GTMUILocalizerView1State.gtmUTState */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = GTMUILocalizerView1State.gtmUTState; sourceTree = "<group>"; };
+ 8B455F5D1193870A00ABD707 /* GTMLocalizedStringTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTMLocalizedStringTest.m; sourceTree = "<group>"; };
8B45A0280DA4696C001148C5 /* UnitTest - UnitTesting.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "UnitTest - UnitTesting.octest"; sourceTree = BUILT_PRODUCTS_DIR; };
8B45A1990DA46AAA001148C5 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = /System/Library/Frameworks/QuartzCore.framework; sourceTree = "<absolute>"; };
8B45A28A0DA49B99001148C5 /* GTMUIUnitTestingHarness.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GTMUIUnitTestingHarness.app; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -1280,6 +1282,7 @@
F41711330ECDFBD500B9B276 /* GTMLightweightProxy.m */,
F41711340ECDFBD500B9B276 /* GTMLightweightProxyTest.m */,
8B21DE54117E5CB7000E004F /* GTMLocalizedString.h */,
+ 8B455F5D1193870A00ABD707 /* GTMLocalizedStringTest.m */,
F98680AF0E2C15C300CEE8BF /* GTMLogger.h */,
F98680B00E2C15C300CEE8BF /* GTMLogger.m */,
F98680B10E2C15C300CEE8BF /* GTMLoggerTest.m */,
@@ -2026,6 +2029,7 @@
8B3080151056B917006C4C7A /* GTMNSNumber+64BitTest.m in Sources */,
0B1B9B8A10FECDA00084EE4B /* GTMStringEncodingTest.m in Sources */,
8B17FD15117638D500E7A908 /* GTMFoundationUnitTestingUtilities.m in Sources */,
+ 8B455F5E1193870A00ABD707 /* GTMLocalizedStringTest.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};