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
b304bb03
Commit
b304bb03
authored
Oct 15, 2007
by
Christophe Mutricy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
i18n for the Qt dialogs
parent
0aa54ef8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
modules/gui/qt4/qt4.cpp
modules/gui/qt4/qt4.cpp
+20
-0
No files found.
modules/gui/qt4/qt4.cpp
View file @
b304bb03
...
...
@@ -22,8 +22,11 @@
*****************************************************************************/
#include <QApplication>
#include <QLocale>
#include <QTranslator>
#include "qt4.hpp"
#include <vlc_os_specific.h>
#include "dialogs_provider.hpp"
#include "input_manager.hpp"
#include "main_interface.hpp"
...
...
@@ -245,6 +248,23 @@ static void Init( intf_thread_t *p_intf )
else
/*if( p_intf->pf_show_dialog )*/
vlc_thread_ready
(
p_intf
);
// Translation - get locale
QLocale
ql
=
QLocale
::
system
();
// Translations for qt's own dialogs
QTranslator
qtTranslator
(
0
);
// Let's find the right path for the translation file
#if !defined( WIN32 )
QString
path
=
QString
(
QT4LOCALEDIR
);
#else
QString
path
=
QString
(
QString
(
system_VLCPath
())
+
DIR_SEP
+
"locale"
+
DIR_SEP
);
#endif
// files depending on locale
bool
b_loaded
=
qtTranslator
.
load
(
path
+
"qt_"
+
ql
.
name
());
if
(
!
b_loaded
)
msg_Dbg
(
p_intf
,
"Error while initializing qt-specific localization"
);
app
->
installTranslator
(
&
qtTranslator
);
/* Start playing if needed */
if
(
!
p_intf
->
pf_show_dialog
&&
p_intf
->
b_play
)
...
...
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