Files
help/source/text/shared/guide/qrcode.xhp
Ilmari Lauhakangas 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

66 lines
4.2 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<helpdocument version="1.0">
<!--
* 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/.
*
-->
<meta>
<topic id="qrcodetopic" indexer="include" status="PUBLISH">
<title id="tit" xml-lang="en-US">QR and Barcode</title>
<filename>/text/shared/guide/qrcode.xhp</filename>
</topic>
</meta>
<body>
<bookmark xml-lang="en-US" branch="index" id="bm_id901566317201860">
<bookmark_value>QR code;barcode</bookmark_value>
</bookmark>
<section id="qrcodeh1">
<h1 id="hd_id461566315781439"><link href="text/shared/guide/qrcode.xhp">QR and Barcode</link></h1>
<bookmark id="bm_id971566315781438" xml-lang="en-US" branch="hid/cui/ui/qrcodegen/QrCodeGenDialog" localize="false"/>
<bookmark id="bm_id971566315781436" xml-lang="en-US" branch="hid/cui/ui/qrcodegen/@@nowidget@@" localize="false"/>
<paragraph id="par_id381566315781439" role="paragraph" xml-lang="en-US">Generate linear and matrix codes for any text or URL.</paragraph>
</section>
<paragraph role="paragraph" id="par_id411566316109551">The QR and Barcode generation feature allows you to encode any text string or URL as a barcode or a QR code and insert it as a graphical object in a document for scanning.</paragraph>
<section id="howtoget">
<embed href="text/shared/00/00000404.xhp#qrcode"/>
</section>
<h2 id="hd_id611566316506278">URL or text</h2>
<bookmark id="bm_id97156631571" xml-lang="en-US" branch="hid/cui/ui/qrcodegen/edit_text" localize="false"/>
<paragraph role="paragraph" id="par_id251566316519649">The text from which to generate the code.</paragraph>
<h2 id="hd_id701566317347416">Error correction</h2>
<paragraph role="paragraph" id="par_id281566317365617">The error correction value for the QR Code that is to be created. The error correction of a QR code is a measure that helps a QR code to recover if it is damaged.</paragraph>
<paragraph role="paragraph" id="par_id781566317374864">There are four standard error correction values.</paragraph>
<bookmark id="bm_id97156631573" xml-lang="en-US" branch="hid/cui/ui/qrcodegen/button_low" localize="false"/>
<bookmark id="bm_id97156631574" xml-lang="en-US" branch="hid/cui/ui/qrcodegen/button_medium" localize="false"/>
<bookmark id="bm_id97156631575" xml-lang="en-US" branch="hid/cui/ui/qrcodegen/button_quartile" localize="false"/>
<bookmark id="bm_id97156631576" xml-lang="en-US" branch="hid/cui/ui/qrcodegen/button_high" localize="false"/>
<list type="unordered">
<listitem>
<paragraph id="par_id271566316757549" role="listitem"><emph>Low</emph>: 7% of codewords can be restored.</paragraph>
</listitem>
<listitem>
<paragraph id="par_id751566316834436" role="listitem"><emph>Medium</emph>: 15% of codewords can be restored.</paragraph>
</listitem>
<listitem>
<paragraph id="par_id481566316843503" role="listitem"><emph>Quartile</emph>: 25% of codewords can be restored.</paragraph>
</listitem>
<listitem>
<paragraph id="par_id641566316849901" role="listitem"><emph>High</emph>: 30% of codewords can be restored.</paragraph>
</listitem>
</list>
<h2 id="hd_id701566316879046">Margin</h2>
<bookmark id="bm_id97156631572" xml-lang="en-US" branch="hid/cui/ui/qrcodegen/edit_margin" localize="false"/>
<paragraph role="paragraph" id="par_id981566316947064">The width of the margin surrounding the code.</paragraph>
<h2 id="hd_id761566322212787">Example</h2>
<paragraph role="paragraph" id="par_id401566321281041">The QR code below was generated for the text <literal>www.libreoffice.org</literal>:</paragraph>
<paragraph role="paragraph" id="par_id561566321218295" xml-lang="en-US">
<image src="media/helpimg/qrcode_example.svg" id="img_id991566321218295" width="4cm" height="4cm"><alt xml-lang="en-US" id="alt_id401566321218295">QR code example</alt></image>
</paragraph>
</body>
</helpdocument>