Bug 87863 - Calc tooltip text for hyperlink wrong on OSX
Summary: Calc tooltip text for hyperlink wrong on OSX
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.0.4 release
Hardware: All macOS (All)
: medium minor
Assignee: Julien Nabet
URL:
Whiteboard: target:4.5.0
Keywords:
: 82682 89083 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-12-30 14:34 UTC by Matthew Francis
Modified: 2015-02-05 10:13 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 Matthew Francis 2014-12-30 14:34:45 UTC
Observed on OSX 10.10, LO from 4.2.0.4 to 4.5 master


The tooltip for a hyperlink in Calc is wrong for OSX. It reads:

"ctrl+click to open hyperlink:..."

but the correct shortcut is "⌘ (command) + click". The equivalent text in Writer is correct (Impress seems never to have been converted from the old-style tooltip which just shows the link text and nothing else)
Comment 1 Julien Nabet 2014-12-31 00:39:39 UTC
Code pointers:
Ctrl click for Writer is:
    142     String STR_LINK_CTRL_CLICK
    143     {
    144         Text [ en-US ] = "%s-Click to follow link";
    145     };

http://opengrok.libreoffice.org/xref/core/sw/source/uibase/utlui/initui.src#142

which gives:
    212     aLinkCtrlClick(SW_RESSTR(STR_LINK_CTRL_CLICK)),
http://opengrok.libreoffice.org/xref/core/sw/source/uibase/utlui/initui.cxx#212

then:
    221     vcl::KeyCode aCode( KEY_SPACE );
    222     vcl::KeyCode aModifiedCode( KEY_SPACE, KEY_MOD1 );
    223     OUString aModStr( aModifiedCode.GetName() );
    224     aModStr = aModStr.replaceFirst(aCode.GetName(), OUString());
    225     aModStr = aModStr.replaceAll("+", OUString());
    226     aLinkCtrlClick = aLinkCtrlClick.replaceAll("%s", aModStr);
http://opengrok.libreoffice.org/xref/core/sw/source/uibase/utlui/initui.cxx#221

So I think the work should begin here:
   2056     String STR_CTRLCLICKHYPERLINK
   2057     {
   2058         Text [ en-US ] = "ctrl+click to open hyperlink:";
   2059     };
http://opengrok.libreoffice.org/xref/core/sc/source/ui/src/globstr.src#2058
Comment 2 Julien Nabet 2014-12-31 15:20:37 UTC
Patch submitted here:
https://gerrit.libreoffice.org/#/c/13712/

Andras: I'm worrying the fact the patch changes a string to translate whereas the freeze of "Hard English strings" already happened according to https://wiki.documentfoundation.org/ReleasePlan/4.4#4.4.0_release.
Moreover, as indicated in the patch, there are still UI things to define.
Any thoughts?
Comment 3 Matthew Francis 2014-12-31 15:31:04 UTC
Worth noting that the change makes the string in question identical to one which already exists in sw/source/uibase/utlui/initui.src - effectively a translatable string is being removed, not added
Comment 4 Julien Nabet 2014-12-31 16:29:40 UTC
(In reply to Matthew Francis from comment #3)
> Worth noting that the change makes the string in question identical to one
> which already exists in sw/source/uibase/utlui/initui.src - effectively a
> translatable string is being removed, not added
You meant "replaced" not "added"?

Jay: I wonder if a new bugtracker about refactoring these kind of strings could be useful.
Indeed, I don't know why there should be 2 locations to define the tip for click link/hyperlink.
Any thoughts?
Comment 5 Yousuf Philips (jay) (retired) 2014-12-31 20:51:34 UTC
Isnt it better to just detect 'ctrl' in the string and auto convert it to the mac equivalent, so that string replacement wont need to happen.
Comment 6 Andras Timar 2015-01-01 10:33:21 UTC
(In reply to Jay Philips from comment #5)
> Isnt it better to just detect 'ctrl' in the string and auto convert it to
> the mac equivalent, so that string replacement wont need to happen.

You cannot easily detect "Ctrl" string, because it can be localized (e.g. "Strg" in German).
Comment 7 Andras Timar 2015-01-01 10:37:57 UTC
(In reply to Julien Nabet from comment #2)
> Patch submitted here:
> https://gerrit.libreoffice.org/#/c/13712/
> 
> Andras: I'm worrying the fact the patch changes a string to translate
> whereas the freeze of "Hard English strings" already happened according to
> https://wiki.documentfoundation.org/ReleasePlan/4.4#4.4.0_release.
> Moreover, as indicated in the patch, there are still UI things to define.
> Any thoughts?

You can fix it master only. It is not a very important problem in my opinion. You can find more occurrences of "Ctrl" on UI, e.g. on presenter's screen help ("Ctrl+'1'" etc.), "Press Ctrl+Alt+A to move focus for more operations", "Press Ctrl+Alt+B to move focus back to the current structure control", "Ctrl-click required _to follow hyperlinks".
Comment 8 Yousuf Philips (jay) (retired) 2015-01-01 12:21:06 UTC
I remember i recently added 'CTRL' to the zoom and pan tool for Impress/Draw. :D

So maybe this bug report can be turned into the bug tracker to find and fix all of these issues.
Comment 9 Commit Notification 2015-01-05 09:36:42 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

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

Resolves fdo#87863: Calc tooltip text for hyperlink wrong on OSX

It will be available in 4.5.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 10 Julien Nabet 2015-01-05 09:56:31 UTC
Following what Andras indicated in https://bugs.freedesktop.org/show_bug.cgi?id=87863#c7, let's put this one to FIXED.
Comment 11 Yousuf Philips (jay) (retired) 2015-01-05 15:30:54 UTC
@Matthew: Can you make another bug reporter to be used for the tracking down of similar problems for the Mac.
Comment 12 Alex Thurgood 2015-01-31 17:36:14 UTC
*** Bug 82682 has been marked as a duplicate of this bug. ***
Comment 13 Alex Thurgood 2015-02-05 10:13:03 UTC
*** Bug 89083 has been marked as a duplicate of this bug. ***