Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpenBoard
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
lifo
Nicolas Ollinger
OpenBoard
Commits
5a434ba6
Commit
5a434ba6
authored
Sep 28, 2012
by
Claudio Valerio
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed issue related to translation loading
parent
c72b6dc6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
UBApplication.cpp
src/core/UBApplication.cpp
+9
-8
No files found.
src/core/UBApplication.cpp
View file @
5a434ba6
...
...
@@ -216,14 +216,17 @@ QString UBApplication::checkLanguageAvailabilityForSankore(QString &language)
void
UBApplication
::
setupTranslators
(
QStringList
args
)
{
QString
forcedLanguage
;
QString
forcedLanguage
(
""
)
;
if
(
args
.
contains
(
"-lang"
))
forcedLanguage
=
args
.
at
(
args
.
indexOf
(
"-lang"
)
+
1
);
else
{
QString
setLanguage
=
UBSettings
::
settings
()
->
appPreferredLanguage
->
get
().
toString
();
if
(
!
setLanguage
.
isEmpty
())
forcedLanguage
=
setLanguage
;
}
// TODO claudio: this has been commented because some of the translation seem to be loaded at this time
// especially tools name. This is a workaround and we have to be able to load settings without
// impacting the translations
// else{
// QString setLanguage = UBSettings::settings()->appPreferredLanguage->get().toString();
// if(!setLanguage.isEmpty())
// forcedLanguage = setLanguage;
// }
QString
language
(
""
);
...
...
@@ -242,7 +245,6 @@ void UBApplication::setupTranslators(QStringList args)
else
{
mApplicationTranslator
=
new
QTranslator
(
this
);
mQtGuiTranslator
=
new
QTranslator
(
this
);
mApplicationTranslator
->
load
(
UBPlatformUtils
::
translationPath
(
QString
(
"sankore_"
),
language
));
installTranslator
(
mApplicationTranslator
);
...
...
@@ -256,7 +258,6 @@ void UBApplication::setupTranslators(QStringList args)
}
if
(
!
qtGuiTranslationPath
.
isEmpty
()){
qDebug
()
<<
"qtGuiTranslationPath "
<<
qtGuiTranslationPath
;
mQtGuiTranslator
->
load
(
qtGuiTranslationPath
);
installTranslator
(
mQtGuiTranslator
);
}
...
...
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