Bug 48129 - resource compiler produces English .res files for any language
Summary: resource compiler produces English .res files for any language
Status: CLOSED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
Master old -3.6
Hardware: Other All
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:3.6.0
Keywords:
: 47530 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-03-31 12:17 UTC by Andras Timar
Modified: 2012-04-15 03:59 UTC (History)
4 users (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 Andras Timar 2012-03-31 12:17:25 UTC
Maybe as a side effect of ByteString->rtl::OString conversion, rsc resource compiler produces English .res files for any language. The source .src file contains the translations, the command line of rsc specifies the correct language, but the result is (almost*) identical for all languages - en-US.

* some random garbage in .res files may differ
Comment 1 Caolán McNamara 2012-04-02 05:23:50 UTC
hmm, git-bisect in progress
Comment 3 Caolán McNamara 2012-04-02 06:52:12 UTC
aha

http://opengrok.libreoffice.org/xref/core/i18npool/inc/i18npool/mslangid.hxx#236

sal_Char      maLangStr[4];
Comment 4 Caolán McNamara 2012-04-02 06:55:40 UTC
Well, for the immediate problem http://cgit.freedesktop.org/libreoffice/core/commit/?id=791f27683311e487947b0464a0cb132b19fd0e12 will fix it, but I guess more problems like this could lurk around the place.
Comment 5 Not Assigned 2012-04-02 06:59:54 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=791f27683311e487947b0464a0cb132b19fd0e12

Resolves: fdo#48129 maLangStr can have trailing nulls
Comment 6 Luboš Luňák 2012-04-02 07:22:48 UTC
IIRC there was initially a check for embedded \0's in string literals and then I removed it later, arguing that if the literal contains it, it's wanted, but seeing this I'll put the check back again and clean up any valid embedded \0 usage.
Comment 7 Ivan Timofeev (retired) 2012-04-02 12:14:31 UTC
*** Bug 47530 has been marked as a duplicate of this bug. ***
Comment 8 Rainer Bielefeld Retired 2012-04-05 08:15:00 UTC
I added Fix submitter as assignee because this will ease queries and bug tracking.
Comment 9 Cor Nouws 2012-04-15 03:59:45 UTC
reg. Bug 47530 : works fine again. Thanks!