Bug 83190 - how to handle "es-ES_tradnl" tag in docx files
Summary: how to handle "es-ES_tradnl" tag in docx files
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
4.4.0.0.alpha0+ Master
Hardware: All All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: target:6.0.0
Keywords: filter:docx
Depends on:
Blocks: DOCX
  Show dependency treegraph
 
Reported: 2014-08-28 12:17 UTC by Caolán McNamara
Modified: 2017-09-12 14:58 UTC (History)
1 user (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 Caolán McNamara 2014-08-28 12:17:20 UTC
In this docx document https://bugs.freedesktop.org/attachment.cgi?id=101215 there is a language tag of "es-ES_tradn" which is malformed as bcp47.

I'm guessing that this is a return of the old/new spanish collation rules problem e.g. https://issues.apache.org/ooo/show_bug.cgi?id=94435 and that es-ES_tradn might be how ms is mapping 0x040A LANGUAGE_SPANISH_DATED

Maybe we should have a means of detecting this tag in the ooxml filter and convert it to something valid that we can transport around and re-break it on ooxml export
Comment 1 Eike Rathke 2014-08-28 16:18:45 UTC
Might be possible, but that anyway looks rather odd in this case, from a quick glance these w:lang elements occur only along with w:rFonts elements where w:eastAsiaTheme='minorEastAsia', consequently that stuffs an en-US as (bad) fallback into the language list of our "Asian text font" section.

Yo gotta lov'em if ya can't hat'em..
Comment 2 QA Administrators 2015-09-04 02:48:40 UTC Comment hidden (obsolete, spam)
Comment 3 QA Administrators 2016-09-20 10:29:52 UTC Comment hidden (obsolete, spam)
Comment 4 Commit Notification 2017-09-05 13:41:43 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=93f490887c837c8a81b035d4c404da186a9bc9a2

Introduce LanguageTag::getBcp47MS() for writing MS malformed tags, tdf#83190

It will be available in 6.0.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 2017-09-05 13:41:49 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=750991d454f60d5718e17cbdcdeb4a438adfe6ab

Map MS malformed es-ES_tradnl to proper BCP 47 es-ES-u-co-trad, tdf#83190

It will be available in 6.0.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 6 Commit Notification 2017-09-05 13:41:55 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=49f1f04c5bb9922b237ec7ed6a9b58f7f1c2e781

Use LanguageTag::getBcp47MS() to write MS malformed tags to OOXML, tdf#83190

It will be available in 6.0.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 2017-09-12 14:58:43 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=82ee2ad282c3548e7ce6e745c8aee0db8b9b2201

Handle 'es-ES_tradnl' and 'es-ES-u-co-trad' as known, tdf#83190 follow-up

It will be available in 6.0.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 8 Commit Notification 2017-09-12 14:58:49 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=4f2a06379dde3839a71a52e81c2ca09aaa9a41c9

Unit tests for 'es_ES_u_co_trad' and 'es_ES_tradnl', tdf#83190

It will be available in 6.0.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.