7 Commits

Author SHA1 Message Date
Tomáš Znamenáček 82a06382f0 Version bump to 2.3.2. 2015-10-12 09:31:34 +02:00
Tomáš Znamenáček dd2507b7f9 Silenced a potential “tautological compare” warning in MASShortcutView.
Fixes #76. I considered putting the #pragma just around the particular
compare line, but I think having it around the whole block is more readable
and there’s little chance of having some legitimate warnings silenced.
2015-10-12 09:28:19 +02:00
Tomáš Znamenáček a0af086f16 Typo fix. 2015-10-08 11:53:21 +02:00
Tomáš Znamenáček a73a254ce7 Documented the CocoaPods localization fix. 2015-10-08 11:30:24 +02:00
Tomáš Znamenáček ed694bc1a5 Merge pull request #75 from beaufour/master
Fixed localization when used from CocoaPods.
2015-10-08 11:26:27 +02:00
Allan Beaufour ded95506c6 fixes localized strings when using CocoaPods
Puts strings inside a MASShortcut resource bundle, and looks for
locallized strings inside that bundle when used as a CocoaPod
2015-10-07 12:52:59 -04:00
Tomáš Znamenáček b99a1a4dc4 Updated localization and accessibility status in README. 2015-09-10 10:01:40 +02:00
6 changed files with 30 additions and 8 deletions
+3
View File
@@ -1,3 +1,6 @@
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 -2
View File
@@ -15,9 +15,9 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.3.1</string>
<string>2.3.2</string>
<key>CFBundleVersion</key>
<string>2.3.1</string>
<string>2.3.2</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 20142015 Vadim Shpakovski. All rights reserved.</string>
</dict>
+11 -1
View File
@@ -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 wont make a separate framework
// and the Localized.strings file wont 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"];
}
+7
View File
@@ -138,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.
// Were silencing the “tautological compare” warning here so that if someone
// takes the naked source files and compiles them with -Wall, the following
// NSAccessibilityPriorityKey comparison doesnt 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") :
@@ -148,6 +154,7 @@ static const CGFloat MASButtonFontSize = 11;
};
NSAccessibilityPostNotificationWithUserInfo(self, NSAccessibilityAnnouncementRequestedNotification, announcementInfo);
}
#pragma clang diagnostic pop
}
- (void)setShortcutValue:(MASShortcut *)shortcutValue
+4 -2
View File
@@ -1,6 +1,7 @@
# coding: utf-8
Pod::Spec.new do |s|
s.name = 'MASShortcut'
s.version = '2.3.1'
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.1' }
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
+3 -3
View File
@@ -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. Theres some basic accessibility code, testers and feedback welcome.
* Localisation. The English and Czech localization should be complete, theres basic support for German, French, Spanish, Italian, and Japanese. If youre a native speaker in one of the mentioned languages, please test the localization and report issues or add missing strings.
Pull requests welcome :)