Bug Hunting Session
Bug 114013 - Compound strings in Writer: "Text Format " + "(Search)" or "(Replace)"
Summary: Compound strings in Writer: "Text Format " + "(Search)" or "(Replace)"
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium trivial
Assignee: Gabor Kelemen
URL:
Whiteboard: target:6.1.0
Keywords:
Depends on:
Blocks: Find&Replace-Dialog
  Show dependency treegraph
 
Reported: 2017-11-23 17:25 UTC by Mihkel Tõnnov
Modified: 2018-01-04 21:44 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mihkel Tõnnov 2017-11-23 17:25:05 UTC
Stumbled across a compound string while updating translation for upcoming 6.0 version. It's the title of "search format" dialog (In Writer, choose Edit - Find & Replace - Other options - Format...).

"Text Format " = key-ID 2nKNE, location: searchformatdialog.ui:8
"(Search) = key-ID AbxGn, location: strings.hrc:1205

Compound strings are bad (ask any translator), so this should be substituted with a proper single string: "Text Format (Search)", or better yet, "Search Text Format".

Apparently it has been like this for long time (and it actually used to be worse: "Text Format(Search)" - note the missing space), so I'm not sure about the earliest affected version (inherited from OOo?).
Comment 1 Mihkel Tõnnov 2017-11-24 17:12:18 UTC
There's also "(Replace)" = key-ID aDW8B, location: strings.hrc:1206
(Seen via Edit - Find & Replace - Other options - click on the Replace field -Format...)
This variation of the compound should be replaced with "Text Format (Replace)", or "Substitute Text Format" or something similar.
Comment 2 Gabor Kelemen 2017-11-28 12:08:13 UTC
Code pointers:

https://opengrok.libreoffice.org/xref/core/include/svx/strings.hrc#1262
https://opengrok.libreoffice.org/xref/core/svx/source/dialog/srchdlg.cxx#1996

It would be easiest to change the RID_SVXSTR_SEARCH and RID_SVXSTR_REPLACE strings as suggested and forget the compounding.
Comment 3 Gabor Kelemen 2017-11-28 19:39:53 UTC
Proposed patch is in gerrit, but UX might come up with better wording: 

https://gerrit.libreoffice.org/45438
Comment 4 Yousuf Philips (jay) (retired) 2017-12-04 13:10:31 UTC
As the labels in the dialog are 'Find' and 'Replace', I would assume we should go with 'Find Text Format' and 'Replace Text Format'.

Heiko, Stuart, Adolfo: thoughts?
Comment 5 Heiko Tietze 2017-12-04 21:02:09 UTC
Not a native speaker but "Search text format" sounds good to me while "Replace text format" has potential. I see the advantage of using the field labels, though. Stumbled also over "Substitute text format".
Comment 6 Mihkel Tõnnov 2017-12-04 22:22:31 UTC
To my non-native ear, "Replace Text Format" doesn't convey the actual meaning (it sounds as if it were for selecting the format to be replaced, not the replacement). Maybe "Substitute Text Format" or "Replacement Text Format" is better?
Comment 7 Yousuf Philips (jay) (retired) 2017-12-05 10:09:08 UTC
Yes 'Replace Text Format' could be misunderstood when read and instead we could have a separator to clarify things like 'Find - Text Format' and 'Replace - Text Format'. Alternatively we can go with 'Format of Find Text' and 'Format of Replace Text', if we'd like to be as descriptive as possible, though we dont really do this in other dialogs.

I checked MS Word and its dialog titles are 'Find Font', 'Find Paragraph', ... and 'Replace Font', 'Replace Paragraph', ...
Comment 8 Heiko Tietze 2017-12-06 20:40:57 UTC
Ideas from the design meeting:

   + #1 'Format of Find Text' and 'Format of Replace Text'
   + #2 'Find - Text Format' and 'Replace - Text Format'
   + #3 'Find Text - Format' and 'Replace Text - Format'
   + #4 'Search text formatting' and 'Replace text formatting' 
         (+1 Thomas, description "text" good to know what formatting)
   + #5 'Search for formatting' and 'Replace with formatting' (+2)
Comment 9 V Stuart Foote 2017-12-19 18:18:36 UTC
(In reply to Heiko Tietze from comment #8)
> Ideas from the design meeting:
> 
>    + #1 'Format of Find Text' and 'Format of Replace Text'
>    + #2 'Find - Text Format' and 'Replace - Text Format'
>    + #3 'Find Text - Format' and 'Replace Text - Format'
>    + #4 'Search text formatting' and 'Replace text formatting' 
>          (+1 Thomas, description "text" good to know what formatting)
>    + #5 'Search for formatting' and 'Replace with formatting' (+2)

As translatable text for RID_SVXSTR_SEARCH and RID_SVXSTR_REPLACE actions--the "Search for formatting" and "Replace with formatting" are going to be fine.

Not sure if we'd want Sentence case or Title case for use here.
Comment 10 Heiko Tietze 2017-12-20 05:39:29 UTC
(In reply to V Stuart Foote from comment #9)
> Not sure if we'd want Sentence case or Title case for use here.

It's a dialog title so Title Style Capitalization.
Comment 11 Commit Notification 2018-01-04 21:44:58 UTC
Gabor Kelemen committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ced886a5c9490d34cc14ffa26bd42ad6195008b6

tdf#114013 Do not use string concatenation

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.