Bug 39935 - Disabled Asian or CTL language value should default to "None"
Summary: Disabled Asian or CTL language value should default to "None"
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Linguistic (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: accessibility
: 57528 (view as bug list)
Depends on:
Blocks: CJK Options-Dialog-Language RTL-UI
  Show dependency treegraph
 
Reported: 2011-08-08 10:04 UTC by Christophe Strobbe
Modified: 2022-05-17 09:54 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
OpenOffice.org-3.3.0 test file with Asian and CTL language disabled (default values) (12.81 KB, application/vnd.oasis.opendocument.text)
2022-05-17 09:45 UTC, Christophe Strobbe
Details
OpenOffice.org-3.3.0 test file with Asian and CTL language disabled and value set to None (12.60 KB, application/vnd.oasis.opendocument.text)
2022-05-17 09:47 UTC, Christophe Strobbe
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christophe Strobbe 2011-08-08 10:04:19 UTC
When enabling or disabling LibreOffice for Asian languages and or CTL languages, the currently selected value in the listbox is or becomes "active". When this value is not set to "[None]", the displayed value (e.g. Hindi in the CTL list) will be output in the default styles for graphics and paragraphs in styles.xml (inside the ODF file). This makes it hard for tools (e.g. XSLT conversion) to know what languages are really in use in a document; consequently it is also hard to output correct language information (e.g. lang and xml:lang in XHTML, DAISY etc) when coverting ODF to another XML-based format.

Procedure to reproduce the issue:
1. Go to Tools > Options > Language Settings > Languages
2. Check "Enabled for Asian languages" and "Enabled for complex text layout (CTL)" if these features are not already enabled. (I assume here that Western language is set to "English (US)".)
3. Choose a language in "Asian languages", e.g. "Chinese (simplified)" and choose a language in "CTL", e.g. Hindi.
4. Close the Options dialog with the OK button.
5. Create some English content in Writer; save and close the ODF file.
6. Unpack/unzip the ODF file and open "styles.xml" in a source code editor; find the attributes fo:language="en" and fo:country="US" (if you had US English selected for Western language), style:language-asian="zh" and style:country-asian="CN" (for simplified Chinese), and style:language-complex="hi" and style:country-complex="IN" (for Hindi - India).
7. Go back to Tools > Options > Language Settings > Languages, and disable Asian and CTL languages. Notice that the values "Chinese (simplified)" and "Hindi" remain visible in the disabled selection lists.
8. Create a new document with some English content; save and close the ODF file.
9. Unpack/unzip the ODF file and open "styles.xml" in a source code editor; find the attributes fo:language="en" and fo:country="US" (if you had US English selected for Western language), style:language-asian="zh" and style:country-asian="CN" (for simplified Chinese), and style:language-complex="hi" and style:country-complex="IN" (for Hindi).
10. Go back to Tools > Options > Language Settings > Languages, enable Asian and CTL languages, set both the Asian and the CTL language to "[None]", disable Asian and CTL languages again and close the Options dialog.
11. Create a new document with some English content; save and close the ODF file.
12. Unpack/unzip the ODF file and open "styles.xml" in a source code editor; find the attributes fo:language="en" and fo:country="US" (if you had US English selected for Western language), style:language-asian="zxx" and style:country-asian="none" (for Asian languages), and style:language-complex="zxx" and style:country-complex="none" (for CTL).

If LibreOffice would automatically change the values for Asian and CTL languages to "None" when these languages are disabled, XSLT conversions could do something useful with the language attributes.
For example, outputting correct lang and xml:lang attributes when exporting to XHTML would then allow text-to-speech software (used in screen readers for blind users and in software for dyslexic users) to choose the appropriate text-to-speech engine. It would also benefit Braille conversion. So this issue is also related to accessibility.
Comment 1 Björn Michaelsen 2011-12-23 12:26:48 UTC Comment hidden (obsolete)
Comment 2 Christophe Strobbe 2012-01-27 04:07:41 UTC
Version info was previously LibO 3.3.1. I confirm that this bug is still relevant to LibreOffice 3.5.0 RC1. After installing Libo 3.5 RC1 on a Windows XP machine where LibO had not been installed before, Asian and CTL languages were enabled without user intervention; the default Asian language was set to 'Default - Chinese (simplified)' and the default CTL language was set to 'Default - Hindi'. Disabling Asian and CTL languages in the options dialog did not change the values to 'None'. Changing the status from NEEDINFO to NEW.
Comment 3 Urmas 2013-01-20 10:41:57 UTC
*** Bug 57528 has been marked as a duplicate of this bug. ***
Comment 4 QA Administrators 2015-02-19 15:44:39 UTC Comment hidden (obsolete)
Comment 5 Robinson Tryon (qubit) 2015-12-10 03:37:44 UTC Comment hidden (obsolete)
Comment 6 QA Administrators 2017-01-03 19:41:55 UTC Comment hidden (obsolete)
Comment 7 Yousuf Philips (jay) (retired) 2017-10-20 17:03:22 UTC
Not sure how much of an issue this is as this only mentions what the default language for CJK and CTL is at the document level and you can set text language at the paragraph and character levels.

Regina, Maxim: your thoughts?
Comment 8 Lior Kaplan 2018-09-17 17:38:38 UTC
Default is still Hindi.

Version: 6.1.1.1
Build ID: 1:6.1.1~rc1-2
Comment 9 QA Administrators 2019-09-18 02:54:43 UTC Comment hidden (obsolete)
Comment 10 Christophe Strobbe 2019-10-22 14:03:58 UTC
I have rechecked the issue in LibreOffice 6.0.7.3 in Ubuntu 18.04 LTS (admittedly not the recent version of either software). The values displayed for Asian [languages] and "Complex text layout" are still "Default - Chinese (simplified)" and "Default - Hindi", respectively. The attributes style:language-asian="zh" and style:country-asian="CN" (for simplified Chinese), and style:language-complex="hi" and style:country-complex="IN" (for Hindi - India) are still present in styles.xml.
Comment 11 QA Administrators 2022-01-09 03:41:25 UTC Comment hidden (obsolete)
Comment 12 Christophe Strobbe 2022-05-17 09:45:59 UTC
Created attachment 180146 [details]
OpenOffice.org-3.3.0 test file with Asian and CTL language disabled (default values)
Comment 13 Christophe Strobbe 2022-05-17 09:47:10 UTC
Created attachment 180147 [details]
OpenOffice.org-3.3.0 test file with Asian and CTL language disabled and value set to None
Comment 14 Christophe Strobbe 2022-05-17 09:54:40 UTC
I confirm that the issue was already present in OpenOffice.org 3.3.0; the files I have attached were created on Windows 10 (German version) with OpenOffice.org 3.3.0 / OOO3330m20 (Build:9567). For this reason I have set the version to "Inherited from OOo".

I also confirm that the issue still exists in LibreOffice Writer 7.3.3.2:
Version: 7.3.3.2 (x64) / LibreOffice Community
Build ID: d1d0ea68f081ee2800a922cac8f79445e4603348
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL 

When the Asian and CTL languages are disabled but the values are not "None" (typically, they are left at their default language), the <style:text-properties> elements in meta.xml that have a Western value such as fo:language="en" still have attribute values for Asian and CTL languages as described in the original bug report. In other words, current behaviour is still the same as in OpenOffice.org 3.3.0.