Created attachment 186840 [details] "Search..." is not translated SUMMARY "Search..." in the system settings is not translated. STEPS TO REPRODUCE 1. Open system settings 2. Look at the search bar 3. Observe that it's not translated OBSERVED RESULT "Search..." in the system settings is not translated. EXPECTED RESULT "Search..." in the system settings is translated SOFTWARE/OS VERSIONS Linux: CachyOS KDE Plasma Version: 6.5.2 KDE Frameworks Version: 6.19.0 Qt Version: 6.10.0
Created attachment 186841 [details] "Search..." is not translated 2
Same here, both on KDE Linux and openSUSE Tumbleweed, regardless of the active locale
Looks like this is a very old bug (see https://bugs.kde.org/show_bug.cgi?id=358792). I'm marking this as a duplicate and copying your information to the original report. Please add yourself to the CC list of that bug if you want to keep up with the updates. *** This bug has been marked as a duplicate of bug 358792 ***
358792 is unrelated, but I can reproduce this on Fedora 43's Plasma. On my self-built master, this works correctly, and the search string is displayed in the correct language as set by the LANGUAGE environment variable. The search term is taken from the Component in Kirigami, SearchField, and systemsettings is not modifying it. It's marked as translatable there (with qsTr, as kirigami does not depend on KI18n), so maybe something with the lookup is failing in distributions. I can't reproduce it with translatable strings from Kirigami in other apps, or even in kcms that use it while loaded into system settings, nor with local translatable strings so it seems relatively specific to the sidebar and externally translated strings (possibly only with qsTr?). Can't see anything obvious in the systemsettings commit logs that would explain why it works on my master build either.
*** Bug 513496 has been marked as a duplicate of this bug. ***
Alright, I'm doing a bit more of research all by myself. First thing I notice: // in frameworks / kirigami / src / controls / SearchField.qml ``` placeholderText: qsTr("Search…") Accessible.name: qsTr("Search") Accessible.searchEdit: true focusSequences: [StandardKey.Find] inputMethodHints: Qt.ImhNoPredictiveText EnterKey.type: Qt.EnterKeySearch rightActions: [ Kirigami.Action { icon.name: root.LayoutMirroring.enabled ? "edit-clear-locationbar-ltr" : "edit-clear-locationbar-rtl" visible: root.text.length > 0 text: qsTr("Clear search") ``` So I tried hardcoding text: ``` placeholderText: "Buscar..." Accessible.name: "Buscar..." ``` Changing the second one didn't work but changing the first... That did change the placeholder text. So... typing a random string also worked: ``` placeholderText: "Ataraxia..." ``` Hardcoding strings does work :D So I tried to use a random string from the same systemsettings with qsTr(): ``` placeholderText: qsTr("Donate") ``` And it still remained in English. That makes me think that qsTr() is not doing anything on that specific part of the code. It seems strange for me that I tried to set the "Select All" text as "Search..." for its respective qsTr() and the "Select All" button still remained select all but translated in Koko (the gallery) and its msgid's appeared marked with #|