Skip to content

Commit

Permalink
Added internationalization support to the installer and parts of the …
Browse files Browse the repository at this point in the history
…plugin.

Signed-off-by: Jonathan 'Wolf' Rentzsch <jwr.git@redshed.net>
  • Loading branch information
eczarny authored and rentzsch committed Jan 28, 2009
1 parent 8fca71e commit 2b94757
Show file tree
Hide file tree
Showing 7 changed files with 85 additions and 30 deletions.
77 changes: 58 additions & 19 deletions ClickToFlash.xcodeproj/project.pbxproj
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -23,16 +23,17 @@
/* End PBXAggregateTarget section */ /* End PBXAggregateTarget section */


/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
072189AD0F30D853008C8944 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 072189AB0F30D853008C8944 /* Localizable.strings */; };
072189B30F30D982008C8944 /* Installer.xib in Resources */ = {isa = PBXBuildFile; fileRef = 072189B10F30D982008C8944 /* Installer.xib */; };
072189BE0F30D9C3008C8944 /* ContextualMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 072189BA0F30D9C3008C8944 /* ContextualMenu.xib */; };
072189BF0F30D9C3008C8944 /* WhitelistPanel.xib in Resources */ = {isa = PBXBuildFile; fileRef = 072189BC0F30D9C3008C8944 /* WhitelistPanel.xib */; };
558405550E0F2C2B00EA991B /* CTFInstaller.m in Sources */ = {isa = PBXBuildFile; fileRef = 558405540E0F2C2B00EA991B /* CTFInstaller.m */; }; 558405550E0F2C2B00EA991B /* CTFInstaller.m in Sources */ = {isa = PBXBuildFile; fileRef = 558405540E0F2C2B00EA991B /* CTFInstaller.m */; };
558405690E0F2DFA00EA991B /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 55EB70560E04A8B80016593D /* Cocoa.framework */; }; 558405690E0F2DFA00EA991B /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 55EB70560E04A8B80016593D /* Cocoa.framework */; };
5584056B0E0F2DFE00EA991B /* CTFInstaller.m in Sources */ = {isa = PBXBuildFile; fileRef = 558405540E0F2C2B00EA991B /* CTFInstaller.m */; }; 5584056B0E0F2DFE00EA991B /* CTFInstaller.m in Sources */ = {isa = PBXBuildFile; fileRef = 558405540E0F2C2B00EA991B /* CTFInstaller.m */; };
5584056C0E0F2E0100EA991B /* Installer.xib in Resources */ = {isa = PBXBuildFile; fileRef = 558405560E0F2C4900EA991B /* Installer.xib */; };
5584064B0E0F35A000EA991B /* ClickToFlash.plugin in Resources */ = {isa = PBXBuildFile; fileRef = 55EB70420E04A8640016593D /* ClickToFlash.plugin */; }; 5584064B0E0F35A000EA991B /* ClickToFlash.plugin in Resources */ = {isa = PBXBuildFile; fileRef = 55EB70420E04A8640016593D /* ClickToFlash.plugin */; };
55EB70480E04A8850016593D /* Plugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 55EB703D0E04A84F0016593D /* Plugin.m */; }; 55EB70480E04A8850016593D /* Plugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 55EB703D0E04A84F0016593D /* Plugin.m */; };
55EB70580E04A8B80016593D /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 55EB70560E04A8B80016593D /* Cocoa.framework */; }; 55EB70580E04A8B80016593D /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 55EB70560E04A8B80016593D /* Cocoa.framework */; };
55EB70590E04A8B80016593D /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 55EB70570E04A8B80016593D /* WebKit.framework */; }; 55EB70590E04A8B80016593D /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 55EB70570E04A8B80016593D /* WebKit.framework */; };
79A21C4B0F30B735009424B8 /* ContextualMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 79A21C470F30B735009424B8 /* ContextualMenu.xib */; };
79A21C4C0F30B735009424B8 /* WhitelistPanel.xib in Resources */ = {isa = PBXBuildFile; fileRef = 79A21C480F30B735009424B8 /* WhitelistPanel.xib */; };
79A21C4D0F30B735009424B8 /* CTFWhitelistWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 79A21C490F30B735009424B8 /* CTFWhitelistWindowController.m */; }; 79A21C4D0F30B735009424B8 /* CTFWhitelistWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 79A21C490F30B735009424B8 /* CTFWhitelistWindowController.m */; };
D0FB700F0F2FE35000DCB854 /* ContainerImage.png in Resources */ = {isa = PBXBuildFile; fileRef = D0FB700E0F2FE35000DCB854 /* ContainerImage.png */; }; D0FB700F0F2FE35000DCB854 /* ContainerImage.png in Resources */ = {isa = PBXBuildFile; fileRef = D0FB700E0F2FE35000DCB854 /* ContainerImage.png */; };
D0FB70100F2FE35000DCB854 /* ContainerImage.png in Resources */ = {isa = PBXBuildFile; fileRef = D0FB700E0F2FE35000DCB854 /* ContainerImage.png */; }; D0FB70100F2FE35000DCB854 /* ContainerImage.png in Resources */ = {isa = PBXBuildFile; fileRef = D0FB700E0F2FE35000DCB854 /* ContainerImage.png */; };
Expand Down Expand Up @@ -63,9 +64,12 @@
/* End PBXContainerItemProxy section */ /* End PBXContainerItemProxy section */


/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
072189AC0F30D853008C8944 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = Installer/English.lproj/Localizable.strings; sourceTree = "<group>"; };
072189B20F30D982008C8944 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = Installer/English.lproj/Installer.xib; sourceTree = "<group>"; };
072189BB0F30D9C3008C8944 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = Plugin/English.lproj/ContextualMenu.xib; sourceTree = "<group>"; };
072189BD0F30D9C3008C8944 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = Plugin/English.lproj/WhitelistPanel.xib; sourceTree = "<group>"; };
558405530E0F2C2B00EA991B /* CTFInstaller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CTFInstaller.h; path = Installer/CTFInstaller.h; sourceTree = "<group>"; }; 558405530E0F2C2B00EA991B /* CTFInstaller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CTFInstaller.h; path = Installer/CTFInstaller.h; sourceTree = "<group>"; };
558405540E0F2C2B00EA991B /* CTFInstaller.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CTFInstaller.m; path = Installer/CTFInstaller.m; sourceTree = "<group>"; }; 558405540E0F2C2B00EA991B /* CTFInstaller.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CTFInstaller.m; path = Installer/CTFInstaller.m; sourceTree = "<group>"; };
558405560E0F2C4900EA991B /* Installer.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Installer.xib; path = Installer/Installer.xib; sourceTree = "<group>"; };
558405590E0F2D6700EA991B /* Info-Installer.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; name = "Info-Installer.plist"; path = "Installer/Info-Installer.plist"; sourceTree = "<group>"; }; 558405590E0F2D6700EA991B /* Info-Installer.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; name = "Info-Installer.plist"; path = "Installer/Info-Installer.plist"; sourceTree = "<group>"; };
558405610E0F2DE900EA991B /* Install ClickToFlash.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Install ClickToFlash.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 558405610E0F2DE900EA991B /* Install ClickToFlash.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Install ClickToFlash.app"; sourceTree = BUILT_PRODUCTS_DIR; };
55EB703C0E04A84F0016593D /* Plugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Plugin.h; path = Plugin/Plugin.h; sourceTree = "<group>"; }; 55EB703C0E04A84F0016593D /* Plugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Plugin.h; path = Plugin/Plugin.h; sourceTree = "<group>"; };
Expand All @@ -74,8 +78,6 @@
55EB70560E04A8B80016593D /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; }; 55EB70560E04A8B80016593D /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
55EB70570E04A8B80016593D /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = /System/Library/Frameworks/WebKit.framework; sourceTree = "<absolute>"; }; 55EB70570E04A8B80016593D /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = /System/Library/Frameworks/WebKit.framework; sourceTree = "<absolute>"; };
55EB70610E04A8D00016593D /* Info-Plugin.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "Info-Plugin.plist"; path = "Plugin/Info-Plugin.plist"; sourceTree = "<group>"; }; 55EB70610E04A8D00016593D /* Info-Plugin.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "Info-Plugin.plist"; path = "Plugin/Info-Plugin.plist"; sourceTree = "<group>"; };
79A21C470F30B735009424B8 /* ContextualMenu.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = ContextualMenu.xib; path = Plugin/ContextualMenu.xib; sourceTree = "<group>"; };
79A21C480F30B735009424B8 /* WhitelistPanel.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = WhitelistPanel.xib; path = Plugin/WhitelistPanel.xib; sourceTree = "<group>"; };
79A21C490F30B735009424B8 /* CTFWhitelistWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CTFWhitelistWindowController.m; path = Plugin/CTFWhitelistWindowController.m; sourceTree = "<group>"; }; 79A21C490F30B735009424B8 /* CTFWhitelistWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CTFWhitelistWindowController.m; path = Plugin/CTFWhitelistWindowController.m; sourceTree = "<group>"; };
79A21C4A0F30B735009424B8 /* CTFWhitelistWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CTFWhitelistWindowController.h; path = Plugin/CTFWhitelistWindowController.h; sourceTree = "<group>"; }; 79A21C4A0F30B735009424B8 /* CTFWhitelistWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CTFWhitelistWindowController.h; path = Plugin/CTFWhitelistWindowController.h; sourceTree = "<group>"; };
D0FB700E0F2FE35000DCB854 /* ContainerImage.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = ContainerImage.png; path = Images/ContainerImage.png; sourceTree = "<group>"; }; D0FB700E0F2FE35000DCB854 /* ContainerImage.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = ContainerImage.png; path = Images/ContainerImage.png; sourceTree = "<group>"; };
Expand Down Expand Up @@ -108,16 +110,17 @@
D0FB700E0F2FE35000DCB854 /* ContainerImage.png */, D0FB700E0F2FE35000DCB854 /* ContainerImage.png */,
558405530E0F2C2B00EA991B /* CTFInstaller.h */, 558405530E0F2C2B00EA991B /* CTFInstaller.h */,
558405540E0F2C2B00EA991B /* CTFInstaller.m */, 558405540E0F2C2B00EA991B /* CTFInstaller.m */,
558405560E0F2C4900EA991B /* Installer.xib */,
558405590E0F2D6700EA991B /* Info-Installer.plist */, 558405590E0F2D6700EA991B /* Info-Installer.plist */,
072189B10F30D982008C8944 /* Installer.xib */,
072189AB0F30D853008C8944 /* Localizable.strings */,
); );
name = Installer; name = Installer;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
55EB70300E04A8410016593D = { 55EB70300E04A8410016593D = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
55EB70540E04A89C0016593D /* Plug-in */, 55EB70540E04A89C0016593D /* Plugin */,
558405520E0F2C2200EA991B /* Installer */, 558405520E0F2C2200EA991B /* Installer */,
55EB70550E04A8A40016593D /* Frameworks */, 55EB70550E04A8A40016593D /* Frameworks */,
55EB70430E04A8640016593D /* Products */, 55EB70430E04A8640016593D /* Products */,
Expand All @@ -133,18 +136,18 @@
name = Products; name = Products;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
55EB70540E04A89C0016593D /* Plug-in */ = { 55EB70540E04A89C0016593D /* Plugin */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
55EB703C0E04A84F0016593D /* Plugin.h */, 072189BA0F30D9C3008C8944 /* ContextualMenu.xib */,
55EB703D0E04A84F0016593D /* Plugin.m */,
55EB70610E04A8D00016593D /* Info-Plugin.plist */,
79A21C470F30B735009424B8 /* ContextualMenu.xib */,
79A21C480F30B735009424B8 /* WhitelistPanel.xib */,
79A21C490F30B735009424B8 /* CTFWhitelistWindowController.m */, 79A21C490F30B735009424B8 /* CTFWhitelistWindowController.m */,
79A21C4A0F30B735009424B8 /* CTFWhitelistWindowController.h */, 79A21C4A0F30B735009424B8 /* CTFWhitelistWindowController.h */,
55EB70610E04A8D00016593D /* Info-Plugin.plist */,
55EB703C0E04A84F0016593D /* Plugin.h */,
55EB703D0E04A84F0016593D /* Plugin.m */,
072189BC0F30D9C3008C8944 /* WhitelistPanel.xib */,
); );
name = "Plug-in"; name = Plugin;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
55EB70550E04A8A40016593D /* Frameworks */ = { 55EB70550E04A8A40016593D /* Frameworks */ = {
Expand Down Expand Up @@ -220,8 +223,9 @@
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
5584064B0E0F35A000EA991B /* ClickToFlash.plugin in Resources */, 5584064B0E0F35A000EA991B /* ClickToFlash.plugin in Resources */,
5584056C0E0F2E0100EA991B /* Installer.xib in Resources */,
D0FB70100F2FE35000DCB854 /* ContainerImage.png in Resources */, D0FB70100F2FE35000DCB854 /* ContainerImage.png in Resources */,
072189B30F30D982008C8944 /* Installer.xib in Resources */,
072189AD0F30D853008C8944 /* Localizable.strings in Resources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
Expand All @@ -230,8 +234,8 @@
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
D0FB700F0F2FE35000DCB854 /* ContainerImage.png in Resources */, D0FB700F0F2FE35000DCB854 /* ContainerImage.png in Resources */,
79A21C4B0F30B735009424B8 /* ContextualMenu.xib in Resources */, 072189BE0F30D9C3008C8944 /* ContextualMenu.xib in Resources */,
79A21C4C0F30B735009424B8 /* WhitelistPanel.xib in Resources */, 072189BF0F30D9C3008C8944 /* WhitelistPanel.xib in Resources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
Expand Down Expand Up @@ -266,9 +270,9 @@
isa = PBXSourcesBuildPhase; isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
55EB70480E04A8850016593D /* Plugin.m in Sources */,
558405550E0F2C2B00EA991B /* CTFInstaller.m in Sources */, 558405550E0F2C2B00EA991B /* CTFInstaller.m in Sources */,
79A21C4D0F30B735009424B8 /* CTFWhitelistWindowController.m in Sources */, 79A21C4D0F30B735009424B8 /* CTFWhitelistWindowController.m in Sources */,
55EB70480E04A8850016593D /* Plugin.m in Sources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
Expand All @@ -292,6 +296,41 @@
}; };
/* End PBXTargetDependency section */ /* End PBXTargetDependency section */


/* Begin PBXVariantGroup section */
072189AB0F30D853008C8944 /* Localizable.strings */ = {
isa = PBXVariantGroup;
children = (
072189AC0F30D853008C8944 /* English */,
);
name = Localizable.strings;
sourceTree = "<group>";
};
072189B10F30D982008C8944 /* Installer.xib */ = {
isa = PBXVariantGroup;
children = (
072189B20F30D982008C8944 /* English */,
);
name = Installer.xib;
sourceTree = "<group>";
};
072189BA0F30D9C3008C8944 /* ContextualMenu.xib */ = {
isa = PBXVariantGroup;
children = (
072189BB0F30D9C3008C8944 /* English */,
);
name = ContextualMenu.xib;
sourceTree = "<group>";
};
072189BC0F30D9C3008C8944 /* WhitelistPanel.xib */ = {
isa = PBXVariantGroup;
children = (
072189BD0F30D9C3008C8944 /* English */,
);
name = WhitelistPanel.xib;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */

/* Begin XCBuildConfiguration section */ /* Begin XCBuildConfiguration section */
558405640E0F2DE900EA991B /* Debug */ = { 558405640E0F2DE900EA991B /* Debug */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
Expand Down
28 changes: 22 additions & 6 deletions Installer/CTFInstaller.m
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -45,14 +45,20 @@ - (void)finishLaunching
NSString *pathToClickToFlash = [self pathToClickToFlash]; NSString *pathToClickToFlash = [self pathToClickToFlash];


if (!pathToClickToFlash) { if (!pathToClickToFlash) {
NSInteger result = NSRunAlertPanel(@"Install ClickToFlash", @"ClickToFlash is not installed. Would you like to install it for this user?", @"Install", @"Cancel", nil); NSString *title = NSLocalizedString(@"Install ClickToFlash", @"Install ClickToFlash");
NSString *message = NSLocalizedString(@"ClickToFlash is not installed. Would you like to install it for this user?", @"ClickToFlash is not installed. Would you like to install it for this user?");

NSInteger result = NSRunAlertPanel(title, message, NSLocalizedString(@"Install", @"Install"), NSLocalizedString(@"Cancel", @"Cancel"), nil);


if (result == NSAlertDefaultReturn) { if (result == NSAlertDefaultReturn) {
[self installClickToFlash]; [self installClickToFlash];
} }


} else { } else {
NSInteger result = NSRunAlertPanel(@"Remove ClickToFlash", @"ClickToFlash is currently installed. Would you like to remove it?", @"Remove", @"Cancel", nil); NSString *title = NSLocalizedString(@"Remove ClickToFlash", @"Remove ClickToFlash");
NSString *message = NSLocalizedString(@"ClickToFlash is currently installed. Would you like to remove it?", @"ClickToFlash is currently installed. Would you like to remove it?");

NSInteger result = NSRunAlertPanel(title, message, NSLocalizedString(@"Remove", @"Remove"), NSLocalizedString(@"Cancel", @"Cancel"), nil);


if (result == NSAlertDefaultReturn) { if (result == NSAlertDefaultReturn) {
[self removeClickToFlash]; [self removeClickToFlash];
Expand Down Expand Up @@ -92,11 +98,17 @@ - (id) installClickToFlash
} }


toPath = [toPath stringByAppendingPathComponent:@"ClickToFlash.plugin"]; toPath = [toPath stringByAppendingPathComponent:@"ClickToFlash.plugin"];


NSString *title = NSLocalizedString(@"Install ClickToFlash", @"Install ClickToFlash");

if ([[NSFileManager defaultManager] copyPath:fromPath toPath:toPath handler:nil]) { if ([[NSFileManager defaultManager] copyPath:fromPath toPath:toPath handler:nil]) {
NSRunAlertPanel(@"Install ClickToFlash", @"ClickToFlash has been installed. Quit and relaunch Safari to activate ClickToFlash.", @"OK", nil, nil); NSString *message = NSLocalizedString(@"ClickToFlash has been installed. Quit and relaunch Safari to activate ClickToFlash.", @"ClickToFlash has been installed. Quit and relaunch Safari to activate ClickToFlash.");

NSRunAlertPanel(title, message, NSLocalizedString(@"OK", @"OK"), nil, nil);
} else { } else {
NSRunAlertPanel(@"Install ClickToFlash", @"ClickToFlash could not be installed.", @"OK", nil, nil); NSString *message = NSLocalizedString(@"ClickToFlash could not be installed.", @"ClickToFlash could not be installed.");

NSRunAlertPanel(title, message, NSLocalizedString(@"OK", @"OK"), nil, nil);
} }


[self terminate:self]; [self terminate:self];
Expand All @@ -108,7 +120,11 @@ - (id) removeClickToFlash
NSString *path = [self pathToClickToFlash]; NSString *path = [self pathToClickToFlash];


if ([[NSFileManager defaultManager] removeFileAtPath:path handler:nil]) { if ([[NSFileManager defaultManager] removeFileAtPath:path handler:nil]) {
NSRunAlertPanel(@"Remove ClickToFlash", @"ClickToFlash has been removed", @"OK", nil, nil); NSString *title = NSLocalizedString(@"Remove ClickToFlash", @"Remove ClickToFlash");
NSString *message = NSLocalizedString(@"ClickToFlash has been removed.", @"ClickToFlash has been removed.");

NSRunAlertPanel(title, message, NSLocalizedString(@"OK", @"OK"), nil, nil);

[self terminate:self]; [self terminate:self];
} }
} }
Expand Down
File renamed without changes.
Binary file added Installer/English.lproj/Localizable.strings
Binary file not shown.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions Plugin/Plugin.m
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ - (IBAction)addToWhitelist:(id)sender;
NSString *message = [NSString stringWithFormat:NSLocalizedString(@"Add %@ to the white list?", @"Add %@ to the white list?"), self.host]; NSString *message = [NSString stringWithFormat:NSLocalizedString(@"Add %@ to the white list?", @"Add %@ to the white list?"), self.host];


NSAlert *alert = [[[NSAlert alloc] init] autorelease]; NSAlert *alert = [[[NSAlert alloc] init] autorelease];
[alert addButtonWithTitle:@"Add to whitelist"]; [alert addButtonWithTitle:NSLocalizedString(@"Add to white list", @"Add to white list")];
[alert addButtonWithTitle:@"Cancel"]; [alert addButtonWithTitle:NSLocalizedString(@"Cancel", @"Cancel")];
[alert setMessageText:title]; [alert setMessageText:title];
[alert setInformativeText:message]; [alert setInformativeText:message];
[alert setAlertStyle:NSInformationalAlertStyle]; [alert setAlertStyle:NSInformationalAlertStyle];
Expand All @@ -214,12 +214,12 @@ - (IBAction)removeFromWhitelist:(id)sender;
if (![self _isHostWhitelisted]) if (![self _isHostWhitelisted])
return; return;


NSString *title = NSLocalizedString(@"Remove from whitelist?", @"Remove from whitelist?"); NSString *title = NSLocalizedString(@"Remove from white list?", @"Remove from white list?");
NSString *message = [NSString stringWithFormat:NSLocalizedString(@"Remove %@ from the white list?", @"Remove %@ from the white list?"), self.host]; NSString *message = [NSString stringWithFormat:NSLocalizedString(@"Remove %@ from the white list?", @"Remove %@ from the white list?"), self.host];


NSAlert *alert = [[[NSAlert alloc] init] autorelease]; NSAlert *alert = [[[NSAlert alloc] init] autorelease];
[alert addButtonWithTitle:@"Remove from whitelist"]; [alert addButtonWithTitle:NSLocalizedString(@"Remove from white list", @"Remove from white list")];
[alert addButtonWithTitle:@"Cancel"]; [alert addButtonWithTitle:NSLocalizedString(@"Cancel", @"Cancel")];
[alert setMessageText:title]; [alert setMessageText:title];
[alert setInformativeText:message]; [alert setInformativeText:message];
[alert setAlertStyle:NSInformationalAlertStyle]; [alert setAlertStyle:NSInformationalAlertStyle];
Expand Down

0 comments on commit 2b94757

Please sign in to comment.