Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
a82ee54f
Commit
a82ee54f
authored
Feb 06, 2003
by
Sam Hocevar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* ./src/misc/darwin_specific.m: completed our list of known languages and
made code simpler to read.
parent
d30cf754
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
38 deletions
+25
-38
src/misc/darwin_specific.m
src/misc/darwin_specific.m
+25
-38
No files found.
src/misc/darwin_specific.m
View file @
a82ee54f
...
...
@@ -2,7 +2,7 @@
* darwin_specific.m: Darwin specific features
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: darwin_specific.m,v 1.
9 2003/02/04 20:45:24 hartman
Exp $
* $Id: darwin_specific.m,v 1.
10 2003/02/06 23:01:31 sam
Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Christophe Massiot <massiot@via.ecp.fr>
...
...
@@ -33,43 +33,31 @@
*****************************************************************************/
static
int
FindLanguage
(
const
char
*
psz_lang
)
{
const
char
*
psz_short
=
NULL
;
if
(
!
strcmp
(
psz_lang
,
"German"
)
)
{
psz_short
=
"de"
;
}
else
if
(
!
strcmp
(
psz_lang
,
"British"
)
)
{
psz_short
=
"en_GB"
;
}
else
if
(
!
strcmp
(
psz_lang
,
"French"
)
)
const
char
**
ppsz_parser
;
const
char
*
ppsz_all
[]
=
{
psz_short
=
"fr"
;
}
else
if
(
!
strcmp
(
psz_lang
,
"Italian"
)
)
"German"
,
"de"
,
"British"
,
"en_GB"
,
"French"
,
"fr"
,
"Italian"
,
"it"
,
"Japanese"
,
"ja"
,
"Dutch"
,
"nl"
,
"Norwegian"
,
"no"
,
"Polish"
,
"pl"
,
"Russian"
,
"ru"
,
"Swedish"
,
"sv"
,
NULL
};
for
(
ppsz_parser
=
ppsz_all
;
ppsz_parser
[
0
]
;
ppsz_parser
+=
2
)
{
psz_short
=
"it"
;
}
else
if
(
!
strcmp
(
psz_lang
,
"Japanese"
)
)
if
(
!
strcmp
(
psz_lang
,
ppsz_parser
[
0
]
)
||
!
strcmp
(
psz_lang
,
ppsz_parser
[
1
]
)
)
{
psz_short
=
"ja"
;
}
else
if
(
!
strcmp
(
psz_lang
,
"Dutch"
)
)
{
psz_short
=
"nl"
;
}
else
{
/* Just in case gettext knows about this. */
psz_short
=
psz_lang
;
}
if
(
psz_short
!=
NULL
)
{
setenv
(
"LANG"
,
psz_short
,
1
);
setenv
(
"LANG"
,
ppsz_parser
[
1
],
1
);
return
1
;
}
}
return
0
;
}
...
...
@@ -98,7 +86,6 @@ void system_Init( vlc_t *p_this, int *pi_argc, char *ppsz_argv[] )
/* Check if $LANG is set. */
if
(
(
p_char
=
getenv
(
"LANG"
))
==
NULL
)
{
vlc_bool_t
b_found
=
0
;
NSAutoreleasePool
*
o_pool
=
[[
NSAutoreleasePool
alloc
]
init
];
/* Retrieve user's preferences. */
...
...
@@ -107,12 +94,12 @@ void system_Init( vlc_t *p_this, int *pi_argc, char *ppsz_argv[] )
NSEnumerator
*
o_enumerator
=
[
o_languages
objectEnumerator
];
NSString
*
o_lang
;
while
(
(
o_lang
=
[
o_enumerator
nextObject
])
&&
(
!
b_found
)
)
while
(
(
o_lang
=
[
o_enumerator
nextObject
])
)
{
const
char
*
psz_string
=
[
o_lang
lossyCString
];
if
(
FindLanguage
(
psz_string
)
)
{
b
_found
=
1
;
b
reak
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment