Virgil Dupras avatar Virgil Dupras committed 17e83a2

Removed the TR() localization macro and tweaked localized strings in cocoalib.

Comments (0)

Files changed (5)

 #import "Dialogs.h"
-#import "HSConsts.h"
 @implementation Dialogs
 + (void)showMessage:(NSString *)message
     NSAlert *a = [[NSAlert alloc] init];
-    [a addButtonWithTitle:TR(@"OK")];
+    [a addButtonWithTitle:NSLocalizedStringFromTable(@"OK", @"cocoalib", @"")];
     [a setMessageText:message];
     [a runModal];
     [a release];
 + (NSInteger)askYesNo:(NSString *)message
     NSAlert *a = [[NSAlert alloc] init];
-    [a addButtonWithTitle:TR(@"Yes")];
-    [[a addButtonWithTitle:TR(@"No")] setKeyEquivalent:@"\E"];
+    [a addButtonWithTitle:NSLocalizedStringFromTable(@"Yes", @"cocoalib", @"")];
+    [[a addButtonWithTitle:NSLocalizedStringFromTable(@"No", @"cocoalib", @"")] setKeyEquivalent:@"\E"];
     [a setMessageText:message];
     NSInteger r = [a runModal];
     [a release];


-Copyright 2012 Hardcoded Software (
-This software is licensed under the "BSD" License as described in the "LICENSE" file, 
-which should be included with this package. The terms are also available at 
-#import <Cocoa/Cocoa.h>
-#define TR(s) NSLocalizedString(s, @"")
 result.canResize = False
 result.canMinimize = False
 image = ImageView(result, "NSApplicationIcon")
-titleLabel = Label(result, "AppTitle")
-versionLabel = Label(result, "AppVersion")
-copyrightLabel = Label(result, "AppCopyright")
+titleLabel = Label(result, NLSTR("AppTitle"))
+versionLabel = Label(result, NLSTR("AppVersion"))
+copyrightLabel = Label(result, NLSTR("AppCopyright"))
 registeredLabel = Label(result, "This app is registered, thanks!")
 registerButton = Button(result, "Register")


 result.canClose = False
 result.canResize = False
 result.canMinimize = False
-demoPromptLabel = Label(result, "<demo prompt>")
+demoPromptLabel = Label(result, NLSTR("<demo prompt>"))
 tryButton = Button(result, "Try")
 enterKeyButton = Button(result, "Enter Key")
 buyButton = Button(result, "Buy")


 result.canResize = False
 result.canMinimize = False
 titleLabel = Label(result, "Please Contribute")
-fairwarePromptLabel = Label(result, "<fairware prompt>")
+fairwarePromptLabel = Label(result, NLSTR("<fairware prompt>"))
 unpaidHoursLabel = Label(result, "Unpaid hours: %0.1f")
 moreInfoButton = Button(result, "More Info")
 continueButton = Button(result, "Continue")
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.