From dfa9bd1e0d84993f1fcb8bed03a52394f6ee663f Mon Sep 17 00:00:00 2001 From: vspader Date: Mon, 11 Jul 2005 20:27:47 +0000 Subject: [PATCH] localized fun --- AppController.m | 18 +++++++++--------- Cog.xcodeproj/project.pbxproj | 2 -- SoundController.m | 7 ++++--- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/AppController.m b/AppController.m index 5e4a67d32..aca996aa2 100644 --- a/AppController.m +++ b/AppController.m @@ -51,15 +51,15 @@ { // DBLog(@"AWAKe"); - [playButton setToolTip:@"Play"]; - [stopButton setToolTip:@"Stop"]; - [prevButton setToolTip:@"Previous"]; - [nextButton setToolTip:@"Next"]; - [addButton setToolTip:@"Add files"]; - [remButton setToolTip:@"Remove selected files"]; - [infoButton setToolTip:@"Information on the selected file."]; - [shuffleButton setToolTip:@"Shuffle mode"]; - [repeatButton setToolTip:@"Repeat mode"]; + [playButton setToolTip:NSLocalizedString(@"PlayButtonTooltip", @"")]; + [stopButton setToolTip:NSLocalizedString(@"StopButtonTooltip", @"")]; + [prevButton setToolTip:NSLocalizedString(@"PrevButtonTooltip", @"")]; + [nextButton setToolTip:NSLocalizedString(@"NextButtonTooltip", @"")]; + [addButton setToolTip:NSLocalizedString(@"AddButtonTooltip", @"")]; + [remButton setToolTip:NSLocalizedString(@"RemoveButtonTooltip", @"")]; + [infoButton setToolTip:NSLocalizedString(@"InfoButtonTooltip", @"")]; + [shuffleButton setToolTip:NSLocalizedString(@"ShuffleButtonTooltip", @"")]; + [repeatButton setToolTip:NSLocalizedString(@"RepeatButtonTooltip", @"")]; NSString *filename = @"~/Library/Application Support/Cog/Default.playlist"; [playlistController loadPlaylist:[filename stringByExpandingTildeInPath]]; diff --git a/Cog.xcodeproj/project.pbxproj b/Cog.xcodeproj/project.pbxproj index cb11e94a7..a88b06d11 100644 --- a/Cog.xcodeproj/project.pbxproj +++ b/Cog.xcodeproj/project.pbxproj @@ -265,7 +265,6 @@ 8EDCBDCA0840617B00F5C7E3 /* Cog.scriptTerminology */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.scriptTerminology; path = Cog.scriptTerminology; sourceTree = ""; }; 8EDCBDCC0840618900F5C7E3 /* Cog.scriptSuite */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.scriptSuite; path = Cog.scriptSuite; sourceTree = ""; }; 8EE90D3808830662002238C8 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/Localizable.strings; sourceTree = ""; }; - 8EE90D5608830B0B002238C8 /* French */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = French; path = French.lproj/Localizable.strings; sourceTree = ""; }; 8EF6FA65082DA526006F7BE6 /* FlacFile.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FlacFile.h; sourceTree = ""; }; 8EF6FA66082DA526006F7BE6 /* FlacFile.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = FlacFile.m; sourceTree = ""; }; 8EF6FA67082DA526006F7BE6 /* MonkeysFile.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MonkeysFile.h; sourceTree = ""; }; @@ -709,7 +708,6 @@ isa = PBXVariantGroup; children = ( 8EE90D3808830662002238C8 /* English */, - 8EE90D5608830B0B002238C8 /* French */, ); name = Localizable.strings; sourceTree = ""; diff --git a/SoundController.m b/SoundController.m index c9dd95b58..82902042a 100644 --- a/SoundController.m +++ b/SoundController.m @@ -102,7 +102,7 @@ waitingForPlay = NO; // DBLog(@"PlayEntry: %@ Sent!", [pe filename]); - + [self sendPortMessage:kCogPlayFileMessage withString:[pe filename]]; } @@ -220,12 +220,12 @@ if (showTimeRemaining == NO) { int sec = (int)(pos/1000.0); - text = [NSString stringWithFormat:@"Time Elapsed: %i:%02i", sec/60, sec%60]; + text = [NSString stringWithFormat:NSLocalizedString(@"TimeElapsed", @""), sec/60, sec%60]; } else { int sec = (int)(([positionSlider maxValue] - pos)/1000.0); - text = [NSString stringWithFormat:@"Time Remaining: %i:%02i", sec/60, sec%60]; + text = [NSString stringWithFormat:NSLocalizedString(@"TimeRemaining", @""), sec/60, sec%60]; } [timeField setStringValue:text]; } @@ -301,6 +301,7 @@ [positionSlider setDoubleValue:0]; // DBLog(@"Length changed: %f", max); // [lengthField setDoubleValue:max/1000.0]; + [self updateTimeField:0.0f]; } else if (message == kCogPositionUpdateMessage) {