Created attachment 173334 [details] Entry "Plasma Widgets" (addons) now empty (arrow) The entry "Plasma Addons" (that we translated as "Plasma Widgets") is moved to "Extra's" but the old entry is not removed and still there in the interface. Empty now.
Can reproduce on master with `LANGUAGE=nl_NL plasma-discover`. Maybe the old strings need to be purged from the .po files?
(In reply to Nate Graham from comment #1) > Maybe the old strings need to be purged from the .po files? Which old strings, and which is the affected file? If the old strings are not valid anymore, they are not used.
$ grep -ri "Plasma widgets" po/*nl* po/nl/libdiscover.po:msgstr "Plasma Widgets" po/nl/libdiscover.po:msgid "Plasma Widgets" I have a vague recollection that we build the UI based on the strings, but I'll let Harald comment on that.
> Maybe the old strings need to be purged from the .po files? Which old strings? libdiscover/backends/PackageKitBackend/packagekit-backend-categories.xml has Plasma Widgets listed there.
Oh what fun. So what is going on is that Plasma Addons is translated as two different strings this then results in the categories not getting merged and since they are not getting merged one of them is just dangling around. If the translations were the same this bug would disappear. I guess this is a variant of the non-unique translation bug I fixed a while ago, except in this case the strings are too unique 😭' Unsure what to do about it though. A unit test probably makes no sense globally because depending on context the same string could require translation as different strings. Removing the Menu entries from the packagekit categories would mean we don't get the widgets enumerated when there is no kns backend or the system is offline. Detecting that there are categories that should be merged (as per english) but aren't (as per locale) would probably require quite a refactor since we'd need to carry around both C and $locale strings for categories. #: libdiscover/backends/KNSBackend/KNSBackend.cpp:277 #, kde-format msgid "Plasma Addons" msgstr "Plasma Extra's" #: libdiscover/backends/PackageKitBackend/packagekit-backend-categories.xml:556 #, kde-format msgctxt "Category" msgid "Plasma Addons" msgstr "Plasma Widgets"
I started Discover with LANGUAGE=en_US and noticed that the base folder is called "Plasma Addons" and that in this folder there is the subfolder "Plasma Widgets". And that seems pretty good in my eyes. Doesn't the solution of the problem lie with us then? We would be happy to contribute.
> Unsure what to do about it though. If code needs both translations to be exactly the same, code should be using just one string and not two, i.e. add the "Category" context to the KNSBackend.cpp:277 string