Bug 477274 - Untranslated string in File Search KCM
Summary: Untranslated string in File Search KCM
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_baloo (show other bugs)
Version: unspecified
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-20 10:17 UTC by Emir SARI
Modified: 2023-12-19 13:14 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
screenshot (387.13 KB, image/png)
2023-11-20 10:17 UTC, Emir SARI
Details
Filename not shown while indexer is idle (283.06 KB, image/jpeg)
2023-12-14 00:34 UTC, Nate Graham
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Emir SARI 2023-11-20 10:17:44 UTC
Created attachment 163310 [details]
screenshot

See screenshot. Latest neon Unstable.

The string "Currently indexing:" (Şu anda indeksleniyor:) is positioned weirdly, and there is a string that says 'Idle', which is also not aligned nicely. This particular string is not available for translation.
Comment 1 Nate Graham 2023-11-29 23:06:52 UTC
This string comes from Baloo; moving the bug report there.
Comment 2 Emir SARI 2023-11-30 06:41:01 UTC
I think the strings are defined here: https://invent.kde.org/frameworks/baloo/-/blob/master/src/qml/experimental/monitor.cpp?ref_type=heads

Not only Idle, but I believe (if I read the code right) Estimating, Resume, Suspend looks like they are also displayed. Is it enough to wrap them with i18n(), or special treatment would be required?
Comment 3 Nate Graham 2023-11-30 20:30:13 UTC
Assuming the rest of the translation infrastructure is hooked up already, yes.
Comment 4 Bug Janitor Service 2023-11-30 20:53:40 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/baloo/-/merge_requests/180
Comment 5 Stefan Brüns 2023-11-30 23:12:36 UTC
Whoever "improved" this dialog should fix it, the filename should be hidden when the indexer is idle. This was the case previously.

This condition is wrong: "visible: fileSearchEnabled.checked && monitor.completionPercentage !== 100 && monitor.filePath.length > 0"
Comment 6 Nate Graham 2023-12-01 00:36:30 UTC
The filename is hidden in the KCM when the indexer is idle. But we always show the status string, and that's not translated, which is the problem here. Is there a reason not to translate it, given how it's something exposed in the API and available for GUI software to display?

Plasmashell is clearly the wrong Bugzilla component for this; moving back to Baloo.
Comment 7 Stefan Brüns 2023-12-01 11:27:37 UTC
Nate, again you are spreading incorrect information, please be more thorough.

1. The filename is obviously *not* hidden when the indexer is idle. I even pointed out the incorrect code. You can even verify this by looking at the screenshot - progress is != 100%, and the filepath length is > 0, so it is visible.

There is even an unused "currentlyIndexing" property which could be used for this check, but the property is completely unused.

2. As far as I can see there is no untranslated string visible here (beside the filename placeholder). The state is already translated, see https://invent.kde.org/frameworks/baloo/-/blob/master/src/engine/indexerstate.cpp?ref_type=heads

3. There is no "Plasma Desktop" bug component, or anything else which matches in the "Plasma" group. So assigning it to the kde catchall ...
Comment 8 Nate Graham 2023-12-14 00:34:44 UTC
Created attachment 164153 [details]
Filename not shown while indexer is idle

> 1. The filename is obviously *not* hidden when the indexer is idle.

The filename *is* hidden when the indexer is idle. I am attaching a screenshot as evidence, disproving your confidently incorrect assertion. Furthermore this is not related to the bug report, which is about the untranslated string, for which there is already an open merge request.

> 3. There is no "Plasma Desktop" bug component, or anything else which matches in the
> "Plasma" group. So assigning it to the kde catchall ...

General Plasma issues live in the "plasmashell" product, which is where this ticket lived in the past and you can see that in the History page. Issues in System Settings KCMs live in the System Settings product. Please learn to use the bug tracker properly and don't intentionally assign tickets to incorrect products.

I'm yet again moving the ticket back to the product for the Baloo framework, which is where the issue lies, as evidenced by the merge request https://invent.kde.org/frameworks/baloo/-/merge_requests/180 that fixes it.

Do not move it elsewhere again.

Any concerns about the current layout should be brought up in new bug reports for systemsettings | kcm_baloofile.
Comment 9 Stefan Brüns 2023-12-14 01:00:48 UTC
(In reply to Nate Graham from comment #8)
> Created attachment 164153 [details]
> Filename not shown while indexer is idle
> 
> > 1. The filename is obviously *not* hidden when the indexer is idle.
> 
> The filename *is* hidden when the indexer is idle. I am attaching a
> screenshot as evidence, disproving your confidently incorrect assertion.
> Furthermore this is not related to the bug report, which is about the
> untranslated string, for which there is already an open merge request.

It is *sometimes* hidden, not always. The check is incorrect, failing *sometimes*.

It should not base the decision on the length of the filename (or, as in this case, the length of an irrelevant placeholder).

It is a regression caused by recent code changes.

> > 3. There is no "Plasma Desktop" bug component, or anything else which matches in the
> > "Plasma" group. So assigning it to the kde catchall ...
> 
> General Plasma issues live in the "plasmashell" product, which is where this
> ticket lived in the past and you can see that in the History page. Issues in
> System Settings KCMs live in the System Settings product. Please learn to
> use the bug tracker properly and don't intentionally assign tickets to
> incorrect products.

You keep assigning this bug to the wrong product.
 
> I'm yet again moving the ticket back to the product for the Baloo framework,
> which is where the issue lies, as evidenced by the merge request
> https://invent.kde.org/frameworks/baloo/-/merge_requests/180 that fixes it.

It does not fix it. 'i18n("idle")' does also return an non-zero string.
 
> Do not move it elsewhere again.

Why not, if your assumptions are just plain wrong?
Comment 10 Nate Graham 2023-12-14 01:32:08 UTC
Your behavior here is completely unacceptable, Stefan, and I have contacted CWG about it.
Comment 11 Stefan Brüns 2023-12-14 02:07:12 UTC
Why is assigning the bug to the right component unacceptable?

Why is mentioning where your conclusions are incorrect unacceptable?

The bug lies in the KCM, and is caused by a change you have done:
https://invent.kde.org/plasma/plasma-desktop/-/commit/6ea58c0f0ac6b9d91b255a41e51032a597238476

You removed the "monitor.currentlyIndexing" condition, and you did so in an apparently unrelated change. The problematic change was not justified in any way in the commit message, not even mentioned.

I have tried to give you a chance to fix it yourself, I pointed you to the problematic line in the main.qml (https://bugs.kde.org/show_bug.cgi?id=477274#c5), but you kept blaming baloo.

I have now created a MR which fixes the regression: 
https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1925
Comment 12 Stefan Brüns 2023-12-19 13:14:04 UTC
Git commit 7ecf315258b4e171ab76d7929ce7b8db5cfc3011 by Stefan Brüns.
Committed on 19/12/2023 at 14:08.
Pushed by bruns into branch 'master'.

Fix hiding of filename label when indexer is idle

This fixes a regression caused by commit 6ea58c0f0ac6 ("kcms/baloo: make
"current indexing" label a full path again"). Prior to this commit, the
condition included the boolean "monitor.currentlyIndexing" property.

Using the filePath.length and completionPercentage is insufficient,
as the filepath value is only valid when the state is *not* idle, and
may show e.g. a placeholder value during idle state.

M  +1    -1    kcms/baloo/ui/main.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/7ecf315258b4e171ab76d7929ce7b8db5cfc3011