Wed, 29 Jul 2009 11:52:41 +0200
Replace local function with its canonical implementation in some cases.
These changes follow porting of the project to build 64-bit targets.
The replacements are needed due to segfaults otherwise ocurring in
some cases of local function (from helper.m) usage. These segfaults
do not ocurr when building only 32-bit targets. This hackish logic
deserves further testing until a fully orthogonal string localization
strategy is available for all targets.
tunblick/MenuController.m | file | annotate | diff | comparison | revisions |
1.1 --- a/tunblick/MenuController.m Wed Jul 29 11:44:56 2009 +0200 1.2 +++ b/tunblick/MenuController.m Wed Jul 29 11:52:41 2009 +0200 1.3 @@ -250,7 +250,7 @@ 1.4 1.5 while (item = [e nextObject]) 1.6 { 1.7 - [item setTitle:local([item title])]; 1.8 + [item setTitle:NSLocalizedString([item title], nil)]; 1.9 } 1.10 } 1.11 1.12 @@ -383,7 +383,7 @@ 1.13 } 1.14 } 1.15 } 1.16 - NSString *label = [NSString stringWithFormat:@"%@ (%@%@)",[myConnection configName],local(cState), cTimeS]; 1.17 + NSString *label = [NSString stringWithFormat:@"%@ (%@%@)",[myConnection configName],NSLocalizedString(cState, nil), cTimeS]; 1.18 [[tabView tabViewItemAtIndex:i] setLabel:label]; 1.19 i++; 1.20 } 1.21 @@ -397,7 +397,7 @@ 1.22 if(connectionNumber == 1) { 1.23 myState = local(@"OpenVPN: 1 connection active."); 1.24 } else { 1.25 - myState = [NSString stringWithFormat:local(@"OpenVPN: %d connections active."),connectionNumber]; 1.26 + myState = [NSString stringWithFormat:NSLocalizedString(@"OpenVPN: %d connections active.", nil),connectionNumber]; 1.27 } 1.28 1.29 [statusMenuItem setTitle: myState];