Bug 117587 - Ordinal/cardinal numbering: preview is shown in program locale language, not in language of selected text
Summary: Ordinal/cardinal numbering: preview is shown in program locale language, not ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.1.0.0.alpha1+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: difficultyInteresting, easyHack
Depends on:
Blocks: Bullets-Numbering-Dialog
  Show dependency treegraph
 
Reported: 2018-05-12 18:13 UTC by Mike Kaganski
Modified: 2024-03-27 04:01 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of the problem (21.53 KB, image/png)
2018-05-12 18:13 UTC, Mike Kaganski
Details
screenshot with locale fr_FR and text and UI in English (162.62 KB, image/png)
2018-06-16 17:14 UTC, Jean-Baptiste Faure
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2018-05-12 18:13:38 UTC
Created attachment 142057 [details]
Screenshot of the problem

The LibreOffice is configured for English (US) UI, and Russian (default) locale.

When I apply a cardinal (and ordinal) numbering to a text which is English, the preview is still in Locale language (Russian). (Ordinal lists have problems with Russian - see bug 117584). I suppose that current text language should be used instead.

Tested with: Version: 6.1.0.0.alpha1+ (x64)
Build ID: 23c5125148a8110d88385b29570bf0b7d4400458
CPU threads: 12; OS: Windows 10.0; UI render: default; 
Locale: ru-RU (ru_RU); Calc: CL
Comment 1 Jean-Baptiste Faure 2018-06-16 17:13:29 UTC
I reproduce the problem with LO 6.1.0.0.beta2+ configured with the UI in English and a text in English. As my locale is French (fr_FR) I see the preview in French instead of the language of my text (English).

Set status to NEW.

Best regards. JBF
Comment 2 Jean-Baptiste Faure 2018-06-16 17:14:15 UTC
Created attachment 142804 [details]
screenshot with locale fr_FR and text and UI in English
Comment 3 QA Administrators 2019-06-19 02:48:39 UTC Comment hidden (obsolete)
Comment 4 christos 2020-07-30 18:35:00 UTC
Reproduced with the following.
Version: 7.0.0.2 (x64)
Build ID: c01aa64b6c3d89ebe5fe69c28c7adb24eb85249c
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: default; VCL: win
Locale: de-DE (en_US); UI: en-US
Calc: threaded

Another example of LibreOffice language bias towards locale is #tdf 134155.
Comment 5 QA Administrators 2022-07-31 03:28:02 UTC Comment hidden (obsolete)
Comment 6 Gabor Kelemen (allotropia) 2024-03-26 23:01:39 UTC
Still a problem in

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 2887ffbf240aa70330cb50bf810170cf9c896405
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: hu-HU (hu_HU.UTF-8); UI: en-US
Calc: threaded
Comment 7 Mike Kaganski 2024-03-27 04:01:41 UTC
Code pointer: the implementation of the preview is in SvxNumberingPreview [1]. It should take additional argument in its constructor, for the locale to use; or maybe a separate setter function for that. Then, the call sites (e.g., functions of SvxNumOptionsTabPage and SvxNumPositionTabPage) must pass that information, as needed.

In Writer's Outline settings (SwOutlineSettingsTabPage, SwNumPositionTabPage), it is implemented using NumberingPreview [2]. This should be modified, too.

[1] https://opengrok.libreoffice.org/xref/core/include/svx/numberingpreview.hxx?r=a830a34d#16
[2] https://opengrok.libreoffice.org/xref/core/sw/source/uibase/inc/numprevw.hxx?r=bc209dd6#28