https://bugs.documentfoundation.org/show_bug.cgi?id=135790

            Bug ID: 135790
           Summary: "%MOD1" appears in LO Tip of the Day #41
           Product: LibreOffice
           Version: 7.0.0.3 release
          Hardware: x86-64 (AMD64)
                OS: Linux (All)
            Status: UNCONFIRMED
          Severity: minor
          Priority: medium
         Component: UI
          Assignee: libreoffice-bugs@lists.freedesktop.org
          Reporter: i...@skierpage.com

Created attachment 164340
  --> https://bugs.documentfoundation.org/attachment.cgi?id=164340&action=edit
%MOD1 appears in Tip of the Day 41

I started my LibreOffice flatpak (7.0.0.3
8061b3e9204bef6b321a21033174034a5e2ea88e) and Tip of the Day 41/222 appeared:

  Need to insert the date in a spreadsheet cell? Type Ctrl+; or Shift+%MOD1+;
to insert the time.

"Ctrl" should appear in place of %MOD1 on Windows and Linux.

Expected result:
  Need to insert the date in a spreadsheet cell? Press Ctrl+; . Press
Shift+Ctrl+; to insert the time.

(or just mention Calc's Insert menu items for this, see below)

Cause of the bug:

The text comes from
https://github.com/LibreOffice/core/blob/18c97df0dcb348134d3ceac022a799338e02d7f5/cui/inc/tipoftheday.hrc#L88
:
     { NC_("RID_CUI_TIPOFTHEDAY", "Need to insert the date in a spreadsheet
cell? Type %MOD1+; or Shift+%MOD1+; to insert the time."), "",
"tipoftheday_c.png"},

I think the bug lies in TipOfTheDayDialog::UpdateTip() in
https://github.com/LibreOffice/core/blob/master/cui/source/dialogs/tipofthedaydlg.cxx#L82
which performs a single replace of "%MOD1" leaving the second variable
unchanged. It would have to replace %MOD1 in a loop or use a replaceAtMultiple
function or regexp.

Additional info:

This specific tip is still really hard to read because semicolon is also
punctuation organizing a sentence; I changed the phrasing above under "Expected
result" to clarify. Ideally you'd use CSS that draws keycaps e.g.
https://jsfiddle.net/7rg5pLs8/1/ . That might address bug 130979, which talks
of the difficulty of localizing the modifier key's name. There's also a mail
thread about problems with this tip for keyboard layouts that don't have a
dedicated semicolon key,
https://www.mail-archive.com/l10n@global.libreoffice.org/msg12782.html

Maybe it's easier if this Tip of the Day tells users
  Use the menu items Insert > Date and Insert > Time to insert the current date
or time into a spreadsheet

since these menu items indicate the keyboard shortcut. Then there's no mention
of %MOD1 or Ctrl and all three problems go away! 😉

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to