Debian Codegraph @

translations/manual/sv/template_lang.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 # Jonatan Nyberg, 2025
7 # efef6ec5b435a041fce803c7f8af77d2_2341d43, 2017
8 # Henrik Mattsson-Mårn <[email protected]>, 2025
9 # Jonatan Nyberg, 2025
10 # Jonatan Nyberg, 2025-2026
11 # Jonatan Nyberg, 2016-2017,2021-2024,2026
12 # Jonatan Nyberg, 2018-2021
13 # efef6ec5b435a041fce803c7f8af77d2_2341d43, 2017-2018
14 # efef6ec5b435a041fce803c7f8af77d2_2341d43, 2017
15 # Jonatan Nyberg, 2026
16 # Merarom <[email protected]>, 2014-2017
17 # Sebastian Rasmussen <[email protected]>, 2018
18 msgid ""
19 msgstr ""
20 "Project-Id-Version: calibre\n"
21 "Report-Msgid-Bugs-To: \n"
22 "POT-Creation-Date: 2026-09-16 15:05+0000\n"
23 "PO-Revision-Date: 2014-06-17 08:34+0000\n"
24 "Last-Translator: Sebastian Rasmussen <[email protected]>, 2018\n"
25 "Language-Team: Swedish (http://app.transifex.com/calibre/calibre/language/sv/)\n"
26 "MIME-Version: 1.0\n"
27 "Content-Type: text/plain; charset=UTF-8\n"
28 "Content-Transfer-Encoding: 8bit\n"
29 "Language: sv\n"
30 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
31
32 #: ../../../__w/calibre/calibre/manual/template_lang.rst:4
33 msgid "The calibre template language"
34 msgstr "Mallspråket för calibre"
35
36 #: ../../../__w/calibre/calibre/manual/template_lang.rst:6
37 msgid ""
38 "The calibre template language is a calibre-specific language used throughout"
39 " calibre for tasks such as specifying file paths, formatting values, and "
40 "computing the value for user-specified columns. Examples:"
41 msgstr "calibre-mallspråket är ett calibre-specifikt språk som används i hela calibre för uppgifter som att specificera filsökvägar, formatera värden och beräkna värdet för användarspecificerade kolumner. Exempel:"
42
43 #: ../../../__w/calibre/calibre/manual/template_lang.rst:8
44 msgid ""
45 "Specify the folder structure and file names when saving files from the "
46 "calibre library to the disk or e-book reader."
47 msgstr "Ange mappstruktur och filnamn när du sparar filer från calibre-biblioteket till disken eller e-bokläsenheten."
48
49 #: ../../../__w/calibre/calibre/manual/template_lang.rst:9
50 msgid "Define rules for adding icons and colors to the calibre book list."
51 msgstr "Definiera regler för att lägga till ikoner och färger till calibre-boklistan."
52
53 #: ../../../__w/calibre/calibre/manual/template_lang.rst:10
54 msgid "Define `virtual columns` that contain data from other columns."
55 msgstr "Definiera `virtuella kolumner` som innehåller data från andra kolumner."
56
57 #: ../../../__w/calibre/calibre/manual/template_lang.rst:11
58 msgid "Advanced library searching."
59 msgstr "Avancerad bibliotekssökning."
60
61 #: ../../../__w/calibre/calibre/manual/template_lang.rst:12
62 msgid "Advanced metadata search and replace."
63 msgstr "Avancerad sökning och ersättning av metadata."
64
65 #: ../../../__w/calibre/calibre/manual/template_lang.rst:14
66 msgid ""
67 "The language is built around the notion of a `template`, which specifies "
68 "which book metadata to use, computations on that metadata, and how it is to "
69 "be formatted."
70 msgstr "Språket bygger på begreppet `mall`, som anger vilka bokmetadata som ska användas, vilka beräkningar som ska utföras på dem och hur resultatet ska formateras."
71
72 #: ../../../__w/calibre/calibre/manual/template_lang.rst:17
73 msgid "Basic templates"
74 msgstr "Grundläggande mallar"
75
76 #: ../../../__w/calibre/calibre/manual/template_lang.rst:19
77 msgid ""
78 "A basic template consists of one or more ``template expressions``. A "
79 "``template expression`` consists of text and names in curly brackets "
80 "(``{}``) that is replaced by the corresponding metadata from the book being "
81 "processed. For example, the default template in calibre used for saving "
82 "books to device has 4 ``template expressions``::"
83 msgstr "En grundläggande mall består av ett eller flera ``malluttryck``. Ett ``malluttryck`` består av text och namn inom klammerparenteser (``{}``) som ersätts av motsvarande metadata från boken som bearbetas. Till exempel har standardmallen i calibre som används för att spara böcker till enheten fyra ``malluttryck``::"
84
85 #: ../../../__w/calibre/calibre/manual/template_lang.rst:23
86 msgid "For the book \"The Foundation\" by \"Isaac Asimov\" the template will become::"
87 msgstr "För boken \"The Foundation\" av \"Isaac Asimov\" blir mallen::"
88
89 #: ../../../__w/calibre/calibre/manual/template_lang.rst:27
90 msgid ""
91 "The slashes are not ``template expressions`` because they are not in between"
92 " ``{}``. Such text is left where it appears. For example, if the template "
93 "is::"
94 msgstr "Snedstreck är inte ``malluttryck`` eftersom de inte finns mellan ``{}``. Sådan text lämnas där den visas. Till exempel, om mallen är::"
95
96 #: ../../../__w/calibre/calibre/manual/template_lang.rst:31
97 msgid "then for \"The Foundation\" the template produces::"
98 msgstr "ger mallen följande resultat för ”The Foundation”::"
99
100 #: ../../../__w/calibre/calibre/manual/template_lang.rst:35
101 msgid ""
102 "A ``template expression`` can access all the metadata available in calibre, "
103 "including custom columns (columns you create yourself), by using a column's "
104 "``lookup name``. To find the lookup name for a `column` (sometimes called "
105 "`fields`), hover your mouse over the column header in calibre's book list. "
106 "Lookup names for custom columns always begin with ``#``. For series type "
107 "columns there is an additional field named ``#lookup name_index`` that is "
108 "the series index for that book in the series. For example, if you have a "
109 "custom series column named ``#myseries``, there will also be a column named "
110 "``#myseries_index``. The standard series column's index is named "
111 "``series_index``."
112 msgstr "Ett ``malluttryck`` kan komma åt alla metadata som finns tillgängliga i calibre, inklusive anpassade kolumner (kolumner du skapar själv), genom att använda en kolumns ``lookup name``. För att hitta söknamnet för en `kolumn` (ibland kallad `fält`), håll muspekaren över kolumnrubriken i calibres boklista. Söknamn för anpassade kolumner börjar alltid med ``#``. För kolumner av serietyp finns det ett ytterligare fält med namnet ``#lookup name_index`` som är serieindexet för den boken i serien. Om du till exempel har en anpassad seriekolumn med namnet ``#myseries`` kommer det också att finnas en kolumn med namnet ``#myseries_index``. Standardseriekolumnens index heter ``series_index``."
113
114 #: ../../../__w/calibre/calibre/manual/template_lang.rst:37
115 msgid "In addition to the standard column based fields, you also can use:"
116 msgstr "Utöver de vanliga kolumnbaserade fälten kan du också använda:"
117
118 #: ../../../__w/calibre/calibre/manual/template_lang.rst:39
119 msgid ""
120 "``{formats}`` - A list of formats available in the calibre library for a "
121 "book"
122 msgstr "``{formats}`` - En lista över format tillgängliga i calibre-biblioteket för en bok"
123
124 #: ../../../__w/calibre/calibre/manual/template_lang.rst:40
125 msgid "``{identifiers:select(isbn)}`` - The ISBN of the book"
126 msgstr "``{identifiers:select(isbn)}`` - Bokens ISBN"
127
128 #: ../../../__w/calibre/calibre/manual/template_lang.rst:42
129 msgid ""
130 "If the metadata for the field for a given book is not defined then the field"
131 " in the template is replaced by the empty string (``''``). For example, "
132 "consider the following template::"
133 msgstr "Om metadata för fältet för en given bok inte är definierad ersätts fältet i mallen med den tomma strängen (``''``). Tänk till exempel på följande mall::"
134
135 #: ../../../__w/calibre/calibre/manual/template_lang.rst:46
136 msgid ""
137 "If Asimov's book \"Second Foundation\" is in the series \"Foundation\" then "
138 "the template produces::"
139 msgstr "Om Asimovs bok \"Second Foundation\" finns i serien \"Foundation\" så producerar mallen::"
140
141 #: ../../../__w/calibre/calibre/manual/template_lang.rst:50
142 msgid ""
143 "If a series has not been entered for the book then the template produces::"
144 msgstr "Om en serie inte har angetts för boken producerar mallen::"
145
146 #: ../../../__w/calibre/calibre/manual/template_lang.rst:54
147 msgid ""
148 "The template processor automatically removes multiple slashes and leading or"
149 " trailing spaces."
150 msgstr "Mallprocessorn tar automatiskt bort flera snedstreck och inledande eller efterföljande mellanslag."
151
152 #: ../../../__w/calibre/calibre/manual/template_lang.rst:57
153 msgid "Advanced formatting"
154 msgstr "Avancerad formatering"
155
156 #: ../../../__w/calibre/calibre/manual/template_lang.rst:59
157 msgid ""
158 "In addition to metadata substitution, templates can conditionally include "
159 "additional text and control how substituted data is formatted."
160 msgstr "Förutom ersättning av metadata kan mallar villkorligt innehålla ytterligare text och styra hur ersatt data formateras."
161
162 #: ../../../__w/calibre/calibre/manual/template_lang.rst:61
163 msgid "**Conditionally including text**"
164 msgstr "**Villkorligt inkludera text**"
165
166 #: ../../../__w/calibre/calibre/manual/template_lang.rst:63
167 msgid ""
168 "Sometimes you want text to appear in the output only if a field is not "
169 "empty. A common case is ``series`` and ``series_index`` where you want "
170 "either nothing or the two values separated by a hyphen. calibre handles this"
171 " case using a special ``template expression`` syntax."
172 msgstr "Ibland vill du att text bara ska visas i utdata om ett fält inte är tomt. Ett vanligt fall är ``series`` och ``series_index``, där du vill ha antingen ingenting eller båda värdena åtskilda av ett bindestreck. calibre hanterar detta med en särskild syntax för ``malluttryck``."
173
174 #: ../../../__w/calibre/calibre/manual/template_lang.rst:65
175 msgid ""
176 "For example and using the above Foundation example, assume you want the "
177 "template to produce `Foundation - 3 - Second Foundation`. This template "
178 "produces that output:"
179 msgstr "Till exempel, och med hjälp av ovanstående Foundation-exempel, anta att du vill att mallen ska producera `Foundation - 3 - Second Foundation`. Den här mallen producerar följande utmatning:"
180
181 #: ../../../__w/calibre/calibre/manual/template_lang.rst:67
182 msgid "``{series} - {series_index} - {title}``"
183 msgstr "``{series} - {series_index} - {title}``"
184
185 #: ../../../__w/calibre/calibre/manual/template_lang.rst:69
186 msgid ""
187 "However, if a book has no series the template will produce `- - the title`, "
188 "which is probably not what you want. Generally, people want the result be "
189 "the title without the extraneous hyphens. You can accomplish this using the "
190 "following template syntax:"
191 msgstr "Om en bok däremot inte har någon serie kommer mallen att producera `- - titeln`, vilket förmodligen inte är vad du vill ha. Generellt sett vill folk att resultatet ska vara titeln utan onödiga bindestreck. Du kan åstadkomma detta med hjälp av följande mallsyntax:"
192
193 #: ../../../__w/calibre/calibre/manual/template_lang.rst:71
194 msgid "``{field:|prefix_text|suffix_text}``"
195 msgstr "``{field:|prefix_text|suffix_text}``"
196
197 #: ../../../__w/calibre/calibre/manual/template_lang.rst:73
198 msgid ""
199 "This ``template expression`` says that if ``field`` has the value `XXXX` "
200 "then the result will be `prefix_textXXXXXsuffix_text`. If ``field`` is empty"
201 " (has no value) then the result will be the empty string (nothing) because "
202 "the prefix and suffix are ignored. The prefix and suffix can contain blanks."
203 msgstr "Detta ``malluttryck`` anger att om ``field`` har värdet `XXXX` blir resultatet `prefix_textXXXXXsuffix_text`. Om ``field`` är tomt (saknar värde) blir resultatet den tomma strängen, eftersom prefixet och suffixet ignoreras. Prefixet och suffixet kan innehålla mellanslag."
204
205 #: ../../../__w/calibre/calibre/manual/template_lang.rst:75
206 msgid ""
207 "**Do not use subtemplates (`{ ... }`) or functions (see below) in the prefix"
208 " or the suffix.**"
209 msgstr "**Använd inte undermallar (`{ ... }`) eller funktioner (se nedan) i prefixet eller suffixet.**"
210
211 #: ../../../__w/calibre/calibre/manual/template_lang.rst:77
212 msgid ""
213 "Using this syntax, we can solve the above no-series problem with the "
214 "template::"
215 msgstr "Med denna syntax kan vi lösa problemet ovan när boken saknar serie, med mallen::"
216
217 #: ../../../__w/calibre/calibre/manual/template_lang.rst:81
218 msgid ""
219 "The hyphens will be included only if the book has a series index, which it "
220 "has only if it has a series. Continuing the Foundation example again, the "
221 "template will produce `Foundation - 1 - Second Foundation`."
222 msgstr "Bindestreck inkluderas endast om boken har ett serieindex, vilket den bara har om den har en serie. Om du fortsätter med Foundation-exemplet igen kommer mallen att producera `Foundation - 1 - Second Foundation`."
223
224 #: ../../../__w/calibre/calibre/manual/template_lang.rst:83
225 #: ../../../__w/calibre/calibre/manual/template_lang.rst:293
226 #: ../../../__w/calibre/calibre/manual/template_lang.rst:469
227 msgid "Notes:"
228 msgstr "Anteckningar:"
229
230 #: ../../../__w/calibre/calibre/manual/template_lang.rst:85
231 msgid ""
232 "You must include the colon after the ``lookup name`` if you are using a "
233 "prefix or a suffix."
234 msgstr "Du måste ta med kolonet efter ``söknamnet`` om du använder ett prefix eller suffix."
235
236 #: ../../../__w/calibre/calibre/manual/template_lang.rst:86
237 msgid ""
238 "You must use either no or both ``|`` characters. Using one, as in ``{field:|"
239 " - }``, is not allowed."
240 msgstr "Du måste använda antingen inga eller båda ``|``-tecknen. Att använda ett av dem, som i ``{field:| - }``, är inte tillåtet."
241
242 #: ../../../__w/calibre/calibre/manual/template_lang.rst:87
243 msgid ""
244 "It is OK to provide no text for either the prefix or the suffix, such as in "
245 "``{series:|| - }``. The template ``{title:||}`` is the same as ``{title}``."
246 msgstr "Det är okej att inte ange någon text för vare sig prefixet eller suffixet, som i ``{series:|| - }``. Mallen ``{title:||}`` är densamma som ``{title}``."
247
248 #: ../../../__w/calibre/calibre/manual/template_lang.rst:89
249 msgid "**Formatting**"
250 msgstr "**Formatering**"
251
252 #: ../../../__w/calibre/calibre/manual/template_lang.rst:91
253 msgid ""
254 "Suppose you want the ``series_index`` to be formatted as three digits with "
255 "leading zeros. This does the trick:"
256 msgstr "Anta att du vill formatera ``series_index`` som tre siffror med inledande nollor. Använd då:"
257
258 #: ../../../__w/calibre/calibre/manual/template_lang.rst:93
259 msgid "``{series_index:0>3s}`` - Three digits with leading zeros"
260 msgstr "``{series_index:0>3s}`` - Tre siffror med inledande nollor"
261
262 #: ../../../__w/calibre/calibre/manual/template_lang.rst:95
263 msgid "For trailing zeros, use:"
264 msgstr "För efterföljande nollor, använd:"
265
266 #: ../../../__w/calibre/calibre/manual/template_lang.rst:97
267 msgid "``{series_index:0<3s}`` - Three digits with trailing zeros"
268 msgstr "``{series_index:0<3s}`` - Tre siffror med efterföljande nollor"
269
270 #: ../../../__w/calibre/calibre/manual/template_lang.rst:99
271 msgid ""
272 "If you use series indices with fractional values, e.g., 1.1, you might want "
273 "the decimal points to line up. For example, you might want the indices 1 and"
274 " 2.5 to appear as 01.00 and 02.50 so that they will sort correctly on a "
275 "device that does lexical sorting. To do this, use:"
276 msgstr "Om du använder serieindex med decimaler, till exempel 1.1, kanske du vill att decimalpunkterna ska stå under varandra. Du kan till exempel vilja visa indexen 1 och 2.5 som 01.00 och 02.50 så att de sorteras korrekt på en enhet som använder lexikografisk sortering. Använd då:"
277
278 #: ../../../__w/calibre/calibre/manual/template_lang.rst:101
279 msgid ""
280 "``{series_index:0>5.2f}`` - Five characters consisting of two digits with "
281 "leading zeros, a decimal point, then 2 digits after the decimal point."
282 msgstr "``{series_index:0>5.2f}`` – Fem tecken: två siffror med inledande nollor, en decimalpunkt och två siffror efter decimalpunkten."
283
284 #: ../../../__w/calibre/calibre/manual/template_lang.rst:103
285 msgid "If you want only the first two letters of the data, use:"
286 msgstr "Om du bara vill ha de två första bokstäverna i data, använd:"
287
288 #: ../../../__w/calibre/calibre/manual/template_lang.rst:105
289 msgid ""
290 "``{author_sort:.2}`` - Only the first two letters of the author sort name"
291 msgstr "``{author_sort:.2}`` – Endast de två första bokstäverna i författarens sorteringsnamn"
292
293 #: ../../../__w/calibre/calibre/manual/template_lang.rst:107
294 msgid ""
295 "Much of the calibre template language formatting comes from Python. For more"
296 " details on the syntax of these advanced formatting operations see the "
297 "`Python documentation "
298 "<https://docs.python.org/3/library/string.html#formatstrings>`_."
299 msgstr "Mycket av formateringen av calibre mallspråk kommer från Python. För mer information om syntaxen för dessa avancerade formateringsoperationer, se `Python-dokumentationen <https://docs.python.org/3/library/string.html#formatstrings>`_."
300
301 #: ../../../__w/calibre/calibre/manual/template_lang.rst:111
302 msgid "Using templates to define custom columns"
303 msgstr "Använda mallar för att definiera anpassade kolumner"
304
305 #: ../../../__w/calibre/calibre/manual/template_lang.rst:113
306 msgid ""
307 "Templates can be used to display information that isn't in calibre metadata,"
308 " or to display metadata differently from calibre's normal format. For "
309 "example, you might want to show the ``ISBN``, a field that calibre does not "
310 "display. You can accomplish this creating a custom column with the type "
311 "`Column built from other columns` (hereafter called `composite columns`) and"
312 " providing a template to generate the displayed text. The column will "
313 "display the result of evaluating the template. For example, to display the "
314 "ISBN, create the column and enter ``{identifiers:select(isbn)}`` in the "
315 "template box. To display a column containing the values of two series custom"
316 " columns, separated by a comma, use ``{#series1:||,}{#series2}``."
317 msgstr "Mallar kan användas för att visa information som inte finns i calibre-metadata, eller för att visa metadata på ett annat sätt än calibres normala format. Du kanske till exempel vill visa ``ISBN``, ett fält som calibre inte visar. Du kan åstadkomma detta genom att skapa en anpassad kolumn med typen `Kolumn byggd från andra kolumner` (hädanefter kallad `sammansatta kolumner`) och tillhandahålla en mall för att generera den visade texten. Kolumnen visar resultatet av utvärderingen av mallen. För att till exempel visa ISBN, skapa kolumnen och ange ``{identifiers:select(isbn)}`` i mallrutan. För att visa en kolumn som innehåller värdena för två anpassade seriekolumner, separerade med ett kommatecken, använd ``{#series1:||,}{#series2}``."
318
319 #: ../../../__w/calibre/calibre/manual/template_lang.rst:115
320 msgid "Composite columns can use any template option, including formatting."
321 msgstr "Sammansatta kolumner kan använda godtyckligt mallalternativ, även formatering."
322
323 #: ../../../__w/calibre/calibre/manual/template_lang.rst:117
324 msgid ""
325 "Note: You cannot edit the data displayed in a composite column. Instead you "
326 "edit the source columns. If you edit a composite column, for example by "
327 "double-clicking it, calibre will open the template for editing, not the "
328 "underlying data."
329 msgstr "Observera: Du kan inte redigera data som visas i en sammansatt kolumn. Redigera i stället källkolumnerna. Om du redigerar en sammansatt kolumn, till exempel genom att dubbelklicka på den, öppnar calibre mallen för redigering, inte underliggande data."
330
331 #: ../../../__w/calibre/calibre/manual/template_lang.rst:121
332 msgid "Templates and plugboards"
333 msgstr "Mallar och metadatakopplingar"
334
335 #: ../../../__w/calibre/calibre/manual/template_lang.rst:123
336 msgid ""
337 "Plugboards are used for changing the metadata written into books during "
338 "send-to-device and save-to-disk operations. A plugboard permits you to "
339 "specify a template to provide the data to write into the book's metadata. "
340 "You can use plugboards to modify the following fields: authors, author_sort,"
341 " language, publisher, tags, title, title_sort. This feature helps people who"
342 " want to use different metadata in books on devices to solve sorting or "
343 "display issues."
344 msgstr "Metadatakopplingar används för att ändra metadata som skrivs till böcker vid åtgärderna ”Skicka till enhet” och ”Spara till disk”. Med en metadatakoppling kan du ange en mall som genererar de data som ska skrivas till bokens metadata. Du kan ändra följande fält: authors, author_sort, language, publisher, tags, title och title_sort. Funktionen är användbar när du vill använda andra metadata i böcker på enheter för att lösa sorterings- eller visningsproblem."
345
346 #: ../../../__w/calibre/calibre/manual/template_lang.rst:125
347 msgid ""
348 "When you create a plugboard, you specify the format and device for which the"
349 " plugboard is to be used. A special device is provided, ``save_to_disk``, "
350 "that is used when saving formats (as opposed to sending them to a device). "
351 "Once you have chosen the format and device, you choose the metadata fields "
352 "to change, providing templates to supply the new values. These templates are"
353 " `connected` to their destination fields, hence the name `plugboards`. You "
354 "can of course use composite columns in these templates."
355 msgstr "När du skapar en metadatakoppling anger du vilket format och vilken enhet den ska användas för. Det finns en särskild enhet, ``save_to_disk``, som används när format sparas (i stället för att skickas till en enhet). När du har valt format och enhet väljer du vilka metadatafält som ska ändras och anger mallar som tillhandahåller de nya värdena. Mallarna är `anslutna` till sina målfält, därav namnet `metadatakopplingar`. Du kan naturligtvis använda sammansatta kolumner i dessa mallar."
356
357 #: ../../../__w/calibre/calibre/manual/template_lang.rst:127
358 msgid ""
359 "Plugboards are quite flexible and can be written in Single Function Mode, "
360 "Template Program Mode, General Program Mode, or Python Template mode."
361 msgstr "Metadatakopplingar är mycket flexibla och kan skrivas i enkelt funktionsläge, mallprogramläge, allmänt programläge eller Python-malläge."
362
363 #: ../../../__w/calibre/calibre/manual/template_lang.rst:129
364 msgid ""
365 "When a plugboard might apply (Content server, save to disk, or send to "
366 "device), calibre searches the defined plugboards to choose the correct one "
367 "for the given format and device. For example, to find the appropriate "
368 "plugboard for an EPUB book being sent to an ANDROID device, calibre searches"
369 " the plugboards using the following search order:"
370 msgstr "När en metadatakoppling kan användas (i innehållsservern, vid sparande till disk eller vid sändning till enhet) söker calibre bland de definierade metadatakopplingarna efter den som passar formatet och enheten. För en EPUB-bok som skickas till en Android-enhet används till exempel följande sökordning:"
371
372 #: ../../../__w/calibre/calibre/manual/template_lang.rst:133
373 msgid ""
374 "a plugboard with an exact match on format and device, e.g., ``EPUB`` and "
375 "``ANDROID``"
376 msgstr "en metadatakoppling med en exakt matchning på format och enhet, till exempel ``EPUB`` och ``ANDROID``"
377
378 #: ../../../__w/calibre/calibre/manual/template_lang.rst:134
379 msgid ""
380 "a plugboard with an exact match on format and the special ``any device`` "
381 "choice, e.g., ``EPUB`` and ``any device``"
382 msgstr "en metadatakoppling med exakt matchande format och det speciella alternativet ``valfri enhet``, t.ex. ``EPUB`` och ``valfri enhet``"
383
384 #: ../../../__w/calibre/calibre/manual/template_lang.rst:135
385 msgid ""
386 "a plugboard with the special ``any format`` choice and an exact match on "
387 "device, e.g., ``any format`` and ``ANDROID``"
388 msgstr "en metadatakoppling med det speciella valet ``valfritt format`` och en exakt matchning på enheten, t.ex. ``valfritt format`` och ``ANDROID``"
389
390 #: ../../../__w/calibre/calibre/manual/template_lang.rst:136
391 msgid "a plugboard with ``any format`` and ``any device``"
392 msgstr "en metadatakoppling med ``valfritt format`` och ``valfri enhet``"
393
394 #: ../../../__w/calibre/calibre/manual/template_lang.rst:138
395 msgid ""
396 "The tags and authors fields have special treatment, because both of these "
397 "fields can hold more than one item. A book can have many tags and many "
398 "authors. When you specify that one of these two fields is to be changed, the"
399 " template's result is examined to see if more than one item is there. For "
400 "tags, the result is cut apart wherever calibre finds a comma. For example, "
401 "if the template produces the value ``Thriller, Horror``, then the result "
402 "will be two tags, ``Thriller`` and ``Horror``. There is no way to put a "
403 "comma in the middle of a tag."
404 msgstr "Fälten för taggar och författare behandlas särskilt, eftersom båda kan innehålla flera värden. En bok kan ha flera taggar och flera författare. När du anger att något av dessa fält ska ändras undersöks mallens resultat för att avgöra om det innehåller flera värden. För taggar delas resultatet vid varje kommatecken. Om mallen exempelvis ger värdet ``Thriller, Horror`` blir resultatet de två taggarna ``Thriller`` och ``Horror``. Det går inte att använda ett kommatecken inuti en enskild tagg."
405
406 #: ../../../__w/calibre/calibre/manual/template_lang.rst:141
407 msgid ""
408 "The same thing happens for authors, but using a different character for the "
409 "cut, a `&` (ampersand) instead of a comma. For example, if the template "
410 "produces the value ``Blogs, Joe&Posts, Susan``, then the book will end up "
411 "with two authors, ``Blogs, Joe`` and ``Posts, Susan``. If the template "
412 "produces the value ``Blogs, Joe;Posts, Susan``, then the book will have one "
413 "author with a rather strange name."
414 msgstr "Samma sak gäller för författare, men då används ett annat avgränsningstecken: ett `&` (et-tecken) i stället för ett kommatecken. Om mallen exempelvis ger värdet ``Blogs, Joe&Posts, Susan`` får boken två författare: ``Blogs, Joe`` och ``Posts, Susan``. Om mallen ger värdet ``Blogs, Joe;Posts, Susan`` får boken i stället en enda författare med ett ganska märkligt namn."
415
416 #: ../../../__w/calibre/calibre/manual/template_lang.rst:143
417 msgid ""
418 "Plugboards affect the metadata written into the book when it is saved to "
419 "disk or written to the device. Plugboards do not affect the metadata used by"
420 " ``save to disk`` and ``send to device`` to create the file names. Instead, "
421 "file names are constructed using the templates entered on the appropriate "
422 "preferences window."
423 msgstr "Metadatakopplingar påverkar metadata som skrivs in i boken när den sparas till disk eller skrivs till enheten. Metadatakopplingar påverkar inte metadata som används av ``spara till disk`` och ``skicka till enhet`` för att skapa filnamnen. I stället konstrueras filnamn med hjälp av mallar som anges i lämpliga inställningsfönster."
424
425 #: ../../../__w/calibre/calibre/manual/template_lang.rst:148
426 msgid "Using functions in templates - Single Function Mode"
427 msgstr "Använda funktioner i mallar – enkelt funktionsläge"
428
429 #: ../../../__w/calibre/calibre/manual/template_lang.rst:150
430 msgid ""
431 "Suppose you want to display the value of a field in upper case when that "
432 "field is normally in title case. You can do this using `template functions`."
433 " For example, to display the title in upper case use the ``uppercase`` "
434 "function, as in ``{title:uppercase()}``. To display it in title case, use "
435 "``{title:titlecase()}``."
436 msgstr "Anta att du vill visa värdet i ett fält med versaler när fältet normalt skrivs med inledande versal i varje ord. Du kan göra detta med `mallfunktioner`. Om du till exempel vill visa titeln med versaler använder du funktionen ``uppercase``, som i ``{title:uppercase()}``. Om du vill visa den med inledande versal i varje ord använder du ``{title:titlecase()}``."
437
438 #: ../../../__w/calibre/calibre/manual/template_lang.rst:152
439 msgid ""
440 "Functions go into the format part of the template, after the ``:`` and "
441 "before the first ``|`` or the closing ``}`` if no prefix/suffix is used. If "
442 "you have both a format and a function reference, the function comes after a "
443 "second ``:``. Functions return the value of the column specified in the "
444 "template, suitably modified."
445 msgstr "Funktioner placeras i mallens formatdel, efter ``:`` och före det första ``|`` eller den avslutande ``}`` om inget prefix eller suffix används. Om du har både ett format och en funktionsreferens placeras funktionen efter ett andra ``:``. Funktioner returnerar värdet i kolumnen som anges i mallen, ändrat på lämpligt sätt."
446
447 #: ../../../__w/calibre/calibre/manual/template_lang.rst:154
448 msgid "The syntax for using functions is one of::"
449 msgstr "Syntaxen för att använda funktioner är en av::"
450
451 #: ../../../__w/calibre/calibre/manual/template_lang.rst:161
452 msgid ""
453 "Function names must always be followed by opening and closing parentheses. "
454 "Some functions require extra values (arguments), and these go inside the "
455 "parentheses. Arguments are separated by commas. Literal commas (commas as "
456 "text, not argument separators) must be preceded by a backslash (``\\``) . "
457 "The last (or only) argument cannot contain a textual closing parenthesis."
458 msgstr "Funktionsnamn måste alltid följas av inledande och avslutande parenteser. Vissa funktioner kräver extra värden (argument), som anges inom parenteserna. Argument avgränsas med kommatecken. Bokstavliga kommatecken (kommatecken som text, inte argumentavgränsare) måste föregås av ett omvänt snedstreck (``\\``). Det sista (eller enda) argumentet får inte innehålla en avslutande parentes som text."
459
460 #: ../../../__w/calibre/calibre/manual/template_lang.rst:163
461 msgid ""
462 "Functions are evaluated before format specifications and the prefix/suffix. "
463 "See further down for an example of using both a format and a function."
464 msgstr "Funktioner utvärderas före formatspecifikationerna och prefixet/suffixet. Längre ned finns ett exempel där både ett format och en funktion används."
465
466 #: ../../../__w/calibre/calibre/manual/template_lang.rst:165
467 msgid ""
468 "**Important**: If you have programming experience, please note that the "
469 "syntax in `Single Function Mode` is not what you expect. Strings are not "
470 "quoted and spaces are significant. All arguments are considered to be "
471 "constants; there are no expressions."
472 msgstr "**Viktigt**: Om du har programmeringserfarenhet bör du observera att syntaxen i `enkelt funktionsläge` inte fungerar som du kanske förväntar dig. Strängar omges inte av citattecken och blanksteg har betydelse. Alla argument betraktas som konstanter; det finns inga uttryck."
473
474 #: ../../../__w/calibre/calibre/manual/template_lang.rst:167
475 msgid ""
476 "**Do not use subtemplates (`{ ... }`) as function arguments.** Instead, use "
477 ":ref:`Template Program Mode <template_mode>` and :ref:`General Program Mode "
478 "<general_mode>`."
479 msgstr "**Använd inte undermallar (`{ ... }`) som funktionsargument.** Använd i stället :ref:`Mallprogramläge <template_mode>` och :ref:`Allmänt programläge <general_mode>`."
480
481 #: ../../../__w/calibre/calibre/manual/template_lang.rst:169
482 msgid "Notes on calling functions in Single Function Mode:"
483 msgstr "Anmärkningar om att anropa funktioner i enkelt funktionsläge:"
484
485 #: ../../../__w/calibre/calibre/manual/template_lang.rst:171
486 msgid ""
487 "When functions are used in Single Function Mode, the first parameter, "
488 "``value``, is automatically replaced by the content of the field specified "
489 "in the template. For example, when the template ``{title:capitalize()}`` is "
490 "processed, the content of the ``title`` field is passed as the parameter "
491 "``value`` to the capitalize function."
492 msgstr "När funktioner används i enkelt funktionsläge ersätts den första parametern, ``value``, automatiskt med innehållet i fältet som anges i mallen. När mallen ``{title:capitalize()}`` bearbetas skickas till exempel innehållet i fältet ``title`` som parametern ``value`` till funktionen capitalize."
493
494 #: ../../../__w/calibre/calibre/manual/template_lang.rst:172
495 msgid ""
496 "In the function documentation, the notation ``[something]*`` means that "
497 "``something`` can be repeated zero or more times. The notation "
498 "``[something]+`` means that the ``something`` is repeated one or more times "
499 "(must exist at least one time)."
500 msgstr "I funktionsdokumentationen betyder beteckningen ``[something]*`` att ``something`` kan upprepas noll eller flera gånger. Beteckningen ``[something]+`` betyder att ``something`` upprepas en eller flera gånger (det måste förekomma minst en gång)."
501
502 #: ../../../__w/calibre/calibre/manual/template_lang.rst:173
503 msgid ""
504 "Some functions use regular expressions. In the template language regular "
505 "expression matching is case-insensitive."
506 msgstr "Vissa funktioner använder reguljära uttryck. I mallspråket är matchning med reguljära uttryck skiftlägesokänslig."
507
508 #: ../../../__w/calibre/calibre/manual/template_lang.rst:175
509 msgid ""
510 "Functions are documented in :ref:`template_functions_reference`. The "
511 "documentation tells you what arguments the functions require and what the "
512 "functions do. For example, here is the documentation of the "
513 ":ref:`ff_ifempty` function."
514 msgstr "Funktionerna dokumenteras i :ref:`template_functions_reference`. Dokumentationen anger vilka argument funktionerna kräver och vad de gör. Här visas till exempel dokumentationen för funktionen :ref:`ff_ifempty`."
515
516 #: ../../../__w/calibre/calibre/manual/template_lang.rst:179
517 msgid ""
518 "You see that the function requires two arguments, ``value`` and "
519 "``text_if_empty``. However, because we are using Single Function Mode, we "
520 "omit the ``value`` argument, passing only ``text_if_empty``. For example, "
521 "this template::"
522 msgstr "Funktionen kräver två argument, ``value`` och ``text_if_empty``. Eftersom vi använder enkelt funktionsläge utelämnar vi dock argumentet ``value`` och skickar endast ``text_if_empty``. Följande mall::"
523
524 #: ../../../__w/calibre/calibre/manual/template_lang.rst:183
525 msgid ""
526 "shows the tags for a book, if any. If it has no tags then it shows `No tags "
527 "on this book`."
528 msgstr "visar bokens taggar, om den har några. Om den inte har några taggar visas `No tags on this book`."
529
530 #: ../../../__w/calibre/calibre/manual/template_lang.rst:185
531 msgid ""
532 "The following functions are usable in Single Function Mode because their "
533 "first parameter is ``value``."
534 msgstr "Följande funktioner kan användas i enkelt funktionsläge eftersom deras första parameter är ``value``."
535
536 #: ../../../__w/calibre/calibre/manual/template_lang.rst:227
537 msgid "**Using functions and formatting in the same template**"
538 msgstr "**Använda funktioner och formatering i samma mall**"
539
540 #: ../../../__w/calibre/calibre/manual/template_lang.rst:229
541 msgid ""
542 "Suppose you have an integer custom column ``#myint`` that you want displayed"
543 " with leading zeros, as in ``003``. One way to do this is to use a format of"
544 " ``0>3s``. However, by default if a number (integer or float) equals zero "
545 "then the value is displayed as the empty string so zero values will produce "
546 "the empty string, not ``000``. If you want to see ``000`` values then you "
547 "use both the format string and the ``ifempty`` function to change the empty "
548 "value back to a zero. The template would be::"
549 msgstr "Anta att du har en anpassad heltalskolumn ``#myint`` som du vill visa med inledande nollor, exempelvis ``003``. Ett sätt är att använda formatet ``0>3s``. Som standard visas dock ett tal (heltal eller flyttal) som den tomma strängen om det är lika med noll, så nollvärden ger den tomma strängen och inte ``000``. Om du vill visa värdet ``000`` använder du både formatsträngen och funktionen ``ifempty`` för att ändra tillbaka det tomma värdet till noll. Mallen blir::"
550
551 #: ../../../__w/calibre/calibre/manual/template_lang.rst:233
552 msgid ""
553 "Note that you can use the prefix and suffix as well. If you want the number "
554 "to appear as ``[003]`` or ``[000]``, then use the template::"
555 msgstr "Observera att du även kan använda prefix och suffix. Om du vill att talet ska visas som ``[003]`` eller ``[000]`` använder du mallen::"
556
557 #: ../../../__w/calibre/calibre/manual/template_lang.rst:240
558 msgid "General Program Mode"
559 msgstr "Allmänt programläge"
560
561 #: ../../../__w/calibre/calibre/manual/template_lang.rst:242
562 msgid ""
563 "`General Program Mode` (`GPM`) replaces `template expressions` with a "
564 "program written in the `template language`. The syntax of the language is "
565 "defined by the following grammar::"
566 msgstr "`Allmänt programläge` (`GPM`) ersätter `malluttryck` med ett program skrivet i `mallspråket`. Språkets syntax definieras av följande grammatik::"
567
568 #: ../../../__w/calibre/calibre/manual/template_lang.rst:295
569 msgid ""
570 "a ``top_expression`` always has a value. The value of an ``expression_list``"
571 " is the value of the last ``top_expression`` in the list. For example, the "
572 "value of the expression list ``1;2;'foobar';3`` is ``3``."
573 msgstr "ett ``top_expression`` har alltid ett värde. Värdet för en ``expression_list`` är värdet för den sista ``top_expression`` i listan. Värdet för uttryckslistan ``1;2;'foobar';3`` är till exempel ``3``."
574
575 #: ../../../__w/calibre/calibre/manual/template_lang.rst:296
576 msgid "In a logical context, any non-empty value is ``True``"
577 msgstr "I ett logiskt sammanhang är alla värden som inte är tomma ``True``"
578
579 #: ../../../__w/calibre/calibre/manual/template_lang.rst:297
580 msgid "In a logical context, the empty value is ``False``"
581 msgstr "I ett logiskt sammanhang är det tomma värdet ``False``"
582
583 #: ../../../__w/calibre/calibre/manual/template_lang.rst:298
584 msgid ""
585 "Strings and numbers can be used interchangeably. For example, ``10`` and "
586 "``'10'`` are the same thing."
587 msgstr "Strängar och tal kan användas omväxlande. Till exempel är ``10`` och ``'10'`` samma sak."
588
589 #: ../../../__w/calibre/calibre/manual/template_lang.rst:299
590 msgid ""
591 "Comments are lines starting with a '#' character, possibly preceded by "
592 "blanks or tabs."
593 msgstr "Kommentarer är rader som börjar med tecknet '#', eventuellt föregånget av blanksteg eller tabbar."
594
595 #: ../../../__w/calibre/calibre/manual/template_lang.rst:301
596 msgid "**Operator precedence**"
597 msgstr "**Operatorprioritet**"
598
599 #: ../../../__w/calibre/calibre/manual/template_lang.rst:303
600 msgid ""
601 "The operator precedence (order of evaluation) from highest (evaluated first)"
602 " to lowest (evaluated last) is:"
603 msgstr "Operatorernas prioritet (utvärderingsordning), från högst (utvärderas först) till lägst (utvärderas sist), är:"
604
605 #: ../../../__w/calibre/calibre/manual/template_lang.rst:305
606 msgid ""
607 "Function calls, constants, parenthesized expressions, statement expressions,"
608 " assignment expressions, field references."
609 msgstr "Funktionsanrop, konstanter, parentesuttryck, satsuttryck, tilldelningsuttryck, fältreferenser."
610
611 #: ../../../__w/calibre/calibre/manual/template_lang.rst:306
612 msgid ""
613 "Unary plus (``+``) and minus (``-``). These operators evaluate right to "
614 "left."
615 msgstr "Unärt plus (``+``) och minus (``-``). Dessa operatorer utvärderas från höger till vänster."
616
617 #: ../../../__w/calibre/calibre/manual/template_lang.rst:308
618 msgid ""
619 "These and all the other arithmetic operators return integers if the "
620 "expression results in a fractional part equal to zero. For example, if an "
621 "expression returns ``3.0`` it is changed to ``3``."
622 msgstr "Dessa och alla andra aritmetiska operatorer returnerar heltal om uttryckets bråkdel är noll. Om ett uttryck till exempel returnerar ``3.0`` ändras det till ``3``."
623
624 #: ../../../__w/calibre/calibre/manual/template_lang.rst:309
625 msgid ""
626 "Multiply (``*``) and divide (``/``). These operators are associative and "
627 "evaluate left to right. Use parentheses if you want to change the order of "
628 "evaluation."
629 msgstr "Multiplikation (``*``) och division (``/``). Dessa operatorer är associativa och utvärderas från vänster till höger. Använd parenteser om du vill ändra utvärderingsordningen."
630
631 #: ../../../__w/calibre/calibre/manual/template_lang.rst:310
632 msgid ""
633 "Add (``+``) and subtract (``-``). These operators are associative and "
634 "evaluate left to right."
635 msgstr "Addition (``+``) och subtraktion (``-``). Dessa operatorer är associativa och utvärderas från vänster till höger."
636
637 #: ../../../__w/calibre/calibre/manual/template_lang.rst:311
638 msgid ""
639 "Numeric and string comparisons. These operators return ``'1'`` if the "
640 "comparison succeeds, otherwise the empty string (``''``). Comparisons are "
641 "not associative: ``a < b < c`` is a syntax error."
642 msgstr "Jämförelser av tal och strängar. Dessa operatorer returnerar ``'1'`` om jämförelsen lyckas, annars den tomma strängen (``''``). Jämförelser är inte associativa: ``a < b < c`` är ett syntaxfel."
643
644 #: ../../../__w/calibre/calibre/manual/template_lang.rst:312
645 msgid ""
646 "String concatenation (``&``). The ``&`` operator returns a string formed by "
647 "concatenating the left-hand and right-hand expressions. Example: ``'aaa' & "
648 "'bbb'`` returns ``'aaabbb'``. The operator is associative and evaluates left"
649 " to right."
650 msgstr "Strängsammanslagning (``&``). Operatorn ``&`` returnerar en sträng som bildas genom att slå samman uttrycken till vänster och höger. Exempel: ``'aaa' & 'bbb'`` returnerar ``'aaabbb'``. Operatorn är associativ och utvärderas från vänster till höger."
651
652 #: ../../../__w/calibre/calibre/manual/template_lang.rst:313
653 msgid ""
654 "Unary logical not (``!``). This operator returns ``'1'`` if the expression "
655 "is False (evaluates to the empty string), otherwise ``''``."
656 msgstr "Unärt logiskt icke (``!``). Operatorn returnerar ``'1'`` om uttrycket är False (utvärderas till den tomma strängen), annars ``''``."
657
658 #: ../../../__w/calibre/calibre/manual/template_lang.rst:314
659 msgid ""
660 "Logical and (``&&``). This operator returns '1' if both the left-hand and "
661 "right-hand expressions are True, or the empty string ``''`` if either is "
662 "False. It is associative, evaluates left to right, and does `short-"
663 "circuiting <https://chortle.ccsu.edu/java5/Notes/chap40/ch40_2.html>`_."
664 msgstr "Logiskt och (``&&``). Denna operator returnerar '1' om både uttrycket till vänster och uttrycket till höger är True, eller den tomma strängen ``''`` om något av dem är False. Den är associativ, utvärderas från vänster till höger och använder `kortslutningsutvärdering <https://chortle.ccsu.edu/java5/Notes/chap40/ch40_2.html>`_."
665
666 #: ../../../__w/calibre/calibre/manual/template_lang.rst:315
667 msgid ""
668 "Logical or (``||``). This operator returns ``'1'`` if either the left-hand "
669 "or right-hand expression is True, or ``''`` if both are False. It is "
670 "associative, evaluates left to right, and does `short-circuiting "
671 "<https://chortle.ccsu.edu/java5/Notes/chap40/ch40_2.html>`_. It is an "
672 "`inclusive or`, returning ``'1'`` if both the left- and right-hand "
673 "expressions are True."
674 msgstr "Logiskt eller (``||``). Denna operator returnerar ``'1'`` om antingen uttrycket till vänster eller uttrycket till höger är True, eller ``''`` om båda är False. Den är associativ, utvärderas från vänster till höger och använder `kortslutningsutvärdering <https://chortle.ccsu.edu/java5/Notes/chap40/ch40_2.html>`_. Det är ett `inklusivt eller` som returnerar ``'1'`` om både uttrycket till vänster och uttrycket till höger är True."
675
676 #: ../../../__w/calibre/calibre/manual/template_lang.rst:317
677 msgid "**Field references**"
678 msgstr "**Fältreferenser**"
679
680 #: ../../../__w/calibre/calibre/manual/template_lang.rst:319
681 msgid ""
682 "A ``field_reference`` evaluates to the value of the metadata field named by "
683 "lookup name that follows the ``$`` or ``$$``. Using ``$`` is equivalent to "
684 "using the :ref:`ff_field` function. Using ``$$`` is equivalent to using the "
685 ":ref:`ff_raw_field` function. Examples::"
686 msgstr "En ``field_reference`` utvärderas till värdet i metadatafältet vars söknamn följer efter ``$`` eller ``$$``. Att använda ``$`` motsvarar att använda funktionen :ref:`ff_field`. Att använda ``$$`` motsvarar att använda funktionen :ref:`ff_raw_field`. Exempel::"
687
688 #: ../../../__w/calibre/calibre/manual/template_lang.rst:326
689 msgid "**If expressions**"
690 msgstr "**if-uttryck**"
691
692 #: ../../../__w/calibre/calibre/manual/template_lang.rst:328
693 msgid ""
694 "``If`` expressions first evaluate the ``condition``. If the ``condition`` is"
695 " True (a non-empty value) then the ``expression_list`` in the ``then`` "
696 "clause is evaluated. If it is False then if present the ``expression_list`` "
697 "in the ``elif`` or ``else`` clause is evaluated. The ``elif`` and ``else`` "
698 "parts are optional. The words ``if``, ``then``, ``elif``, ``else``, and "
699 "``fi`` are reserved; you cannot use them as identifier names. You can put "
700 "newlines and white space wherever they make sense. The ``condition`` is a "
701 "``top_expression`` not an ``expression_list``; semicolons are not allowed. "
702 "The ``expression_lists`` are semicolon-separated sequences of "
703 "``top_expressions``. An ``if`` expression returns the result of the last "
704 "``top_expression`` in the evaluated ``expression_list``, or the empty string"
705 " if no expression list was evaluated."
706 msgstr "``If``-uttryck utvärderar först ``condition``. Om ``condition`` är True (ett värde som inte är tomt) utvärderas ``expression_list`` i ``then``-satsen. Om det är False utvärderas, om de finns, ``expression_list`` i ``elif``- eller ``else``-satsen. Delarna ``elif`` och ``else`` är valfria. Orden ``if``, ``then``, ``elif``, ``else`` och ``fi`` är reserverade; du kan inte använda dem som identifierarnamn. Du kan lägga in radbrytningar och blanksteg där det är lämpligt. ``condition`` är ett ``top_expression``, inte en ``expression_list``; semikolon är inte tillåtna. ``expression_lists`` är sekvenser av ``top_expressions`` avgränsade med semikolon. Ett ``if``-uttryck returnerar resultatet av det sista ``top_expression`` i den ``expression_list`` som utvärderades, eller den tomma strängen om ingen uttryckslista utvärderades."
707
708 #: ../../../__w/calibre/calibre/manual/template_lang.rst:330
709 msgid "Examples::"
710 msgstr "Exempel::"
711
712 #: ../../../__w/calibre/calibre/manual/template_lang.rst:343
713 msgid "Nested ``if`` example::"
714 msgstr "Exempel på nästlade ``if``-uttryck::"
715
716 #: ../../../__w/calibre/calibre/manual/template_lang.rst:356
717 msgid ""
718 "As said above, an ``if`` produces a value. This means that all the following"
719 " are equivalent::"
720 msgstr "Som nämnts ovan ger ett ``if``-uttryck ett värde. Det innebär att alla följande är likvärdiga::"
721
722 #: ../../../__w/calibre/calibre/manual/template_lang.rst:362
723 msgid ""
724 "For example, this program returns the value of the ``series`` column if the "
725 "book has a series, otherwise the value of the ``title`` column::"
726 msgstr "Det här programmet returnerar till exempel värdet i kolumnen ``series`` om boken ingår i en serie, annars värdet i kolumnen ``title``::"
727
728 #: ../../../__w/calibre/calibre/manual/template_lang.rst:366
729 msgid "**For expressions**"
730 msgstr "**for-uttryck**"
731
732 #: ../../../__w/calibre/calibre/manual/template_lang.rst:368
733 msgid ""
734 "The ``for`` expression iterates over a list of values, processing them one "
735 "at a time. The ``list_expression`` must evaluate either to a metadata field "
736 "``lookup name`` e.g., ``tags`` or ``#genre``, or to a list of values. The "
737 ":ref:`ff_range` generates a list of numbers. If the result is a valid "
738 "``lookup name`` then the field's value is fetched and the separator "
739 "specified for that field type is used. If the result isn't a valid lookup "
740 "name then it is assumed to be a list of values. The list is assumed to be "
741 "separated by commas unless the optional keyword ``separator`` is supplied, "
742 "in which case the list values must be separated by the result of evaluating "
743 "the ``separator_expr``. A separator cannot be used if the list is generated "
744 "by ``range()``. Each value in the list is assigned to the specified variable"
745 " then the ``expression_list`` is evaluated. You can use ``break`` to jump "
746 "out of the loop, and ``continue`` to jump to the beginning of the loop for "
747 "the next iteration."
748 msgstr "Uttrycket ``for`` itererar över en lista med värden och bearbetar dem ett i taget. ``list_expression`` måste utvärderas antingen till ett ``söknamn`` för ett metadatafält, till exempel ``tags`` eller ``#genre``, eller till en lista med värden. :ref:`ff_range` genererar en lista med tal. Om resultatet är ett giltigt ``söknamn`` hämtas fältets värde och avgränsaren som anges för fälttypen används. Om resultatet inte är ett giltigt söknamn antas det vara en lista med värden. Listan antas vara kommaavgränsad om inte det valfria nyckelordet ``separator`` anges; i så fall måste listvärdena avgränsas med resultatet av utvärderingen av ``separator_expr``. En avgränsare kan inte användas om listan genereras av ``range()``. Varje värde i listan tilldelas den angivna variabeln och därefter utvärderas ``expression_list``. Du kan använda ``break`` för att lämna loopen och ``continue`` för att gå till början av loopen inför nästa iteration."
749
750 #: ../../../__w/calibre/calibre/manual/template_lang.rst:370
751 msgid ""
752 "Example: This template removes the first hierarchical name for each value in"
753 " Genre (``#genre``), constructing a list with the new names::"
754 msgstr "Exempel: Den här mallen tar bort det första hierarkiska namnet från varje värde i Genre (``#genre``) och skapar en lista med de nya namnen::"
755
756 #: ../../../__w/calibre/calibre/manual/template_lang.rst:380
757 msgid ""
758 "If the original Genre is `History.Military, Science Fiction.Alternate "
759 "History, ReadMe` then the template returns `Military, Alternate History, "
760 "ReadMe`. You could use this template in calibre's :guilabel:`Edit metadata "
761 "in bulk -> Search & replace` with :guilabel:`Search for` set to ``template``"
762 " to strip off the first level of the hierarchy and assign the resulting "
763 "value to Genre."
764 msgstr "Om ursprungligt Genre är `History.Military, Science Fiction.Alternate History, ReadMe` returnerar mallen `Military, Alternate History, ReadMe`. Du kan använda mallen i calibres :guilabel:`Redigera metadata i grupp -> Sök och ersätt` med :guilabel:`Sök efter` inställt på ``template`` för att ta bort hierarkins första nivå och tilldela resultatet till Genre."
765
766 #: ../../../__w/calibre/calibre/manual/template_lang.rst:383
767 msgid ""
768 "Note: the last line in the template, ``new_tags``, isn't strictly necessary "
769 "in this case because ``for`` returns the value of the last top_expression in"
770 " the expression list. The value of an assignment is the value of its "
771 "expression, so the value of the ``for`` statement is what was assigned to "
772 "``new_tags``."
773 msgstr "Observera: den sista raden i mallen, ``new_tags``, är egentligen inte nödvändig i det här fallet, eftersom ``for`` returnerar värdet för den sista top_expression i uttryckslistan. Värdet av en tilldelning är värdet av dess uttryck, så värdet för ``for``-satsen är det som tilldelades ``new_tags``."
774
775 #: ../../../__w/calibre/calibre/manual/template_lang.rst:385
776 msgid "**with expressions**"
777 msgstr "**with-uttryck**"
778
779 #: ../../../__w/calibre/calibre/manual/template_lang.rst:387
780 msgid "The ``with`` expression:"
781 msgstr "Uttrycket ``with``:"
782
783 #: ../../../__w/calibre/calibre/manual/template_lang.rst:389
784 msgid ""
785 "changes the current book to the book with calibre book id (an integer) "
786 "produced by evaluating the ``top_expression``."
787 msgstr "byter den aktuella boken till boken med det calibre-bok-ID (ett heltal) som fås genom att utvärdera ``top_expression``."
788
789 #: ../../../__w/calibre/calibre/manual/template_lang.rst:390
790 msgid "runs the ``expression_list``."
791 msgstr "kör ``expression_list``."
792
793 #: ../../../__w/calibre/calibre/manual/template_lang.rst:391
794 msgid "then resets the current book back to what it was."
795 msgstr "återställer sedan den aktuella boken till den ursprungliga."
796
797 #: ../../../__w/calibre/calibre/manual/template_lang.rst:393
798 msgid ""
799 "The ``with`` expression returns the result of the last ``top_expression`` in"
800 " the evaluated ``expression_list``, or the empty string if no expression "
801 "list was evaluated."
802 msgstr "Uttrycket ``with`` returnerar resultatet av det sista ``top_expression`` i den ``expression_list`` som utvärderades, eller den tomma strängen om ingen uttryckslista utvärderades."
803
804 #: ../../../__w/calibre/calibre/manual/template_lang.rst:396
805 msgid ""
806 "For example, this template returns a list of the titles of each book "
807 "selected in the GUI::"
808 msgstr "Den här mallen returnerar till exempel en lista med titlarna på alla böcker som är markerade i det grafiska gränssnittet::"
809
810 #: ../../../__w/calibre/calibre/manual/template_lang.rst:408
811 msgid "**Return stmt**"
812 msgstr "**return-sats**"
813
814 #: ../../../__w/calibre/calibre/manual/template_lang.rst:410
815 msgid ""
816 "Return the value of the ``expression``. If executed in a function then it "
817 "returns the value of the expression to the caller. If executed in the "
818 "outermost context (the template) then it sets the value of the template to "
819 "the value of the expression and exits the template."
820 msgstr "Returnera värdet för ``expression``. Om satsen körs i en funktion returneras uttryckets värde till anroparen. Om den körs i det yttersta sammanhanget (mallen) anges mallens värde till uttryckets värde och mallen avslutas."
821
822 #: ../../../__w/calibre/calibre/manual/template_lang.rst:412
823 msgid "**Function definition**"
824 msgstr "**Funktionsdefinition**"
825
826 #: ../../../__w/calibre/calibre/manual/template_lang.rst:414
827 msgid ""
828 "If you have repeated code in a template then you can put that code into a "
829 "local function. The ``def`` keyword starts the definition. It is followed by"
830 " the function name, the argument list, then the code in the function. The "
831 "function definition ends with the ``fed`` keyword."
832 msgstr "Om du har upprepad kod i en mall kan du placera koden i en lokal funktion. Nyckelordet ``def`` inleder definitionen. Därefter följer funktionsnamnet, argumentlistan och sedan funktionens kod. Funktionsdefinitionen avslutas med nyckelordet ``fed``."
833
834 #: ../../../__w/calibre/calibre/manual/template_lang.rst:416
835 msgid ""
836 "Arguments are positional. When a function is called the supplied arguments "
837 "are matched left to right against the defined parameters, with the value of "
838 "the argument assigned to the parameter. It is an error to provide more "
839 "arguments than defined parameters. Parameters can have default values, such "
840 "as ``a = 25``. If an argument is not supplied for that parameter then the "
841 "default value is used, otherwise the parameter is set to the empty string."
842 msgstr "Argument är positionsberoende. När en funktion anropas matchas de angivna argumenten från vänster till höger mot de definierade parametrarna, och argumentets värde tilldelas parametern. Det är ett fel att ange fler argument än det finns definierade parametrar. Parametrar kan ha standardvärden, till exempel ``a = 25``. Om inget argument anges för parametern används standardvärdet. Om det inte finns något standardvärde sätts parametern till den tomma strängen."
843
844 #: ../../../__w/calibre/calibre/manual/template_lang.rst:418
845 msgid "The ``return`` statement can be used in a local function."
846 msgstr "Satsen ``return`` kan användas i en lokal funktion."
847
848 #: ../../../__w/calibre/calibre/manual/template_lang.rst:420
849 msgid "A function must be defined before it can be used."
850 msgstr "En funktion måste definieras innan den kan användas."
851
852 #: ../../../__w/calibre/calibre/manual/template_lang.rst:422
853 msgid ""
854 "Example: This template computes an approximate duration in years, months, "
855 "and days from a number of days. The function ``to_plural()`` formats the "
856 "computed values. Note that the example also uses the ``&`` operator::"
857 msgstr "Exempel: Den här mallen beräknar en ungefärlig tidslängd i år, månader och dagar från ett antal dagar. Funktionen ``to_plural()`` formaterar de beräknade värdena. Observera att exemplet även använder operatorn ``&``::"
858
859 #: ../../../__w/calibre/calibre/manual/template_lang.rst:437
860 msgid "**Relational operators**"
861 msgstr "**Relationsoperatorer**"
862
863 #: ../../../__w/calibre/calibre/manual/template_lang.rst:439
864 msgid ""
865 "Relational operators return ``'1'`` if the comparison is true, otherwise the"
866 " empty string (``''``)."
867 msgstr "Relationsoperatorer returnerar ``'1'`` om jämförelsen är sann, annars den tomma strängen (``''``)."
868
869 #: ../../../__w/calibre/calibre/manual/template_lang.rst:441
870 msgid ""
871 "There are two forms of relational operators: string comparisons and numeric "
872 "comparisons."
873 msgstr "Det finns två typer av relationsoperatorer: strängjämförelser och numeriska jämförelser."
874
875 #: ../../../__w/calibre/calibre/manual/template_lang.rst:443
876 msgid ""
877 "String comparisons do case-insensitive string comparison using lexical "
878 "order. The supported string comparison operators are ``==``, ``!=``, ``<``, "
879 "``<=``, ``>``, ``>=``, ``in``, ``inlist``, and ``inlist_field``. For the "
880 "``in``, ``inlist``, and ``inlist_field`` operators, the result of the left "
881 "hand expression is interpreted as a regular expression pattern. They are "
882 "true if the value of left-hand regular expression matches the value of the "
883 "right hand expression. The regular expressions are case-insensitive."
884 msgstr "Strängjämförelser gör skiftlägesokänsliga jämförelser enligt lexikografisk ordning. De strängjämförelseoperatorer som stöds är ``==``, ``!=``, ``<``, ``<=``, ``>``, ``>=``, ``in``, ``inlist`` och ``inlist_field``. För operatorerna ``in``, ``inlist`` och ``inlist_field`` tolkas resultatet av uttrycket till vänster som ett mönster för reguljära uttryck. De är sanna om det reguljära uttrycket till vänster matchar värdet i uttrycket till höger. De reguljära uttrycken är skiftlägesokänsliga."
885
886 #: ../../../__w/calibre/calibre/manual/template_lang.rst:446
887 msgid ""
888 "The ``inlist`` operator is true if the left hand regular expression matches "
889 "any one of the items in the right hand list where the items in the list are "
890 "separated by commas. The ``inlist_field`` operator is true if the left hand "
891 "regular expression matches any of the items in the field (column) named by "
892 "the right hand expression, using the separator defined for the field. NB: "
893 "the ``inlist_field`` operator requires the right hand expression to evaluate"
894 " to a field name, while the ``inlist`` operator requires the right hand "
895 "expression to evaluate to a string containing a comma-separated list. "
896 "Because of this difference, ``inlist_field`` is substantially faster than "
897 "``inlist`` because no string conversions or list constructions are done."
898 msgstr "Operatorn ``inlist`` är sann om det reguljära uttrycket till vänster matchar något av objekten i listan till höger, där objekten är kommaavgränsade. Operatorn ``inlist_field`` är sann om det reguljära uttrycket till vänster matchar något av objekten i fältet (kolumnen) vars namn anges av uttrycket till höger, med den avgränsare som är definierad för fältet. Observera att ``inlist_field`` kräver att uttrycket till höger utvärderas till ett fältnamn, medan ``inlist`` kräver att uttrycket till höger utvärderas till en sträng med en kommaavgränsad lista. På grund av denna skillnad är ``inlist_field`` avsevärt snabbare än ``inlist``, eftersom inga strängkonverteringar eller listkonstruktioner görs."
899
900 #: ../../../__w/calibre/calibre/manual/template_lang.rst:448
901 msgid ""
902 "The numeric comparison operators are ``==#``, ``!=#``, ``<#``, ``<=#``, "
903 "``>#``, ``>=#``. The left and right expressions must evaluate to numeric "
904 "values with two exceptions: both the string value \"None\" (undefined field)"
905 " and the empty string evaluate to the value zero."
906 msgstr "De numeriska jämförelseoperatorerna är ``==#``, ``!=#``, ``<#``, ``<=#``, ``>#`` och ``>=#``. Uttrycken till vänster och höger måste utvärderas till numeriska värden med två undantag: både strängvärdet \"None\" (odefinierat fält) och den tomma strängen utvärderas till värdet noll."
907
908 #: ../../../__w/calibre/calibre/manual/template_lang.rst:450
909 msgid "Examples:"
910 msgstr "Exempel:"
911
912 #: ../../../__w/calibre/calibre/manual/template_lang.rst:452
913 msgid ""
914 "``program: field('series') == 'foo'`` returns ``'1'`` if the book's series "
915 "is `foo`, otherwise ``''``."
916 msgstr "``program: field('series') == 'foo'`` returnerar ``'1'`` om bokens serie är `foo`, annars ``''``."
917
918 #: ../../../__w/calibre/calibre/manual/template_lang.rst:453
919 msgid ""
920 "``program: 'f.o' in field('series')`` returns ``'1'`` if the book's series "
921 "matches the regular expression ``f.o`` (e.g., `foo`, `Off Onyx`, etc.), "
922 "otherwise ``''``."
923 msgstr "``program: 'f.o' in field('series')`` returnerar ``'1'`` om bokens serie matchar det reguljära uttrycket ``f.o`` (till exempel `foo`, `Off Onyx` och så vidare), annars ``''``."
924
925 #: ../../../__w/calibre/calibre/manual/template_lang.rst:454
926 msgid ""
927 "``program: 'science' inlist $#genre`` returns ``'1'`` if any of the values "
928 "retrieved from the book's genres match the regular expression ``science``, "
929 "e.g., `Science`, `History of Science`, `Science Fiction` etc., otherwise "
930 "``''``."
931 msgstr "``program: 'science' inlist $#genre`` returnerar ``'1'`` om något av värdena som hämtas från bokens genrer matchar det reguljära uttrycket ``science``, till exempel `Science`, `History of Science` eller `Science Fiction`, annars ``''``."
932
933 #: ../../../__w/calibre/calibre/manual/template_lang.rst:455
934 msgid ""
935 "``program: '^science$' inlist $#genre`` returns ``'1'`` if any of the book's"
936 " genres exactly match the regular expression ``^science$``, e.g., `Science`,"
937 " otherwise ``''``. The genres `History of Science` and `Science Fiction` "
938 "don't match."
939 msgstr "``program: '^science$' inlist $#genre`` returnerar ``'1'`` om någon av bokens genrer exakt matchar det reguljära uttrycket ``^science$``, till exempel `Science`, annars ``''``. Genrerna `History of Science` och `Science Fiction` matchar inte."
940
941 #: ../../../__w/calibre/calibre/manual/template_lang.rst:456
942 msgid ""
943 "``program: 'asimov' inlist $authors`` returns ``'1'`` if any author matches "
944 "the regular expression ``asimov``, e.g., `Asimov, Isaac` or `Isaac Asimov`, "
945 "otherwise ``''``."
946 msgstr "``program: 'asimov' inlist $authors`` returnerar ``'1'`` om någon författare matchar det reguljära uttrycket ``asimov``, till exempel `Asimov, Isaac` eller `Isaac Asimov`, annars ``''``."
947
948 #: ../../../__w/calibre/calibre/manual/template_lang.rst:457
949 msgid ""
950 "``program: 'asimov' inlist_field 'authors'`` returns ``'1'`` if any author "
951 "matches the regular expression ``asimov``, e.g., `Asimov, Isaac` or `Isaac "
952 "Asimov`, otherwise ``''``."
953 msgstr "``program: 'asimov' inlist_field 'authors'`` returnerar ``'1'`` om någon författare matchar det reguljära uttrycket ``asimov``, till exempel `Asimov, Isaac` eller `Isaac Asimov`, annars ``''``."
954
955 #: ../../../__w/calibre/calibre/manual/template_lang.rst:458
956 msgid ""
957 "``program: 'asimov$' inlist_field 'authors'`` returns ``'1'`` if any author "
958 "matches the regular expression ``asimov$``, e.g., `Isaac Asimov`, otherwise "
959 "``''``. It doesn't match `Asimov, Isaac` because of the ``$`` anchor in the "
960 "regular expression."
961 msgstr "``program: 'asimov$' inlist_field 'authors'`` returnerar ``'1'`` om någon författare matchar det reguljära uttrycket ``asimov$``, till exempel `Isaac Asimov`, annars ``''``. Det matchar inte `Asimov, Isaac` på grund av ankaret ``$`` i det reguljära uttrycket."
962
963 #: ../../../__w/calibre/calibre/manual/template_lang.rst:459
964 msgid ""
965 "``program: if field('series') != 'foo' then 'bar' else 'mumble' fi`` returns"
966 " ``'bar'`` if the book's series is not `foo`. Otherwise it returns "
967 "``'mumble'``."
968 msgstr "``program: if field('series') != 'foo' then 'bar' else 'mumble' fi`` returnerar ``'bar'`` om bokens serie inte är `foo`. Annars returneras ``'mumble'``."
969
970 #: ../../../__w/calibre/calibre/manual/template_lang.rst:460
971 msgid ""
972 "``program: if field('series') == 'foo' || field('series') == '1632' then "
973 "'yes' else 'no' fi`` returns ``'yes'`` if series is either `foo` or `1632`, "
974 "otherwise ``'no'``."
975 msgstr "``program: if field('series') == 'foo' || field('series') == '1632' then 'yes' else 'no' fi`` returnerar ``'yes'`` om serien är antingen `foo` eller `1632`, annars ``'no'``."
976
977 #: ../../../__w/calibre/calibre/manual/template_lang.rst:461
978 msgid ""
979 "``program: if '^(foo|1632)$' in field('series') then 'yes' else 'no' fi`` "
980 "returns ``'yes'`` if series is either `foo` or `1632`, otherwise ``'no'``."
981 msgstr "``program: if '^(foo|1632)$' in field('series') then 'yes' else 'no' fi`` returnerar ``'yes'`` om serien är antingen `foo` eller `1632`, annars ``'no'``."
982
983 #: ../../../__w/calibre/calibre/manual/template_lang.rst:462
984 msgid ""
985 "``program: if 11 > 2 then 'yes' else 'no' fi`` returns ``'no'`` because the "
986 "``>`` operator does a lexical comparison."
987 msgstr "``program: if 11 > 2 then 'yes' else 'no' fi`` returnerar ``'no'`` eftersom operatorn ``>`` gör en lexikografisk jämförelse."
988
989 #: ../../../__w/calibre/calibre/manual/template_lang.rst:463
990 msgid ""
991 "``program: if 11 ># 2 then 'yes' else 'no' fi`` returns ``'yes'`` because "
992 "the ``>#`` operator does a numeric comparison."
993 msgstr "``program: if 11 ># 2 then 'yes' else 'no' fi`` returnerar ``'yes'`` eftersom operatorn ``>#`` gör en numerisk jämförelse."
994
995 #: ../../../__w/calibre/calibre/manual/template_lang.rst:465
996 msgid "**Functions in General Program Mode**"
997 msgstr "**Funktioner i allmänt programläge**"
998
999 #: ../../../__w/calibre/calibre/manual/template_lang.rst:467
1000 msgid ""
1001 "See :ref:`template_functions_reference` for the list of functions built into"
1002 " the template language."
1003 msgstr "En lista över funktionerna som är inbyggda i mallspråket finns i :ref:`template_functions_reference`."
1004
1005 #: ../../../__w/calibre/calibre/manual/template_lang.rst:471
1006 msgid ""
1007 "As opposed to :ref:`Single Function Mode <single_mode>`, in General Program "
1008 "Mode you must specify the first parameter ``value``."
1009 msgstr "Till skillnad från :ref:`enkelt funktionsläge <single_mode>` måste du i allmänt programläge ange den första parametern ``value``."
1010
1011 #: ../../../__w/calibre/calibre/manual/template_lang.rst:472
1012 msgid "All parameters are expression_lists (see the grammar above)."
1013 msgstr "Alla parametrar är expression_lists (se grammatiken ovan)."
1014
1015 #: ../../../__w/calibre/calibre/manual/template_lang.rst:477
1016 msgid "More complex programs in template expressions - Template Program Mode"
1017 msgstr "Mer komplexa program i malluttryck – mallprogramläge"
1018
1019 #: ../../../__w/calibre/calibre/manual/template_lang.rst:479
1020 msgid ""
1021 "`Template Program Mode` (`TPM`) is a blend of :ref:`General Program Mode "
1022 "<general_mode>` and :ref:`Single Function Mode <single_mode>`. `TPM` differs"
1023 " from Single Function Mode in that it permits writing template expressions "
1024 "that refer to other metadata fields, use nested functions, modify variables,"
1025 " and do arithmetic. It differs from `General Program Mode` in that the "
1026 "template is contained between ``{`` and ``}`` characters and doesn't begin "
1027 "with the word ``program:``. The program portion of the template is a General"
1028 " Program Mode expression list."
1029 msgstr "`Mallprogramläge` (`TPM`) är en blandning av :ref:`Allmänt programläge <general_mode>` och :ref:`Enkelt funktionsläge <single_mode>`. `TPM` skiljer sig från enkelt funktionsläge genom att det tillåter malluttryck som refererar till andra metadatafält, använder nästlade funktioner, ändrar variabler och utför aritmetik. Det skiljer sig från `Allmänt programläge` genom att mallen omges av tecknen ``{`` och ``}`` och inte börjar med ordet ``program:``. Programdelen av mallen är en uttryckslista i allmänt programläge."
1030
1031 #: ../../../__w/calibre/calibre/manual/template_lang.rst:482
1032 msgid ""
1033 "Example: assume you want a template to show the series for a book if it has "
1034 "one, otherwise show the value of a custom field #genre. You cannot do this "
1035 "in the :ref:`Single Function Mode <single_mode>` because you cannot make "
1036 "reference to another metadata field within a template expression. In `TPM` "
1037 "you can, as the following expression demonstrates::"
1038 msgstr "Exempel: anta att du vill att en mall ska visa en boks serie om den har en, annars värdet i det anpassade fältet #genre. Detta går inte i :ref:`enkelt funktionsläge <single_mode>` eftersom du inte kan referera till ett annat metadatafält inifrån ett malluttryck. I `TPM` går det, vilket följande uttryck visar::"
1039
1040 #: ../../../__w/calibre/calibre/manual/template_lang.rst:487
1041 msgid "The example shows several things:"
1042 msgstr "Exemplet visar flera saker:"
1043
1044 #: ../../../__w/calibre/calibre/manual/template_lang.rst:489
1045 msgid ""
1046 "`TPM` is used if the expression begins with ``:'`` and ends with ``'}``. "
1047 "Anything else is assumed to be in :ref:`Single Function Mode <single_mode>`."
1048 msgstr "`TPM` används om uttrycket börjar med ``:'`` och slutar med ``'}``. Allt annat antas vara i :ref:`enkelt funktionsläge <single_mode>`."
1049
1050 #: ../../../__w/calibre/calibre/manual/template_lang.rst:491
1051 msgid ""
1052 "If the template contains a prefix and suffix, the expression ends with "
1053 "``'|`` where the ``|`` is the delimiter for the prefix. Example::"
1054 msgstr "Om mallen innehåller ett prefix och ett suffix slutar uttrycket med ``'|``, där ``|`` avgränsar prefixet. Exempel::"
1055
1056 #: ../../../__w/calibre/calibre/manual/template_lang.rst:495
1057 msgid ""
1058 "Functions must be given all their arguments. For example, the standard "
1059 "built-in functions must be given the initial parameter ``value``."
1060 msgstr "Funktioner måste få alla sina argument. De inbyggda standardfunktionerna måste till exempel få den inledande parametern ``value``."
1061
1062 #: ../../../__w/calibre/calibre/manual/template_lang.rst:496
1063 msgid ""
1064 "The variable ``$`` is usable as the ``value`` argument and stands for the "
1065 "value of the field named in the template, ``series`` in this case."
1066 msgstr "Variabeln ``$`` kan användas som argumentet ``value`` och står för värdet i fältet som anges i mallen, i det här fallet ``series``."
1067
1068 #: ../../../__w/calibre/calibre/manual/template_lang.rst:497
1069 msgid "white space is ignored and can be used anywhere within the expression."
1070 msgstr "blanksteg ignoreras och kan användas var som helst i uttrycket."
1071
1072 #: ../../../__w/calibre/calibre/manual/template_lang.rst:498
1073 msgid ""
1074 "constant strings are enclosed in matching quotes, either ``'`` or ``\"``."
1075 msgstr "konstanta strängar omges av matchande citattecken, antingen ``'`` eller ``\"``."
1076
1077 #: ../../../__w/calibre/calibre/manual/template_lang.rst:500
1078 msgid ""
1079 "In `TPM`, using ``{`` and ``}`` characters in string literals can lead to "
1080 "errors or unexpected results because they confuse the template processor. It"
1081 " tries to treat them as template expression boundaries, not characters. In "
1082 "some but not all cases you can replace a ``{`` with ``[[`` and a ``}`` with "
1083 "`]]`. Advice: if your program contains ``{`` and ``}`` characters then you "
1084 "should use `General Program Mode`."
1085 msgstr "I `TPM` kan tecknen ``{`` och ``}`` i strängliteraler orsaka fel eller oväntade resultat, eftersom de förvirrar mallprocessorn. Den försöker tolka dem som gränser för malluttryck, inte som tecken. I vissa, men inte alla, fall kan du ersätta ``{`` med ``[[`` och ``}`` med `]]`. Råd: om programmet innehåller tecknen ``{`` och ``}`` bör du använda `Allmänt programläge`."
1086
1087 #: ../../../__w/calibre/calibre/manual/template_lang.rst:505
1088 msgid "Python Template Mode"
1089 msgstr "Python-malläge"
1090
1091 #: ../../../__w/calibre/calibre/manual/template_lang.rst:507
1092 msgid ""
1093 "Python Template Mode (PTM) lets you write templates using native Python and "
1094 "the `calibre API <https://manual.calibre-ebook.com/develop.html#api-"
1095 "documentation-for-various-parts-of-calibre>`_. The database API will be of "
1096 "most use; further discussion is beyond the scope of this manual. PTM "
1097 "templates are faster and can do more complicated operations but you must "
1098 "know how to write code in Python using the calibre API."
1099 msgstr "Python-malläge (PTM) låter dig skriva mallar med vanlig Python och `calibre-API:et <https://manual.calibre-ebook.com/develop.html#api-documentation-for-various-parts-of-calibre>`_. Databas-API:et är sannolikt mest användbart; en utförligare genomgång ligger utanför den här manualens omfattning. PTM-mallar är snabbare och kan utföra mer komplicerade åtgärder, men du måste kunna skriva Python-kod som använder calibre-API:et."
1100
1101 #: ../../../__w/calibre/calibre/manual/template_lang.rst:509
1102 msgid "A PTM template begins with:"
1103 msgstr "En PTM-mall börjar med:"
1104
1105 #: ../../../__w/calibre/calibre/manual/template_lang.rst:527
1106 msgid ""
1107 "You can add the above text to your template using the context menu, usually "
1108 "accessed with a right click. The comments are not significant and can be "
1109 "removed. You must use python indenting."
1110 msgstr "Du kan lägga till texten ovan i mallen med snabbmenyn, som vanligtvis öppnas med ett högerklick. Kommentarerna saknar betydelse och kan tas bort. Du måste använda indrag enligt Python-syntax."
1111
1112 #: ../../../__w/calibre/calibre/manual/template_lang.rst:529
1113 msgid ""
1114 "The context object supports ``str(context)`` that returns a string of the "
1115 "context's contents, and ``context.attributes`` that returns a list of the "
1116 "attribute names in the context."
1117 msgstr "Kontextobjektet stöder ``str(context)``, som returnerar en sträng med kontextens innehåll, och ``context.attributes``, som returnerar en lista med namnen på kontextens attribut."
1118
1119 #: ../../../__w/calibre/calibre/manual/template_lang.rst:531
1120 msgid ""
1121 "The ``context.funcs`` attribute allows calling Built-in and User template "
1122 "functions, and Stored GPM/Python templates, so that you can execute them "
1123 "directly in your code. The functions are retrieved using their names. If the"
1124 " name conflicts with a Python keyword, add an underscore to the end of the "
1125 "name. Examples:"
1126 msgstr "Attributet ``context.funcs`` gör det möjligt att anropa inbyggda och användardefinierade mallfunktioner samt lagrade GPM-/Python-mallar, så att du kan köra dem direkt i koden. Funktionerna hämtas med sina namn. Om namnet krockar med ett Python-nyckelord lägger du till ett understreck i slutet av namnet. Exempel:"
1127
1128 #: ../../../__w/calibre/calibre/manual/template_lang.rst:538
1129 msgid ""
1130 "Here is an example of a PTM template that produces a list of all the authors"
1131 " for a series. The list is stored in a `Column built from other columns, "
1132 "behaves like tags`. It shows in :guilabel:`Book details` and has the "
1133 ":guilabel:`on separate lines` checked (in :guilabel:`Preferences->Look & "
1134 "feel->Book details`). That option requires the list to be comma-separated. "
1135 "To satisfy that requirement the template converts commas in author names to "
1136 "semicolons then builds a comma-separated list of authors. The authors are "
1137 "then sorted, which is why the template uses author_sort."
1138 msgstr "Följande är ett exempel på en PTM-mall som skapar en lista över alla författare i en serie. Listan lagras i en `Kolumn byggd från andra kolumner, fungerar som taggar`. Den visas i :guilabel:`Bokdetaljer` och alternativet :guilabel:`på separata rader` är markerat (under :guilabel:`Inställningar -> Utseende och känsla -> Bokdetaljer`). Det alternativet kräver att listan är kommaavgränsad. För att uppfylla kravet omvandlar mallen kommatecken i författarnamn till semikolon och bygger sedan en kommaavgränsad lista över författare. Författarna sorteras därefter, vilket är anledningen till att mallen använder author_sort."
1139
1140 #: ../../../__w/calibre/calibre/manual/template_lang.rst:559
1141 msgid "The output in :guilabel:`Book details` looks like this:"
1142 msgstr "Utmatningen i :guilabel:`Bokdetaljer` ser ut så här:"
1143
1144 #: ../../../__w/calibre/calibre/manual/template_lang.rst:561
1145 msgid "E-book conversion dialog"
1146 msgstr "Dialogruta för konvertering av e-bok"
1147
1148 #: ../../../__w/calibre/calibre/manual/template_lang.rst:569
1149 msgid "Templates and URLs"
1150 msgstr "Mallar och URL:er"
1151
1152 #: ../../../__w/calibre/calibre/manual/template_lang.rst:571
1153 msgid "You can use templates to construct URLs. Two cases are described here:"
1154 msgstr "Du kan använda mallar för att skapa URL:er. Två fall beskrivs här:"
1155
1156 #: ../../../__w/calibre/calibre/manual/template_lang.rst:573
1157 msgid "Custom column :guilabel:`Book details` search URLs"
1158 msgstr "Sök-URL:er för anpassade kolumner i :guilabel:`Bokdetaljer`"
1159
1160 #: ../../../__w/calibre/calibre/manual/template_lang.rst:574
1161 msgid "The calibre URL scheme"
1162 msgstr "calibres URL-schema"
1163
1164 #: ../../../__w/calibre/calibre/manual/template_lang.rst:576
1165 msgid "**Custom column book details search URLs**"
1166 msgstr "**Sök-URL:er för anpassade kolumner i Bokdetaljer**"
1167
1168 #: ../../../__w/calibre/calibre/manual/template_lang.rst:578
1169 msgid ""
1170 "When you create a custom column you can provide a URL to be used in "
1171 ":guilabel:`Book details` using a template. For example, if you have a custom"
1172 " column for `Translators` you can define a URL to take you to a site for "
1173 "translators. Book details search URLs can be provided for `Text`, "
1174 "`Enumerated`, `Series`, and `Column built from other column` column types."
1175 msgstr "När du skapar en anpassad kolumn kan du med hjälp av en mall ange en URL som ska användas i :guilabel:`Bokdetaljer`. Om du till exempel har en anpassad kolumn för `Översättare` kan du ange en URL som leder till en webbplats om översättare. Sök-URL:er i Bokdetaljer kan anges för kolumntyperna `Text`, `Uppräkning`, `Serie` och `Kolumn byggd från annan kolumn`."
1176
1177 #: ../../../__w/calibre/calibre/manual/template_lang.rst:580
1178 msgid ""
1179 "When an item with a `search template` is clicked in :guilabel:`Book details`"
1180 " the template is evaluated. It is provided the normal book metadata. It is "
1181 "also provided three additional fields:"
1182 msgstr "När du klickar på ett objekt som har en `sökmall` i :guilabel:`Bokdetaljer` utvärderas mallen. Den får bokens vanliga metadata och dessutom tre extra fält:"
1183
1184 #: ../../../__w/calibre/calibre/manual/template_lang.rst:582
1185 msgid "``item_value``: the value of the clicked item."
1186 msgstr "``item_value``: värdet för det klickade objektet."
1187
1188 #: ../../../__w/calibre/calibre/manual/template_lang.rst:583
1189 msgid ""
1190 "``item_value_quoted``: the value of clicked item, URL-encoded. Special "
1191 "characters are escaped to make them valid in URLs and spaces are replaced by"
1192 " ``'+'`` (plus) signs."
1193 msgstr "``item_value_quoted``: värdet för det klickade objektet, URL-kodat. Specialtecken kodas så att de är giltiga i URL:er och blanksteg ersätts med ``'+'`` (plustecken)."
1194
1195 #: ../../../__w/calibre/calibre/manual/template_lang.rst:584
1196 msgid ""
1197 "``item_value_no_plus``: the value of clicked item, URL-encoded. Special "
1198 "characters are escaped to make them valid in URLs and spaces are replaced by"
1199 " the ``%20``, not plus."
1200 msgstr "``item_value_no_plus``: värdet för det klickade objektet, URL-kodat. Specialtecken kodas så att de är giltiga i URL:er och blanksteg ersätts med ``%20``, inte med plustecken."
1201
1202 #: ../../../__w/calibre/calibre/manual/template_lang.rst:586
1203 msgid ""
1204 "There are several ways to construct the URL. The following use Wikipedia as "
1205 "an example."
1206 msgstr "Det finns flera sätt att skapa URL:en. I följande exempel används Wikipedia."
1207
1208 #: ../../../__w/calibre/calibre/manual/template_lang.rst:588
1209 msgid "The simplest is a basic template::"
1210 msgstr "Det enklaste är en grundläggande mall::"
1211
1212 #: ../../../__w/calibre/calibre/manual/template_lang.rst:592
1213 msgid ""
1214 "In some cases you might want to do more processing. There are four template "
1215 "functions you can use, depending on the complexity of the processing."
1216 msgstr "I vissa fall kanske du vill göra mer bearbetning. Det finns fyra mallfunktioner som du kan använda beroende på hur komplex bearbetningen är."
1217
1218 #: ../../../__w/calibre/calibre/manual/template_lang.rst:599
1219 msgid ""
1220 "For example, assume you have a custom column `Translators` "
1221 "(``#translators``) where the names are `Last name, First name`. You might "
1222 "need to convert the name to `First name Last name` when creating the URL. "
1223 "You can use the :ref:`ff_make_url` function to do this::"
1224 msgstr "Anta till exempel att du har en anpassad kolumn `Översättare` (``#translators``) där namnen har formen `Efternamn, Förnamn`. Du kan behöva omvandla namnet till `Förnamn Efternamn` när URL:en skapas. Du kan använda funktionen :ref:`ff_make_url` för detta::"
1225
1226 #: ../../../__w/calibre/calibre/manual/template_lang.rst:603
1227 msgid ""
1228 "If we assume that the translator's name is `Boy-Żeleński, Tadeusz` then the "
1229 "above template produces the link::"
1230 msgstr "Om vi antar att översättarens namn är `Boy-Żeleński, Tadeusz` skapar mallen ovan länken::"
1231
1232 #: ../../../__w/calibre/calibre/manual/template_lang.rst:607
1233 msgid ""
1234 "Note that the person's first name is now first, the space is now a plus, and"
1235 " that the non-English characters in the last name are URL-encoded."
1236 msgstr "Observera att personens förnamn nu står först, att blanksteget har blivit ett plustecken och att de icke-engelska tecknen i efternamnet är URL-kodade."
1237
1238 #: ../../../__w/calibre/calibre/manual/template_lang.rst:609
1239 msgid ""
1240 "The functions :ref:`ff_make_url_extended`, :ref:`ff_query_string`, and "
1241 ":ref:`ff_encode_for_url` might be useful depending upon any additional "
1242 "processing complexity."
1243 msgstr "Funktionerna :ref:`ff_make_url_extended`, :ref:`ff_query_string` och :ref:`ff_encode_for_url` kan vara användbara beroende på hur komplicerad den ytterligare bearbetningen är."
1244
1245 #: ../../../__w/calibre/calibre/manual/template_lang.rst:611
1246 msgid "**The calibre URL scheme**"
1247 msgstr "**calibres URL-schema**"
1248
1249 #: ../../../__w/calibre/calibre/manual/template_lang.rst:613
1250 msgid ""
1251 "Calibre supports several different URLs to navigate your calibre libraries. "
1252 "This section shows how to use templates to construct some of the URLs. See "
1253 ":doc:`url_scheme` for details on the URLs available."
1254 msgstr "calibre stöder flera olika URL:er för att navigera i dina calibre-bibliotek. Det här avsnittet visar hur mallar används för att skapa några av URL:erna. Information om tillgängliga URL:er finns i :doc:`url_scheme`."
1255
1256 #: ../../../__w/calibre/calibre/manual/template_lang.rst:616
1257 msgid "Switch to a specific library. The syntax of this URL is::"
1258 msgstr "Byt till ett visst bibliotek. URL:ens syntax är::"
1259
1260 #: ../../../__w/calibre/calibre/manual/template_lang.rst:620
1261 msgid ""
1262 "``Library_Name`` must be replaced with the name of the calibre library you "
1263 "wish to open. The library name is shown in the title bar of the window. It "
1264 "is a simple name, not the file path to the library. You must spell it as "
1265 "shown in the title bar, including letter case. The character ``_`` "
1266 "(underscore) stands for the current library. If the name contains any spaces"
1267 " or special characters then it must be hex encoded using the "
1268 ":ref:`ff_to_hex` function, as in the following example::"
1269 msgstr "``Library_Name`` måste ersättas med namnet på det calibre-bibliotek du vill öppna. Biblioteksnamnet visas i fönstrets namnlist. Det är ett enkelt namn, inte sökvägen till biblioteket. Du måste skriva det exakt som det visas i namnlisten, inklusive skiftläge. Tecknet ``_`` (understreck) står för det aktuella biblioteket. Om namnet innehåller blanksteg eller specialtecken måste det hexkodas med funktionen :ref:`ff_to_hex`, som i följande exempel::"
1270
1271 #: ../../../__w/calibre/calibre/manual/template_lang.rst:628
1272 msgid "The template generates the URL::"
1273 msgstr "Mallen genererar URL:en::"
1274
1275 #: ../../../__w/calibre/calibre/manual/template_lang.rst:632
1276 msgid ""
1277 "You can replace the ``current_library_name()`` function with the actual name"
1278 " of the library, as in::"
1279 msgstr "Du kan ersätta funktionen ``current_library_name()`` med bibliotekets faktiska namn, som i::"
1280
1281 #: ../../../__w/calibre/calibre/manual/template_lang.rst:636
1282 msgid ""
1283 "Links to show books. These links select a book in the calibre library. The "
1284 "syntax for this URL is::"
1285 msgstr "Länkar för att visa böcker. Dessa länkar markerar en bok i calibre-biblioteket. URL:ens syntax är::"
1286
1287 #: ../../../__w/calibre/calibre/manual/template_lang.rst:640
1288 msgid ""
1289 "The ``book id`` is the numeric calibre id for the book, available to "
1290 "templates as ``$id``. As above, the library name might need to be hex "
1291 "encoded. Here is an example::"
1292 msgstr "``book id`` är bokens numeriska calibre-ID och är tillgängligt för mallar som ``$id``. Som ovan kan biblioteksnamnet behöva hexkodas. Här är ett exempel::"
1293
1294 #: ../../../__w/calibre/calibre/manual/template_lang.rst:645
1295 msgid "It produces the URL::"
1296 msgstr "Det ger URL:en::"
1297
1298 #: ../../../__w/calibre/calibre/manual/template_lang.rst:649
1299 msgid ""
1300 "Searching for books. These links search for books in the specified calibre "
1301 "library. The syntax for this URL is::"
1302 msgstr "Söka efter böcker. Dessa länkar söker efter böcker i det angivna calibre-biblioteket. URL:ens syntax är::"
1303
1304 #: ../../../__w/calibre/calibre/manual/template_lang.rst:654
1305 msgid ""
1306 "where `query` is any valid calibre search expression. You must hex encode "
1307 "any query containing spaces or special characters, which generally means all"
1308 " of them. For example, the calibre search expression for searching for a "
1309 "hierarchical tag beginning with 'AA' is ``tags:\"=.AA\"``. This template "
1310 "constructs a search URL for that expression::"
1311 msgstr "där `query` är ett giltigt calibre-sökuttryck. Du måste hexkoda alla frågor som innehåller blanksteg eller specialtecken, vilket i praktiken innebär de flesta. Calibre-sökuttrycket för att söka efter en hierarkisk tagg som börjar med 'AA' är till exempel ``tags:\"=.AA\"``. Den här mallen skapar en sök-URL för uttrycket::"
1312
1313 #: ../../../__w/calibre/calibre/manual/template_lang.rst:660
1314 msgid "The resulting URL is::"
1315 msgstr "Den resulterande URL:en är::"
1316
1317 #: ../../../__w/calibre/calibre/manual/template_lang.rst:664
1318 msgid ""
1319 "Here is an example of the same URL built using the "
1320 ":ref:``ff_make_url_extended`` function instead of :ref:`ff_strcat`::"
1321 msgstr "Här är ett exempel på samma URL skapad med funktionen :ref:`ff_make_url_extended` i stället för :ref:`ff_strcat`::"
1322
1323 #: ../../../__w/calibre/calibre/manual/template_lang.rst:669
1324 msgid ""
1325 "Open a book details window on a book in some library. The syntax for this "
1326 "URL is::"
1327 msgstr "Öppna ett bokdetaljfönster för en bok i ett bibliotek. URL:ens syntax är::"
1328
1329 #: ../../../__w/calibre/calibre/manual/template_lang.rst:673
1330 msgid "An example template is::"
1331 msgstr "En exempelmall är::"
1332
1333 #: ../../../__w/calibre/calibre/manual/template_lang.rst:677
1334 #: ../../../__w/calibre/calibre/manual/template_lang.rst:694
1335 msgid "which produces the URL::"
1336 msgstr "vilket ger URL:en::"
1337
1338 #: ../../../__w/calibre/calibre/manual/template_lang.rst:681
1339 msgid ""
1340 "Open the notes associated with an author/series/etc. The syntax of the URL "
1341 "is::"
1342 msgstr "Öppna anteckningarna som är kopplade till en författare, serie och så vidare. URL:ens syntax är::"
1343
1344 #: ../../../__w/calibre/calibre/manual/template_lang.rst:686
1345 msgid ""
1346 "``Field_Name`` is the lookup name of the field. If the field is a custom "
1347 "column then replace the ``#`` character with an underscore (``_``). "
1348 "``Item_Id`` is the internal numeric ID of the value in the field. There "
1349 "isn't a template function that returns the ``Item_Id``, so templates will "
1350 "normally use the second form, ``Hex_Encoded_Item_Name``. Here is a sample "
1351 "template that opens the note for the person ``Boy-Żeleński, Tadeusz`` in the"
1352 " field ``#authtest``::"
1353 msgstr "``Field_Name`` är fältets söknamn. Om fältet är en anpassad kolumn ersätter du tecknet ``#`` med ett understreck (``_``). ``Item_Id`` är det interna numeriska ID:t för värdet i fältet. Det finns ingen mallfunktion som returnerar ``Item_Id``, så mallar använder normalt den andra formen, ``Hex_Encoded_Item_Name``. Här är en exempelmall som öppnar anteckningen för personen ``Boy-Żeleński, Tadeusz`` i fältet ``#authtest``::"
1354
1355 #: ../../../__w/calibre/calibre/manual/template_lang.rst:700
1356 msgid "Stored templates"
1357 msgstr "Lagrade mallar"
1358
1359 #: ../../../__w/calibre/calibre/manual/template_lang.rst:702
1360 msgid ""
1361 "Both :ref:`General Program Mode <general_mode>` and :ref:`Python Template "
1362 "Mode <python_mode>` support saving templates and calling those templates "
1363 "from another template, much like calling stored functions. You save "
1364 "templates using :guilabel:`Preferences->Advanced->Template functions`. More "
1365 "information is provided in that dialog. You call a template the same way you"
1366 " call a function, passing positional arguments if desired. An argument can "
1367 "be any expression. Examples of calling a template, assuming the stored "
1368 "template is named ``foo``:"
1369 msgstr "Både :ref:`Allmänt programläge <general_mode>` och :ref:`Python-malläge <python_mode>` stöder att mallar sparas och anropas från en annan mall, ungefär som lagrade funktioner. Du sparar mallar via :guilabel:`Inställningar -> Avancerat -> Mallfunktioner`. Mer information finns i dialogrutan. Du anropar en mall på samma sätt som en funktion och kan ange positionsargument. Ett argument kan vara vilket uttryck som helst. Exempel på hur en mall anropas, om den lagrade mallen heter ``foo``:"
1370
1371 #: ../../../__w/calibre/calibre/manual/template_lang.rst:704
1372 msgid "``foo()`` -- call the template passing no arguments."
1373 msgstr "``foo()`` – anropa mallen utan argument."
1374
1375 #: ../../../__w/calibre/calibre/manual/template_lang.rst:705
1376 msgid ""
1377 "``foo(a, b)`` call the template passing the values of the two variables "
1378 "``a`` and ``b``."
1379 msgstr "``foo(a, b)`` – anropa mallen och skicka värdena för de två variablerna ``a`` och ``b``."
1380
1381 #: ../../../__w/calibre/calibre/manual/template_lang.rst:706
1382 msgid ""
1383 "``foo(if field('series') then field('series_index') else 0 fi)`` -- if the "
1384 "book has a ``series`` then pass the ``series_index``, otherwise pass the "
1385 "value ``0``."
1386 msgstr "``foo(if field('series') then field('series_index') else 0 fi)`` – om boken har en ``series`` skickas ``series_index``, annars skickas värdet ``0``."
1387
1388 #: ../../../__w/calibre/calibre/manual/template_lang.rst:708
1389 msgid ""
1390 "In GPM you retrieve the arguments passed in the call to the stored template "
1391 "using the ``arguments`` function. It both declares and initializes local "
1392 "variables, effectively parameters. The variables are positional; they get "
1393 "the value of the parameter given in the call in the same position. If the "
1394 "corresponding parameter is not provided in the call then ``arguments`` "
1395 "assigns that variable the provided default value. If there is no default "
1396 "value then the variable is set to the empty string. For example, the "
1397 "following ``arguments`` function declares 2 variables, ``key``, "
1398 "``alternate``::"
1399 msgstr "I GPM hämtar du argumenten som skickades i anropet till den lagrade mallen med funktionen ``arguments``. Den både deklarerar och initierar lokala variabler, det vill säga parametrar. Variablerna är positionsberoende; de får värdet för parametern som anges på motsvarande position i anropet. Om motsvarande parameter inte anges i anropet tilldelar ``arguments`` variabeln det angivna standardvärdet. Om det inte finns något standardvärde sätts variabeln till den tomma strängen. Följande ``arguments``-funktion deklarerar till exempel två variabler, ``key`` och ``alternate``::"
1400
1401 #: ../../../__w/calibre/calibre/manual/template_lang.rst:712
1402 msgid "Examples, again assuming the stored template is named ``foo``:"
1403 msgstr "Exempel, fortfarande med antagandet att den lagrade mallen heter ``foo``:"
1404
1405 #: ../../../__w/calibre/calibre/manual/template_lang.rst:714
1406 msgid ""
1407 "``foo('#myseries')`` -- argument ``key`` is assigned the value "
1408 "``'myseries'`` and the argument ``alternate`` is assigned the default value "
1409 "``'series'``."
1410 msgstr "``foo('#myseries')`` – argumentet ``key`` tilldelas värdet ``'myseries'`` och argumentet ``alternate`` tilldelas standardvärdet ``'series'``."
1411
1412 #: ../../../__w/calibre/calibre/manual/template_lang.rst:715
1413 msgid ""
1414 "``foo('series', '#genre')`` the variable ``key`` is assigned the value "
1415 "``'series'`` and the variable ``alternate`` is assigned the value "
1416 "``'#genre'``."
1417 msgstr "``foo('series', '#genre')`` – variabeln ``key`` tilldelas värdet ``'series'`` och variabeln ``alternate`` värdet ``'#genre'``."
1418
1419 #: ../../../__w/calibre/calibre/manual/template_lang.rst:716
1420 msgid ""
1421 "``foo()`` -- the variable ``key`` is assigned the empty string and the "
1422 "variable ``alternate`` is assigned the value ``'series'``."
1423 msgstr "``foo()`` – variabeln ``key`` tilldelas den tomma strängen och variabeln ``alternate`` tilldelas värdet ``'series'``."
1424
1425 #: ../../../__w/calibre/calibre/manual/template_lang.rst:718
1426 msgid ""
1427 "In PTM the arguments are passed in the ``arguments`` parameter, which is a "
1428 "list of strings. There isn't any way to specify default values. You must "
1429 "check the length of the ``arguments`` list to be sure that the number of "
1430 "arguments is what you expect."
1431 msgstr "I PTM skickas argumenten i parametern ``arguments``, som är en lista med strängar. Det går inte att ange standardvärden. Du måste kontrollera längden på listan ``arguments`` för att säkerställa att antalet argument är det förväntade."
1432
1433 #: ../../../__w/calibre/calibre/manual/template_lang.rst:720
1434 msgid ""
1435 "An easy way to test stored templates is using the ``Template tester`` "
1436 "dialog. For ease of access give it a keyboard shortcut in "
1437 ":guilabel:`Preferences->Advanced->Keyboard shortcuts->Template tester`. "
1438 "Giving the ``Stored templates`` dialog a shortcut will help switching more "
1439 "rapidly between the tester and editing the stored template's source code."
1440 msgstr "Ett enkelt sätt att testa lagrade mallar är dialogrutan ``Malltestaren``. För att komma åt den snabbt ger du den ett kortkommando under :guilabel:`Inställningar -> Avancerat -> Kortkommandon -> Malltestaren`. Om du även ger dialogrutan ``Lagrade mallar`` ett kortkommando kan du snabbare växla mellan testaren och redigeringen av den lagrade mallens källkod."
1441
1442 #: ../../../__w/calibre/calibre/manual/template_lang.rst:723
1443 msgid "Providing additional information to templates"
1444 msgstr "Tillhandahålla ytterligare information till mallar"
1445
1446 #: ../../../__w/calibre/calibre/manual/template_lang.rst:725
1447 msgid ""
1448 "A developer can choose to pass additional information to the template "
1449 "processor, such as application-specific book metadata or information about "
1450 "what the processor is being asked to do. A template can access this "
1451 "information and use it during the evaluation."
1452 msgstr "En utvecklare kan välja att skicka ytterligare information till mallprocessorn, till exempel programspecifika bokmetadata eller information om vad processorn ska göra. En mall kan komma åt informationen och använda den under utvärderingen."
1453
1454 #: ../../../__w/calibre/calibre/manual/template_lang.rst:727
1455 msgid "**Developer: how to pass additional information**"
1456 msgstr "**Utvecklare: så skickar du ytterligare information**"
1457
1458 #: ../../../__w/calibre/calibre/manual/template_lang.rst:729
1459 msgid ""
1460 "The additional information is a Python dictionary containing pairs "
1461 "``variable_name: variable_value`` where the values must be strings. The "
1462 "template can access the dictionary, creating template local variables named "
1463 "``variable_name`` containing the value ``variable_value``. The user cannot "
1464 "change the name so it is best to use names that won't collide with other "
1465 "template local variables, for example by prefixing the name with an "
1466 "underscore."
1467 msgstr "Den ytterligare informationen är en Python-ordlista med paren ``variable_name: variable_value``, där värdena måste vara strängar. Mallen kan komma åt ordlistan och skapa lokala mallvariabler med namnet ``variable_name`` och värdet ``variable_value``. Användaren kan inte ändra namnet, så det är bäst att använda namn som inte krockar med andra lokala mallvariabler, till exempel genom att inleda namnet med ett understreck."
1468
1469 #: ../../../__w/calibre/calibre/manual/template_lang.rst:731
1470 msgid ""
1471 "This dictionary is passed to the template processor (the ``formatter``) "
1472 "using the named parameter ``global_vars=your_dict``. The full method "
1473 "signature is::"
1474 msgstr "Denna ordlista skickas till mallprocessorn (``formatter``) med den namngivna parametern ``global_vars=your_dict``. Den fullständiga metodsignaturen är::"
1475
1476 #: ../../../__w/calibre/calibre/manual/template_lang.rst:739
1477 msgid "**Template writer: how to access the additional information**"
1478 msgstr "**Mallförfattare: så kommer du åt den ytterligare informationen**"
1479
1480 #: ../../../__w/calibre/calibre/manual/template_lang.rst:741
1481 msgid ""
1482 "You access the additional information (the ``globals`` dictionary) in a "
1483 "template using the template function::"
1484 msgstr "Du kommer åt den ytterligare informationen (ordlistan ``globals``) i en mall med mallfunktionen::"
1485
1486 #: ../../../__w/calibre/calibre/manual/template_lang.rst:745
1487 msgid ""
1488 "where ``id`` is any legal variable name. This function checks whether the "
1489 "additional information provided by the developer contains the name. If it "
1490 "does then the function assigns the provided value to a template local "
1491 "variable with that name. If the name is not in the additional information "
1492 "and if an ``expression`` is provided, the ``expression`` is evaluated and "
1493 "the result is assigned to the local variable. If neither a value nor an "
1494 "expression is provided, the function assigns the empty string (``''``) to "
1495 "the local variable."
1496 msgstr "där ``id`` är ett giltigt variabelnamn. Funktionen kontrollerar om den ytterligare informationen som utvecklaren tillhandahöll innehåller namnet. Om den gör det tilldelas det angivna värdet till en lokal mallvariabel med det namnet. Om namnet inte finns i den ytterligare informationen och ett ``expression`` anges, utvärderas ``expression`` och resultatet tilldelas den lokala variabeln. Om varken ett värde eller ett uttryck anges tilldelar funktionen den tomma strängen (``''``) till den lokala variabeln."
1497
1498 #: ../../../__w/calibre/calibre/manual/template_lang.rst:747
1499 msgid ""
1500 "A template can set a value in the ``globals`` dictionary using the template "
1501 "function::"
1502 msgstr "En mall kan ange ett värde i ordlistan ``globals`` med mallfunktionen::"
1503
1504 #: ../../../__w/calibre/calibre/manual/template_lang.rst:751
1505 msgid ""
1506 "This function sets the ``globals`` dictionary key:value pair ``id:value`` "
1507 "where ``value`` is the value of the template local variable ``id``. If that "
1508 "local variable doesn't exist then ``value`` is set to the result of "
1509 "evaluating ``expression``."
1510 msgstr "Funktionen anger nyckel/värde-paret ``id:value`` i ordlistan ``globals``, där ``value`` är värdet för den lokala mallvariabeln ``id``. Om den lokala variabeln inte finns sätts ``value`` till resultatet av att utvärdera ``expression``."
1511
1512 #: ../../../__w/calibre/calibre/manual/template_lang.rst:754
1513 msgid "Notes on the difference between modes"
1514 msgstr "Anmärkningar om skillnaderna mellan lägena"
1515
1516 #: ../../../__w/calibre/calibre/manual/template_lang.rst:756
1517 msgid ""
1518 "The three program modes, :ref:`Single Function Mode <single_mode>` (SFM), "
1519 ":ref:`Template Program Mode <template_mode>` (`TPM`), and :ref:`General "
1520 "Program Mode <general_mode>` (`GPM`), work differently. SFM is intended to "
1521 "be 'simple' so it hides a lot of programming language bits."
1522 msgstr "De tre programlägena, :ref:`Enkelt funktionsläge <single_mode>` (SFM), :ref:`Mallprogramläge <template_mode>` (`TPM`) och :ref:`Allmänt programläge <general_mode>` (`GPM`), fungerar på olika sätt. SFM är avsett att vara 'enkelt' och döljer därför många delar av programmeringsspråket."
1523
1524 #: ../../../__w/calibre/calibre/manual/template_lang.rst:758
1525 msgid "Differences:"
1526 msgstr "Skillnader:"
1527
1528 #: ../../../__w/calibre/calibre/manual/template_lang.rst:760
1529 msgid ""
1530 "In SFM the value of the column is always passed as an 'invisible' first "
1531 "argument to a function included in the template."
1532 msgstr "I SFM skickas kolumnens värde alltid som ett 'osynligt' första argument till en funktion som ingår i mallen."
1533
1534 #: ../../../__w/calibre/calibre/manual/template_lang.rst:761
1535 msgid ""
1536 "SFM doesn't support the difference between variables and strings; all values"
1537 " are strings."
1538 msgstr "SFM skiljer inte mellan variabler och strängar; alla värden är strängar."
1539
1540 #: ../../../__w/calibre/calibre/manual/template_lang.rst:762
1541 msgid ""
1542 "The following SFM template returns either the series name or the string \"no"
1543 " series\"::"
1544 msgstr "Följande SFM-mall returnerar antingen serienamnet eller strängen \"no series\"::"
1545
1546 #: ../../../__w/calibre/calibre/manual/template_lang.rst:766
1547 msgid "The equivalent template in `TPM` is ::"
1548 msgstr "Motsvarande mall i `TPM` är::"
1549
1550 #: ../../../__w/calibre/calibre/manual/template_lang.rst:770
1551 msgid "The equivalent template in `GPM` is::"
1552 msgstr "Motsvarande mall i `GPM` är::"
1553
1554 #: ../../../__w/calibre/calibre/manual/template_lang.rst:774
1555 msgid ""
1556 "The first argument to ``ifempty`` is the value of the field ``series``. The "
1557 "second argument is the string ``no series``. In SFM the first argument, the "
1558 "value of the field, is automatically passed (the invisible argument)."
1559 msgstr "Det första argumentet till ``ifempty`` är värdet i fältet ``series``. Det andra argumentet är strängen ``no series``. I SFM skickas det första argumentet, fältets värde, automatiskt (det osynliga argumentet)."
1560
1561 #: ../../../__w/calibre/calibre/manual/template_lang.rst:775
1562 msgid ""
1563 "Several template functions, for example ``booksize()`` and "
1564 "``current_library_name()``, take no arguments. Because of the 'invisible "
1565 "argument' you cannot use these functions in SFM."
1566 msgstr "Flera mallfunktioner, till exempel ``booksize()`` och ``current_library_name()``, tar inga argument. På grund av det 'osynliga argumentet' kan du inte använda dessa funktioner i SFM."
1567
1568 #: ../../../__w/calibre/calibre/manual/template_lang.rst:776
1569 msgid ""
1570 "Nested functions, where a function calls another function to compute an "
1571 "argument, cannot be used in SFM. For example this template, intended to "
1572 "return the first 5 characters of the series value uppercased, won't work in "
1573 "SFM::"
1574 msgstr "Nästlade funktioner, där en funktion anropar en annan funktion för att beräkna ett argument, kan inte användas i SFM. Följande mall, som är avsedd att returnera de första fem tecknen i serievärdet med versaler, fungerar till exempel inte i SFM::"
1575
1576 #: ../../../__w/calibre/calibre/manual/template_lang.rst:780
1577 msgid ""
1578 "`TPM` and `GPM` support nested functions. The above template in `TPM` would "
1579 "be::"
1580 msgstr "`TPM` och `GPM` stöder nästlade funktioner. Mallen ovan skulle i `TPM` vara::"
1581
1582 #: ../../../__w/calibre/calibre/manual/template_lang.rst:784
1583 msgid "In `GPM` it would be::"
1584 msgstr "I `GPM` skulle det vara::"
1585
1586 #: ../../../__w/calibre/calibre/manual/template_lang.rst:788
1587 msgid ""
1588 "As noted in the above :ref:`Template Program Mode <template_mode>` section, "
1589 "using ``{`` and ``}`` characters in `TPM` string literals can lead to errors"
1590 " or unexpected results because they confuse the template processor. It tries"
1591 " to treat them as template boundaries, not characters. In some but not all "
1592 "cases you can replace a ``{`` with ``[[`` and a ``}`` with `]]`. Generally, "
1593 "if your program contains ``{`` and ``}`` characters then you should use "
1594 "`General Program Mode`."
1595 msgstr "Som anges i avsnittet :ref:`Mallprogramläge <template_mode>` ovan kan tecknen ``{`` och ``}`` i `TPM`-strängliteraler orsaka fel eller oväntade resultat, eftersom de förvirrar mallprocessorn. Den försöker tolka dem som mallgränser, inte som tecken. I vissa, men inte alla, fall kan du ersätta ``{`` med ``[[`` och ``}`` med `]]`. Om programmet innehåller tecknen ``{`` och ``}`` bör du i allmänhet använda `Allmänt programläge`."
1596
1597 #: ../../../__w/calibre/calibre/manual/template_lang.rst:792
1598 msgid "User-defined Python template functions"
1599 msgstr "Användardefinierade Python-mallfunktioner"
1600
1601 #: ../../../__w/calibre/calibre/manual/template_lang.rst:794
1602 msgid ""
1603 "You can add your own Python functions to the template processor. Such "
1604 "functions can be used in any of the three template programming modes. The "
1605 "functions are added by going to :guilabel:`Preferences -> Advanced -> "
1606 "Template functions`. Instructions are shown in that dialog. Note that you "
1607 "can use `Python Templates` for a similar purpose. As calling user-defined "
1608 "functions is faster than calling a Python template, user-defined functions "
1609 "might be more efficient depending on the complexity of what the function or "
1610 "template does."
1611 msgstr "Du kan lägga till egna Python-funktioner i mallprocessorn. Sådana funktioner kan användas i alla tre mallprogramlägen. Funktionerna läggs till via :guilabel:`Inställningar -> Avancerat -> Mallfunktioner`. Instruktioner visas i dialogrutan. Observera att du kan använda `Python-mallar` för ett liknande ändamål. Eftersom anrop av användardefinierade funktioner är snabbare än anrop av en Python-mall kan användardefinierade funktioner vara effektivare, beroende på hur komplicerad funktionen eller mallen är."
1612
1613 #: ../../../__w/calibre/calibre/manual/template_lang.rst:797
1614 msgid "Special notes for using templates in different contexts"
1615 msgstr "Särskilda anmärkningar om att använda mallar i olika sammanhang"
1616
1617 #: ../../../__w/calibre/calibre/manual/template_lang.rst:799
1618 msgid ""
1619 "In the GUI (:guilabel:`Columns made from other columns` and "
1620 ":guilabel:`Template searches`):"
1621 msgstr "I det grafiska gränssnittet (:guilabel:`Kolumner skapade från andra kolumner` och :guilabel:`Mallsökningar`):"
1622
1623 #: ../../../__w/calibre/calibre/manual/template_lang.rst:801
1624 msgid "GPM templates work as before."
1625 msgstr "GPM-mallar fungerar som tidigare."
1626
1627 #: ../../../__w/calibre/calibre/manual/template_lang.rst:802
1628 msgid "Python templates have full access to the calibre database."
1629 msgstr "Python-mallar har fullständig åtkomst till calibre-databasen."
1630
1631 #: ../../../__w/calibre/calibre/manual/template_lang.rst:804
1632 msgid "In icon rules:"
1633 msgstr "I ikonregler:"
1634
1635 #: ../../../__w/calibre/calibre/manual/template_lang.rst:806
1636 msgid ""
1637 "icon rule templates have no book data so field-based functions such as "
1638 ":ref:`ff_format_date_field`, :ref:`ff_list_count_field`, and "
1639 ":ref:`ff_check_yes_no` won't work."
1640 msgstr "mallar för ikonregler har inga bokdata, så fältbaserade funktioner som :ref:`ff_format_date_field`, :ref:`ff_list_count_field` och :ref:`ff_check_yes_no` fungerar inte."
1641
1642 #: ../../../__w/calibre/calibre/manual/template_lang.rst:808
1643 msgid "In the Content server:"
1644 msgstr "I Innehållsservern:"
1645
1646 #: ../../../__w/calibre/calibre/manual/template_lang.rst:810
1647 msgid ""
1648 "Templates have access to the new API but not the old API (LibraryDatabase)."
1649 msgstr "Mallar har åtkomst till det nya API:et men inte det gamla API:et (LibraryDatabase)."
1650
1651 #: ../../../__w/calibre/calibre/manual/template_lang.rst:811
1652 msgid ""
1653 "Because of the above, the following formatter functions are not guaranteed "
1654 "to work in GPM templates (composite columns, icon rules, etc) and should be "
1655 "avoided if you use the content server:"
1656 msgstr "På grund av ovanstående är det inte garanterat att följande formateringsfunktioner fungerar i GPM-mallar (sammansatta kolumner, ikonregler och så vidare), och de bör undvikas om du använder Innehållsservern:"
1657
1658 #: ../../../__w/calibre/calibre/manual/template_lang.rst:813
1659 msgid ":ref:`ff_connected_device_name`"
1660 msgstr ":ref:`ff_connected_device_name`"
1661
1662 #: ../../../__w/calibre/calibre/manual/template_lang.rst:814
1663 msgid ":ref:`ff_connected_device_uuid`"
1664 msgstr ":ref:`ff_connected_device_uuid`"
1665
1666 #: ../../../__w/calibre/calibre/manual/template_lang.rst:815
1667 msgid ":ref:`ff_current_virtual_library_name`"
1668 msgstr ":ref:`ff_current_virtual_library_name`"
1669
1670 #: ../../../__w/calibre/calibre/manual/template_lang.rst:816
1671 msgid ":ref:`ff_is_marked`"
1672 msgstr ":ref:`ff_is_marked`"
1673
1674 #: ../../../__w/calibre/calibre/manual/template_lang.rst:817
1675 msgid ":ref:`ff_virtual_libraries`"
1676 msgstr ":ref:`ff_virtual_libraries`"
1677
1678 #: ../../../__w/calibre/calibre/manual/template_lang.rst:820
1679 msgid "Special notes for save/send templates"
1680 msgstr "Särskilda anvisningar för mallar för sparande och sändning"
1681
1682 #: ../../../__w/calibre/calibre/manual/template_lang.rst:822
1683 msgid ""
1684 "Special processing is applied when a template is used in a :guilabel:`Save "
1685 "to disk` or :guilabel:`Send to device` template. The values of the fields "
1686 "are cleaned, replacing characters that are special to file systems with "
1687 "underscores, including slashes. This means that field text cannot be used to"
1688 " create folders. However, slashes are not changed in prefix or suffix "
1689 "strings, so slashes in these strings will cause folders to be created. "
1690 "Because of this, you can create variable-depth folder structure."
1691 msgstr "Särskild bearbetning används när en mall används som mall för :guilabel:`Spara till disk` eller :guilabel:`Skicka till enhet`. Fältvärdena rensas genom att tecken som är speciella för filsystem, inklusive snedstreck, ersätts med understreck. Det innebär att fälttext inte kan användas för att skapa mappar. Snedstreck ändras däremot inte i prefix- eller suffixsträngar, så snedstreck i dessa strängar skapar mappar. Därför kan du skapa en mappstruktur med varierande djup."
1692
1693 #: ../../../__w/calibre/calibre/manual/template_lang.rst:824
1694 msgid ""
1695 "For example, assume we want the folder structure `series/series_index - "
1696 "title`, with the caveat that if series does not exist, then the title should"
1697 " be in the top folder. The template to do this is::"
1698 msgstr "Antag till exempel att vi vill ha mappstrukturen `series/series_index - title`, med förbehållet att om serien inte finns, så bör titeln vara i översta mappen. Mallen för att göra detta är::"
1699
1700 #: ../../../__w/calibre/calibre/manual/template_lang.rst:828
1701 msgid "The slash and the hyphen appear only if series is not empty."
1702 msgstr "Snedstrecket och bindestrecket visas bara om serien inte är tom."
1703
1704 #: ../../../__w/calibre/calibre/manual/template_lang.rst:830
1705 msgid ""
1706 "The lookup function lets us do even fancier processing. For example, assume "
1707 "that if a book has a series, then we want the folder structure "
1708 "`series/series index - title.fmt`. If the book does not have a series then "
1709 "we want the folder structure `genre/author_sort/title.fmt`. If the book has "
1710 "no genre then we want to use 'Unknown'. We want two completely different "
1711 "paths, depending on the value of series."
1712 msgstr "Funktionen lookup gör det möjligt att utföra ännu mer avancerad bearbetning. Anta till exempel att vi vill använda mappstrukturen `series/series index - title.fmt` om boken ingår i en serie. Om den inte ingår i en serie vill vi använda mappstrukturen `genre/author_sort/title.fmt`. Om boken saknar genre vill vi använda 'Unknown'. Vi vill alltså ha två helt olika sökvägar beroende på värdet för series."
1713
1714 #: ../../../__w/calibre/calibre/manual/template_lang.rst:832
1715 msgid "To accomplish this, we:"
1716 msgstr "För att åstadkomma detta gör vi följande:"
1717
1718 #: ../../../__w/calibre/calibre/manual/template_lang.rst:834
1719 msgid ""
1720 "Create a composite field (give it lookup name #aa) containing "
1721 "``{series}/{series_index} - {title}``. If the series is not empty, then this"
1722 " template will produce `series/series_index - title`."
1723 msgstr "Skapa ett sammansatt fält (ge det söknamnet #aa) som innehåller ``{series}/{series_index} - {title}``. Om series inte är tomt skapar mallen `series/series_index - title`."
1724
1725 #: ../../../__w/calibre/calibre/manual/template_lang.rst:835
1726 msgid ""
1727 "Create a composite field (give it lookup name #bb) containing "
1728 "``{#genre:ifempty(Unknown)}/{author_sort}/{title}``. This template produces "
1729 "`genre/author_sort/title`, where an empty genre is replaced with `Unknown`."
1730 msgstr "Skapa ett sammansatt fält (ge det söknamnet #bb) som innehåller ``{#genre:ifempty(Unknown)}/{author_sort}/{title}``. Mallen skapar `genre/author_sort/title`, där en tom genre ersätts med `Unknown`."
1731
1732 #: ../../../__w/calibre/calibre/manual/template_lang.rst:836
1733 msgid ""
1734 "Set the save template to ``{series:lookup(.,#aa,#bb)}``. This template "
1735 "chooses composite field ``#aa`` if series is not empty and composite field "
1736 "``#bb`` if series is empty. We therefore have two completely different save "
1737 "paths, depending on whether or not `series` is empty."
1738 msgstr "Ange sparmallen som ``{series:lookup(.,#aa,#bb)}``. Mallen väljer det sammansatta fältet ``#aa`` om series inte är tomt och det sammansatta fältet ``#bb`` om series är tomt. Vi får därför två helt olika sökvägar beroende på om `series` är tomt eller inte."
1739
1740 #: ../../../__w/calibre/calibre/manual/template_lang.rst:839
1741 msgid "Tips"
1742 msgstr "Tips"
1743
1744 #: ../../../__w/calibre/calibre/manual/template_lang.rst:841
1745 msgid ""
1746 "Use the Template Tester to test templates. Add the tester to the context "
1747 "menu for books in the library and/or give it a keyboard shortcut."
1748 msgstr "Använd Malltestaren för att testa mallar. Lägg till testaren i snabbmenyn för böcker i biblioteket och/eller ge den ett kortkommando."
1749
1750 #: ../../../__w/calibre/calibre/manual/template_lang.rst:842
1751 msgid ""
1752 "Templates can use other templates by referencing composite columns built "
1753 "with the desired template. Alternatively, you can use Stored Templates."
1754 msgstr "Mallar kan använda andra mallar genom att referera till sammansatta kolumner som bygger på den önskade mallen. Du kan också använda Lagrade mallar."
1755
1756 #: ../../../__w/calibre/calibre/manual/template_lang.rst:843
1757 msgid ""
1758 "In a plugboard, you can set a field to empty (or whatever is equivalent to "
1759 "empty) by using the special template ``{}``. This template will always "
1760 "evaluate to an empty string."
1761 msgstr "I en metadatakoppling kan du ställa in ett fält till tomt (eller vad som motsvarar tomt) genom att använda den särskilda mallen ``{}``. Den här mallen kommer alltid att utvärderas till en tom sträng."
1762
1763 #: ../../../__w/calibre/calibre/manual/template_lang.rst:844
1764 msgid ""
1765 "The technique described above to show numbers even if they have a zero value"
1766 " works with the standard field series_index."
1767 msgstr "Den teknik som beskrivs ovan för att visa siffror även om de har ett nollvärde fungerar med standardfältet series_index."
1768
1769 #: ../../../__w/calibre/calibre/manual/template_lang.rst:849
1770 msgid "Template function reference"
1771 msgstr "Mallfunktionsreferens"