Bug 217219 - names of built-in energy profiles are not translated
Summary: names of built-in energy profiles are not translated
Status: RESOLVED FIXED
Alias: None
Product: solid
Classification: Frameworks and Libraries
Component: powermanagement-kcm (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Dario Freddi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-03 16:15 UTC by Kamil Neczaj
Modified: 2010-12-10 18:29 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kamil Neczaj 2009-12-03 16:15:42 UTC
Version:            (using KDE 4.3.3)
OS:                Linux
Installed from:    Archlinux Packages

I don't know whether I place the report in appropriate category, so move it if not.

Kde comes with several power management profiles: performance, powersave, presentation etc. The problem is that their names are displayed in English no matter what language the user sets in systemsettings.
Comment 1 Karl Ove Hufthammer 2010-04-13 21:20:33 UTC
The bug is really that it’s not *possible* to translate these names, not that they’re not translated into certain languages.

And the bug is still present in KDE 4.4.2.
Comment 2 Albert Astals Cid 2010-07-09 00:27:51 UTC
Dario, any estimated time for this? Lots of translators seem unhappy about this situation
Comment 3 Dario Freddi 2010-07-09 11:16:08 UTC
I'm afraid this will have to wait until 4.6. This issue is caused by a design flaw which is not fixable until the rework I've planned for the next major release.
Comment 4 Albert Astals Cid 2010-10-02 19:03:25 UTC
Just spoke with Dario in real life and he is rewriting powerdevil internals and he says he is keeping this in mind to make it possible to be translateable
Comment 5 Dario Freddi 2010-11-09 17:08:31 UTC
Fixed in 4.6 - profiles are generated through a code path in PowerDevil which translates the names to the current used locale.
Comment 6 Burkhard Lück 2010-12-03 18:19:18 UTC
(In reply to comment #5)
> Fixed in 4.6 - profiles are generated through a code path in PowerDevil which
> translates the names to the current used locale.

This issue is not really fixed, the current solution is only an OTT = One Time Translation.

Problem is, that the default profile names Performance, Powersave and Aggressive powersave are only translated once at the first start of powerdevil using the current locale.
Switching the language later leaves the profile names  in the old locale and there is no way to get them translated into the new locale except editing the names in powerdevilrc + powerdevil2profilesrc manually or remove these files and lose all user defined settings
Comment 7 Dario Freddi 2010-12-09 08:23:01 UTC
SVN commit 1204813 by dafre:

BUG: 217219

Make profiles really translatable by separating ID and Name in the config UI. The Daemon will provide clients with a map id->name (so 3rd parties don't have to
parse the config file theirselves), and will translate bundled profiles based on their ID. Fix also all the 3rd party apps accordingly.

 M  +6 -8      plasma/generic/applets/battery/battery.cpp  
 M  +4 -1      plasma/generic/applets/battery/battery.h  
 M  +33 -21    plasma/generic/dataengines/powermanagement/powermanagementengine.cpp  
 M  +30 -12    plasma/generic/runners/powerdevil/PowerDevilRunner.cpp  
 M  +4 -1      plasma/generic/runners/powerdevil/PowerDevilRunner.h  
 M  +4 -0      powerdevil/daemon/org.kde.Solid.PowerManagement.xml  
 M  +32 -6     powerdevil/daemon/powerdevilcore.cpp  
 M  +6 -0      powerdevil/daemon/powerdevilcore.h  
 M  +3 -3      powerdevil/daemon/powerdevilprofilegenerator.cpp  
 M  +42 -19    powerdevil/kcmodule/global/GeneralPage.cpp  
 M  +53 -28    powerdevil/kcmodule/profiles/EditPage.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1204813
Comment 8 Anne-Marie Mahfouf 2010-12-09 22:29:33 UTC
Reopening as I don't have any profiles at all displayed (probably because I switch to French and back to English).
I can test more what's happening if you need me to.

Something taht I don't know if it can help: we noticed that when we run kcmshell4 powerdevilprofilesconfig
we get as output:

kcmshell(12342)/kutils (KCModuleProxy) KCModuleProxyPrivate::loadModule: Module not already loaded, loading module  "Power Profiles"  from library  "kcm_powerdevilprofilesconfig"  using symbol  "kcm_powerdevilprofilesconfig"
kcmshell(12342) EditPage::reloadAvailableProfiles: Error contacting the daemon!

Burkhard also confirmed all this.
Comment 9 Dario Freddi 2010-12-10 14:31:23 UTC
Please file a separate bug, this is totally unrelated to this and it's due to the KCM not able to contact the daemon.
Comment 10 Anne-Marie Mahfouf 2010-12-10 15:14:25 UTC
This is obviously related: 
- for people running KDE in English only the profile are there, there is no bug.
- before this commit whenever I switched to another language I never lost my profiles list.

I suppose I'll have to restart with a new $KDEHOME and see when it happens and file a new bug report...
Comment 11 Dario Freddi 2010-12-10 18:29:12 UTC
Definitely - moreover, the bug MIGHT be related to the fix introduced, but it is NOT related to the specific issue - as the bug is no longer that profiles are not translatable, but that profiles do not show up.

Hope this makes more sense. Btw, starting from a new KDEHOME if you were running beta1 might be a good idea.