Bug 93981 - helpauthoring: Attribute localize=(false|true) is deleted
Summary: helpauthoring: Attribute localize=(false|true) is deleted
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Documentation (show other bugs)
Version:
(earliest affected)
5.0.1.2 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:5.1.0
Keywords:
: 94080 (view as bug list)
Depends on:
Blocks: HelpAuthoring-Extension
  Show dependency treegraph
 
Reported: 2015-09-07 08:32 UTC by Jan Holesovsky
Modified: 2016-09-15 23:10 UTC (History)
5 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 Jan Holesovsky 2015-09-07 08:32:09 UTC
In another file(*) the paragraph attribute "localize" (=true/false) is deleted. This affects translations, and will pollute Pootle server with useless translations (e.g. translate keywords, numbers, etc...)

(*) helpcontent2/source/text/scalc/01/statistics.xhp
Comment 1 Yousuf Philips (jay) (retired) 2015-09-10 22:32:36 UTC
*** Bug 94080 has been marked as a duplicate of this bug. ***
Comment 2 Yousuf Philips (jay) (retired) 2015-09-10 22:34:26 UTC
From my duplicate bug.

-----------------

When a paragraph tag has the localize entry set to false, it is supposed to append '_NOL10N' to the paragraph id on import, as the code to toggle L10N relies on that appended text in the paragraph id in order to know if it is on or off. Not setting this causes saving the file to lose the localize entry.

Example file - source/text/sbasic/shared/03020104.xhp

In

<paragraph role="bascode" localize="false" xml-lang="en-US">Sub ExampleReset</paragraph>

Out

<paragraph id="" role="bascode" xml-lang="en-US">Sub ExampleReset</paragraph>

-----------------

Just to note, 'localize="true"' is never actually set as true is the default.
Comment 3 Regina Henschel 2015-10-01 12:46:51 UTC
Observations:

While introducing "bascode" as element and as role attribute value, a lot of id-attributes have been removed. But from xmlhelp.dtd the attribute "id" is a required attribute for the paragraph element.

The transformation appends '_NOL10N' to the id of a paragraph in case that xml-lang does not exist. But that may not happen, because the 'xml-lang' attribute is required for paragraphs. The xsl-file contains a lot of commented stuff, so it looks like it was not finished in that part.
Comment 4 Regina Henschel 2015-10-04 23:14:36 UTC
When the test is done on localize="false", it fixes the bug. I can make a patch for it, but first want to know, how bug #94612 should be solved. When the proposal (2) is used, then the very same part of the file has to be reworked and then it should be solved together.
Comment 5 Yousuf Philips (jay) (retired) 2015-10-05 11:10:27 UTC
If proposal 2 make it easier to solve this issue at the same time, as we cant have empty ids with _NOL10N appended to them, then i think that is the better option.
Comment 6 Regina Henschel 2015-10-05 16:35:52 UTC
I propose https://gerrit.libreoffice.org/19166
The attribute localize='false' is now correctly tracked by adding _NOL10N to the paragraph id. In addition an id is generated, when the paragraph has no id at all or when the id is empty.
Comment 7 Yousuf Philips (jay) (retired) 2015-10-05 18:12:11 UTC
Is this taking into consideration that paragraph ids arent important for bascode paragraphs or are we going to add ids to them anyway?
Comment 8 Regina Henschel 2015-10-05 19:08:26 UTC
They will get id-attributes too. An id-attribute is an required attribute for all paragraphs, independent of the role. With my patch, if a paragraph has no id or an empty id value, the import filter will generate a valid id.
Comment 9 Commit Notification 2015-10-20 06:24:04 UTC
Regina Henschel committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/contrib/dev-tools/commit/?id=1d020c732782085c99c166bd3b4bd583360c277e

tdf#93981 Attribute localize=(false|true) is deleted
Comment 10 Xisco Faulí 2016-09-15 22:20:13 UTC
Hello,
Is this bug fixed?
If so, could you please close it as RESOLVED FIXED?