mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-03-10 05:34:36 +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:
parent
5a5a74d0e1
commit
653668dd96
86
build.py
86
build.py
@ -22,6 +22,8 @@ from hscommon.build import (add_to_pythonpath, print_and_do, copy_packages, file
|
|||||||
get_module_version, move_all, copy_sysconfig_files_for_embed, copy_all, move, copy,
|
get_module_version, move_all, copy_sysconfig_files_for_embed, copy_all, move, copy,
|
||||||
create_osx_app_structure)
|
create_osx_app_structure)
|
||||||
from hscommon import loc
|
from hscommon import loc
|
||||||
|
from hscommon.plat import ISOSX
|
||||||
|
from hscommon.util import ensure_folder
|
||||||
|
|
||||||
def parse_args():
|
def parse_args():
|
||||||
usage = "usage: %prog [options]"
|
usage = "usage: %prog [options]"
|
||||||
@ -32,8 +34,10 @@ def parse_args():
|
|||||||
help="Build only the help file")
|
help="Build only the help file")
|
||||||
parser.add_option('--loc', action='store_true', dest='loc',
|
parser.add_option('--loc', action='store_true', dest='loc',
|
||||||
help="Build only localization")
|
help="Build only localization")
|
||||||
|
parser.add_option('--cocoa-ext', action='store_true', dest='cocoa_ext',
|
||||||
|
help="Build only Cocoa extensions")
|
||||||
parser.add_option('--cocoa-compile', action='store_true', dest='cocoa_compile',
|
parser.add_option('--cocoa-compile', action='store_true', dest='cocoa_compile',
|
||||||
help="Build only Cocoa modules and executables")
|
help="Build only Cocoa executable")
|
||||||
parser.add_option('--xibless', action='store_true', dest='xibless',
|
parser.add_option('--xibless', action='store_true', dest='xibless',
|
||||||
help="Build only xibless UIs")
|
help="Build only xibless UIs")
|
||||||
parser.add_option('--updatepot', action='store_true', dest='updatepot',
|
parser.add_option('--updatepot', action='store_true', dest='updatepot',
|
||||||
@ -53,33 +57,44 @@ def cocoa_app_path(edition):
|
|||||||
'pe': 'build/dupeGuru PE.app',
|
'pe': 'build/dupeGuru PE.app',
|
||||||
}[edition]
|
}[edition]
|
||||||
|
|
||||||
def build_xibless(edition):
|
def build_cocoalib_xibless(dest='cocoa/autogen'):
|
||||||
import xibless
|
import xibless
|
||||||
if not op.exists('cocoa/autogen'):
|
ensure_folder(dest)
|
||||||
os.mkdir('cocoa/autogen')
|
FNPAIRS = [
|
||||||
xibless.generate('cocoalib/ui/progress.py', 'cocoa/autogen/ProgressController_UI')
|
('progress.py', 'ProgressController_UI'),
|
||||||
xibless.generate('cocoalib/ui/about.py', 'cocoa/autogen/HSAboutBox_UI', localizationTable='cocoalib')
|
('about.py', 'HSAboutBox_UI'),
|
||||||
xibless.generate('cocoalib/ui/fairware_reminder.py', 'cocoa/autogen/HSFairwareReminder_UI', localizationTable='cocoalib')
|
('fairware_reminder.py', 'HSFairwareReminder_UI'),
|
||||||
xibless.generate('cocoalib/ui/demo_reminder.py', 'cocoa/autogen/HSDemoReminder_UI', localizationTable='cocoalib')
|
('demo_reminder.py', 'HSDemoReminder_UI'),
|
||||||
xibless.generate('cocoalib/ui/enter_code.py', 'cocoa/autogen/HSEnterCode_UI', localizationTable='cocoalib')
|
('enter_code.py', 'HSEnterCode_UI'),
|
||||||
xibless.generate('cocoalib/ui/error_report.py', 'cocoa/autogen/HSErrorReportWindow_UI', localizationTable='cocoalib')
|
('error_report.py', 'HSErrorReportWindow_UI'),
|
||||||
xibless.generate('cocoa/base/ui/ignore_list_dialog.py', 'cocoa/autogen/IgnoreListDialog_UI', localizationTable='Localizable')
|
]
|
||||||
xibless.generate('cocoa/base/ui/deletion_options.py', 'cocoa/autogen/DeletionOptions_UI', localizationTable='Localizable')
|
for srcname, dstname in FNPAIRS:
|
||||||
xibless.generate('cocoa/base/ui/problem_dialog.py', 'cocoa/autogen/ProblemDialog_UI', localizationTable='Localizable')
|
xibless.generate(op.join('cocoalib', 'ui', srcname), op.join(dest, dstname), localizationTable='cocoalib')
|
||||||
xibless.generate('cocoa/base/ui/directory_panel.py', 'cocoa/autogen/DirectoryPanel_UI', localizationTable='Localizable')
|
|
||||||
xibless.generate('cocoa/base/ui/prioritize_dialog.py', 'cocoa/autogen/PrioritizeDialog_UI', localizationTable='Localizable')
|
def build_xibless(edition, dest='cocoa/autogen'):
|
||||||
xibless.generate('cocoa/base/ui/result_window.py', 'cocoa/autogen/ResultWindow_UI', localizationTable='Localizable')
|
import xibless
|
||||||
xibless.generate('cocoa/base/ui/main_menu.py', 'cocoa/autogen/MainMenu_UI',
|
ensure_folder(dest)
|
||||||
localizationTable='Localizable', args={'edition': edition})
|
FNPAIRS = [
|
||||||
xibless.generate('cocoa/base/ui/preferences_panel.py', 'cocoa/autogen/PreferencesPanel_UI',
|
('ignore_list_dialog.py', 'IgnoreListDialog_UI'),
|
||||||
localizationTable='Localizable', args={'edition': edition})
|
('deletion_options.py', 'DeletionOptions_UI'),
|
||||||
|
('problem_dialog.py', 'ProblemDialog_UI'),
|
||||||
|
('directory_panel.py', 'DirectoryPanel_UI'),
|
||||||
|
('prioritize_dialog.py', 'PrioritizeDialog_UI'),
|
||||||
|
('result_window.py', 'ResultWindow_UI'),
|
||||||
|
('main_menu.py', 'MainMenu_UI'),
|
||||||
|
('preferences_panel.py', 'PreferencesPanel_UI'),
|
||||||
|
]
|
||||||
|
for srcname, dstname in FNPAIRS:
|
||||||
|
xibless.generate(op.join('cocoa', 'base', 'ui', srcname), op.join(dest, dstname),
|
||||||
|
localizationTable='Localizable', args={'edition': edition})
|
||||||
if edition == 'pe':
|
if edition == 'pe':
|
||||||
xibless.generate('cocoa/pe/ui/details_panel.py', 'cocoa/autogen/DetailsPanel_UI', localizationTable='Localizable')
|
xibless.generate('cocoa/pe/ui/details_panel.py', op.join(dest, 'DetailsPanel_UI'), localizationTable='Localizable')
|
||||||
else:
|
else:
|
||||||
xibless.generate('cocoa/base/ui/details_panel.py', 'cocoa/autogen/DetailsPanel_UI', localizationTable='Localizable')
|
xibless.generate('cocoa/base/ui/details_panel.py', op.join(dest, 'DetailsPanel_UI'), localizationTable='Localizable')
|
||||||
|
|
||||||
def build_cocoa(edition, dev):
|
def build_cocoa(edition, dev):
|
||||||
ed = lambda s: s.format(edition)
|
ed = lambda s: s.format(edition)
|
||||||
|
build_cocoalib_xibless()
|
||||||
build_xibless(edition)
|
build_xibless(edition)
|
||||||
build_cocoa_proxy_module()
|
build_cocoa_proxy_module()
|
||||||
build_cocoa_bridging_interfaces(edition)
|
build_cocoa_bridging_interfaces(edition)
|
||||||
@ -174,6 +189,15 @@ def build_localizations(ui, edition):
|
|||||||
shutil.copytree('locale', op.join('build', 'locale'), ignore=shutil.ignore_patterns('*.po', '*.pot'))
|
shutil.copytree('locale', op.join('build', 'locale'), ignore=shutil.ignore_patterns('*.po', '*.pot'))
|
||||||
|
|
||||||
def build_updatepot():
|
def build_updatepot():
|
||||||
|
if ISOSX:
|
||||||
|
print("Updating Cocoa strings file.")
|
||||||
|
# We need to have strings from *all* editions in here, so we'll call xibless for all editions
|
||||||
|
# in dummy subfolders.
|
||||||
|
build_cocoalib_xibless('cocoalib/autogen')
|
||||||
|
loc.generate_cocoa_strings_from_code('cocoalib', 'cocoalib/en.lproj')
|
||||||
|
for edition in ('se', 'me', 'pe'):
|
||||||
|
build_xibless(edition, op.join('cocoa', 'autogen', edition))
|
||||||
|
loc.generate_cocoa_strings_from_code('cocoa', 'cocoa/base/en.lproj')
|
||||||
print("Building .pot files from source files")
|
print("Building .pot files from source files")
|
||||||
print("Building core.pot")
|
print("Building core.pot")
|
||||||
all_cores = ['core', 'core_se', 'core_me', 'core_pe']
|
all_cores = ['core', 'core_se', 'core_me', 'core_pe']
|
||||||
@ -187,12 +211,14 @@ def build_updatepot():
|
|||||||
loc.generate_pot(['hscommon'], op.join('hscommon', 'locale', 'hscommon.pot'), ['tr'])
|
loc.generate_pot(['hscommon'], op.join('hscommon', 'locale', 'hscommon.pot'), ['tr'])
|
||||||
print("Building qtlib.pot")
|
print("Building qtlib.pot")
|
||||||
loc.generate_pot(['qtlib'], op.join('qtlib', 'locale', 'qtlib.pot'), ['tr'])
|
loc.generate_pot(['qtlib'], op.join('qtlib', 'locale', 'qtlib.pot'), ['tr'])
|
||||||
print("Building cocoalib.pot")
|
if ISOSX:
|
||||||
loc.strings2pot(op.join('cocoalib', 'en.lproj', 'cocoalib.strings'),
|
print("Building cocoalib.pot")
|
||||||
op.join('cocoalib', 'locale', 'cocoalib.pot'))
|
cocoalib_pot = op.join('cocoalib', 'locale', 'cocoalib.pot')
|
||||||
print("Enhancing ui.pot with Cocoa's strings files")
|
os.remove(cocoalib_pot)
|
||||||
loc.strings2pot(op.join('cocoa', 'base', 'en.lproj', 'Localizable.strings'),
|
loc.strings2pot(op.join('cocoalib', 'en.lproj', 'cocoalib.strings'), cocoalib_pot)
|
||||||
op.join('locale', 'ui.pot'))
|
print("Enhancing ui.pot with Cocoa's strings files")
|
||||||
|
loc.strings2pot(op.join('cocoa', 'base', 'en.lproj', 'Localizable.strings'),
|
||||||
|
op.join('locale', 'ui.pot'))
|
||||||
|
|
||||||
def build_mergepot():
|
def build_mergepot():
|
||||||
print("Updating .po files using .pot files")
|
print("Updating .po files using .pot files")
|
||||||
@ -311,14 +337,16 @@ def main():
|
|||||||
build_updatepot()
|
build_updatepot()
|
||||||
elif options.mergepot:
|
elif options.mergepot:
|
||||||
build_mergepot()
|
build_mergepot()
|
||||||
elif options.cocoa_compile:
|
elif options.cocoa_ext:
|
||||||
build_cocoa_proxy_module()
|
build_cocoa_proxy_module()
|
||||||
build_cocoa_bridging_interfaces(edition)
|
build_cocoa_bridging_interfaces(edition)
|
||||||
|
elif options.cocoa_compile:
|
||||||
os.chdir('cocoa')
|
os.chdir('cocoa')
|
||||||
os.system(cocoa_compile_command(edition))
|
os.system(cocoa_compile_command(edition))
|
||||||
os.chdir('..')
|
os.chdir('..')
|
||||||
copy('cocoa/build/dupeGuru', op.join(cocoa_app_path(edition), 'Contents/MacOS/dupeGuru'))
|
copy('cocoa/build/dupeGuru', op.join(cocoa_app_path(edition), 'Contents/MacOS/dupeGuru'))
|
||||||
elif options.xibless:
|
elif options.xibless:
|
||||||
|
build_cocoalib_xibless()
|
||||||
build_xibless(edition)
|
build_xibless(edition)
|
||||||
else:
|
else:
|
||||||
build_normal(edition, ui, dev)
|
build_normal(edition, ui, dev)
|
||||||
|
@ -136,7 +136,7 @@ http://www.hardcoded.net/licenses/bsd_license
|
|||||||
[op setCanCreateDirectories:NO];
|
[op setCanCreateDirectories:NO];
|
||||||
[op setAllowsMultipleSelection:NO];
|
[op setAllowsMultipleSelection:NO];
|
||||||
[op setAllowedFileTypes:[NSArray arrayWithObject:@"dupeguru"]];
|
[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) {
|
if ([op runModal] == NSOKButton) {
|
||||||
NSString *filename = [[op filenames] objectAtIndex:0];
|
NSString *filename = [[op filenames] objectAtIndex:0];
|
||||||
[model loadResultsFrom:filename];
|
[model loadResultsFrom:filename];
|
||||||
@ -212,7 +212,7 @@ http://www.hardcoded.net/licenses/bsd_license
|
|||||||
- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender
|
- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender
|
||||||
{
|
{
|
||||||
if ([model resultsAreModified]) {
|
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
|
if ([Dialogs askYesNo:msg] == NSAlertSecondButtonReturn) { // NO
|
||||||
return NSTerminateCancel;
|
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
|
http://www.hardcoded.net/licenses/bsd_license
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import "HSConsts.h"
|
|
||||||
|
|
||||||
#define JobStarted @"JobStarted"
|
#define JobStarted @"JobStarted"
|
||||||
#define JobInProgress @"JobInProgress"
|
#define JobInProgress @"JobInProgress"
|
||||||
#define TableFontSize @"TableFontSize"
|
#define TableFontSize @"TableFontSize"
|
||||||
|
@ -11,7 +11,6 @@ http://www.hardcoded.net/licenses/bsd_license
|
|||||||
#import "Dialogs.h"
|
#import "Dialogs.h"
|
||||||
#import "Utils.h"
|
#import "Utils.h"
|
||||||
#import "AppDelegate.h"
|
#import "AppDelegate.h"
|
||||||
#import "Consts.h"
|
|
||||||
|
|
||||||
@implementation DirectoryPanel
|
@implementation DirectoryPanel
|
||||||
|
|
||||||
@ -55,7 +54,7 @@ http://www.hardcoded.net/licenses/bsd_license
|
|||||||
- (void)fillPopUpMenu
|
- (void)fillPopUpMenu
|
||||||
{
|
{
|
||||||
NSMenu *m = [addButtonPopUp menu];
|
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];
|
[mi setTarget:self];
|
||||||
[m addItem:[NSMenuItem separatorItem]];
|
[m addItem:[NSMenuItem separatorItem]];
|
||||||
}
|
}
|
||||||
@ -89,7 +88,7 @@ http://www.hardcoded.net/licenses/bsd_license
|
|||||||
[op setCanChooseFiles:YES];
|
[op setCanChooseFiles:YES];
|
||||||
[op setCanChooseDirectories:YES];
|
[op setCanChooseDirectories:YES];
|
||||||
[op setAllowsMultipleSelection: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];
|
[op setDelegate:self];
|
||||||
if ([op runModal] == NSOKButton) {
|
if ([op runModal] == NSOKButton) {
|
||||||
for (NSString *directory in [op filenames]) {
|
for (NSString *directory in [op filenames]) {
|
||||||
@ -116,7 +115,7 @@ http://www.hardcoded.net/licenses/bsd_license
|
|||||||
while ([m numberOfItems] > 0) {
|
while ([m numberOfItems] > 0) {
|
||||||
[m removeItemAtIndex: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];
|
[mi setTarget:_app];
|
||||||
[m addItem:[NSMenuItem separatorItem]];
|
[m addItem:[NSMenuItem separatorItem]];
|
||||||
[[_app recentResults] fillMenu:m];
|
[[_app recentResults] fillMenu:m];
|
||||||
|
@ -9,7 +9,6 @@ http://www.hardcoded.net/licenses/bsd_license
|
|||||||
#import "ResultTable.h"
|
#import "ResultTable.h"
|
||||||
#import "Dialogs.h"
|
#import "Dialogs.h"
|
||||||
#import "Utils.h"
|
#import "Utils.h"
|
||||||
#import "Consts.h"
|
|
||||||
#import "HSQuicklook.h"
|
#import "HSQuicklook.h"
|
||||||
|
|
||||||
@interface HSTable (private)
|
@interface HSTable (private)
|
||||||
@ -99,7 +98,7 @@ http://www.hardcoded.net/licenses/bsd_license
|
|||||||
if (![newName isEqual:oldName]) {
|
if (![newName isEqual:oldName]) {
|
||||||
BOOL renamed = [[self model] renameSelected:newName];
|
BOOL renamed = [[self model] renameSelected:newName];
|
||||||
if (!renamed) {
|
if (!renamed) {
|
||||||
[Dialogs showMessage:[NSString stringWithFormat:TR(@"The name '%@' already exists."), newName]];
|
[Dialogs showMessage:[NSString stringWithFormat:NSLocalizedString(@"The name '%@' already exists.", @""), newName]];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
[[self view] setNeedsDisplay:YES];
|
[[self view] setNeedsDisplay:YES];
|
||||||
|
@ -80,7 +80,7 @@ http://www.hardcoded.net/licenses/bsd_license
|
|||||||
[mi setTag:i];
|
[mi setTag:i];
|
||||||
}
|
}
|
||||||
[[app columnsMenu] addItem:[NSMenuItem separatorItem]];
|
[[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:@""];
|
action:@selector(resetColumnsToDefault) keyEquivalent:@""];
|
||||||
[mi setTarget:self];
|
[mi setTarget:self];
|
||||||
}
|
}
|
||||||
@ -259,7 +259,7 @@ http://www.hardcoded.net/licenses/bsd_license
|
|||||||
NSSavePanel *sp = [NSSavePanel savePanel];
|
NSSavePanel *sp = [NSSavePanel savePanel];
|
||||||
[sp setCanCreateDirectories:YES];
|
[sp setCanCreateDirectories:YES];
|
||||||
[sp setAllowedFileTypes:[NSArray arrayWithObject:@"dupeguru"]];
|
[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) {
|
if ([sp runModal] == NSOKButton) {
|
||||||
[model saveResultsAs:[sp filename]];
|
[model saveResultsAs:[sp filename]];
|
||||||
[[app recentResults] addFile:[sp filename]];
|
[[app recentResults] addFile:[sp filename]];
|
||||||
@ -269,7 +269,7 @@ http://www.hardcoded.net/licenses/bsd_license
|
|||||||
- (void)startDuplicateScan
|
- (void)startDuplicateScan
|
||||||
{
|
{
|
||||||
if ([model resultsAreModified]) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
[self setScanOptions];
|
[self setScanOptions];
|
||||||
@ -342,7 +342,7 @@ http://www.hardcoded.net/licenses/bsd_license
|
|||||||
|
|
||||||
- (void)jobInProgress:(NSNotification *)aNotification
|
- (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
|
- (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)
|
categoryPopup = Popup(result)
|
||||||
criteriaTable = ListView(result)
|
criteriaTable = ListView(result)
|
||||||
prioritizationTable = ListView(result)
|
prioritizationTable = ListView(result)
|
||||||
addButton = Button(result, "-->")
|
addButton = Button(result, NLSTR("-->"))
|
||||||
removeButton = Button(result, "<--")
|
removeButton = Button(result, NLSTR("<--"))
|
||||||
okButton = Button(result, "Ok")
|
okButton = Button(result, "Ok")
|
||||||
cancelButton = Button(result, "Cancel")
|
cancelButton = Button(result, "Cancel")
|
||||||
|
|
||||||
|
@ -7,7 +7,6 @@ http://www.hardcoded.net/licenses/bsd_license
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#import "DirectoryPanel.h"
|
#import "DirectoryPanel.h"
|
||||||
#import "Consts.h"
|
|
||||||
|
|
||||||
@implementation DirectoryPanelME
|
@implementation DirectoryPanelME
|
||||||
- (id)initWithParentApp:(id)aParentApp
|
- (id)initWithParentApp:(id)aParentApp
|
||||||
@ -21,7 +20,7 @@ http://www.hardcoded.net/licenses/bsd_license
|
|||||||
{
|
{
|
||||||
[super fillPopUpMenu];
|
[super fillPopUpMenu];
|
||||||
NSMenu *m = [addButtonPopUp menu];
|
NSMenu *m = [addButtonPopUp menu];
|
||||||
NSMenuItem *mi = [m insertItemWithTitle:TR(@"Add iTunes Library") action:@selector(addiTunes:)
|
NSMenuItem *mi = [m insertItemWithTitle:NSLocalizedString(@"Add iTunes Library", @"") action:@selector(addiTunes:)
|
||||||
keyEquivalent:@"" atIndex:1];
|
keyEquivalent:@"" atIndex:1];
|
||||||
[mi setTarget:self];
|
[mi setTarget:self];
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,6 @@ http://www.hardcoded.net/licenses/bsd_license
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#import "DirectoryPanel.h"
|
#import "DirectoryPanel.h"
|
||||||
#import "Consts.h"
|
|
||||||
|
|
||||||
@implementation DirectoryPanelPE
|
@implementation DirectoryPanelPE
|
||||||
- (id)initWithParentApp:(id)aParentApp
|
- (id)initWithParentApp:(id)aParentApp
|
||||||
@ -21,10 +20,10 @@ http://www.hardcoded.net/licenses/bsd_license
|
|||||||
{
|
{
|
||||||
[super fillPopUpMenu];
|
[super fillPopUpMenu];
|
||||||
NSMenu *m = [addButtonPopUp menu];
|
NSMenu *m = [addButtonPopUp menu];
|
||||||
NSMenuItem *mi = [m insertItemWithTitle:TR(@"Add iPhoto Library") action:@selector(addiPhoto:)
|
NSMenuItem *mi = [m insertItemWithTitle:NSLocalizedString(@"Add iPhoto Library", @"") action:@selector(addiPhoto:)
|
||||||
keyEquivalent:@"" atIndex:1];
|
keyEquivalent:@"" atIndex:1];
|
||||||
[mi setTarget:self];
|
[mi setTarget:self];
|
||||||
mi = [m insertItemWithTitle:TR(@"Add Aperture Library") action:@selector(addAperture:)
|
mi = [m insertItemWithTitle:NSLocalizedString(@"Add Aperture Library", @"") action:@selector(addAperture:)
|
||||||
keyEquivalent:@"" atIndex:2];
|
keyEquivalent:@"" atIndex:2];
|
||||||
[mi setTarget:self];
|
[mi setTarget:self];
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,6 @@ http://www.hardcoded.net/licenses/bsd_license
|
|||||||
#import "ResultWindow.h"
|
#import "ResultWindow.h"
|
||||||
#import "Dialogs.h"
|
#import "Dialogs.h"
|
||||||
#import "Utils.h"
|
#import "Utils.h"
|
||||||
#import "Consts.h"
|
|
||||||
#import "PyDupeGuru.h"
|
#import "PyDupeGuru.h"
|
||||||
|
|
||||||
@implementation ResultWindow
|
@implementation ResultWindow
|
||||||
@ -50,7 +49,7 @@ http://www.hardcoded.net/licenses/bsd_license
|
|||||||
/* Actions */
|
/* Actions */
|
||||||
- (void)clearPictureCache
|
- (void)clearPictureCache
|
||||||
{
|
{
|
||||||
NSString *msg = TR(@"Do you really want to remove all your cached picture analysis?");
|
NSString *msg = NSLocalizedString(@"Do you really want to remove all your cached picture analysis?", @"");
|
||||||
if ([Dialogs askYesNo:msg] == NSAlertSecondButtonReturn) // NO
|
if ([Dialogs askYesNo:msg] == NSAlertSecondButtonReturn) // NO
|
||||||
return;
|
return;
|
||||||
[model clearPictureCache];
|
[model clearPictureCache];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user