mirror of
https://github.com/tappollo/Xcode-Quick-Localization.git
synced 2026-01-13 08:00:53 +08:00
Initial Commit
This commit is contained in:
32
QuickLocalization/QuickLocalization-Info.plist
Normal file
32
QuickLocalization/QuickLocalization-Info.plist
Normal file
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.nanaimostudio.${PRODUCT_NAME:rfc1034identifier}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>XC4Compatible</key>
|
||||
<true/>
|
||||
<key>XCGCReady</key>
|
||||
<true/>
|
||||
<key>XCPluginHasUI</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
||||
7
QuickLocalization/QuickLocalization-Prefix.pch
Normal file
7
QuickLocalization/QuickLocalization-Prefix.pch
Normal file
@@ -0,0 +1,7 @@
|
||||
//
|
||||
// Prefix header for all source files of the 'QuickLocalization' target in the 'QuickLocalization' project
|
||||
//
|
||||
|
||||
#ifdef __OBJC__
|
||||
#import <Foundation/Foundation.h>
|
||||
#endif
|
||||
13
QuickLocalization/QuickLocalization.h
Normal file
13
QuickLocalization/QuickLocalization.h
Normal file
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// QuickLocalization.h
|
||||
// QuickLocalization
|
||||
//
|
||||
// Created by Zitao Xiong on 5/12/13.
|
||||
// Copyright (c) 2013 nanaimostudio. All rights reserved.
|
||||
//
|
||||
|
||||
#import <AppKit/AppKit.h>
|
||||
|
||||
@interface QuickLocalization : NSObject
|
||||
|
||||
@end
|
||||
54
QuickLocalization/QuickLocalization.m
Normal file
54
QuickLocalization/QuickLocalization.m
Normal file
@@ -0,0 +1,54 @@
|
||||
//
|
||||
// QuickLocalization.m
|
||||
// QuickLocalization
|
||||
//
|
||||
// Created by Zitao Xiong on 5/12/13.
|
||||
// Copyright (c) 2013 nanaimostudio. All rights reserved.
|
||||
//
|
||||
|
||||
#import "QuickLocalization.h"
|
||||
|
||||
@implementation QuickLocalization
|
||||
|
||||
|
||||
+ (void)pluginDidLoad:(NSBundle *)plugin
|
||||
{
|
||||
static id sharedPlugin = nil;
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
sharedPlugin = [[self alloc] init];
|
||||
});
|
||||
}
|
||||
|
||||
- (id)init
|
||||
{
|
||||
if (self = [super init]) {
|
||||
// Create menu items, initialize UI, etc.
|
||||
|
||||
// Sample Menu Item:
|
||||
NSMenuItem *viewMenuItem = [[NSApp mainMenu] itemWithTitle:@"File"];
|
||||
if (viewMenuItem) {
|
||||
[[viewMenuItem submenu] addItem:[NSMenuItem separatorItem]];
|
||||
NSMenuItem *sample = [[NSMenuItem alloc] initWithTitle:@"Do Action" action:@selector(doMenuAction) keyEquivalent:@""];
|
||||
[sample setTarget:self];
|
||||
[[viewMenuItem submenu] addItem:sample];
|
||||
[sample release];
|
||||
}
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
// Sample Action, for menu item:
|
||||
- (void)doMenuAction
|
||||
{
|
||||
NSAlert *alert = [NSAlert alertWithMessageText:@"Hello, World" defaultButton:nil alternateButton:nil otherButton:nil informativeTextWithFormat:@""];
|
||||
[alert runModal];
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
@end
|
||||
2
QuickLocalization/en.lproj/InfoPlist.strings
Normal file
2
QuickLocalization/en.lproj/InfoPlist.strings
Normal file
@@ -0,0 +1,2 @@
|
||||
/* Localized versions of Info.plist keys */
|
||||
|
||||
Reference in New Issue
Block a user