Permalink
Browse files

Added localization to embedded framework.

  • Loading branch information...
1 parent d042f34 commit 004dd3cd46da7dbd7a406a7316bcbdac6779cb93 Philippe Casgrain committed Aug 29, 2010
View
@@ -23,6 +23,6 @@
<key>CFBundleVersion</key>
<string>1</string>
<key>NSPrincipalClass</key>
- <string></string>
+ <string>PhFacebook</string>
</dict>
</plist>
@@ -10,10 +10,9 @@
375CCD711225EED40064B3AE /* PhFacebook.h in Headers */ = {isa = PBXBuildFile; fileRef = 375CCD6F1225EED40064B3AE /* PhFacebook.h */; settings = {ATTRIBUTES = (Public, ); }; };
375CCD721225EED40064B3AE /* PhFacebook.m in Sources */ = {isa = PBXBuildFile; fileRef = 375CCD701225EED40064B3AE /* PhFacebook.m */; };
378DEC0E1228B619008061E4 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 378DEC0D1228B618008061E4 /* WebKit.framework */; };
- 378DEC151228B9FD008061E4 /* PhWebViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 378DEC131228B9FD008061E4 /* PhWebViewController.h */; };
378DEC161228B9FD008061E4 /* PhWebViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 378DEC141228B9FD008061E4 /* PhWebViewController.m */; };
378DEC1F1228BC24008061E4 /* FacebookBrowser.xib in Resources */ = {isa = PBXBuildFile; fileRef = 378DEC1D1228BC1B008061E4 /* FacebookBrowser.xib */; };
- 37FB6D7712295681006339F3 /* PhFacebook_URLs.h in Headers */ = {isa = PBXBuildFile; fileRef = 37FB6D7612295681006339F3 /* PhFacebook_URLs.h */; };
+ 37FB6F89122ACEB6006339F3 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 37FB6F87122ACEB6006339F3 /* Localizable.strings */; };
8DC2EF530486A6940098B216 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C1666FE841158C02AAC07 /* InfoPlist.strings */; };
8DC2EF570486A6940098B216 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */; };
/* End PBXBuildFile section */
@@ -31,6 +30,8 @@
378DEC141228B9FD008061E4 /* PhWebViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PhWebViewController.m; path = classes/PhWebViewController.m; sourceTree = "<group>"; };
378DEC1E1228BC1B008061E4 /* en */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = en; path = en.lproj/FacebookBrowser.xib; sourceTree = "<group>"; };
37FB6D7612295681006339F3 /* PhFacebook_URLs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PhFacebook_URLs.h; path = private/PhFacebook_URLs.h; sourceTree = "<group>"; };
+ 37FB6F88122ACEB6006339F3 /* en */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
+ 37FB6FBD122AD1DA006339F3 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Localizable.strings; sourceTree = "<group>"; };
8DC2EF5A0486A6940098B216 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
8DC2EF5B0486A6940098B216 /* PhFacebook.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PhFacebook.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D2F7E79907B2D74100F64583 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
@@ -84,6 +85,7 @@
378DEC1D1228BC1B008061E4 /* FacebookBrowser.xib */,
8DC2EF5A0486A6940098B216 /* Info.plist */,
089C1666FE841158C02AAC07 /* InfoPlist.strings */,
+ 37FB6F87122ACEB6006339F3 /* Localizable.strings */,
);
name = Resources;
sourceTree = "<group>";
@@ -135,8 +137,6 @@
buildActionMask = 2147483647;
files = (
375CCD711225EED40064B3AE /* PhFacebook.h in Headers */,
- 378DEC151228B9FD008061E4 /* PhWebViewController.h in Headers */,
- 37FB6D7712295681006339F3 /* PhFacebook_URLs.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -170,6 +170,14 @@
buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "PhFacebook" */;
compatibilityVersion = "Xcode 3.1";
hasScannedForEncodings = 1;
+ knownRegions = (
+ English,
+ Japanese,
+ French,
+ German,
+ en,
+ fr,
+ );
mainGroup = 0867D691FE84028FC02AAC07 /* PhFacebook */;
productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
projectDirPath = "";
@@ -187,6 +195,7 @@
files = (
8DC2EF530486A6940098B216 /* InfoPlist.strings in Resources */,
378DEC1F1228BC24008061E4 /* FacebookBrowser.xib in Resources */,
+ 37FB6F89122ACEB6006339F3 /* Localizable.strings in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -221,6 +230,15 @@
name = FacebookBrowser.xib;
sourceTree = "<group>";
};
+ 37FB6F87122ACEB6006339F3 /* Localizable.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 37FB6F88122ACEB6006339F3 /* en */,
+ 37FB6FBD122AD1DA006339F3 /* fr */,
+ );
+ name = Localizable.strings;
+ sourceTree = "<group>";
+ };
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
@@ -16,12 +16,14 @@
{
IBOutlet NSWindow *window;
IBOutlet WebView *webView;
+ IBOutlet NSButton *cancelButton;
PhFacebook *parent;
}
@property (assign) IBOutlet NSWindow *window;
@property (assign) IBOutlet WebView *webView;
+@property (assign) IBOutlet NSButton *cancelButton;
@property (assign) PhFacebook *parent;
@end
@@ -15,6 +15,7 @@ @implementation PhWebViewController
@synthesize window;
@synthesize webView;
+@synthesize cancelButton;
@synthesize parent;
- (id) init
@@ -31,6 +32,13 @@ - (void) dealloc
[super dealloc];
}
+- (void) awakeFromNib
+{
+ NSBundle *bundle = [NSBundle bundleForClass: [PhFacebook class]];
+ self.window.title = [bundle localizedStringForKey: @"FBAuthWindowTitle" value: @"" table: nil];
+ self.cancelButton.title = [bundle localizedStringForKey: @"FBAuthWindowCancel" value: @"" table: nil];;
+}
+
#pragma mark Delegate
- (void) webView: (WebView*) sender didCommitLoadForFrame: (WebFrame*) frame;
@@ -80,16 +80,15 @@
<nil key="NSViewClass"/>
<string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
<object class="NSView" key="NSWindowView" id="75091160">
- <reference key="NSNextResponder"/>
+ <nil key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSButton" id="52411274">
<reference key="NSNextResponder" ref="75091160"/>
<int key="NSvFlags">293</int>
- <string key="NSFrame">{{161, 12}, {96, 32}}</string>
+ <string key="NSFrame">{{146, 12}, {127, 32}}</string>
<reference key="NSSuperview" ref="75091160"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="508019644">
<int key="NSCellFlags">67239424</int>
@@ -131,8 +130,6 @@
</object>
<string key="NSFrame">{{20, 60}, {379, 315}}</string>
<reference key="NSSuperview" ref="75091160"/>
- <reference key="NSWindow"/>
- <reference key="NSNextKeyView"/>
<string key="FrameName"/>
<string key="GroupName"/>
<object class="WebPreferences" key="Preferences">
@@ -158,9 +155,6 @@
</object>
</object>
<string key="NSFrameSize">{419, 395}</string>
- <reference key="NSSuperview"/>
- <reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="837994684"/>
</object>
<string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
<string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
@@ -202,6 +196,14 @@
</object>
<int key="connectionID">15</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">cancelButton</string>
+ <reference key="source" ref="1001"/>
+ <reference key="destination" ref="52411274"/>
+ </object>
+ <int key="connectionID">17</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -258,8 +260,8 @@
<reference key="object" ref="75091160"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="52411274"/>
<reference ref="837994684"/>
+ <reference ref="52411274"/>
</object>
<reference key="parent" ref="1014391221"/>
</object>
@@ -323,7 +325,7 @@
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">16</int>
+ <int key="maxID">17</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -335,11 +337,13 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
+ <string>cancelButton</string>
<string>webView</string>
<string>window</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
+ <string>NSButton</string>
<string>WebView</string>
<string>NSWindow</string>
</object>
@@ -348,11 +352,16 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
+ <string>cancelButton</string>
<string>webView</string>
<string>window</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBToOneOutletInfo">
+ <string key="name">cancelButton</string>
+ <string key="candidateClassName">NSButton</string>
+ </object>
<object class="IBToOneOutletInfo">
<string key="name">webView</string>
<string key="candidateClassName">WebView</string>
@@ -382,21 +391,21 @@
<object class="IBPartialClassDescription">
<string key="className">NSApplication</string>
<string key="superclassName">NSResponder</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier" id="213814587">
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="531387813">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">AppKit.framework/Headers/NSApplication.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSApplication</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier" id="513242558">
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="750738352">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">AppKit.framework/Headers/NSApplicationScripting.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSApplication</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier" id="700961889">
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="365903472">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">AppKit.framework/Headers/NSColorPanel.h</string>
</object>
@@ -449,7 +458,7 @@
<object class="IBPartialClassDescription">
<string key="className">NSControl</string>
<string key="superclassName">NSView</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier" id="402970198">
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="488481952">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">AppKit.framework/Headers/NSControl.h</string>
</object>
@@ -465,7 +474,7 @@
<object class="IBPartialClassDescription">
<string key="className">NSMenu</string>
<string key="superclassName">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier" id="126292154">
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="329900456">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">AppKit.framework/Headers/NSMenu.h</string>
</object>
@@ -479,19 +488,19 @@
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
- <reference key="sourceIdentifier" ref="213814587"/>
+ <reference key="sourceIdentifier" ref="531387813"/>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
- <reference key="sourceIdentifier" ref="513242558"/>
+ <reference key="sourceIdentifier" ref="750738352"/>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
- <reference key="sourceIdentifier" ref="700961889"/>
+ <reference key="sourceIdentifier" ref="365903472"/>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
- <reference key="sourceIdentifier" ref="402970198"/>
+ <reference key="sourceIdentifier" ref="488481952"/>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
@@ -530,7 +539,7 @@
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
- <reference key="sourceIdentifier" ref="126292154"/>
+ <reference key="sourceIdentifier" ref="329900456"/>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
@@ -576,7 +585,7 @@
</object>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier" id="886032334">
+ <object class="IBClassDescriptionSource" key="sourceIdentifier" id="248598141">
<string key="majorKey">IBFrameworkSource</string>
<string key="minorKey">AppKit.framework/Headers/NSView.h</string>
</object>
@@ -823,7 +832,7 @@
<object class="IBPartialClassDescription">
<string key="className">NSView</string>
<string key="superclassName">NSResponder</string>
- <reference key="sourceIdentifier" ref="886032334"/>
+ <reference key="sourceIdentifier" ref="248598141"/>
</object>
<object class="IBPartialClassDescription">
<string key="className">NSWindow</string>
@@ -0,0 +1,10 @@
+/*
+ Localizable.strings
+ PhFacebook
+
+ Created by Philippe on 10-08-29.
+ Copyright 2010 Philippe Casgrain. All rights reserved.
+ */
+
+"FBAuthWindowTitle" = "Facebook Authentication";
+"FBAuthWindowCancel" = "Cancel";
@@ -0,0 +1,10 @@
+/*
+ Localizable.strings
+ PhFacebook
+
+ Created by Philippe on 10-08-29.
+ Copyright 2010 Philippe Casgrain. All rights reserved.
+ */
+
+"FBAuthWindowTitle" = "Autorisation Facebook";
+"FBAuthWindowCancel" = "Annuler";

0 comments on commit 004dd3c

Please sign in to comment.