diff options
author | Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> | 2022-12-06 14:05:20 +0200 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2022-12-07 17:39:02 +0000 |
commit | 7e42394ecbf921ee53160b495aa12c1cba158604 (patch) | |
tree | 9f0b4dcbbf31112c0260a6a6831cbddf86d82c6d /source/text/swriter/main0106.xhp | |
parent | 490d42493e8dbec31ad58978df5084b080a36fcb (diff) |
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>
Diffstat (limited to 'source/text/swriter/main0106.xhp')
-rw-r--r-- | source/text/swriter/main0106.xhp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/source/text/swriter/main0106.xhp b/source/text/swriter/main0106.xhp index 2f728073c5..ebaca3d5c4 100644 --- a/source/text/swriter/main0106.xhp +++ b/source/text/swriter/main0106.xhp @@ -28,12 +28,12 @@ <body> <section id="tools"> <bookmark xml-lang="en-US" branch="hid/.uno:ToolsMenu" id="bm_id8101443" localize="false"/> - <h1 id="hd_id3147241" xml-lang="en-US"><link href="text/swriter/main0106.xhp" name="Tools">Tools</link></h1> + <h1 id="hd_id3147241" xml-lang="en-US"><link href="text/swriter/main0106.xhp">Tools</link></h1> <paragraph id="par_id3147258" role="paragraph" xml-lang="en-US"><ahelp hid=".">Contains spelling tools, redact options, mail merge wizard, macros, development tools, extension manager, as well as tools for configuring and customizing menus, and setting program preferences.</ahelp></paragraph> </section> <embed href="text/shared/01/06990000.xhp#spelling"/> - <h2 id="hd_id691612907136111"><link href="text/shared/02/18030000.xhp" name="Automatic Spell Checking">Automatic Spell Checking</link></h2> + <h2 id="hd_id691612907136111"><link href="text/shared/02/18030000.xhp">Automatic Spell Checking</link></h2> <embed href="text/shared/optionen/01010400.xhp#automatisch"/> <embed href="text/shared/01/06020000.xhp#thesaurus"/> <embed href="text/shared/01/06010500.xhp#language"/> @@ -42,40 +42,40 @@ <embed href="text/swriter/01/05150000.xhp#autoformat"/> <embed href="text/swriter/01/02120000.xhp#autotext"/> - <h2 id="hd_id3156150"><link href="text/shared/01/02220000.xhp" name="ImageMap">ImageMap</link></h2> + <h2 id="hd_id3156150"><link href="text/shared/01/02220000.xhp">ImageMap</link></h2> <embed href="text/shared/01/02220000.xhp#imagemaptext"/> - <h2 id="hd_id621628789958422"><link href="text/shared/guide/redaction.xhp" name="Redact">Redact</link></h2> + <h2 id="hd_id621628789958422"><link href="text/shared/guide/redaction.xhp">Redact</link></h2> <embed href="text/shared/guide/redaction.xhp#redaction_desc"/> - <h2 id="hd_id231628790402002"><link href="text/shared/guide/auto_redact.xhp" name="AutoRedact">Auto-Redact</link></h2> + <h2 id="hd_id231628790402002"><link href="text/shared/guide/auto_redact.xhp">Auto-Redact</link></h2> <embed href="text/shared/guide/auto_redact.xhp#auto_redact_var"/> - <h2 id="hd_id3149965" xml-lang="en-US"><link href="text/swriter/01/06060000.xhp" name="Chapter Numbering">Chapter Numbering</link></h2> + <h2 id="hd_id3149965" xml-lang="en-US"><link href="text/swriter/01/06060000.xhp">Chapter Numbering</link></h2> <embed href="text/swriter/01/06060000.xhp#kapnum"/> - <h2 id="hd_id3145688" xml-lang="en-US"><link href="text/swriter/01/06180000.xhp" name="Line Numbering">Line Numbering</link></h2> + <h2 id="hd_id3145688" xml-lang="en-US"><link href="text/swriter/01/06180000.xhp">Line Numbering</link></h2> <embed href="text/swriter/01/06180000.xhp#zeinum"/> - <h2 id="hd_id3145713" xml-lang="en-US"><link href="text/swriter/01/06080000.xhp" name="Footnotes">Footnotes and Endnotes</link></h2> + <h2 id="hd_id3145713" xml-lang="en-US"><link href="text/swriter/01/06080000.xhp">Footnotes and Endnotes</link></h2> <embed href="text/swriter/01/06080000.xhp#fnoten"/> <embed href="text/swriter/01/mailmerge00.xhp#mailmerge"/> <embed href="text/shared/01/02250000.xhp#biblio_db"/> <embed href="text/shared/01/02250000.xhp#litdattext"/> - <h2 id="hd_id501612910204859"><link href="text/shared/01/01110101.xhp" name="Address Book Source">Address Book Source</link></h2> + <h2 id="hd_id501612910204859"><link href="text/shared/01/01110101.xhp">Address Book Source</link></h2> <embed href="text/shared/01/01110101.xhp#address_book_assignment"/> <embed href="text/swriter/01/06990000.xhp#update"/> <embed href="text/swriter/01/protectdocument.xhp#protectdocumentheading"/> <embed href="text/swriter/01/06110000.xhp#calculate"/> - <h2 id="hd_id3147346" xml-lang="en-US"><link href="text/swriter/01/06100000.xhp" name="Sort">Sort</link></h2> + <h2 id="hd_id3147346" xml-lang="en-US"><link href="text/swriter/01/06100000.xhp">Sort</link></h2> <embed href="text/swriter/01/06100000.xhp#sort"/> <embed href="text/shared/01/06130001.xhp#macro"/> <embed href="text/shared/01/packagemanager.xhp#packagemanager"/> - <h2 id="hd_id3147406" xml-lang="en-US"><link href="text/shared/01/06140000.xhp" name="Customize">Customize</link></h2> + <h2 id="hd_id3147406" xml-lang="en-US"><link href="text/shared/01/06140000.xhp">Customize</link></h2> <embed href="text/shared/01/06140000.xhp#anpassen"/> <embed href="text/shared/optionen/01000000.xhp#options"/> </body> |