Bug 401136 - Color scheme names are not translatable
Summary: Color scheme names are not translatable
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_colors (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Matthew Woehlke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-17 12:10 UTC by Karl Ove Hufthammer
Modified: 2018-12-04 15:47 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.15.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Karl Ove Hufthammer 2018-11-17 12:10:14 UTC
SUMMARY
It’s not possible to translate the names of the default colour schemes. They are called ‘Breeze Dark’, ‘Breeze High Contrast’ etc. The names are meaningful, and should be translatable.

Note that corresponding names of desktop themes, cursor themes, icon themes, and widget styles *are* translatable.


STEPS TO REPRODUCE
1. Observe that that the colour scheme names are shown in English no matter what language settings you have.
2. Observe that none of translation files for the colour schemes (https://l10n.kde.org/stats/gui/trunk-kf5/team/en_GB/kde-workspace/) contain strings for the various colour schemes (e.g. for ‘Breeze High Contrast’).
Comment 1 Kai Uwe Broulik 2018-11-19 07:21:08 UTC
It just uses the filename of the scheme. Perhaps we could introduce a Name= key to a [General] section of the .colors file, but that also needs wiring up scripty to extract those.
Comment 2 Burkhard Lück 2018-12-04 15:18:14 UTC
(In reply to Kai Uwe Broulik from comment #1)
> It just uses the filename of the scheme. 

that is wrong

> Perhaps we could introduce a Name=
> key to a [General] section of the .colors file

we already have a Name key in the colors files:

breeze/colors$ wcgrep Name
./BreezeHighContrast.colors:107:Name=Breeze High Contrast
./BreezeLight.colors:107:Name=Breeze Light
./BreezeDark.colors:107:Name=Breeze Dark
./Breeze.colors:107:Name=Breeze

and 

plasma-desktop/kcms/colors/schemes$ wcgrep Name
./Honeycomb.colors:90:Name=Honeycomb
./Norway.colors:90:Name=Norway
./Oxygen.colors:107:Name=Oxygen
./ObsidianCoast.colors:89:Name=Obsidian Coast
./Zion.colors:90:Name=Zion
./OxygenCold.colors:103:Name=Oxygen Cold
./WontonSoup.colors:88:Name=Wonton Soup
./ZionReversed.colors:90:Name=Zion (Reversed)
./Steel.colors:89:Name=Steel

> but that also needs wiring up scripty to extract those.

That is easy, see
https://techbase.kde.org/Development/Tutorials/Localization/i18n_Build_Systems#Translating_.desktop_Files

<quote>
... you have to create an ExtraDesktop.sh file that outputs the path of those files

#! /bin/sh
find -name *colors -print
</quote>

Adding ExtraDesktop.sh files to plasma-desktop/kcms/colors/schemes and breeze/colors should work afaik
Comment 3 Kai Uwe Broulik 2018-12-04 15:20:53 UTC
Cool! I'll give it a shot, thanks a lot
Comment 4 Kai Uwe Broulik 2018-12-04 15:47:10 UTC
Git commit 4087961586e4732e4e62f083211ad94b5ffe0aee by Kai Uwe Broulik.
Committed on 04/12/2018 at 15:46.
Pushed by broulik into branch 'master'.

Translate color scheme names
FIXED-IN: 5.15.0

Differential Revision: https://phabricator.kde.org/D17347

A  +2    -0    kcms/colors/schemes/ExtraDesktop.sh

https://commits.kde.org/plasma-desktop/4087961586e4732e4e62f083211ad94b5ffe0aee
Comment 5 Kai Uwe Broulik 2018-12-04 15:47:59 UTC
Git commit da5fbe7f18ffae4bfc639816aa71b2df510ca23a by Kai Uwe Broulik.
Committed on 04/12/2018 at 15:47.
Pushed by broulik into branch 'master'.

Translate color scheme names

A  +2    -0    colors/ExtraDesktop.sh

https://commits.kde.org/breeze/da5fbe7f18ffae4bfc639816aa71b2df510ca23a