Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tag: v1.0.1
Fetching contributors…

Cannot retrieve contributors at this time

54 lines (44 sloc) 1.187 kB
//
// ApplicationController.m
// JSLocalizedString
//
// Created by Patrick Geiller on 18/02/09.
// Copyright 2009 __MyCompanyName__. All rights reserved.
//
#import "ApplicationController.h"
#import "JSCocoa.h"
@implementation ApplicationController
- (id)init
{
self = [super init];
bookCount = 0;
return self;
}
- (void)awakeFromNib
{
id str = JSLocalizedString(@"BookCount", [NSNumber numberWithInt:bookCount], nil);
NSLog(@"init %d %@", bookCount, str);
if (!str) str = @"***Localization not found***";
[label setStringValue:str];
}
- (IBAction)add:(id)sender
{
bookCount++;
id str = JSLocalizedString(@"BookCount", [NSNumber numberWithInt:bookCount], nil);
NSLog(@"add %d %@", bookCount, str);
if (!str) str = @"***Localization not found***";
[label setStringValue:str];
}
- (IBAction)remove:(id)sender
{
if (bookCount > 0) bookCount--;
id str = JSLocalizedString(@"BookCount", [NSNumber numberWithInt:bookCount], nil);
NSLog(@"remove %d", bookCount);
if (!str) str = @"***Localization not found***";
[label setStringValue:str];
}
- (IBAction)openInternational:(id)sender
{
system("open /System/Library/PreferencePanes/Localization.prefPane");
}
@end
Jump to Line
Something went wrong with that request. Please try again.