Bug 146228 - i18langtag warns about converting locale en-IL:en
Summary: i18langtag warns about converting locale en-IL:en
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: framework (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All Linux (All)
: medium trivial
Assignee: Eike Rathke
URL:
Whiteboard: target:7.4.0 target:7.3.0.0.beta2
Keywords:
Depends on:
Blocks: console-noise
  Show dependency treegraph
 
Reported: 2021-12-14 19:29 UTC by Eyal Rozenberg
Modified: 2021-12-15 21:38 UTC (History)
0 users

See Also:
Crash report or crash signature:
Regression By:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eyal Rozenberg 2021-12-14 19:29:52 UTC
When I start LO Writer, I get the following on the console:

warn:i18nlangtag:4695:4695:i18nlangtag/source/languagetag/languagetag.cxx:1426: LanguageTagImpl::convertLocaleToLang: with bAllowOnTheFlyID invalid 'en-IL:en'
warn:i18nlangtag:4695:4695:i18nlangtag/source/isolang/isolang.cxx:1413: convertIsoNamesToLanguage(string_view): on-the-fly for {en-IL:en} 1023
warn:i18nlangtag:4695:4695:i18nlangtag/source/isolang/isolang.cxx:1416: convertIsoNamesToLanguage(string_view): on-the-fly bad, using {en-US}


en-IL is a legitimate locale, so this shouldn't happen. See also 145173 about other console noise due to not recognizing this locale - I guess the fix for that one isn't enough here.
Comment 1 Eyal Rozenberg 2021-12-14 19:34:44 UTC
Build info:

Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: 250e4886d85a7e131da76f181b3fa7be02d1a76d
CPU threads: 4; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: en-IL (en_IL); UI: en-US
Comment 2 Eike Rathke 2021-12-14 20:04:22 UTC
(In reply to Eyal Rozenberg from comment #0)
> with bAllowOnTheFlyID invalid 'en-IL:en'
> 
> en-IL is a legitimate locale
Yes, but en-IL:en is not, so where does it get that from?
What does your locale environment in a shell commandline using the 'locale' command say?
Comment 3 Eyal Rozenberg 2021-12-14 20:45:59 UTC
(In reply to Eike Rathke from comment #2)
> What does your locale environment in a shell commandline using the 'locale'
> command say?

  $ locale
  LANG=en_IL
  LANGUAGE=en_IL:en
  LC_CTYPE="en_IL"
  LC_NUMERIC="en_IL"
  LC_TIME="en_IL"
  LC_COLLATE="en_IL"
  LC_MONETARY="en_IL"
  LC_MESSAGES="en_IL"
  LC_PAPER="en_IL"
  LC_NAME="en_IL"
  LC_ADDRESS="en_IL"
  LC_TELEPHONE="en_IL"
  LC_MEASUREMENT="en_IL"
  LC_IDENTIFICATION="en_IL"
  LC_ALL=

I have no idea who sets it that way...
Comment 4 Eike Rathke 2021-12-15 01:05:32 UTC
Ahaa.. the LANGUAGE variable. Humya, that may indeed be a colon separated list.
Comment 5 Commit Notification 2021-12-15 15:54:42 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

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

Resolves: tdf#146228 env-var $LANGUAGE can be a colon separated list

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 6 Commit Notification 2021-12-15 17:48:46 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

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

Resolves: tdf#146228 env-var $LANGUAGE can be a colon separated list

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 7 Commit Notification 2021-12-15 18:51:22 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/7c22bed187c12122fe29459279771ca414799ac8

Related: tdf#146228 convertIsoNamesToLanguage() fallback for empty tag

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 8 Eyal Rozenberg 2021-12-15 19:07:41 UTC
(In reply to Eike Rathke from comment #4)

Thank you for the quick fix. :-)
Comment 9 Commit Notification 2021-12-15 21:38:59 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/302d33f94607ac0ef8f0bad927ba290b19bc44a3

Related: tdf#146228 convertIsoNamesToLanguage() fallback for empty tag

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.