Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Plasma Workspace
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
3
Issues
3
List
Boards
Labels
Service Desk
Milestones
Merge Requests
63
Merge Requests
63
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
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
Plasma
Plasma Workspace
Commits
e7293023
Commit
e7293023
authored
Jun 13, 2014
by
Sebastian Kügler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Temporary reset application domain, fix more labels
parent
32bf6130
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
kcmtranslations.cpp
kcmtranslations.cpp
+9
-2
No files found.
kcmtranslations.cpp
View file @
e7293023
...
...
@@ -52,7 +52,7 @@ KCMTranslations::KCMTranslations(QWidget *parent, const QVariantList &args)
m_ui
->
setupUi
(
this
);
// Set the translation domain to Plasma, i.e.
KLocalizedString
::
setApplicationDomain
(
"
systemsetting
s"
);
KLocalizedString
::
setApplicationDomain
(
"
kcmtranslation
s"
);
// Get the current config
m_config
=
KConfigGroup
(
KSharedConfig
::
openConfig
(
configFile
),
"Translations"
);
...
...
@@ -88,7 +88,10 @@ void KCMTranslations::load()
// Get the currently installed translations for Plasma
// TODO May want to later add all installed .po files on system?
m_installedTranslations
.
clear
();
KLocalizedString
::
setApplicationDomain
(
"systemsettings"
);
m_installedTranslations
=
KLocalizedString
::
availableApplicationTranslations
().
toList
();
KLocalizedString
::
setApplicationDomain
(
"kcmtranslations"
);
if
(
!
m_installedTranslations
.
contains
(
"en_US"
))
{
m_installedTranslations
.
append
(
"en_US"
);
}
...
...
@@ -241,7 +244,11 @@ void KCMTranslations::initTranslations()
if
(
!
m_kcmTranslations
.
contains
(
languageCode
))
{
QListWidgetItem
*
listItem
=
new
QListWidgetItem
(
m_ui
->
m_selectTranslations
->
availableListWidget
());
// TODO This gives the name in the language itself, not in current language, need new QLocale api for that
listItem
->
setText
(
QLocale
(
languageCode
).
nativeLanguageName
());
QString
label
=
QLocale
(
languageCode
).
nativeLanguageName
();
if
(
label
.
isEmpty
())
{
label
=
languageCode
;
}
listItem
->
setText
(
label
);
listItem
->
setData
(
Qt
::
UserRole
,
languageCode
);
}
}
...
...
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