Bug 93580 (HelpAuthoring-Extension) - [META] HELPAUTHORING Issues
Summary: [META] HELPAUTHORING Issues
Status: RESOLVED WONTFIX
Alias: HelpAuthoring-Extension
Product: LibreOffice
Classification: Unclassified
Component: Documentation (show other bugs)
Version:
(earliest affected)
5.0.0.0.beta1
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on: 93979 93981 93982 93985 94059 94080 94154 94167 94201 94215 94330 94331 94332 94490 94583 94612 94615 94618 95064 95457 95498 95501 95509 108054 108278
Blocks: Help
  Show dependency treegraph
 
Reported: 2015-08-21 18:12 UTC by Olivier Hallot
Modified: 2018-07-28 11:40 UTC (History)
7 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 Olivier Hallot 2015-08-21 18:12:56 UTC
The following issues were noted in a roundtrip edition of a help page with the latest version of the HelpAuthoring.oxt extension.

File analyses is (but not bounded to)

helpcontent2/source/text/shared/optionen/01060500.xhp

Issue 01:

Keyword <filename> in <meta> looses initial slash (/)

<     <filename>/text/shared/optionen/01060500.xhp</filename>

>     <filename>text/shared/optionen/01060500.xhp</filename>


Issue 02:

Attribute l10n and oldref in <paragraph> deleted.

Note: this may be irrelevant or deprecated.


Attached the diff file
Comment 1 Olivier Hallot 2015-08-21 18:26:50 UTC
Issue 03:

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 2 Olivier Hallot 2015-08-21 18:56:31 UTC
Issue 04:

In the same file as comment#1 the sections with id="howtoget" were renamed "SectionN", where N is a number >2.

This is probably to keep section id's uniqueness inside the file.

But we loose the "To access this command" sections, except the first occurrence.

Manually naming id's as "howtoget" in the xhp file does work and the "To access this command..." sections are displayed.

But I don't know if that obfuscate another issue.
Comment 3 Regina Henschel 2015-08-23 23:12:20 UTC
(In reply to Olivier Hallot from comment #0)
 
> Issue 02:
> 
> Attribute l10n and oldref in <paragraph> deleted.
> 
> Note: this may be irrelevant or deprecated.

Read in table "Attributes" in section "Paragraphs" on page 58 in OOo2HelpAuthoring.pdf.

The attribute 'oldref' can surely be removed totally. It is not required and the comment says "This contains the reference number used by the old help files and is only used for migration purposes." and migration is finished long ago.

The attribute 'l10n' is described with "required" in that document, but when you look at the current /help/helpers/xmlhelp.dtd, it is actually not required. It has the same comment, so I think it can be removed too.

Therefore the extension does it right, to remove both attributes. Perhaps these attributes should be removed in all help files.
Comment 4 Regina Henschel 2015-08-24 13:37:27 UTC
(In reply to Olivier Hallot from comment #0)

> Issue 01:
> 
> Keyword <filename> in <meta> looses initial slash (/)
> 
> <     <filename>/text/shared/optionen/01060500.xhp</filename>
> 
> >     <filename>text/shared/optionen/01060500.xhp</filename>

The problem is in Function SetMetaDataOnSave in module _Main.
In string is build in line 57. The variable sDocRoot contains a character '/' as last character. Therefore subtracting sDocRoot removes the character '/' from the variable Path. I'm not sure about the solution:

(A) in line 57 in Function SetMetaDataOnSave in module _Main
-   Path = Right(Path,Len(Path)-Len(sDocRoot))
+   Path = Right(Path,Len(Path)-Len(sDocRoot)+1)

or save the HelpPrefix without slash. I don't know what further implications that will have and where other parts would have to be adapted then.
(B) in line 1057 in Function SetDocumentRoot in module Helpers
-   sHelpPrefix = oFolderDialog.getDirectory + "/"
+   sHelpPrefix = oFolderDialog.getDirectory

I prefer (A). What do you think?
Comment 5 Joel Madero 2015-08-24 15:40:03 UTC
Reading comments it seems like this has been confirmed (as the discussion is about a solution not about the problem itself). Setting to NEW.
Comment 6 Olivier Hallot 2015-08-24 17:29:07 UTC
(In reply to Regina Henschel from comment #3)
> (In reply to Olivier Hallot from comment #0)
(....)
> 
> Therefore the extension does it right, to remove both attributes. Perhaps
> these attributes should be removed in all help files.

Right, so since this is innocuous, let is stay as is for later cleanup.
Comment 7 Yousuf Philips (jay) (retired) 2015-09-05 18:54:14 UTC
(In reply to Regina Henschel from comment #4)
> (A) in line 57 in Function SetMetaDataOnSave in module _Main
> -   Path = Right(Path,Len(Path)-Len(sDocRoot))
> +   Path = Right(Path,Len(Path)-Len(sDocRoot)+1)

Yes this was the same solution that i came up with and it works.
Comment 8 Jan Holesovsky 2015-09-07 06:56:22 UTC
Let's split this bug to several ones, and have this as meta-issue for dependency :-)
Comment 9 Yousuf Philips (jay) (retired) 2015-09-07 07:55:26 UTC
(In reply to Olivier Hallot from comment #0)
> The following issues were noted in a roundtrip edition of a help page with
> the latest version of the HelpAuthoring.oxt extension.
> 
> File analyses is (but not bounded to)
> 
> helpcontent2/source/text/shared/optionen/01060500.xhp

Which version number is this, as i'm unable to open that file with the latest version (3.1.0).
Comment 10 Jan Holesovsky 2015-09-07 08:37:28 UTC
I've created bug 93979 for Issue 01, bug 93981 for Issue 03, and bug 93982 for Issue 04.

I did not create a bug for Issue 02 as Regina's comment 3 says that these attributes are not necessary.
Comment 11 Yousuf Philips (jay) (retired) 2015-09-08 14:33:59 UTC
Got access to the dev-tools repo and have submitted 4 patches so far.

Have title tag id attribute before xml-lang (merge directly to master)

Embed tags should be on their own line (merge directly to master)

Reorganize the menu according to usage
https://gerrit.libreoffice.org/18408

Have level attribute of paragraph tag appear before xml-lang
https://gerrit.libreoffice.org/18410

More patches coming soon and you can find the issues that i'm looking to patch as well as my patched version of the tool here - https://docs.google.com/document/d/1PWerIggak-XyuwtME-bYLtdnyw2LHoCUrJjhAqHcVO4/edit?usp=sharing'

@Regina: My version should work with AOO as its based on 3.1.0. :D
Comment 12 Yousuf Philips (jay) (retired) 2015-09-10 00:10:14 UTC
Another set of patches sent into gerrit.

Insert product name and version variables
https://gerrit.libreoffice.org/18451

Add ability to reload the active help document
https://gerrit.libreoffice.org/18452

Always jump to cursor position to insert new paragraph data
https://gerrit.libreoffice.org/18454

Add wizard to creating new help file
https://gerrit.libreoffice.org/18455

Dont clear help topic id and indexer
https://gerrit.libreoffice.org/18456

Additional cleanup of the menu
https://gerrit.libreoffice.org/18458
Comment 13 Yousuf Philips (jay) (retired) 2015-09-11 06:54:26 UTC
Another set of patches

Dont set indexer during new help file wizard
https://gerrit.libreoffice.org/18476

Open a embedded or linked help file and some menu cleanup
https://gerrit.libreoffice.org/18485

Insert switch and switchinline tags
https://gerrit.libreoffice.org/18486

I hope to push my last patches in today or tomorrow, depending on when these get pushed in, as there would be a merge conflict.
Comment 14 Yousuf Philips (jay) (retired) 2015-09-15 21:04:48 UTC
All the remaining patches are in and are just awaiting approval. Hopefully the new version can be published once they are in.

I've been able to modify help files quite easily with the new version (the toolbar makes it alot easier) and my latest 2 help patches ( https://gerrit.libreoffice.org/18515, https://gerrit.libreoffice.org/18574 ) were primarily edited in the authoring tool, except for occurrences that trigger bug 94167 and when i just wanted to add a section to the beginning of help files.

@Regina: Can you test bug 93982, basically olivier's issue number 4 listed on this page, as i wasnt able to reproduce this when editing with the authoring tool.
Comment 15 Olivier Hallot 2018-07-28 11:40:24 UTC
Helpauthoring extension is deprecated. closing wontfix.