Use locale currency for donate icon
ClosedPublic

Authored by broulik on May 9 2019, 1:09 PM.

Details

Summary

This allows the icon theme to provide a donate icon using the currency symbol, e.g. help-donate-eur.
In case such an icon doesn't exist the icon fallback mechanism chooses help-donate again.

Test Plan

English US (default icon)


German locale
(obviously needs proper icons ;))

Diff Detail

Repository
R265 KConfigWidgets
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.May 9 2019, 1:09 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptMay 9 2019, 1:09 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
broulik requested review of this revision.May 9 2019, 1:09 PM
ngraham accepted this revision.May 9 2019, 1:53 PM
ngraham added a subscriber: ngraham.

Is there a list of currency codes somewhere so that VDG can know what icons we'll need to make to fully support this?

This revision is now accepted and ready to land.May 9 2019, 1:53 PM
sitter added a comment.May 9 2019, 2:20 PM

For obvious reasons I'd recommend only going for the major currencies :)

I've had a quick look at a part of our website visits and the following currencies would be the most relevant based on that:

  1. EUR
  2. USD (this is actually the default icon so it's not needed and as far as I can see AUD and CAD have the same symbol)
  3. RUB
  4. GBP
  5. CNY
  6. BRR
  7. INR
  8. MXN
  9. PLN
  10. UAH
  11. TRY
  12. SEK
  13. JPY
  14. ARS
  15. CHF

(in that order)

The first 5-10 or so are also in line with localization statistics I have in the back of my mind from a while ago (from Kubuntu I think?), so this list should be fairly representative as far as how many of our current users are affected by that currency.

davidedmundson added inline comments.
src/kstandardaction.cpp
202

else iconName = "help-donate" ?

broulik added inline comments.May 9 2019, 5:20 PM
src/kstandardaction.cpp
202

That's the default specified in the struct already

Filed an icon request bug for Breeze icons: https://bugs.kde.org/show_bug.cgi?id=407372

In the meantime I think this is safe enough to land given that the fallback mechanic will result in no visual changes until we actually get new icons.

This revision was automatically updated to reflect the committed changes.