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>
66 lines
4.0 KiB
XML
66 lines
4.0 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!--
|
|
* This file is part of the LibreOffice project.
|
|
*
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
*
|
|
* This file incorporates work covered by the following license notice:
|
|
*
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
* with this work for additional information regarding copyright
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
* except in compliance with the License. You may obtain a copy of
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
-->
|
|
|
|
<helpdocument version="1.0">
|
|
<meta>
|
|
<topic id="textsbasicshared03050200xml" indexer="include" status="PUBLISH">
|
|
<title id="tit" xml-lang="en-US">Err Function</title>
|
|
<filename>/text/sbasic/shared/03050200.xhp</filename>
|
|
</topic>
|
|
<history>
|
|
<created date="2003-10-31T00:00:00">Sun Microsystems, Inc.</created>
|
|
</history>
|
|
</meta>
|
|
<body>
|
|
<section id="err">
|
|
<bookmark xml-lang="en-US" branch="index" id="bm_id3156343"><bookmark_value>Err function</bookmark_value>
|
|
</bookmark>
|
|
<paragraph role="heading" id="hd_id3156343" xml-lang="en-US" level="1"><link href="text/sbasic/shared/03050200.xhp">Err Function</link></paragraph>
|
|
<paragraph role="paragraph" id="par_id3150541" xml-lang="en-US">Returns an error code that identifies the error that occurred during program execution.</paragraph>
|
|
</section>
|
|
<paragraph role="heading" id="hd_id3149656" xml-lang="en-US" level="2">Syntax:</paragraph>
|
|
<bascode>
|
|
<paragraph role="bascode" localize="false" id="par_id3154123" xml-lang="en-US">Err</paragraph>
|
|
</bascode>
|
|
<paragraph role="heading" id="hd_id3147229" xml-lang="en-US" level="2">Return value:</paragraph>
|
|
<paragraph role="paragraph" id="par_id3150869" xml-lang="en-US">Integer</paragraph>
|
|
<paragraph role="heading" id="hd_id3153193" xml-lang="en-US" level="2">Parameters:</paragraph>
|
|
<paragraph role="paragraph" id="par_id3149561" xml-lang="en-US">The Err function is used in error-handling routines to determine the error and the corrective action.</paragraph>
|
|
<paragraph role="heading" id="hd_id3147317" xml-lang="en-US" level="2">Example:</paragraph>
|
|
<bascode>
|
|
<paragraph role="bascode" id="par_id3153727" xml-lang="en-US" localize="false">Sub ExampleError</paragraph>
|
|
<paragraph role="bascode" id="par_id3147426" xml-lang="en-US">On Error Goto ErrorHandler REM Set up error handler</paragraph>
|
|
<paragraph role="bascode" id="par_id3163710" xml-lang="en-US" localize="false">Dim iVar as Integer</paragraph>
|
|
<paragraph role="bascode" id="par_id3153093" xml-lang="en-US" localize="false">Dim sVar As String</paragraph>
|
|
<paragraph role="bascode" id="par_id3149481" xml-lang="en-US">REM Error occurs due to non-existent file</paragraph>
|
|
<paragraph role="bascode" id="par_id3153190" xml-lang="en-US" localize="false"> iVar = Freefile</paragraph>
|
|
<paragraph role="bascode" id="par_id3146120" xml-lang="en-US" localize="false"> Open "\file9879.txt" for Input as #iVar</paragraph>
|
|
<paragraph role="bascode" id="par_id3155308" xml-lang="en-US" localize="false"> Line Input #iVar, sVar</paragraph>
|
|
<paragraph role="bascode" id="par_id3153142" xml-lang="en-US" localize="false"> Close #iVar</paragraph>
|
|
<paragraph role="bascode" id="par_id3149665" xml-lang="en-US" localize="false">Exit Sub</paragraph>
|
|
<paragraph role="bascode" id="par_id3154942" xml-lang="en-US" localize="false">ErrorHandler:</paragraph>
|
|
<paragraph role="bascode" id="par_id3145646" xml-lang="en-US"> MsgBox "Error " & Err & ": " & Error$ + chr(13) + "At line : " + Erl + chr(13) + Now , 16 ,"an error occurred"</paragraph>
|
|
<paragraph role="bascode" id="par_id3155418" xml-lang="en-US" localize="false">End Sub</paragraph>
|
|
</bascode>
|
|
<section id="relatedtopics">
|
|
<embed href="text/sbasic/shared/03050000.xhp#ErrHandlingh1"/>
|
|
</section>
|
|
</body>
|
|
</helpdocument> |