Bug 97315 - i18n: add language
Summary: i18n: add language
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Localization (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Eike Rathke
URL:
Whiteboard: target:5.2.0 target:5.1.1 target:5.1...
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-22 10:17 UTC by axlor
Modified: 2016-10-25 19:11 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
The attached patch adds "eu-ES" and "eu-FR" to the mappings for LANGUAGE_BASQUE so that opening a docx with Basque text in Libreoffice works as expected. (786 bytes, patch)
2016-01-22 10:17 UTC, axlor
Details

Note You need to log in before you can comment on or make changes to this bug.
Description axlor 2016-01-22 10:17:05 UTC
Created attachment 122145 [details]
The attached patch adds "eu-ES" and "eu-FR" to the mappings for LANGUAGE_BASQUE so that opening a docx with Basque text in Libreoffice works as expected.

I have come across this problem during the development of a spellchecker and proofreader extension for Basque

Libreoffice marks Paragraphs written in Basque with the "eu" language code. On the other hand Office's docx format uses "eu-ES" for the very same purpose. If we open a docx file in Libreoffice the paragraphs marked as "eu-ES" are not recognized as written in Basque which has at least the following negative side effects:

  - The status bar shows "eu-ES" as the language instead of "Basque".
  - Libreoffice never runs the spellchecker even though the spellchecker states that it supports the es-ES locale.

The attached patch adds "eu-ES" and "eu-FR" to the mappings for LANGUAGE_BASQUE so that opening a docx with Basque text in Libreoffice works as expected.
Comment 1 axlor 2016-01-22 10:59:35 UTC
Comment on attachment 122145 [details]
The attached patch adds "eu-ES" and "eu-FR" to the mappings for LANGUAGE_BASQUE so that opening a docx with Basque text in Libreoffice works as expected.

>diff --git a/i18nlangtag/source/isolang/isolang.cxx b/i18nlangtag/source/isolang/isolang.cxx
>index c005c19..f66d8e8 100644
>--- a/i18nlangtag/source/isolang/isolang.cxx
>+++ b/i18nlangtag/source/isolang/isolang.cxx
>@@ -240,6 +240,7 @@ static IsoLanguageCountryEntry const aImplIsoLangEntries[] =
>     { LANGUAGE_USER_ARABIC_SUDAN,           "ar", "SD", 0     },
>     { LANGUAGE_ARABIC_PRIMARY_ONLY,         "ar", ""  , 0     },
>     { LANGUAGE_BASQUE,                      "eu", ""  , 0     },
>+    { LANGUAGE_BASQUE,                      "eu", "ES", 0     },    // As used by Office 2007+
>+    { LANGUAGE_BASQUE,                      "eu", "FR", 0     },    // As used by Office 2007+
>     { LANGUAGE_BULGARIAN,                   "bg", "BG", 0     },
>     { LANGUAGE_CZECH,                       "cs", "CZ", 0     },
>     { LANGUAGE_CZECH,                       "cz", ""  , kSAME },
Comment 2 Eike Rathke 2016-01-22 11:09:16 UTC
Thanks for the hint. Unfortunately, only adding an entry with the same LCID value to that table is not sufficient, loading an MS document and recognizing the eu-ES or eu-FR (why also eu-FR btw? MS dows not create both, does it?) as Basque will probably work with it, but when saving it would still save with 'eu' only. Also, there are other places that treat Basque special because of its "language-only" attribution, and there's locale data involved. I'll take a look.
Comment 3 Commit Notification 2016-01-22 20:54:10 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=72c5e230f9cda8e18f63f7bbc6567487b4c5a5e0

tdf#97315 add Basque [eu-ES] and map [eu] to [eu-ES]

It will be available in 5.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Commit Notification 2016-01-26 08:37:43 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e0591f72d6088ee392b4c2e41fda8c0dc4faf2a3&h=libreoffice-5-1

tdf#97315 add Basque [eu-ES] and map [eu] to [eu-ES]

It will be available in 5.1.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2016-01-26 20:53:42 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-5-1-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2fa74e718363d4874920bb2f71653b386c9f99d0&h=libreoffice-5-1-0

tdf#97315 add Basque [eu-ES] and map [eu] to [eu-ES]

It will be available in 5.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Commit Notification 2016-02-02 23:28:22 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-5-0-5":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=edc44d944a3465c4387548d2ddd69ba1f67970fe&h=libreoffice-5-0-5

tdf#97315 forward compatibility for [eu-ES] mapping to [eu]

It will be available in 5.0.5.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2016-02-04 16:40:35 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9c9876c8b63fb47814e05141c74a4fc244cfa56c&h=libreoffice-5-0

tdf#97315 forward compatibility for [eu-ES] mapping to [eu]

It will be available in 5.0.6.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.