by copying the en-US file a single pattern rule can be used without the
need of using a generator/eval to add the targets/dependencies
Change-Id: Ie63fce1e3687f1e1ba46583529e6f4997c0aba44
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/192835
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
+ A big red warning displays on top of pages when JS is disabled in browser.
+ otherwise JS switch warning to display = none.
+ Fast/instantaneous in Firefox
+ Some delay (flash) experienced with Brave and Edge in Linux (Chrome engines).
Change-Id: I2b1792e87520b3f4e0bf93a6e0430376587b4afb
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/179578
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
not always/reproducible but often enough when using git-bash to get
annoying when building with all langs/when that is run in parallel
Splitting this up makes it more reliable (or I just have been lucky)
btw: why is this split-per-app when the final bookmarks.js is a simple
concatenation of all of them?
Change-Id: I629a302237b32da8ba77460e0415f32d50105ae5
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/166320
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
+ Remove call to matomo TDF server instance when help is local
+ Keep when Help is online.
+ refactor javascript
Change-Id: I285b426531c91ff558c01798f803bf3f89720b1f
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/157255
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
Seen this fail once at
<https://buildbot.flathub.org/#/builders/31/builds/1623>,
> cp: cannot create regular file '/run/build/libreoffice/workdir/CustomTarget/helpcontent2/help3xsl/online_transform.xsl': No such file or directory
> make[1]: *** [/run/build/libreoffice/helpcontent2/CustomTarget_html.mk:186: /run/build/libreoffice/workdir/CustomTarget/helpcontent2/help3xsl/online_transform.xsl] Error 1
Change-Id: I8cfa387d1bb2ef488f5f34ff20b9dc975d424751
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/146141
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
quirk introduced with the change making the xsltproc one an order-only
dependency. The line-continuation wasn't removed with that change
causing the annouce to fire when make is parsing the makefile. Doesn't
hurt anything or affected the build result in any way, but certainly not
as intended :-)
Change-Id: I82069208fff1ff0c01efba00caa2d8fa5279efaf
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/144760
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
some cygwin setups still treat the final CR as part of the filename, so
avoid that problem alltogether by simply appending a dummy entry to each
line on the responsefile to catch any stray EOL/EOF characters
Change-Id: I624eeeca033f72b2845394b44f27b6e32d01eb70
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/144758
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
the remarks about the indicator files are obsolete after the rule has
been rewritten to work in batch and not on single files
Change-Id: I8a2509aed7a38b9cff0dacec3d4161bc020fde31
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/144468
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
mostly making xstlproc and python order-only dependencies, simplifying
some of the print statements/remove sed or grep calls that can be
handled by make's own text functions
Change-Id: If4f8ef145d7721384e914ae79494c500bbf244dc
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/144410
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
instead of running xsltproc for each file, pass multiple files at once,
greatly reducing the overhead of the processing, especially on
Windows/cygwin. since it not only removes the need for the xsltproc
invocations, but also for the surrounding workarounds with the rm,
touch, rm of the indicator file.
Change-Id: I4588bfc869c668a41da29b5d4080a600ed02223b
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/144409
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
For each language times the 2500+ xhp files the build did run
dirname, mkdir, and pwd (twice, and on windows also with additional
cygpath) - replacing those by static values provided my make saves
4-5 minutes on a fast m1 machine and over 25 on windows with
cygwin (despite building with 32 threads...)
Change-Id: Ib3ca9e2ffdea622a4b5f578f2580152eb0b3b674
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/144393
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
On the Jenkins Windows builder only 40~45 of the ~2500 helpfiles can be
processed at once when not stripping that prefix. With the shortened
filenames the build needs less than half of the xsltproc invocations.
Also prevent a trailing carriage return to be interpreted as part of the
filename on windows and drop the abbreviate_dir wrapper around the
command since there's nothing left to shorten anymore.
Change-Id: Ifaff26f73f262bd1d7cb4f813bf081782661ba17
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/144236
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
...as was done in f048f02f50 "hid2file.js
generation: process in batch, not each file one-by-one", causing my build to
fail with
> [XSL] CustomTarget/helpcontent2/help3xsl/hid2file.js
> xargs: LD_LIBRARY_PATH=/home/sbergman/gcc/trunk/inst/lib64:/home/sbergman/lo/core/instdir/program:/home/sbergman/lo/core/instdir/program: No such file or directory
Change-Id: I94ea42878de55a887e6955b350997425438bb90e
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/144154
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
xsltproc can happily process many files at once, no need to process them
individually and also no need to surround them with the rm, touch, rm
triplet each time to catch a possible error.
When letting xargs actually run the command, then xargs will report
error if any invocation failed. It will not stop execution commands for
remaining input unless the command exists with status 255 explicitly,
but this doesn't matter, processing the whole batch regardless is still
much faster than processing each file separately.
To maximize the number of files that can be processed in a single
command, don't prefix each file with $(SRCDIR)/, but instead cd to
$(SRCRDIR) before running the command.
Change-Id: I532a54f7298d7011900af5e618d75b37649b0477
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/144050
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Open a new module sdatabase and add one entry file.
Later, and very slowly, move database help pages from
shared/explorer/database/* to sdatabase/*
Note: Each move will trigger translation so better move
only a few files per translation cycle, not to overload
translators. Translation memory should easy the traslation
job.
Change-Id: I8e2be9c9355b966775fb5dacc5d63b852be7187a
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/94362
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
As explained in tdf#128519, command <include> in XLST must
have its href= hardcoded. Thus, copy online_transform.xsl and
create links.txtx.xsl in workdir/
Change-Id: I979fd58f16a51ae6f57fc6f87349700eafdefbd7
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/94082
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
It contained Python-2--isms that caused errors when /usr/bin/python is Python 3
(at least on Fedora 32 with python-unversioned-command-3.8.2-2.fc32.noarch and
python3-3.8.2-2.fc32.x86_64):
> File "helpcontent2/helpers/make_icon_link.txt.py", line 21
> print "There was an error reading", file_icon
> ^
> SyntaxError: Missing parentheses in call to 'print'. Did you mean print("There was an error reading", file_icon)?
and
> File "helpcontent2/helpers/make_icon_link.txt.py", line 39
> if line.find('png',0, len(line)) <> -1 :
> ^
> SyntaxError: invalid syntax
So fix helpers/make_icon_link.txt.py to be proper Python 3 and explicitly
execute it with gb_ExternalExecutable_get_command,python instead of via a
/usr/bin/python shebang.
(That file was apparently not executed during the build prior to
ee180ade07 "tdf#128519 Automate icon repl't table
for Help bld", so these issues were not noticied earlier.)
Change-Id: Ia3cff9538ab537076a02b64ad8c1bf56dcfaf30b
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/94039
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
The solution here is to create links.txt.xsl in the
helpcontent2/helpers/ folder at build time because the <include>
directive in XSLT of online_transform.xsl must be hardcoded
(compile time) and core/workdir/ is not.
Change-Id: I8c4c8d0b8aed58c10a95c5d42bbd1b8acdb39614
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/93436
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
This is the helpcontent2/ part of the patch.
Add xapian-omega search to online Help.
The patch replaces Google custom search with xapian-omega search.
A new build key is introduced.
--with-omindex=server : Localizes and adds the xapian result page
template, adds the xapian form to each Help page.
--with-omindex=noxap : do not localize the result template and
do not add a form in the Help page.
--with-omindex= will force Online Help build.
Default is noxap
NOTES:
- xapian-omega databases are built in the server.
- searches returns results only on localized Help pages, avoiding same
resulis in many languages.
TODO:
- Tweak the xapian-omega result page CSS and markup.
Change-Id: I3dc2b79c4111f61fd5fea01b1f8c95bfacab1e8f
Reviewed-on: https://gerrit.libreoffice.org/79366
Tested-by: Jenkins
Reviewed-by: Guilhem Moulin <guilhem@libreoffice.org>
Tested-by: Guilhem Moulin <guilhem@libreoffice.org>
Create a separated sdraw.tree for Contents and move entries
from Impress tree to Draw tree.
Common contents are maintained in both trees.
This is work in progress. Draw and Impress Help pages need update
especially for menus.
Change-Id: I179a5ee7407c4a8357a87b2e7a0d8782b7bb0520
Reviewed-on: https://gerrit.libreoffice.org/72693
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
...as setting a GNU Make LANG var exports it to recipes as an env var, and see
e.g. 56bc0b1a376f62570a7287e9bb4193e00360c978 "Don't set locale env vars on
macOS" for potential problems caused by that.
This is the help half of a change spanning the core and help repos.
Change-Id: Ib5faf612e9030db384f7408ecd4fd03e65120f17
Reviewed-on: https://gerrit.libreoffice.org/70930
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Missing UI icons have a replacement table in
/core/icon-themes/colibre/links.txt
Help must also use this replacement table when Help
pages have missing icons. The previous approach was a manual
creation of a XSLT for the replacement.
The patch moves the replacement table creation inside the
Custom makefile, making it automatic and carrying changes
of the original links.txt source.
Change-Id: I7f834fa03bbd85f329efbec43e5c51cc86d51586
Reviewed-on: https://gerrit.libreoffice.org/70080
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
Add ?DbPAR=<MODULE> to the contents link URL. <smodule>.tree does not
have the DbPAR param in the link URLs.
2 possibiltites:
1) Add to the source files *.tree and we are done (triggers retranslation)
2) get module name at build time and add to the resulting tree (this
solution)
Change-Id: I2a3c1edcec7dd824a44bb93f0343ec8cb88cb0c4
Reviewed-on: https://gerrit.libreoffice.org/69714
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
...following up on c3509fb7e6 "Propagate xsltproc
failure". The while loops would only have a non-zero exit code if the xsltproc
invocation in the last iteration of the loop fails. (Oddly, adding `set -e`
instead seems to have no effect.)
Change-Id: I9296a59147697595ebe7b0d2b742044f8a8a3f02
Reviewed-on: https://gerrit.libreoffice.org/68309
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
At least the version of echo used to build TDF's LO 6.2.0.3 release apparently
doesn't understand that non-standard option and printed out "-n" verbatim,
generating a broken languages.js. (Though my local macOS 10.14.3 /bin/echo does
understand that option.)
Change-Id: I7233fa5c6e7851c5086c428a67aaee71604061e1
Reviewed-on: https://gerrit.libreoffice.org/67858
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
...instead of with app:"SHARED", according to a request by buovjaga.
That means that helpcontent2/source/text/shared/explorer/database/*.xhp files
(and their per-locale counterparts) should be processed into workdir/
CustomTarget/helpcontent2/help3xsl/shared/explorer/database/*/bookmarks.part
(which were empty until now) instead of
workdir/CustomTarget/helpcontent2/help3xsl/shared/*/bookmarks.part.
This change requres gb_AllLangHelp_*_BOOKMARK_HELPFILES introduced into the core
repo with <https://gerrit.libreoffice.org/#/c/63364/> "Prepare
gb_AllLangHelp_add_helpfiles for special bookmark needs".
Change-Id: I8f37fcec67a37aee4260042e550214a34495254a
Reviewed-on: https://gerrit.libreoffice.org/63365
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>