Bug 512187

Summary: System Settings sidebar SearchField fails to find translated placeholder text under certain circumstances
Product: [Applications] systemsettings Reporter: 2anwe <2anwe.0>
Component: generalAssignee: Plasma Bugs List <plasma-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: bizyaev, cwo.kde, jesusnavarrojr188, marceloslacerda
Priority: NOR    
Version First Reported In: 6.5.1   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: "Search..." is not translated
"Search..." is not translated 2

Description 2anwe 2025-11-16 13:04:16 UTC
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
Comment 1 2anwe 2025-11-16 13:33:54 UTC
Created attachment 186841 [details]
"Search..." is not translated 2
Comment 2 Ilya Bizyaev 2025-11-26 21:01:01 UTC
Same here, both on KDE Linux and openSUSE Tumbleweed, regardless of the active locale
Comment 3 Marcelo Lacerda 2025-12-18 02:37:37 UTC
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 ***
Comment 4 cwo 2025-12-18 04:19:51 UTC
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.
Comment 5 cwo 2025-12-18 04:24:58 UTC
*** Bug 513496 has been marked as a duplicate of this bug. ***
Comment 6 Ángel Navarro 2025-12-18 07:01:43 UTC
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 #|