Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
545ad065
Commit
545ad065
authored
Aug 21, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initialize language from vlcrc before any language-dependent stuff
- command line help text - text domain binding
parent
b91341a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
29 deletions
+14
-29
src/libvlc.c
src/libvlc.c
+14
-29
No files found.
src/libvlc.c
View file @
545ad065
...
...
@@ -238,21 +238,10 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
int
i_ret
=
VLC_EEXIT
;
playlist_t
*
p_playlist
=
NULL
;
char
*
psz_val
;
#if defined( ENABLE_NLS ) \
&& ( defined( HAVE_GETTEXT ) || defined( HAVE_INCLUDED_GETTEXT ) )
# if defined (WIN32) || defined (__APPLE__)
char
*
psz_language
;
#endif
#endif
/* System specific initialization code */
system_Init
();
/*
* Support for gettext
*/
vlc_bindtextdomain
(
PACKAGE_NAME
);
/* Initialize the module bank and load the configuration of the
* main module. We need to do this at this stage to be able to display
* a short help if required by the user. (short help == main module
...
...
@@ -308,6 +297,20 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
}
priv
->
i_verbose
=
var_InheritInteger
(
p_libvlc
,
"verbose"
);
/*
* Support for gettext
*/
#if defined( ENABLE_NLS ) \
&& ( defined( HAVE_GETTEXT ) || defined( HAVE_INCLUDED_GETTEXT ) )
# if defined (WIN32) || defined (__APPLE__)
/* Check if the user specified a custom language */
char
*
lang
=
var_InheritString
(
p_libvlc
,
"language"
);
if
(
lang
!=
NULL
&&
strcmp
(
lang
,
"auto"
))
SetLanguage
(
lang
);
free
(
lang
);
# endif
vlc_bindtextdomain
(
PACKAGE_NAME
);
#endif
/*xgettext: Translate "C" to the language code: "fr", "en_GB", "nl", "ru"... */
msg_Dbg
(
p_libvlc
,
"translation test: code is
\"
%s
\"
"
,
_
(
"C"
)
);
...
...
@@ -397,24 +400,6 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
return
i_ret
;
}
/* Check for translation config option */
#if defined( ENABLE_NLS ) \
&& ( defined( HAVE_GETTEXT ) || defined( HAVE_INCLUDED_GETTEXT ) )
# if defined (WIN32) || defined (__APPLE__)
/* Check if the user specified a custom language */
psz_language
=
var_CreateGetNonEmptyString
(
p_libvlc
,
"language"
);
if
(
psz_language
&&
strcmp
(
psz_language
,
"auto"
)
)
{
/* Reset the default domain */
SetLanguage
(
psz_language
);
/* Translate "C" to the language code: "fr", "en_GB", "nl", "ru"... */
msg_Dbg
(
p_libvlc
,
"translation test: code is
\"
%s
\"
"
,
_
(
"C"
)
);
}
free
(
psz_language
);
# endif
#endif
/* Check for help on modules */
if
(
(
p_tmp
=
var_InheritString
(
p_libvlc
,
"module"
))
)
{
...
...
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