Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 82a06382f0 | |||
| dd2507b7f9 | |||
| a0af086f16 | |||
| a73a254ce7 | |||
| ed694bc1a5 | |||
| ded95506c6 | |||
| b99a1a4dc4 | |||
| dd0a37c785 | |||
| a06ef8d27c |
@@ -1,3 +1,9 @@
|
||||
2.3.2 2015/10/12
|
||||
- Fixed localization when building through CocoaPods [Allan Beaufour]
|
||||
|
||||
2.3.1 2015/9/10
|
||||
- Trying to work around a strange build error in CocoaPods.
|
||||
|
||||
2.3.0 2015/9/10
|
||||
- Basic localization support for Czech, German, Spanish,
|
||||
Italian, French, and Japanese. Native speaking testers welcome!
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.3.0</string>
|
||||
<string>2.3.2</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>2.3.0</string>
|
||||
<string>2.3.2</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2014–2015 Vadim Shpakovski. All rights reserved.</string>
|
||||
</dict>
|
||||
|
||||
@@ -1,7 +1,17 @@
|
||||
#import "MASLocalization.h"
|
||||
#import "MASShortcut.h"
|
||||
|
||||
// The CocoaPods trickery here is needed because when the code
|
||||
// is built as a part of CocoaPods, it won’t make a separate framework
|
||||
// and the Localized.strings file won’t be bundled correctly.
|
||||
// See https://github.com/shpakovski/MASShortcut/issues/74
|
||||
NSString *MASLocalizedString(NSString *key, NSString *comment) {
|
||||
NSBundle *frameworkBundle = [NSBundle bundleForClass:[MASShortcut class]];
|
||||
NSBundle *frameworkBundle = nil;
|
||||
#ifdef COCOAPODS
|
||||
NSURL *bundleURL = [[NSBundle mainBundle] URLForResource:@"MASShortcut" withExtension:@"bundle"];
|
||||
frameworkBundle = [NSBundle bundleWithURL:bundleURL];
|
||||
#else
|
||||
frameworkBundle = [NSBundle bundleForClass:[MASShortcut class]];
|
||||
#endif
|
||||
return [frameworkBundle localizedStringForKey:key value:@"XXX" table:@"Localizable"];
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#import "MASShortcut.h"
|
||||
#import "MASLocalization.h"
|
||||
|
||||
static NSString *const MASShortcutKeyCode = @"KeyCode";
|
||||
static NSString *const MASShortcutModifierFlags = @"ModifierFlags";
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#import "MASShortcutValidator.h"
|
||||
#import "MASLocalization.h"
|
||||
|
||||
@implementation MASShortcutValidator
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#import "MASShortcutView.h"
|
||||
#import "MASShortcutValidator.h"
|
||||
#import "MASLocalization.h"
|
||||
|
||||
NSString *const MASShortcutBinding = @"shortcutValue";
|
||||
|
||||
@@ -137,6 +138,12 @@ static const CGFloat MASButtonFontSize = 11;
|
||||
[self setNeedsDisplay:YES];
|
||||
|
||||
// Give VoiceOver users feedback on the result. Requires at least 10.9 to run.
|
||||
// We’re silencing the “tautological compare” warning here so that if someone
|
||||
// takes the naked source files and compiles them with -Wall, the following
|
||||
// NSAccessibilityPriorityKey comparison doesn’t cause a warning. See:
|
||||
// https://github.com/shpakovski/MASShortcut/issues/76
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wtautological-compare"
|
||||
if (_recording == NO && (&NSAccessibilityPriorityKey != NULL)) {
|
||||
NSString* msg = _shortcutValue ?
|
||||
MASLocalizedString(@"Shortcut set", @"VoiceOver: Shortcut set") :
|
||||
@@ -147,6 +154,7 @@ static const CGFloat MASButtonFontSize = 11;
|
||||
};
|
||||
NSAccessibilityPostNotificationWithUserInfo(self, NSAccessibilityAnnouncementRequestedNotification, announcementInfo);
|
||||
}
|
||||
#pragma clang diagnostic pop
|
||||
}
|
||||
|
||||
- (void)setShortcutValue:(MASShortcut *)shortcutValue
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
#import <AppKit/AppKit.h>
|
||||
#import <Carbon/Carbon.h>
|
||||
#import "MASLocalization.h"
|
||||
#import <Carbon/Carbon.h>
|
||||
+4
-2
@@ -1,6 +1,7 @@
|
||||
# coding: utf-8
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'MASShortcut'
|
||||
s.version = '2.3.0'
|
||||
s.version = '2.3.2'
|
||||
s.summary = 'Modern framework for managing global keyboard shortcuts compatible with Mac App Store'
|
||||
s.homepage = 'https://github.com/shpakovski/MASShortcut'
|
||||
s.license = 'BSD 2-clause'
|
||||
@@ -9,9 +10,10 @@ Pod::Spec.new do |s|
|
||||
|
||||
s.platform = :osx
|
||||
s.osx.deployment_target = "10.6"
|
||||
s.source = { :git => 'https://github.com/shpakovski/MASShortcut.git', :tag => '2.3.0' }
|
||||
s.source = { :git => 'https://github.com/shpakovski/MASShortcut.git', :tag => '2.3.2' }
|
||||
s.source_files = 'Framework/*.{h,m}'
|
||||
s.exclude_files = 'Framework/*Tests.m'
|
||||
s.osx.frameworks = 'Carbon', 'AppKit'
|
||||
s.requires_arc = true
|
||||
s.osx.resource_bundles = { 'MASShortcut' => ['*.lproj'] }
|
||||
end
|
||||
|
||||
@@ -19,11 +19,11 @@ Features:
|
||||
* Mac App Store friendly
|
||||
* Works on OS X 10.6 and up
|
||||
* Hacking-friendly codebase covered with tests
|
||||
* Basic accessibility support
|
||||
|
||||
Important features currently missing:
|
||||
Partially done:
|
||||
|
||||
* Localisation
|
||||
* Accessibility support. There’s some basic accessibility code, testers and feedback welcome.
|
||||
* Localisation. The English and Czech localization should be complete, there’s basic support for German, French, Spanish, Italian, and Japanese. If you’re a native speaker in one of the mentioned languages, please test the localization and report issues or add missing strings.
|
||||
|
||||
Pull requests welcome :)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user