12 Commits

Author SHA1 Message Date
49f82528ae Precisions about OS recognition in scripts
plus a few invitations to go Python 
Change-Id: I0c58b9f35638c0d609727e6ef4affffac8fce971
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/183441
Reviewed-by: Alain Romedenne <alain.romedenne@libreoffice.org>
Tested-by: Jenkins
2025-03-31 16:46:50 +02:00
4453c0b2ed convert paragraphs with role="heading" & childelements to → h<level>
and also drop the language that was changed to implied previously/defaults to
en-US unless specified.

This change doesn't affect translations, only the content of the
paragraph/headings is extracted.

done with:
perl -CSD -pi -e 'BEGIN {$base = qr/role="heading"|level="(?<level>\d+)"|(?<id>id="[^"]+")/;} s#<paragraph(((\s+($base)){3})|(\s+($base|xml-lang="en-US")){4})>(?<body>.*?)</paragraph>#<h$+{level} $+{id}>$+{body}</h$+{level}>#g'

and manually undoing the one that uses <sup>in body that's not valid
according to the dtd in the h tags.

Change-Id: Ibd4aed3157ed168cd5005161575672a392e59202
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/148797
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2023-03-16 15:18:30 +00:00
7e42394ecb tdf#152323 drop name attribute from <link> elements
Replacement done with

find . -name \*.xhp -print0 |xargs -0 -P 0 perl -CS -pi -e \
        's#(<link[^>]*?) +name *="[^"]*" *( [^>]+|) *>#$1$2>#g'

(note some inconsistencies with space between name and = and also having
empty value, and some more complicated expression to also clear up
double space before/after the attribute)

translation files will be prepped with:

find */helpcontent2 -name \*.po -print0 |xargs -0 -P 0 perl -CS -pi -e \
    $'s#(<link[^>]*?) +name=(?:\\\\"[^"]*\\\\"|\'[^\']*\') *( [^>]+|) *(/?>)#$1$2$3#g unless /^#/'

(note that not all languages use the " as quote character for the
attributes, but that also single quotes appera in the po file. Hence
the use of the shell $'string' syntax to be able to quote ' as \'
It also requires to quote the backslash, so that it needs to be escaped
once for the shell, then another time for perl. Also don't work on
obsolete strings (those are prefixed with #~ in the po files)
Also note that <link..></link> gets turned into <link ../> during
translation extraction (along with removal of the space between the
attribute name and the value), so the pattern needs to be slightly
different here)

Change-Id: I95e53a08e6b0095cd894109ea0de154cc4859d8f
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/143713
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2022-12-07 17:39:02 +00:00
9438da88cd A couple of articles and tag vomit cleanup
Change-Id: I5e3d9c7f9ce78807d1acfa190a740f41ddd8a378
2019-01-28 15:27:22 -06:00
de5dad498a Add more python examples
Change-Id: Id34674cd96d615b8613a35e18d96886a3d39bae0
Reviewed-on: https://gerrit.libreoffice.org/66763
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2019-01-23 12:39:28 +01:00
dc327ee89c Localization inhibition in Basic code
Change-Id: I483489265463bbd00a0ab4f82fee856e429a7497
Reviewed-on: https://gerrit.libreoffice.org/66505
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2019-01-22 11:48:19 +01:00
a02a91b543 Link 2 Help pages on GetPathSeparator()
Change-Id: I81c23ff64baff8303d2f1936c2e426bd7ba59163
Reviewed-on: https://gerrit.libreoffice.org/66685
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2019-01-21 15:21:26 +01:00
e06034e3c0 Mute and simplify l10n for GetPathSeparator()
Change-Id: I5b5736f56a21bb6abef75519557d60b8494a09be
Reviewed-on: https://gerrit.libreoffice.org/66454
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2019-01-16 21:34:52 +01:00
197b505a88 superfluous character
Change-Id: I2c7641a6c7431a3b82b449364519f4f34bf8a8c9
Reviewed-on: https://gerrit.libreoffice.org/65446
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-12-19 16:38:00 +01:00
9634a1ff3a Fix typo
Change-Id: Ic224fbb099b86942afb651e5c10c6a91d2dac020
Reviewed-on: https://gerrit.libreoffice.org/63978
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
2018-11-26 02:37:49 +01:00
6c90a05e6c Hyphenate pre-noun adjective phrase
Change-Id: I108cb3b91031327f7d775857f8e7d55042eccb6c
2018-11-23 09:14:02 -06:00
3954a99fbd tdf#114263 add help page for GetPathSelector()
Change-Id: I021dcde2c5bb27713cbbff03af9f3662f187be4b
Signed-off-by: Olivier Hallot <olivier.hallot@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/63807
Tested-by: Jenkins
2018-11-23 14:06:17 +01:00