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/sbasic/shared/ErrVBA.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/sbasic/shared/ErrVBA.xhp')
-rw-r--r-- | source/text/sbasic/shared/ErrVBA.xhp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/text/sbasic/shared/ErrVBA.xhp b/source/text/sbasic/shared/ErrVBA.xhp index 1badcbf05c..5fe8be500d 100644 --- a/source/text/sbasic/shared/ErrVBA.xhp +++ b/source/text/sbasic/shared/ErrVBA.xhp @@ -21,7 +21,7 @@ <bookmark_value>Error;raising</bookmark_value> <bookmark_value>Error;handling</bookmark_value> </bookmark> - <h1 id="N0011"><variable id="ErrVBAh1"><link href="text/sbasic/shared/ErrVBA.xhp" name="Err object [VBA]">Err Object [VBA]</link></variable></h1> + <h1 id="N0011"><variable id="ErrVBAh1"><link href="text/sbasic/shared/ErrVBA.xhp">Err Object [VBA]</link></variable></h1> <paragraph role="paragraph" id="N0012">Use VBA <literal>Err</literal> object to raise or handle runtime errors.</paragraph> </section> <paragraph role="paragraph" id="N0012b"><literal>Err</literal> is a built-in VBA global object that allows:</paragraph> @@ -37,11 +37,11 @@ <bascode> <paragraph role="bascode" id="N0019" localize="false">Err.Description As String</paragraph> </bascode> - <paragraph role="paragraph" id="N0020">The <emph>Description</emph> property gives the nature of the error. <emph>Description</emph> details the various reasons that may be the cause of the error. Ideally, it provides the multiple course of actions to help solve the issue and prevent its reoccurrence. The Basic alias is the <link href="text/sbasic/shared/03050300.xhp" name ="Error function">Error</link> function for %PRODUCTNAME predefined errors.</paragraph> + <paragraph role="paragraph" id="N0020">The <emph>Description</emph> property gives the nature of the error. <emph>Description</emph> details the various reasons that may be the cause of the error. Ideally, it provides the multiple course of actions to help solve the issue and prevent its reoccurrence. The Basic alias is the <link href="text/sbasic/shared/03050300.xhp">Error</link> function for %PRODUCTNAME predefined errors.</paragraph> <bascode> <paragraph role="bascode" id="N0021" localize="false">Err.Number As Long</paragraph> </bascode> - <paragraph role="paragraph" id="N0022">The error code associated with the error. <literal>Err</literal> object default property is <emph>Number</emph>. The %PRODUCTNAME Basic alias is the <link href="text/sbasic/shared/03050200.xhp" name ="Err">Err</link> function.</paragraph> + <paragraph role="paragraph" id="N0022">The error code associated with the error. <literal>Err</literal> object default property is <emph>Number</emph>. The %PRODUCTNAME Basic alias is the <link href="text/sbasic/shared/03050200.xhp">Err</link> function.</paragraph> <bascode> <paragraph role="bascode" id="N0023" localize="false">Err.Source As String</paragraph> </bascode> @@ -50,11 +50,11 @@ <bascode> <paragraph role="bascode" id="N0026" localize="false">Err.Clear()</paragraph> </bascode> - <paragraph role="paragraph" id="N0027">Resets description, <link href="text/sbasic/shared/03050100.xhp" name ="error line">Erl</link>, number and source properties of current error. The %PRODUCTNAME Basic alias is the <link href="text/sbasic/shared/03050500.xhp" name ="Resume statement">Resume</link> statement.</paragraph> + <paragraph role="paragraph" id="N0027">Resets description, <link href="text/sbasic/shared/03050100.xhp">Erl</link>, number and source properties of current error. The %PRODUCTNAME Basic alias is the <link href="text/sbasic/shared/03050500.xhp">Resume</link> statement.</paragraph> <bascode> <paragraph role="bascode" id="N0028" localize="false">Err.Raise(Number As Long, Optional source As String, Optional description As String)</paragraph> </bascode> - <paragraph role="paragraph" id="N0029">Throws user-defined errors or predefined errors. The %PRODUCTNAME Basic alias is the <link href="text/sbasic/shared/03050200.xhp" name ="Error statement">Error</link> statement.</paragraph> + <paragraph role="paragraph" id="N0029">Throws user-defined errors or predefined errors. The %PRODUCTNAME Basic alias is the <link href="text/sbasic/shared/03050200.xhp">Error</link> statement.</paragraph> <h3 id="N0030">Parameters</h3> <paragraph role="paragraph" id="N0031"><emph>Number</emph>: A user-defined or predefined error code to be raised.</paragraph> <section id="RestrictedErrorCodes"> @@ -80,7 +80,7 @@ <paragraph role="bascode" id="N0048" localize="false">End Sub</paragraph> </bascode> <h2 id="N0050">Exception ClassModule</h2> - <tip id="N0049">A short <link href="text/sbasic/shared/classmodule.xhp" name="ClassModule option">ClassModule</link>, that wraps VBA <literal>Err</literal> object, can distribute <literal>Err</literal> properties and methods for standard %PRODUCTNAME Basic modules.</tip> + <tip id="N0049">A short <link href="text/sbasic/shared/classmodule.xhp">ClassModule</link>, that wraps VBA <literal>Err</literal> object, can distribute <literal>Err</literal> properties and methods for standard %PRODUCTNAME Basic modules.</tip> <bascode> <paragraph role="bascode" id="N0051" localize="false">Option ClassModule</paragraph> <paragraph role="bascode" id="N0052" localize="false">Option VBASupport 1</paragraph> @@ -121,7 +121,7 @@ <paragraph role="bascode" id="N0085" localize="false"> Resume finally</paragraph> <paragraph role="bascode" id="N0086" localize="false">End Sub</paragraph> </bascode> - <note id="N0088">The <link href="text/sbasic/shared/03050300.xhp" name="Error statement">Error</link> statement or an Exception-like class module can be used interchangeably, while the latter adds extra features.</note> + <note id="N0088">The <link href="text/sbasic/shared/03050300.xhp">Error</link> statement or an Exception-like class module can be used interchangeably, while the latter adds extra features.</note> <section id="relatedtopics"> <embed href="text/sbasic/shared/03050000.xhp#ErrHandlingh1"/> <embed href="text/sbasic/shared/classmodule.xhp#classmodulestatement"/> |