Bug 133918 - CHARACTER DIALOG: Typing the name of a language in the Font tab of the Character style dialog does not work correctly sometimes
Summary: CHARACTER DIALOG: Typing the name of a language in the Font tab of the Charac...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.2.7.2 release
Hardware: x86-64 (AMD64) All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Character-Dialog
  Show dependency treegraph
 
Reported: 2020-06-11 22:50 UTC by andvaranaut@gmail.com
Modified: 2022-12-11 07:42 UTC (History)
3 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 andvaranaut@gmail.com 2020-06-11 22:50:57 UTC
Description:
I'm using LibreOffice 6.4.3.2 (latest Ubuntu stable version) in the Spanish/Spain (es-ES) locale and finding a very strange bug when changing language. I'll try to be as clear as possible in the description.

To change language you have to open the Character dialog in the Font tab (hopefully I'm guessing the names right), then there's a combobox where you can select the language.

It used to be that one could write in the first few letters of the desired language, and it would autocomplete to the first matching language in the list. For the most part, it still works, but there is a catch. If you write "in" as the first two letters, it gets changed to "id" for some reason. Since English is written "Inglés" in Spanish, this is rather annoying.

The change to "id" happens regardless of case. By experimenting I have found another weird change - "iw" gets changed to "he". 

In practical terms, this means that you can't pick English as a language when using the Spanish locale by using the keyboard to search the list. It works OK when using the mouse, though.

This is a fairly recent regression (probably on the update from Ubuntu 18.04 LTS to 20.04).

I have reproduced the bug by restarting in safe mode, as well as using LC_ALL=C to reset LO to the default English locale. The same substitutions happen.

Steps to Reproduce:
1. Select some text 
2. Right click > Character > Font tab and focus the language selector
3. Type "IN" or "IW"

Actual Results:
The "IN"/"IW" input gets changed to "id"/"he" respectively

Expected Results:
The "IN"/"IW" input remains and auto-selects the first matching language


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Versión: 6.4.3.2
Id. de compilación: 1:6.4.3-0ubuntu0.20.04.1
Subprocs. CPU: 8; SO: Linux 5.4; Repres. IU: predet.; VCL: gtk3; 
Configuración regional: es-ES (es_ES.UTF-8); Idioma de IU: es-ES
Calc: threaded
Comment 1 Dieter 2020-12-10 17:12:53 UTC
Xisco, is it possible for you to check this? I don't have spanish UI?
Comment 2 andvaranaut@gmail.com 2020-12-10 17:25:30 UTC
Dieter,

The bug was also triggered with LC_ALL=C, apparently it is not locale-dependent.

Just select some text > right click > Character > Character... then click on the Language combobox entry area. Delete the contents and try to write "IN" or "IW". That triggers the bug for me.
Comment 3 Dieter 2020-12-11 07:41:39 UTC
(In reply to andvaranaut@gmail.com from comment #2)
> Dieter,
> 
> The bug was also triggered with LC_ALL=C, apparently it is not
> locale-dependent.
> 
> Just select some text > right click > Character > Character... then click on
> the Language combobox entry area. Delete the contents and try to write "IN"
> or "IW". That triggers the bug for me.

Thanks for clarification. I tested with the wrong dialog. My results
in = Indonesia (expected)
iw = he (not expected)

Expected result:
Perhaps like behaviour in Tools => Options => Language Settings => Languages: typing iw gives result Walloon (because there is no language with iw at the beginning
Comment 4 Ming Hua 2020-12-11 08:11:22 UTC
(In reply to andvaranaut@gmail.com from comment #0)
> This is a fairly recent regression (probably on the update from Ubuntu 18.04
> LTS to 20.04).

I can (mostly) reproduce with 6.2.8 on Windows:
Version: 6.2.8.2 (x64)
Build ID: f82ddfca21ebc1e222a662a32b25c0c9d20169ee
CPU threads: 2; OS: Windows 10.0; UI render: default; VCL: win; 
Locale: zh-CN (zh_CN); UI-Language: en-US
Calc: threaded

Will test earlier versions later.

> Actual Results:
> The "IN"/"IW" input gets changed to "id"/"he" respectively
> 
> Expected Results:
> The "IN"/"IW" input remains and auto-selects the first matching language

Like Dieter, when I type two letters "in" it autocompletes to "Indonesia", however if I then press Backspace key, it deletes the "donesia" part, and the text changes to "id".  Since Indonesia's ISO code (called BCP47 or something) is "id", I suspect there is some mix-up between the names and ISO codes.

For "iw" I reproduce the reported, changing to "he" behavior.
Comment 5 Ming Hua 2020-12-11 09:28:29 UTC
Also reproducible with 5.2.7 (the oldest version I have):
Version: 5.2.7.2 (x64)
Build ID: 2b7f1e640c46ceb28adf43ee075a6e8b8439ed10
CPU Threads: 2; OS Version: Windows 6.19; UI Render: default; 
Locale: zh-CN (zh_CN); Calc: group

As 5.2.7 should be older than Ubuntu 18.04 I doubt this is a regression as the reporter claimed.

It's also not limited to the Format Characters dialog, the Font tab of Paragraph Style dialog has the same problem.
Comment 6 andvaranaut@gmail.com 2020-12-11 10:12:35 UTC
Ming Hua,

While in my experience the behavior is a regression (I noticed it because something I used to be able to do did not work anymore), the underlying cause might as well not be. If your hunch regarding the confusion between codes and names is correct, then there is some chance that locale does play into it. 

I have rechecked, however, and I'm definitely seeing the IN->ID change with both es_ES and C locale (set by invoking LC_ALL=C lowriter) in my current version (6.4.6.2 from Ubuntu 20.04), even though "Indonesian" is an option in the dropdown.
Comment 7 Dieter 2022-12-11 07:42:17 UTC
Still present in

Version: 7.5.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 52c75986adc2b370eb55ce918ab1db0a95831c83
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-US (de_DE); UI: en-GB
Calc: CL threaded

Steps
1. Format -> Character -> Font tab
2. In language field type "iw"

Actual result
Change to "he"

Expected result
Perhaps like behaviour in Tools => Options => Language Settings => Languages: typing iw gives result Walloon (because there is no language with iw at the beginning