Review Request 118879: Revert to old shell script code for parsing rgb.txt

Alexander Potashev aspotashev at gmail.com
Tue Jun 24 00:15:31 UTC 2014



> On June 23, 2014, 8:28 a.m., Aurélien Gâteau wrote:
> > Out of curiosity: why is it necessary to skip colors with spaces?

I guess it's a heuristic to remove duplicate entries for same {R,G,B}. However, it doesn't work perfectly, e.g. we have two entries "navy" and "NavyBlue" for the same RGB={0, 0, 128}.

A better algorithm would be to group all lines in rgb.txt by RGB and then choose one text from each group somehow, may be take the shortest one.

More important, we are now talking about Messages.sh which only populates translation templates with strings. The rgb.txt file parser used at run-time is elsewhere: see KColorTable::readNamedColor() in kdelibs4support/src/kdeui/kcolordialog.cpp


- Alexander


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/118879/#review60754
-----------------------------------------------------------


On June 22, 2014, 12:30 p.m., Alexander Potashev wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/118879/
> -----------------------------------------------------------
> 
> (Updated June 22, 2014, 12:30 p.m.)
> 
> 
> Review request for KDE Frameworks and Aurélien Gâteau.
> 
> 
> Repository: kdelibs4support
> 
> 
> Description
> -------
> 
> The code using AWK did not properly throw away entries containing
> spaces.
> 
> The code inserted in this commit was used successfully in KDE SC 4, see
> kdelibs/kdeui/colors/Messages.sh
> 
> 
> Diffs
> -----
> 
>   src/Messages.sh 9b918fa 
> 
> Diff: https://git.reviewboard.kde.org/r/118879/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Alexander Potashev
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20140624/937161cf/attachment.html>


More information about the Kde-frameworks-devel mailing list