Bug 146638 - In a titlebar, name of a app and the opened document should be separated by an emdash, not a hyphen
Summary: In a titlebar, name of a app and the opened document should be separated by a...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All Linux (All)
: medium trivial
Assignee: Not Assigned
URL:
Whiteboard: target:7.6.0
Keywords: difficultyBeginner, easyHack, skillCpp, topicUI
Depends on:
Blocks:
 
Reported: 2022-01-07 13:30 UTC by tomashnyk
Modified: 2023-01-17 09:35 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
See the difference between a program that does it and Libreoffice (20.45 KB, image/png)
2022-01-07 13:30 UTC, tomashnyk
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tomashnyk 2022-01-07 13:30:47 UTC
Created attachment 177373 [details]
See the difference between a program that does it and Libreoffice

Words should be separated by emdashes, not hyphens (see attachment). According to my desktop environment (KDE), this should be done on a per-app basis https://bugs.kde.org/show_bug.cgi?id=448059.

Hyphen is this: - 
Em-dash is this: —

For the correct usage, see here: https://practicaltypography.com/hyphens-and-dashes.html

QT5 does this automatically, by the way: https://code.woboq.org/qt5/qtbase/src/plugins/platforms/xcb/qxcbwindow.cpp.html#2586
Comment 1 Jean-Baptiste Faure 2022-01-21 21:57:44 UTC
Why do you think that typography rules must apply in a titlebar?

If applicable, typography rules are not the same in each language in which LibreOffice is translated. So, if your bug report was confirmed, one should have a translatable string like "- %PRODUCTNAME" where the only thing to be translated would be the -. You will need a detailed explanation associated with this string, if you want translators to understand what is expected of them.

Patches are welcome ;-)

If, instead of invoking obscure typographical rules, you think the hyphen is ugly and the title would look better with an emdash, I'd tend to agree with you. In that case I think a patch would be easier to do to fix this issue.  

Best regards. JBF
Comment 2 Jean-Baptiste Faure 2022-01-21 22:00:01 UTC
Under Gnome, Mozilla Firefox does the same thing as LibreOffice.

Best regards. JBF
Comment 3 tomashnyk 2022-01-22 00:04:29 UTC
I would not call that typographical rule obscure but mainstream. I do no really have a clue which file should be patched, if I had, I would submit a patch. I can certainly open another issue with Mozilla:-).
Comment 4 tomashnyk 2022-01-22 20:49:25 UTC
And here is the issue for Mozzila: https://bugzilla.mozilla.org/show_bug.cgi?id=1751584
Comment 5 Heiko Tietze 2022-12-06 15:04:39 UTC
The Firefox people take it serious and replaced the hyphen long time ago. It seems to be some localization trouble now.

So let's do it as JBF recommends in c1.

Code pointer (thanks Miklos!):
TitleHelper::impl_updateTitleForFrame() in framework/source/fwe/helper/titlehelper.cxx calls impl_appendProductName () that adds the hyphen.
Comment 6 Radhey Parekh 2023-01-15 16:47:51 UTC
I would like to work on this task. So, assigning it to myself. Also, I want to ask that should I "Create Snippet" (For VSCode) to type em-dash? Currently, there is "hyphen" which is being called. Thanks.
Comment 7 Radhey Parekh 2023-01-15 20:36:55 UTC
(In reply to Radhey Parekh from comment #6)
> I would like to work on this task. So, assigning it to myself. Also, I want
> to ask that should I "Create Snippet" (For VSCode) to type em-dash?
> Currently, there is "hyphen" which is being called. Thanks.

Found the way for typing "em-dash".
Comment 8 Commit Notification 2023-01-17 09:35:52 UTC
Radhey Parekh committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/f7d4efc02118a92a3f3cb17ea131674e88907a7b

tdf#146638 In a titlebar, separator is changed from a hyphen to an emdash

It will be available in 7.6.0.

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

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