poedit
poedit copied to clipboard
Disabled checkboxes in Replace don't accurately reflect search scope
Poedit 2.0beta3 Windows 10
The checkboxes are enabled in the Search dialog, but not in the Replace dialog. To me, this doesn't make sense since when replacing text, I also want to restrict the search to certain source fields.
Workaround: to change the value of these checkboxes, I currently have to open the Find dialog, change the values there and then open the Replace dialog, which is more complicated than necessary.
You can't replace in source text — it's read-only. That's why the checkbox is disabled, it makes no sense.
You could, in theory, replace in (translator's) comments, but it's not currently supported. Do you have a practical, real-life, actually encountered need to replace text in comments? If so, could you elaborate?
No, I don't want to replace text in comments.
My practical use case is: The GCC translation switched from using »%s«
to using %qs
. Therefore I want to find all instances where the source text contains %qs
and the translated text contains »%s«
, and replace that with %qs
. The dialog doesn't allow this currently, so the best approach I could think of was to search for »%s«
, but only in the target text.
Do you mean the checkboxes to the right are useless? Then they should not be shown at all.
But the Case insensitive checkbox to the left should be enabled.
Do you mean the checkboxes to the right are useless? Then they should not be shown at all.
I disagree. Showing and hiding widgets is more confusing for users, who have to work out why a control has vanished in certain situations. This is the case in e.g. LibreOffice and it annoys me greatly. Another disadvantage is that it makes dialog layouting much more difficult.
Do you mean the checkboxes to the right are useless? Then they should not be shown at all.
I disagree. Showing and hiding widgets is more confusing for users, who have to work out why a control has vanished in certain situations.
Point taken. I had not noticed that in Poedit there is a unified Find/Replace dialog. I thought they were two separate dialogs. Still, the checkboxes suggest that the text is searched for in the source text and in the comments, since they are checked.
When selecting Replace
in the dropdown:
- the checkbox for
Search in source texts
should be disabled and unchecked - the checkbox for
Search in translations
should be disabled and checked - the checkbox for
Search in comments
should be disabled and unchecked - the state of these checkboxes should not be remembered for the next search
Therefore I want to find all instances where the source text contains %qs and the translated text contains »%s«,
That's unrelated to what you reported and I have never seen anything like that supported (perhaps some programmer's editor can): you're asking to be able to search for two strings at once and replace one of them.
Then they should not be shown at all.
As explained, not the really.
But the Case insensitive checkbox to the left should be enabled.
That's one of those things that could be done, but aren't, and frankly make very little sense: if you're searching case-insensitively, case-fixed replacement strings is more likely to be bad than not.
the checkbox for Search in source texts should be disabled and unchecked the checkbox for Search in translations should be disabled and checked the checkbox for Search in comments should be disabled and unchecked the state of these checkboxes should not be remembered for the next search
Let me put it this way: you're welcome to submit patches to that effect, but I'm unlikely to address it anytime soon: it's just not worth spending time on. The controls are disabled, it's obvious that don't do anything, and I plan to redo Find & Replace to be inline anyway.