plasma-systemmonitor in kdereview

Albert Astals Cid aacid at kde.org
Sun Oct 18 23:49:08 BST 2020


El dijous, 1 d’octubre de 2020, a les 14:36:05 CEST, Arjen Hiemstra va escriure:
> On Thursday, 1 October 2020 14:11:16 CEST Harald Sitter wrote:
> > On 01.10.20 11:36, Arjen Hiemstra wrote:
> > > Hello,
> > > 
> > > I'd hereby like to announce that plasma-systemmonitor is in kdereview. It
> > > can be found at https://invent.kde.org/plasma/plasma-systemmonitor .
> > > 
> > > plasma-systemmonitor is a new system monitor UI built with Kirigami. It
> > > makes use of the ksystemstats daemon and the faces system for system
> > > monitor plasmoids that were both introduced in Plasma 5.19.
> > > 
> > > Our current plan is to do a "preview release" alongside Plasma 5.20, then
> > > have it be an official part of Plasma with 5.21.
> > 
> > Cool stuff.
> > 
> > L10n is currently a bit incomplete.
> > Notably
> > - the pages files lack any localization at all and I'm also not sure how
> > those could be best localized.
> 
> Yeah that is a good point. If we can somehow extract the strings from these 
> files I think we can make it work. But that may need some custom scripting.

I think that shows a bit of a bad design decision. You shouldn't have default user visible strings in data files if they are also user editable

If you do, you have several chained problems:
 * You need to extract those strings somehow 
 * You need to feed all the "title" strings coming from .page files through i18n() to get the translation before showing it to the user
 * Once you do that, what happens if i create a page and call it "Disk"? i do *not* want to get the translation for that, it's something i manually created i want to get exactly what i wrote
 * This means that now for each title string in your .page files you need to store whether this is a default string and thus should be passed through i18n or if it is a user-entered string and should not be passed through i18n

Random suggestion after spending 2 minutes thinking on it, for the default pages instead of having
  title=Disk
you have
  default_page_title=overview_page_disk

and then on the C++ side you have a big group of
  if (default_page_title == "overview_page_disk") return i18nc("Label on Overview Page", "Disk");

and leave title only for user created pages.

Cheers,
   Albert






More information about the kde-core-devel mailing list