Bug 143422 - "Missing hyphenation data" is displayed in info bar in Japanese documents
Summary: "Missing hyphenation data" is displayed in info bar in Japanese documents
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Linguistic (show other bugs)
Version:
(earliest affected)
7.0.6.2 release
Hardware: All All
: medium normal
Assignee: Jun Nogata
URL:
Whiteboard: target:7.4.0 target:7.3.0.0.beta2 tar...
Keywords:
: 145992 (view as bug list)
Depends on:
Blocks: Hyphenation
  Show dependency treegraph
 
Reported: 2021-07-17 14:15 UTC by Jun Nogata
Modified: 2021-12-09 14:23 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
reproduction file (9.14 KB, application/vnd.oasis.opendocument.text)
2021-07-17 14:18 UTC, Jun Nogata
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jun Nogata 2021-07-17 14:15:09 UTC
Description:
When I set hyphenation in the style a Japanese document, I get a warning message "Missing hyphenation data Please install the hyphenation package for locale "ja"". There is no hyphenation for Japanese.

Steps to Reproduce:
Tool -> Options, Language Settings -> Languages

Default Languages for Documents:
- Western: Default - English(USA)
- Asian: Default - Japanese

1. Open Writer
2. Input 2lines of "あ"
3. Open The Default paragraph style in Styles
4. Check the Automaticaly at Hyphenation in Text flow tab, and Push OK button
5. Save the file, and Close the Writer
6. Open the saved file in the Writer

Actual Results:
message "Missing hyphenation data Please install the hyphenation package for locale "ja"" is displayed in the information bar.

Expected Results:
Nothing is displayed.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Version: 7.2.0.1 / LibreOffice Community
Build ID: 32efc3b7f3a71cfa6a7fa3f6c208333df48656cc
CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: ja-JP (ja_JP.UTF-8); UI: ja-JP
Calc: threaded
Comment 1 Jun Nogata 2021-07-17 14:18:16 UTC
Created attachment 173649 [details]
reproduction file
Comment 2 Ming Hua 2021-07-17 15:07:21 UTC
Reproduced with 7.0.6 and the attached file in comment #1:
Version: 7.0.6.2 (x64)
Build ID: 144abb84a525d8e30c9dbbefa69cbbf2d8d4ae3b
CPU threads: 2; OS: Windows 10.0 Build 19043; UI render: default; VCL: win
Locale: zh-CN (zh_CN); UI: en-US
Calc: threaded

(In reply to Jun Nogata from comment #0)
> 1. Open Writer
> 2. Input 2lines of "あ"
> 3. Open The Default paragraph style in Styles
> 4. Check the Automaticaly at Hyphenation in Text flow tab, and Push OK button
But why would you want to do this for Japanese text?  It seems it's disabled by default, at least for me with zh-CN locale (which also doesn't have hyphenation).

> 5. Save the file, and Close the Writer
> 6. Open the saved file in the Writer
Comment 3 Jun Nogata 2021-07-17 15:16:54 UTC
(In reply to Ming Hua from comment #2)
> But why would you want to do this for Japanese text?  It seems it's disabled
> by default, at least for me with zh-CN locale (which also doesn't have
> hyphenation).

Hyphenation is not necessary for Japanese. However, when English and Japanese are mixed, it is required for English. Here is an example of this. (See the link.)

* https://forum.affinity.serif.com/index.php?/topic/90423-hyphenation-for-english-words-in-asian-language/
Comment 4 Ming Hua 2021-07-18 04:00:59 UTC
(In reply to Jun Nogata from comment #3)
> (In reply to Ming Hua from comment #2)
> > But why would you want to do this for Japanese text?  It seems it's disabled
> > by default, at least for me with zh-CN locale (which also doesn't have
> > hyphenation).
> 
> Hyphenation is not necessary for Japanese. However, when English and
> Japanese are mixed, it is required for English.
Fair enough.

Reproduced also from empty document using steps in commen #0.  Setting to NEW.

I previously thought that bug 132396 is due to non-MS software creating ambiguous "zh" language tag in the documents, now I see that LibreOffice can also create ODT documents with the same problem.

Some additional details:
For mixed English and Chinese/Japanese text, this only happens when there are consecutive C/J characters across a line break (i.e., the first line ends with C/J characters, the next line also starts with C/J characters).  For mostly English list text with only a few C/J words that don't cross lines, there is no warning infobar.
Comment 5 Eike Rathke 2021-12-06 16:05:46 UTC
*** Bug 145992 has been marked as a duplicate of this bug. ***
Comment 6 Commit Notification 2021-12-06 16:14:26 UTC
Jun Nogata committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/53d5555f13371252874ec962dee4643168d26780

tdf#143422 Hide "Hyphenation data not found" in Japanese

It will be available in 7.4.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 7 Commit Notification 2021-12-06 19:32:41 UTC
Jun Nogata committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/9b47fe4746c2fc32272533aaf7267ab9b3d2e749

tdf#143422 Hide "Hyphenation data not found" in Japanese

It will be available in 7.3.0.0.beta2.

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 8 Kevin Suo 2021-12-06 23:27:01 UTC
I once encountered the same issue with Simplified Chinese language. We should hide this for the following languages also:

71  #define LANGUAGE_CHINESE_HONGKONG
172  #define LANGUAGE_CHINESE_LSO
173  #define LANGUAGE_CHINESE_MACAU
174  #define LANGUAGE_CHINESE_SIMPLIFIED
175  #define LANGUAGE_CHINESE_SINGAPORE
176  #define LANGUAGE_CHINESE_TRADITIONAL
177  #define LANGUAGE_CHINESE_SIMPLIFIED_LEGACY
178  #define LANGUAGE_CHINESE_TRADITIONAL_LSO
179  #define LANGUAGE_CHINESE

However I think only LANGUAGE_CHINESE_SIMPLIFIED and LANGUAGE_CHINESE_TRADITIONAL are used, so checking these two only is enough.

Aslo I think LANGUAGE_KOREAN also does not need hyphenation.

Is a survey in the l10n mailing list necessary?
Comment 9 Kevin Suo 2021-12-06 23:34:53 UTC
(In reply to Kevin Suo from comment #8)
Well, my comment in comment 8 should go to bug 146084.
Comment 10 Commit Notification 2021-12-09 14:09:17 UTC
Jun Nogata committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/bbe8db038a98d2c89fd86370495bd986951263cd

tdf#143422 Hide "Hyphenation data not found" in Japanese

It will be available in 7.2.4.

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 11 Christian Lohmaier 2021-12-09 14:23:43 UTC
7.2.4 was a hotfix release, updating target in status-whiteboard