mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
Try reversion again.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@22017 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d3dbf0c0b1
commit
15de84b232
7 changed files with 153 additions and 165 deletions
|
@ -627,36 +627,27 @@ static BOOL setSharedDefaults = NO; /* Flag to prevent infinite recursion */
|
|||
#endif
|
||||
if (currLang == nil)
|
||||
{
|
||||
const char *env_list;
|
||||
NSString *env;
|
||||
|
||||
env = [[[NSProcessInfo processInfo] environment]
|
||||
objectForKey: @"LANGUAGES"];
|
||||
if (env != nil)
|
||||
env_list = getenv("LANGUAGES");
|
||||
if (env_list != 0)
|
||||
{
|
||||
env = [NSStringClass stringWithCString: env_list];
|
||||
currLang = [env componentsSeparatedByString: @";"];
|
||||
}
|
||||
}
|
||||
|
||||
if (currLang != nil)
|
||||
{
|
||||
NSMutableArray *a = [currLang mutableCopy];
|
||||
unsigned c = [a count];
|
||||
|
||||
while (c-- > 0)
|
||||
if ([currLang containsObject: @""] == YES)
|
||||
{
|
||||
NSString *s = [[a objectAtIndex: c] stringByTrimmingSpaces];
|
||||
NSMutableArray *a = [currLang mutableCopy];
|
||||
|
||||
if ([s length] == 0)
|
||||
{
|
||||
[a removeObjectAtIndex: c];
|
||||
}
|
||||
else
|
||||
{
|
||||
[a replaceObjectAtIndex: c withObject: s];
|
||||
}
|
||||
[a removeObject: @""];
|
||||
currLang = (NSArray*)AUTORELEASE(a);
|
||||
}
|
||||
[userLanguages addObjectsFromArray: a];
|
||||
RELEASE(a);
|
||||
[userLanguages addObjectsFromArray: currLang];
|
||||
}
|
||||
|
||||
/* Check if "English" is included. We do this to make sure all the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue