Debian Codegraph @

translations/manual/sv/xpath.po

raw
1 # SOME DESCRIPTIVE TITLE.
2 # Copyright (C) Kovid Goyal
3 # This file is distributed under the same license as the calibre package.
4 #
5 # Translators:
6 # efef6ec5b435a041fce803c7f8af77d2_2341d43, 2017
7 # Jonatan Nyberg, 2026
8 # Jonatan Nyberg, 2016-2017,2021-2022
9 # Jonatan Nyberg, 2019-2021
10 # efef6ec5b435a041fce803c7f8af77d2_2341d43, 2017
11 # Jonatan Nyberg, 2026
12 # Merarom <[email protected]>, 2014-2015
13 msgid ""
14 msgstr ""
15 "Project-Id-Version: calibre\n"
16 "Report-Msgid-Bugs-To: \n"
17 "POT-Creation-Date: 2026-07-30 18:07+0000\n"
18 "PO-Revision-Date: 2014-06-17 08:35+0000\n"
19 "Last-Translator: Jonatan Nyberg, 2026\n"
20 "Language-Team: Swedish (http://app.transifex.com/calibre/calibre/language/sv/)\n"
21 "MIME-Version: 1.0\n"
22 "Content-Type: text/plain; charset=UTF-8\n"
23 "Content-Transfer-Encoding: 8bit\n"
24 "Language: sv\n"
25 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
26
27 #: ../../../__w/calibre/calibre/manual/xpath.rst:4
28 msgid "XPath tutorial"
29 msgstr "XPath-introduktion"
30
31 #: ../../../__w/calibre/calibre/manual/xpath.rst:6
32 msgid ""
33 "In this tutorial, you will be given a gentle introduction to `XPath "
34 "<https://en.wikipedia.org/wiki/XPath>`_, a query language that can be used "
35 "to select arbitrary parts of `HTML <https://en.wikipedia.org/wiki/HTML>`_ "
36 "documents in calibre. XPath is a widely used standard, and googling it will "
37 "yield a ton of information. This tutorial, however, focuses on using XPath "
38 "for e-book related tasks like finding chapter headings in an unstructured "
39 "HTML document."
40 msgstr "I den här handledningen får du en lättillgänglig introduktion till `XPath <https://en.wikipedia.org/wiki/XPath>`_, ett frågespråk som kan användas för att välja valfria delar av `HTML <https://en.wikipedia.org/wiki/HTML>`_-dokument i calibre. XPath är en etablerad standard och det finns mycket information om språket på internet. Den här handledningen fokuserar på hur XPath används för e-boksrelaterade uppgifter, till exempel för att hitta kapitelrubriker i ett ostrukturerat HTML-dokument."
41
42 #: ../../../__w/calibre/calibre/manual/xpath.rst:16
43 msgid "Contents"
44 msgstr "Innehåll"
45
46 #: ../../../__w/calibre/calibre/manual/xpath.rst:19
47 msgid "Selecting by tag name"
48 msgstr "Välja efter taggnamn"
49
50 #: ../../../__w/calibre/calibre/manual/xpath.rst:21
51 msgid ""
52 "The simplest form of selection is to select tags by name. For example, "
53 "suppose you want to select all the ``<h2>`` tags in a document. The XPath "
54 "query for this is simply::"
55 msgstr "Det enklaste är att välja taggar efter namn. Anta till exempel att du vill välja alla ``<h2>``-taggar i ett dokument. XPath-uttrycket är då helt enkelt::"
56
57 #: ../../../__w/calibre/calibre/manual/xpath.rst:27
58 msgid ""
59 "The prefix `//` means *search at any level of the document*. Now suppose you"
60 " want to search for ``<span>`` tags that are inside ``<a>`` tags. That can "
61 "be achieved with::"
62 msgstr "Prefixet `//` betyder *sök på valfri nivå i dokumentet*. Anta nu att du vill söka efter ``<span>``-taggar som finns inuti ``<a>``-taggar. Det kan göras med::"
63
64 #: ../../../__w/calibre/calibre/manual/xpath.rst:33
65 msgid ""
66 "If you want to search for tags at a particular level in the document, change"
67 " the prefix::"
68 msgstr "Om du vill söka efter taggar på en viss nivå i dokumentet ändrar du prefixet::"
69
70 #: ../../../__w/calibre/calibre/manual/xpath.rst:39
71 msgid ""
72 "This will match only ``<p>A very short e-book to demonstrate the use of "
73 "XPath.</p>`` in the :ref:`sample_ebook` but not any of the other ``<p>`` "
74 "tags. The ``h:`` prefix in the above examples is needed to match XHTML tags."
75 " This is because internally, calibre represents all content as XHTML. In "
76 "XHTML tags have a *namespace*, and ``h:`` is the namespace prefix for HTML "
77 "tags."
78 msgstr "Detta matchar endast ``<p>A very short e-book to demonstrate the use of XPath.</p>`` i :ref:`sample_ebook`, inte någon av de andra ``<p>``-taggarna. Prefixet ``h:`` i exemplen ovan krävs för att matcha XHTML-taggar. Det beror på att calibre internt representerar allt innehåll som XHTML. I XHTML tillhör taggar ett *namnområde*, och ``h:`` är namnrymdsprefixet för HTML-taggar."
79
80 #: ../../../__w/calibre/calibre/manual/xpath.rst:45
81 msgid ""
82 "Now suppose you want to select both ``<h1>`` and ``<h2>`` tags. To do that, "
83 "we need an XPath construct called *predicate*. A :dfn:`predicate` is simply "
84 "a test that is used to select tags. Tests can be arbitrarily powerful and as"
85 " this tutorial progresses, you will see more powerful examples. A predicate "
86 "is created by enclosing the test expression in square brackets::"
87 msgstr "Anta nu att du vill välja både ``<h1>``- och ``<h2>``-taggar. Då behöver vi en XPath-konstruktion som kallas *predikat*. Ett :dfn:`predikat` är ett villkor som används för att välja taggar. Villkoren kan vara godtyckligt avancerade, och längre fram i handledningen visas kraftfullare exempel. Ett predikat skapas genom att omge villkorsuttrycket med hakparenteser::"
88
89 #: ../../../__w/calibre/calibre/manual/xpath.rst:53
90 msgid ""
91 "There are several new features in this XPath expression. The first is the "
92 "use of the wildcard ``*``. It means *match any tag*. Now look at the test "
93 "expression ``name()='h1' or name()='h2'``. :term:`name()` is an example of a"
94 " *built-in function*. It simply evaluates to the name of the tag. So by "
95 "using it, we can select tags whose names are either `h1` or `h2`. Note that "
96 "the :term:`name()` function ignores namespaces so that there is no need for "
97 "the ``h:`` prefix. XPath has several useful built-in functions. A few more "
98 "will be introduced in this tutorial."
99 msgstr "Det finns flera nya delar i XPath-uttrycket. Den första är jokertecknet ``*``, som betyder *matcha valfri tagg*. Titta sedan på villkorsuttrycket ``name()='h1' or name()='h2'``. :term:`name()` är en *inbyggd funktion* som returnerar taggens namn. Med den kan vi välja taggar vars namn är antingen `h1` eller `h2`. Funktionen :term:`name()` ignorerar namnrymder, så prefixet ``h:`` behövs inte. XPath har flera användbara inbyggda funktioner. Några fler presenteras i den här handledningen."
100
101 #: ../../../__w/calibre/calibre/manual/xpath.rst:62
102 msgid "Selecting by attributes"
103 msgstr "Välja efter attribut"
104
105 #: ../../../__w/calibre/calibre/manual/xpath.rst:64
106 msgid ""
107 "To select tags based on their attributes, the use of predicates is "
108 "required::"
109 msgstr "För att välja taggar utifrån deras attribut krävs predikat::"
110
111 #: ../../../__w/calibre/calibre/manual/xpath.rst:70
112 msgid ""
113 "Here, the ``@`` operator refers to the attributes of the tag. You can use "
114 "some of the `XPath built-in functions`_ to perform more sophisticated "
115 "matching on attribute values."
116 msgstr "Här hänvisar operatorn ``@`` till taggens attribut. Du kan använda några av `XPaths inbyggda funktioner`_ för att göra mer avancerade matchningar av attributvärden."
117
118 #: ../../../__w/calibre/calibre/manual/xpath.rst:76
119 msgid "Selecting by tag content"
120 msgstr "Välja efter tagginnehåll"
121
122 #: ../../../__w/calibre/calibre/manual/xpath.rst:78
123 msgid ""
124 "Using XPath, you can even select tags based on the text they contain. The "
125 "best way to do this is to use the power of *regular expressions* via the "
126 "built-in function :term:`re:test()`::"
127 msgstr "Med XPath kan du även välja taggar utifrån den text de innehåller. Det bästa sättet är att använda *reguljära uttryck* via den inbyggda funktionen :term:`re:test()`::"
128
129 #: ../../../__w/calibre/calibre/manual/xpath.rst:84
130 msgid ""
131 "Here the ``.`` operator refers to the contents of the tag, just as the ``@``"
132 " operator referred to its attributes."
133 msgstr "Här hänvisar ``.``-operatören till innehållet i taggen, precis som ``@``-operatören avser dess attribut."
134
135 #: ../../../__w/calibre/calibre/manual/xpath.rst:90
136 msgid "Sample e-book"
137 msgstr "Exempel-e-bok"
138
139 #: ../../../__w/calibre/calibre/manual/xpath.rst:96
140 msgid "XPath built-in functions"
141 msgstr "XPaths inbyggda funktioner"
142
143 #: ../../../__w/calibre/calibre/manual/xpath.rst:99
144 msgid "name()"
145 msgstr "name()"
146
147 #: ../../../__w/calibre/calibre/manual/xpath.rst:101
148 msgid "The name of the current tag."
149 msgstr "Namnet på den aktuella taggen."
150
151 #: ../../../__w/calibre/calibre/manual/xpath.rst:102
152 msgid "contains()"
153 msgstr "contains()"
154
155 #: ../../../__w/calibre/calibre/manual/xpath.rst:104
156 msgid "``contains(s1, s2)`` returns `true` if s1 contains s2."
157 msgstr "``contains(s1, s2)`` returnerar `true` om s1 innehåller s2."
158
159 #: ../../../__w/calibre/calibre/manual/xpath.rst:105
160 msgid "re:test()"
161 msgstr "re:test()"
162
163 #: ../../../__w/calibre/calibre/manual/xpath.rst:107
164 msgid ""
165 "``re:test(src, pattern, flags)`` returns `true` if the string `src` matches "
166 "the regular expression `pattern`. A particularly useful flag is ``i``, it "
167 "makes matching case insensitive. A good primer on the syntax for regular "
168 "expressions can be found at `regexp syntax "
169 "<https://docs.python.org/library/re.html>`_"
170 msgstr "``re:test(src, pattern, flags)`` returnerar `true` om strängen `src` matchar det reguljära uttrycket `pattern`. En särskilt användbar flagga är ``i``, som gör matchningen skiftlägesokänslig. En bra introduktion till syntaxen finns i `Python-dokumentationen <https://docs.python.org/library/re.html>`_."