Chameleon Applications

Chameleon Applications Commit Details

Date:2011-12-04 02:05:03 (12 years 4 months ago)
Author:Rekursor
Commit:397
Parents: 396
Message:Added localization of status red message
Changes:
M/trunk/ChameleonPrefPane/English.lproj/Localizable.strings
M/trunk/ChameleonPrefPane/Sources/ChameleonPrefPane.mm
M/trunk/ChameleonPrefPane/Sources/PreferencesControllerBase.h
M/trunk/ChameleonPrefPane/Sources/PreferencesControllerBase.mm

File differences

trunk/ChameleonPrefPane/Sources/ChameleonPrefPane.mm
228228
229229
230230
231
231
232
232233
233234
234
235
236
235237
236238
237239
ft=false;
[mStatusText setTextColor: [NSColor redColor] ];
if (errorString)
[mStatusText setStringValue:[NSString stringWithFormat: @"Error while parsing org.chameleon.Boot.plist : %@",
[mStatusText setStringValue:[NSString stringWithFormat:
GetLocStrDef(@"Error_Parsing", @"error", @"Error while parsing %@"),
errorString] ];
else
[mStatusText setStringValue: @"Error while searching for org.chameleon.Boot.plist"];
[mStatusText setStringValue:
GetLocStrDef(@"Error_Searching", @"Error while searching for org.chameleon.Boot.plist", @"error") ];
}
else
trunk/ChameleonPrefPane/Sources/PreferencesControllerBase.mm
2020
2121
2222
23
24
25
26
27
28
29
30
2331
24
2532
2633
2734
static KernOptionsParser kernelFlags;
//--------------------------------------------------------------------------
NSString* GetLocStrDef(NSString* label, NSString* comment, NSString* def)
{
return NSLocalizedStringWithDefaultValue(label, nil,
[NSBundle bundleForClass:[ChameleonPrefPane class]],
def,
comment);
}
//--------------------------------------------------------------------------
@implementation PreferencesControllerBase
-(ChameleonPrefPane*) chameleon { return [ChameleonPrefPane instance]; }
trunk/ChameleonPrefPane/Sources/PreferencesControllerBase.h
2929
3030
3131
32
33
3234
3335
3436
SaveBootConfigOptions
};
/// PrefPane Localization Helper
NSString* GetLocStrDef(NSString* label, NSString* comment, NSString* def);
// ENHANCE ME: remove this globals and integrate them in ChameleonPrefPane or at least
trunk/ChameleonPrefPane/English.lproj/Localizable.strings
2222
2323
2424
25
26
27
25
26
27
28
29
/* comment */
"Peripherals" = "Peripherals";
/* error message 1*/
"Error while parsing" = "ERROR123456";
"Error searching for" = "ERROR123456";
/* error */
"Error_Parsing" = "Error while parsing %@";
/* error */
"Error_Searching" = "Error while searching for org.chameleon.Boot.plist";

Archive Download the corresponding diff file

Revision: 397