Bug 138662 - RENAMING SHEET: Improve content of warning per Comment 7
Summary: RENAMING SHEET: Improve content of warning per Comment 7
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.0.3.1 release
Hardware: All All
: low enhancement
Assignee: sdc.blanco
URL:
Whiteboard: target:7.2.0 target:7.1.0.0.beta2
Keywords:
Depends on:
Blocks: Error-Messages
  Show dependency treegraph
 
Reported: 2020-12-04 17:56 UTC by Robert Großkopf
Modified: 2021-08-08 01:05 UTC (History)
5 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 Robert Großkopf 2020-12-04 17:56:48 UTC
Open a new Calc sheet.
Try to rename the sheet "Sheet1" to "Sheet20/21".

A warning appears:
Invalid sheet name.
The sheet name must not be empty or a duplicate of 
an existing name and may not contain the characters [ ] * ? : / \ 
or the character ' (apostrophe) as first or last character.

2 possibilities: The warning is wrong or there is a bug. / isn't the last character of the sheet name. It is the same behavior with all other names with this characters.

Tested this with OpenSUSE 15.1 64bit rpm Linux and LO 7.0.4.1
Comment 1 Robert Großkopf 2020-12-04 18:04:54 UTC
I 'm not so firm in English, but could be this is a better warning:

Invalid sheet name.
The sheet name must not be empty or a duplicate of 
an existing name and may not contain the characters [ ] * ? : / \ 
or, as first or last character, the character ' (apostrophe).
Comment 2 Julien Nabet 2020-12-04 19:33:55 UTC
As you had already guessed reading your last comment, "as first or last character" refers to "or the character ' (apostrophe)".

Heiko/Xisco/Eike: any thoughts about Robert's suggestion?
Comment 3 Timur 2020-12-05 09:11:11 UTC
I think it's safe to mark WontFix because it's rather clear now.
If not, UX may change.
Comment 4 Heiko Tietze 2020-12-07 11:35:20 UTC Comment hidden (obsolete)
Comment 5 Robert Großkopf 2020-12-07 16:14:17 UTC
(In reply to Heiko Tietze from comment #4)
> Just to mention the German translation:
> 
> https://translations.documentfoundation.org/translate/libo_ui-7-0/scmessages/
> de/?checksum=e1e3e003dfa960a1
> 
> Ungültiger Name der Tabelle.
> Der Name einer Tabelle darf nicht leer sein oder doppelt vorkommen
> und nicht die Zeichen [ ] * ? : / \ oder ' (Apostroph)
> als erstes oder letztes Zeichen enthalten.

... and the better German translation, which shows that only ' could be part of the table name except first and last character:

Ungültiger Name der Tabelle.
Der Name einer Tabelle darf nicht leer sein oder doppelt vorkommen
und nicht die Zeichen [ ] * ? : / \ oder, als erstes oder letztes Zeichen, ein  ' (Apostroph) enthalten.
Comment 6 Heiko Tietze 2020-12-08 10:56:48 UTC
The nested logical operators make the hint not easy to read. A list would have been a better solution.

Invalid sheet name.
* empty names are not accepted
* it must not duplicate an existing name
* the characters [ ] * ? : / \ are not allowed
* the apostrophe (') cannot be used as first or last character

Last time it was changed by Eike for bug 112236 (https://gerrit.libreoffice.org/64788) and the apostrophe part was added in I04c85c9fc8d89ecc1be4d8d7fddc58672314d2dc.

Maybe Seth wants to change this (don't see urgent need, and those changes have a string of consequences for the l10n team)

STR_INVALIDTABNAME sc/inc/globstr.hrc

Don't know why wizards/source/scriptforge/SF_String.xba needs this hard-coded.
Comment 7 sdc.blanco 2020-12-08 11:48:39 UTC
If this bug WF or Reopened?  Here is a terse counterproposal, if a change is actually intended.

-------

Invalid sheet name

The sheet name must not:
• be empty
• already exist
• contain  [ ] * ? : / \
• use ' (apostrophe) as first or last character.

--------

Notes:
1. Blank line after Invalid sheet name  (or not?)
2. Maybe (apostrophe) should be dropped?
3. • is U+2022  
4. Does the dialog box accommodate the increased number of lines?
Comment 8 Heiko Tietze 2020-12-08 12:45:15 UTC
(In reply to sdc.blanco from comment #7)
> If this bug WF or Reopened?
Feel free to pick it up.

> Here is a terse counterproposal...
Sounds good to me

> 1. Blank line after Invalid sheet name  (or not?)
+1
> 2. Maybe (apostrophe) should be dropped?
Guess there is a reason
> 3. • is U+2022  
Be careful with those extended unicode characters, not all fonts are up-to-date and complete.
> 4. Does the dialog box accommodate the increased number of lines?
Think so, it becomes just a bit larger.
Comment 9 sdc.blanco 2020-12-08 15:20:25 UTC
OK.  I will have a go -- but first a couple more clarification questions.

(In reply to Heiko Tietze from comment #8)
> > 2. Maybe (apostrophe) should be dropped?
> Guess there is a reason
Just to keep it complicated.... how about:

    use ' (U+27) as first or last character

instead of:

    use ' (apostrophe) as first or last character

or my query about "drop" was meant to simplify further:

    use ' as first or last character

or full disclosure version

    use ' (apostrophe - U+27) as first or last character

Reason:  In LO 6.3 through 7.2, all of the following ‛ ‛ ʼ ‛ ’ ‟ work just fine as first and last characters (even as a sheet name itself). 
Only U+27 is rejected. 

I have no opinion, beyond pointing out these possibilities for those who might have an opinion.  (otherwise, will just leave it unchanged)

> > 3. • is U+2022  
> Be careful with those extended unicode characters, not all fonts are
> up-to-date and complete.
??  Can users control the font used in UI dialog boxes? or is it built-in (in which case, I assume it should work).
Comment 10 Heiko Tietze 2020-12-08 15:46:29 UTC
(In reply to sdc.blanco from comment #9)
> Reason:  ... Only U+27 is rejected. 
Surprising. This requires more expertise. Eike!

> ??  Can users control the font used in UI dialog boxes?
On KDE you change it per system settings > fonts, similar for LXQt and for sure also possible on Gnome based DE's. Guessing that even Windows has an option for the system font.
Besides, some users may run an up-to-date LibreOffice on a very old OS/DE.
Comment 11 Eike Rathke 2020-12-09 19:55:51 UTC
(In reply to Heiko Tietze from comment #10)
> (In reply to sdc.blanco from comment #9)
> > Reason:  ... Only U+27 is rejected. 
> Surprising. This requires more expertise. Eike!
What? Yes, all kind of rubbish can be used as sheet names ;-)
LO could even use the other forbidden characters but restricts naming sheets due to Excel not being able to handle such. Technically there is no such restriction in the ODF file format (IIRC).
Comment 12 sdc.blanco 2020-12-09 23:45:16 UTC
(In reply to Eike Rathke from comment #11)
> What? Yes, all kind of rubbish can be used as sheet names ;-)
(-:   Thanks Eike.

@Heiko -- way out of labyrinth.

1.  Just leave existing form:  use ' (apostrophe) as first or last character.

Reasons: 
(a) in relation to quote, the message would only appear when U+0027 is used, not with the other single quote variants. And in that case the "error" message gives a valid explanation of why it is an error.
(b) only the typographical sophisticate might notice the ambiguity with ', and being a typographical sophisticate, would quickly resolve the ambiguity with a little testing.

Meanwhile there is a Help button in Rename Sheet, which opens a help page that includes a link to "Renaming Sheets" that discusses the matter in more detail.

And soon, the issue about U+0027 will also be explained: https://gerrit.libreoffice.org/c/help/+/107380/

2. About using U+2022

For the rare case, when a person both actually gets this error message and is using a font that does not have U+2022, then wouldn't the dialog box show either "nothing" (i.e, no character) (which would be all right, because the list would still be there) or possibly something like:  -- which would also be all right, given that it will function as a kind of bullet in the list (and users of old software are likely to be familiar with occasional strangeness).
Comment 13 Ming Hua 2020-12-10 00:21:26 UTC
(In reply to Heiko Tietze from comment #10)
> Besides, some users may run an up-to-date LibreOffice on a very old OS/DE.
...in which case they are screwed anyway.  The LO UI is already using a lot of fancy characters, such as smart quotes (U+2019 in save reminder dialog's "Don’t Save" button) and right-pointing triangle (▸, in many tips-of-the-day).
Comment 14 Commit Notification 2020-12-10 06:32:54 UTC
Seth Chaiklin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/help/commit/13cd181da4668aba0ba1e60c928d91c4892754db

Related to: tdf#138662   improve help for renaming Calc sheets
Comment 15 Commit Notification 2020-12-10 12:31:52 UTC
Seth Chaiklin committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

https://git.libreoffice.org/help/commit/ed893b7a8c47e2b5fe712b73966324e4c44e41d5

Related to: tdf#138662   improve help for renaming Calc sheets
Comment 16 Commit Notification 2020-12-14 09:30:48 UTC
Seth Chaiklin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/64f1445cdb5ac66eef161e1e333cc9d2e2bcb6e4

tdf#138662  improve dialog box feedback for invalid Calc sheet names

It will be available in 7.2.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.
Comment 17 sdc.blanco 2020-12-14 11:00:15 UTC
The warning message is changed.  The help page on renaming sheets is improved, and updated with an explanation about U+0027:  https://help.libreoffice.org/7.2/en-US/text/scalc/guide/rename_table.html

Closing as FIXED.
Comment 18 Stéphane Guillou (stragu) 2021-08-08 01:05:20 UTC
Verified as fixed:

Version: 7.2.0.2 / LibreOffice Community
Build ID: 614be4f5c67816389257027dc5e56c801a547089
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded