Bug 95385 - Sidebar : category General does not exist and inconsistent with cell formatting dialog (see comment 7, comment 8, comment 21)
Summary: Sidebar : category General does not exist and inconsistent with cell formatti...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.4.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: ToBeReviewed
Keywords: difficultyMedium, easyHack, skillCpp, topicCleanup
Depends on:
Blocks: Sidebar-Properties-Number-Format
  Show dependency treegraph
 
Reported: 2015-10-28 09:16 UTC by Jean-Baptiste Faure
Modified: 2024-03-22 17:06 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
screen capture with the master (keyID enabled) (219.41 KB, image/png)
2015-10-28 09:16 UTC, Jean-Baptiste Faure
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-Baptiste Faure 2015-10-28 09:16:46 UTC
Created attachment 120037 [details]
screen capture with the master (keyID enabled)

Step to reproduce:
1/ open a new spreadsheet
2/ activate the sidebar if necessary
3/ under Number Format the first dropdown list shows General
4/ select A1, right click and choose Format Cells in category dropdown list there is no general category

I think that the sidebar dropdown list should show Standard instead of General.

Best regards. JBF
Comment 1 Katarina Behrens (Inactive) 2015-10-29 13:05:59 UTC
Very weird. I saw "General" both in sidebar AND number formatting dialog, but ...

... then I switched Language in number formatting dialog (the combobox in top right corner of it) to "French - France" i.e. the same JBF has ...

... and voila, "Standard" appears in number formatting dialog, while "General" stays in sidebar :)

Anyway, confirmed. Some languages have "Standard", some have "General". This needs to be unified. Slightly reluctant to make this easy hack, as there might be some gotcha ...
Comment 2 Laurent Balland 2015-10-31 22:05:09 UTC
(In reply to Katarina Behrens (CIB) from comment #1)
> Anyway, confirmed. Some languages have "Standard", some have "General". This
> needs to be unified. Slightly reluctant to make this easy hack, as there
> might be some gotcha ...
All translation of "General" format can be found in each 155 locale files, on next line defining "FixedFormatskey1"
http://opengrok.libreoffice.org/s?n=25&start=0&q=FixedFormatskey1&sort=fullpath&project=core
This wording is used in Format > Cells > Number dialog
Comment 3 Robinson Tryon (qubit) 2015-12-14 06:56:28 UTC Comment hidden (obsolete)
Comment 4 Robinson Tryon (qubit) 2016-02-18 14:52:22 UTC Comment hidden (obsolete)
Comment 5 Rohan Kumar 2016-03-17 11:01:38 UTC
Hi, I have started working on this bug. Initially i was confused about whether the issue is with inconsistent locale data or with the sidebar. I uploaded a patch to ensure that all languages have "General" (instead of standard) in the xml files. The number formatting dialog is in sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx. According to me the problem is : Sidebar contents aren't updated when we change languages. we can add some code in the action listeners of Format Cells dialog so that the sidebar contents are updated. I would really appreciate if someone could provide a more clear description or some code pointers ...
Comment 6 Laurent Balland 2016-03-17 16:21:47 UTC
@ Rohan Kumar
From my point of view, the problem is that General format should be a category and not a format. 
In Gnumeric and Excel, General (or Standard) is a category without option, different from Number and Scientific, as General is a mix of these two categories.
This would imply refactoring Number Format UI dialog.
Comment 7 Eike Rathke 2016-03-17 16:41:21 UTC
General (or Standard, or ...) is one specific number format, not a category. And it is up to the localization of the locale data (.xml file) if and how it is translated. Usually it is translated to the same word that Excel uses in the corresponding localized version, but not necessarily.
Comment 8 Laurent Balland 2016-03-18 17:58:52 UTC
The problem is that "General" format is considered as a format in  Format>Cell>Number dialog, and as a category in the Sidebar. They are translated in different file for each UI:
- dialog box: i18npool/source/localedata/data/xx_XX.xml http://opengrok.libreoffice.org/s?n=25&start=0&q=FixedFormatskey1&sort=fullpath&project=core (see Comment 2)
- Sidebar: http://opengrok.libreoffice.org/xref/translations/source/fr/sc/uiconfig/scalc/ui.po#8090 replace "fr" with your local

Each localization should check if both are translated in the same way.
Comment 9 Rohan Kumar 2016-03-19 10:04:27 UTC
@Laurent BP. The localization inconsistency is a side effect of this bug. I have actually committed a patch related to the localization inconsistency issue :https://gerrit.libreoffice.org/#/c/23310/ . Is this which you were saying about the languages translated the same way?
Comment 10 Laurent Balland 2016-03-21 11:08:40 UTC
(In reply to Rohan Kumar from comment #9)
> @Laurent BP. The localization inconsistency is a side effect of this bug. I
> have actually committed a patch related to the localization inconsistency
> issue :https://gerrit.libreoffice.org/#/c/23310/ . Is this which you were
> saying about the languages translated the same way?

Yes, but no. In your patch, you made no translation. You just forced to use an English word. For instance in French (language which I can understand ;-) ) you replaced "Standard" (which is a valid French word) with "General" which is not valid in French (it should be written "Général"). I suppose that same problem occurs in other languages.

What should be done for each l10n:
1. Check inconsistency: is there a different translation in both places Number dialog/Sidebar (see Comment 8)? If not, there is nothing to do (like in French, because "Standard" was chosen as preferred translation by the l10n community
2. Ask l10n community what is the preferred translation or warn l10n community on l10n@global.libreoffice.org
3. Change translation in Sidebar OR in dialog
4. Check other places where the translation is used:
    - in dialog Tools > Options > Calc > Calculate: "_Limit decimals for general number format" see http://opengrok.libreoffice.org/search?&q=generalprec&project=translations,&sort=fullpath
    - in help, see http://opengrok.libreoffice.org/search?&q=hd_id315634199&project=translations,&sort=fullpath
Comment 11 Laurent Balland 2016-03-21 15:44:56 UTC
I did not notice that your commit was already merged. You should have added tdf#95385 at the beginning of your commit title to link your commit with this .

As mentioned in Comment 10, I do not agree with that commit. It is in contradiction with some l10n work. With French l10n, it is "Standard" which was chosen to translate "General" in SideBar. See http://opengrok.libreoffice.org/xref/translations/source/fr/sc/uiconfig/scalc/ui.po#8090
Comment 12 jani 2016-03-21 16:54:00 UTC
(In reply to Laurent BP from comment #11)
> I did not notice that your commit was already merged. You should have added
> tdf#95385 at the beginning of your commit title to link your commit with
> this .
> 
> As mentioned in Comment 10, I do not agree with that commit. It is in
> contradiction with some l10n work. With French l10n, it is "Standard" which
> was chosen to translate "General" in SideBar. See
> http://opengrok.libreoffice.org/xref/translations/source/fr/sc/uiconfig/
> scalc/ui.po#8090

This patch was only merged after exchanging mails with Sophie, if the l10n team as such does not agree, it can of course be changed.
Comment 13 Eike Rathke 2016-03-23 11:55:48 UTC
PLEASE REVERT https://gerrit.libreoffice.org/23310
Modifying locale datas' number format is a wrong solution.
I guess it was a result of a misunderstanding.
Comment 14 Eike Rathke 2016-03-24 18:03:00 UTC
Doing myself now.
Comment 15 Commit Notification 2016-03-24 18:05:36 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=6c26ef04cf4f47ee16d4cb96648b9627f3b69c28

Revert "Text General inconsistent with cell formatting dlg", tdf#95385

It will be available in 5.2.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 16 Xisco Faulí 2016-09-26 12:08:07 UTC Comment hidden (obsolete)
Comment 17 Xisco Faulí 2016-09-26 12:14:18 UTC
I've just realized your last commit reverted the previous commit. Sorry for the noise.
Comment 18 Xisco Faulí 2017-07-13 11:28:15 UTC Comment hidden (obsolete)
Comment 19 QA Administrators 2018-07-14 02:46:18 UTC Comment hidden (obsolete)
Comment 20 Jean-Baptiste Faure 2018-07-17 10:16:44 UTC
Same inconsistency between formatting dialog and sidebar in LO 6.1.0.1.0+

Best regards. JBF
Comment 21 Eike Rathke 2020-04-29 11:20:21 UTC
To recap and summarise:
The General (or Standard, or ...) seen in the sidebar is the (translated or not) keyword/code of the General number format, not a UI string or translation, if there is no specific number format applied (hence format code General). The problem is that the format code keyword is used as UI "category" name; that should be decoupled.
Comment 22 Sophie Sipasseuth 2023-10-05 08:59:10 UTC
This bug is still present.

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 486ae5db6987411d5e394de94b2b077099d03856
CPU threads: 8; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: fr-FR (fr_FR); UI: en-US
Calc: threaded