Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linphone-desktop
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
linphone-desktop
Commits
e689cb46
Commit
e689cb46
authored
Nov 28, 2016
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(app/App): better translations support
parent
46a1bf4f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
App.cpp
tests/src/app/App.cpp
+8
-7
No files found.
tests/src/app/App.cpp
View file @
e689cb46
...
...
@@ -27,20 +27,21 @@
App
*
App
::
m_instance
=
nullptr
;
App
::
App
(
int
&
argc
,
char
**
argv
)
:
QApplication
(
argc
,
argv
)
{
QString
current_locale
=
QLocale
::
system
().
name
();
if
(
m_english_translator
.
load
(
LANGUAGES_PATH
"en"
))
if
(
m_english_translator
.
load
(
QLocale
(
QLocale
::
English
),
LANGUAGES_PATH
))
installTranslator
(
&
m_english_translator
);
else
qWarning
(
"Unable to install english translator."
);
// Try to use default locale.
if
(
m_default_translator
.
load
(
QString
(
LANGUAGES_PATH
)
+
current_locale
))
{
QLocale
current_locale
=
QLocale
::
system
();
if
(
m_default_translator
.
load
(
current_locale
,
LANGUAGES_PATH
))
{
installTranslator
(
&
m_default_translator
);
m_locale
=
current_locale
;
}
else
m_locale
=
current_locale
.
name
()
;
}
else
{
qWarning
()
<<
QStringLiteral
(
"Unable to found translations for locale: %1."
)
.
arg
(
current_locale
);
.
arg
(
current_locale
.
name
());
}
setWindowIcon
(
QIcon
(
WINDOW_ICON_PATH
));
...
...
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