mirror of
https://github.com/arsenetar/dupeguru.git
synced 2026-01-22 22:51:39 +00:00
Auto-generate Cocoa strings file from code (at last!).
Also, removed TR() macro usage (didn't work with the genstrings command) and tweaked a couple of localized strings.
This commit is contained in:
@@ -136,7 +136,7 @@ http://www.hardcoded.net/licenses/bsd_license
|
||||
[op setCanCreateDirectories:NO];
|
||||
[op setAllowsMultipleSelection:NO];
|
||||
[op setAllowedFileTypes:[NSArray arrayWithObject:@"dupeguru"]];
|
||||
[op setTitle:TR(@"Select a results file to load")];
|
||||
[op setTitle:NSLocalizedString(@"Select a results file to load", @"")];
|
||||
if ([op runModal] == NSOKButton) {
|
||||
NSString *filename = [[op filenames] objectAtIndex:0];
|
||||
[model loadResultsFrom:filename];
|
||||
@@ -212,7 +212,7 @@ http://www.hardcoded.net/licenses/bsd_license
|
||||
- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender
|
||||
{
|
||||
if ([model resultsAreModified]) {
|
||||
NSString *msg = TR(@"You have unsaved results, do you really want to quit?");
|
||||
NSString *msg = NSLocalizedString(@"You have unsaved results, do you really want to quit?", @"");
|
||||
if ([Dialogs askYesNo:msg] == NSAlertSecondButtonReturn) { // NO
|
||||
return NSTerminateCancel;
|
||||
}
|
||||
|
||||
@@ -6,8 +6,6 @@ which should be included with this package. The terms are also available at
|
||||
http://www.hardcoded.net/licenses/bsd_license
|
||||
*/
|
||||
|
||||
#import "HSConsts.h"
|
||||
|
||||
#define JobStarted @"JobStarted"
|
||||
#define JobInProgress @"JobInProgress"
|
||||
#define TableFontSize @"TableFontSize"
|
||||
|
||||
@@ -11,7 +11,6 @@ http://www.hardcoded.net/licenses/bsd_license
|
||||
#import "Dialogs.h"
|
||||
#import "Utils.h"
|
||||
#import "AppDelegate.h"
|
||||
#import "Consts.h"
|
||||
|
||||
@implementation DirectoryPanel
|
||||
|
||||
@@ -55,7 +54,7 @@ http://www.hardcoded.net/licenses/bsd_license
|
||||
- (void)fillPopUpMenu
|
||||
{
|
||||
NSMenu *m = [addButtonPopUp menu];
|
||||
NSMenuItem *mi = [m addItemWithTitle:TR(@"Add New Folder...") action:@selector(askForDirectory) keyEquivalent:@""];
|
||||
NSMenuItem *mi = [m addItemWithTitle:NSLocalizedString(@"Add New Folder...", @"") action:@selector(askForDirectory) keyEquivalent:@""];
|
||||
[mi setTarget:self];
|
||||
[m addItem:[NSMenuItem separatorItem]];
|
||||
}
|
||||
@@ -89,7 +88,7 @@ http://www.hardcoded.net/licenses/bsd_license
|
||||
[op setCanChooseFiles:YES];
|
||||
[op setCanChooseDirectories:YES];
|
||||
[op setAllowsMultipleSelection:YES];
|
||||
[op setTitle:TR(@"Select a folder to add to the scanning list")];
|
||||
[op setTitle:NSLocalizedString(@"Select a folder to add to the scanning list", @"")];
|
||||
[op setDelegate:self];
|
||||
if ([op runModal] == NSOKButton) {
|
||||
for (NSString *directory in [op filenames]) {
|
||||
@@ -116,7 +115,7 @@ http://www.hardcoded.net/licenses/bsd_license
|
||||
while ([m numberOfItems] > 0) {
|
||||
[m removeItemAtIndex:0];
|
||||
}
|
||||
NSMenuItem *mi = [m addItemWithTitle:TR(@"Load from file...") action:@selector(loadResults) keyEquivalent:@""];
|
||||
NSMenuItem *mi = [m addItemWithTitle:NSLocalizedString(@"Load from file...", @"") action:@selector(loadResults) keyEquivalent:@""];
|
||||
[mi setTarget:_app];
|
||||
[m addItem:[NSMenuItem separatorItem]];
|
||||
[[_app recentResults] fillMenu:m];
|
||||
|
||||
@@ -9,7 +9,6 @@ http://www.hardcoded.net/licenses/bsd_license
|
||||
#import "ResultTable.h"
|
||||
#import "Dialogs.h"
|
||||
#import "Utils.h"
|
||||
#import "Consts.h"
|
||||
#import "HSQuicklook.h"
|
||||
|
||||
@interface HSTable (private)
|
||||
@@ -99,7 +98,7 @@ http://www.hardcoded.net/licenses/bsd_license
|
||||
if (![newName isEqual:oldName]) {
|
||||
BOOL renamed = [[self model] renameSelected:newName];
|
||||
if (!renamed) {
|
||||
[Dialogs showMessage:[NSString stringWithFormat:TR(@"The name '%@' already exists."), newName]];
|
||||
[Dialogs showMessage:[NSString stringWithFormat:NSLocalizedString(@"The name '%@' already exists.", @""), newName]];
|
||||
}
|
||||
else {
|
||||
[[self view] setNeedsDisplay:YES];
|
||||
|
||||
@@ -80,7 +80,7 @@ http://www.hardcoded.net/licenses/bsd_license
|
||||
[mi setTag:i];
|
||||
}
|
||||
[[app columnsMenu] addItem:[NSMenuItem separatorItem]];
|
||||
NSMenuItem *mi = [[app columnsMenu] addItemWithTitle:TR(@"Reset to Default")
|
||||
NSMenuItem *mi = [[app columnsMenu] addItemWithTitle:NSLocalizedString(@"Reset to Default", @"")
|
||||
action:@selector(resetColumnsToDefault) keyEquivalent:@""];
|
||||
[mi setTarget:self];
|
||||
}
|
||||
@@ -259,7 +259,7 @@ http://www.hardcoded.net/licenses/bsd_license
|
||||
NSSavePanel *sp = [NSSavePanel savePanel];
|
||||
[sp setCanCreateDirectories:YES];
|
||||
[sp setAllowedFileTypes:[NSArray arrayWithObject:@"dupeguru"]];
|
||||
[sp setTitle:TR(@"Select a file to save your results to")];
|
||||
[sp setTitle:NSLocalizedString(@"Select a file to save your results to", @"")];
|
||||
if ([sp runModal] == NSOKButton) {
|
||||
[model saveResultsAs:[sp filename]];
|
||||
[[app recentResults] addFile:[sp filename]];
|
||||
@@ -269,7 +269,7 @@ http://www.hardcoded.net/licenses/bsd_license
|
||||
- (void)startDuplicateScan
|
||||
{
|
||||
if ([model resultsAreModified]) {
|
||||
if ([Dialogs askYesNo:TR(@"You have unsaved results, do you really want to continue?")] == NSAlertSecondButtonReturn) // NO
|
||||
if ([Dialogs askYesNo:NSLocalizedString(@"You have unsaved results, do you really want to continue?", @"")] == NSAlertSecondButtonReturn) // NO
|
||||
return;
|
||||
}
|
||||
[self setScanOptions];
|
||||
@@ -342,7 +342,7 @@ http://www.hardcoded.net/licenses/bsd_license
|
||||
|
||||
- (void)jobInProgress:(NSNotification *)aNotification
|
||||
{
|
||||
[Dialogs showMessage:TR(@"A previous action is still hanging in there. You can't start a new one yet. Wait a few seconds, then try again.")];
|
||||
[Dialogs showMessage:NSLocalizedString(@"A previous action is still hanging in there. You can't start a new one yet. Wait a few seconds, then try again.", @"")];
|
||||
}
|
||||
|
||||
- (void)jobStarted:(NSNotification *)aNotification
|
||||
|
||||
@@ -8,8 +8,8 @@ promptLabel = Label(result, "Add criteria to the right box and click OK to send
|
||||
categoryPopup = Popup(result)
|
||||
criteriaTable = ListView(result)
|
||||
prioritizationTable = ListView(result)
|
||||
addButton = Button(result, "-->")
|
||||
removeButton = Button(result, "<--")
|
||||
addButton = Button(result, NLSTR("-->"))
|
||||
removeButton = Button(result, NLSTR("<--"))
|
||||
okButton = Button(result, "Ok")
|
||||
cancelButton = Button(result, "Cancel")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user