Bug 114340 - Document's name needs improvement in 'Compatibility' tab
Summary: Document's name needs improvement in 'Compatibility' tab
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.1.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Heiko Tietze
URL:
Whiteboard: target:6.1.0 target:6.0.0.1
Keywords:
Depends on:
Blocks: Options-Dialog-Writer
  Show dependency treegraph
 
Reported: 2017-12-08 11:37 UTC by Yousuf Philips (jay) (retired)
Modified: 2018-02-02 13:27 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
writer's title and document name in compatibility tab (13.09 KB, image/png)
2017-12-08 11:37 UTC, Yousuf Philips (jay) (retired)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2017-12-08 11:37:41 UTC
Created attachment 138304 [details]
writer's title and document name in compatibility tab

The appearance of the currently open document's name in the Compatibility tab of the options dialog doesnt look correct, especially when the document filename has a space in it. So i recommend one of these two options.

1. Add single quotes around the name and also add the file extension

2. replace the name with 'current document'
Comment 1 Heiko Tietze 2017-12-09 08:10:14 UTC
This string defined in [1] uses %DOCNAME at many places, which means changing is delicate. The quotes aren't a problem and interestingly there is a AOO guideline stating that quotes are the way to go [2]. So my take is to just add single quotes that can be localized easily.

[1] https://opengrok.libreoffice.org/xref/core/sw/uiconfig/swriter/ui/optcompatpage.ui
[2] http://www.openoffice.org/specs/collaterals/guides/_components.inv/UITextStyleGuide.html
Comment 2 sophie 2017-12-11 09:51:11 UTC
Yes, UI variables are between quotes and the variable should not be replaced. Sophie
Comment 3 Commit Notification 2017-12-12 18:24:41 UTC
Heiko Tietze committed a patch related to this issue.
It has been pushed to "master":

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

tdf#114340 Naming issue %DOCUMENT need brackets

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.
Comment 4 Commit Notification 2017-12-12 23:34:13 UTC
Heiko Tietze committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=290d7d857c9f4505b0d2ba29b8b40da5b47279f8&h=libreoffice-6-0

tdf#114340 Naming issue %DOCUMENT need brackets

It will be available in 6.0.0.1.

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.
Comment 5 Yousuf Philips (jay) (retired) 2017-12-13 14:59:25 UTC
(In reply to Heiko Tietze from comment #1)
> This string defined in [1] uses %DOCNAME at many places, which means
> changing is delicate.

Searching the code, %DOCNAME is only defined in one place in the code, so modifying it so that it adds the extension should be done.

https://opengrok.libreoffice.org/xref/core/sw/source/ui/config/optcomp.cxx#188
Comment 6 Heiko Tietze 2017-12-13 15:09:45 UTC
(In reply to Yousuf Philips (jay) from comment #5)
> (In reply to Heiko Tietze from comment #1)
> > This string defined in [1] uses %DOCNAME at many places, which means
> > changing is delicate.
> 
> Searching the code, %DOCNAME is only defined in one place in the code, so
> modifying it so that it adds the extension should be done.
> 
> https://opengrok.libreoffice.org/xref/core/sw/source/ui/config/optcomp.
> cxx#188

I don't trust this search as for example the Navigator has a dropdown at the bottom with the same information. It may or may not have a different source but for safety we better go with the quotes.
Comment 7 Yousuf Philips (jay) (retired) 2017-12-13 16:14:50 UTC
(In reply to Heiko Tietze from comment #6)
> I don't trust this search as for example the Navigator has a dropdown at the
> bottom with the same information. It may or may not have a different source
> but for safety we better go with the quotes.

I did a git grep and it resulted in the same search results as opengrok. The filename shown at the bottom of the Navigator dropdown isnt related the replacement of %DOCNAME with the filename, and the Navigator dropdown should also be changed to add the file extension.
Comment 8 Adolfo Jayme Barrientos 2017-12-13 23:25:09 UTC
> 1. Add single quotes around the name and also add the file extension

Single quotes why, exactly? en_US uses double quotation marks, which by the way should not be the ASCII character in translatable strings.
Comment 9 Heiko Tietze 2017-12-14 08:02:54 UTC
(In reply to Adolfo Jayme from comment #8)
> > 1. Add single quotes around the name and also add the file extension
> 
> Single quotes why, exactly? en_US uses double quotation marks, which by the
> way should not be the ASCII character in translatable strings.

Single quotes are known in most languages where double quotes are more specific (https://en.wikipedia.org/wiki/Quotation_mark). Furthermore, single quotes are defined the OO guideline ([2] in comment 1). Translators can easily change it anyway.
Comment 10 Adolfo Jayme Barrientos 2017-12-14 23:50:47 UTC
Uh, 1) is false and 2) no reason why we should still be bound by a legacy, 2005-era document.
Comment 11 Heiko Tietze 2018-02-02 13:27:24 UTC
Nothing to say against changing the guideline. We should file another ticket for that since this has been submitted. It makes the terminology at least a bit more clear.