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/01/05150100.xhp | |
parent | Fix typo (diff) | |
download | help-7e42394ecbf921ee53160b495aa12c1cba158604.tar.gz help-7e42394ecbf921ee53160b495aa12c1cba158604.zip |
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/01/05150100.xhp')
-rw-r--r-- | source/text/swriter/01/05150100.xhp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/text/swriter/01/05150100.xhp b/source/text/swriter/01/05150100.xhp index ddee2b2979..6816463988 100644 --- a/source/text/swriter/01/05150100.xhp +++ b/source/text/swriter/01/05150100.xhp @@ -33,14 +33,14 @@ <bookmark_value>separator lines;AutoCorrect function</bookmark_value> </bookmark> <bookmark xml-lang="en-US" branch="hid/.uno:OnlineAutoFormat" id="bm_id3154491" localize="false"/> -<h1 id="hd_id3147436" xml-lang="en-US"><link href="text/swriter/01/05150100.xhp" name="While Typing">While Typing</link></h1> +<h1 id="hd_id3147436" xml-lang="en-US"><link href="text/swriter/01/05150100.xhp">While Typing</link></h1> <paragraph role="paragraph" id="par_id3154017" xml-lang="en-US"><ahelp hid=".uno:OnlineAutoFormat">Automatically formats the document while you type. To set the formatting options, choose <menuitem>Tools - AutoCorrect - Options</menuitem>, and then click the <emph>Options</emph> tab.</ahelp></paragraph> </section> <section id="howtoget"> <embed href="text/swriter/00/00000405.xhp#while_typing"/> </section> -<paragraph role="paragraph" id="par_id3148488" xml-lang="en-US">You can use AutoCorrect to format text documents and plain ASCII text files, but not characters that you have manually formatted. Automatic <link href="text/shared/01/06040100.xhp" name="word completion">word completion</link> only occurs after you type a word for the second time in a document.</paragraph> -<tip id="par_id3147407" xml-lang="en-US">To reverse the last AutoCorrect action, choose <emph>Edit - </emph><link href="text/shared/01/02010000.xhp" name="Undo"><emph>Undo</emph></link>.</tip> +<paragraph role="paragraph" id="par_id3148488" xml-lang="en-US">You can use AutoCorrect to format text documents and plain ASCII text files, but not characters that you have manually formatted. Automatic <link href="text/shared/01/06040100.xhp">word completion</link> only occurs after you type a word for the second time in a document.</paragraph> +<tip id="par_id3147407" xml-lang="en-US">To reverse the last AutoCorrect action, choose <emph>Edit - </emph><link href="text/shared/01/02010000.xhp"><emph>Undo</emph></link>.</tip> <paragraph xml-lang="en-US" id="par_id3147404" role="paragraph">When you apply automatic formats, the following rules apply:</paragraph> <h2 xml-lang="en-US" id="hd_id3155625">AutoCorrect for Headings</h2> <paragraph xml-lang="en-US" id="par_id3154505" role="paragraph">A paragraph is formatted as a heading when the following conditions are met:</paragraph> @@ -56,7 +56,7 @@ </listitem> </list> <h2 xml-lang="en-US" id="hd_id3152941">AutoCorrect for Separator Lines</h2> - <paragraph xml-lang="en-US" id="par_id3154105" role="paragraph">If you type three or more hyphens (---) or certain other characters in a row and then press Enter, the paragraph is replaced by a horizontal line as wide as the page. The line is actually the <link href="text/shared/01/05030500.xhp" name="lower border">lower border</link> of the preceding paragraph. The bottom padding of such a paragraph will be set to 0.75 mm. The following rules apply:</paragraph> + <paragraph xml-lang="en-US" id="par_id3154105" role="paragraph">If you type three or more hyphens (---) or certain other characters in a row and then press Enter, the paragraph is replaced by a horizontal line as wide as the page. The line is actually the <link href="text/shared/01/05030500.xhp">lower border</link> of the preceding paragraph. The bottom padding of such a paragraph will be set to 0.75 mm. The following rules apply:</paragraph> <list type="ordered"> <listitem> <paragraph xml-lang="en-US" id="par_id3153530" role="listitem">Three hyphens (-) yield a single line (0.05 pt thick).</paragraph> @@ -78,7 +78,7 @@ </listitem> </list> <section id="relatedtopics"> -<paragraph role="paragraph" id="par_id3150536" xml-lang="en-US"><link href="text/swriter/01/05150200.xhp" name="Other AutoFormat rules">Other AutoCorrect rules</link></paragraph> +<paragraph role="paragraph" id="par_id3150536" xml-lang="en-US"><link href="text/swriter/01/05150200.xhp">Other AutoCorrect rules</link></paragraph> </section> </body> </helpdocument> |