# SOME DESCRIPTIVE TITLE. # Copyright (C) Kovid Goyal # This file is distributed under the same license as the calibre package. # # Translators: # Jonatan Nyberg, 2025 # efef6ec5b435a041fce803c7f8af77d2_2341d43, 2018,2020 # efef6ec5b435a041fce803c7f8af77d2_2341d43, 2020 # Jonatan Nyberg, 2025-2026 # Jonatan Nyberg, 2016-2017,2021,2026 # Jonatan Nyberg, 2019-2021 # efef6ec5b435a041fce803c7f8af77d2_2341d43, 2018 # Jonatan Nyberg, 2026 # Merarom , 2015,2017 msgid "" msgstr "" "Project-Id-Version: calibre\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2026-09-16 15:05+0000\n" "PO-Revision-Date: 2015-01-10 01:24+0000\n" "Last-Translator: Merarom , 2015,2017\n" "Language-Team: Swedish (http://app.transifex.com/calibre/calibre/language/sv/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Language: sv\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: ../../../__w/calibre/calibre/manual/snippets.rst:2 msgid "Snippets" msgstr "Kodavsnitt" #: ../../../__w/calibre/calibre/manual/snippets.rst:6 msgid "" "The calibre E-book editor supports *snippets*. A snippet is a piece of text " "that is either re-used often or contains a lot of redundant text. The editor" " allows you to insert a snippet with only a few key strokes. For example, " "suppose you often find yourself inserting link tags when editing HTML files," " then you can simply type ```` tags so you can easily type in the text for " "the link." msgstr "Dessutom markeras ordet ``filename`` och markören placeras på det, så att du enkelt kan skriva in det verkliga filnamnet med hjälp av redigerarens praktiska :ref:`editor_auto_complete`-funktion. När du har skrivit filnamnet trycker du på |ct| igen. Markören flyttas då till platsen mellan ````-taggarna, där du enkelt kan skriva länktexten." #: ../../../__w/calibre/calibre/manual/snippets.rst:21 msgid "" "The snippets system in the editor is very sophisticated, there are a few " "built-in snippets and you can create your own to suit your editing style." msgstr "Kodavsnittssystemet i redigeraren är mycket avancerat. Det finns några inbyggda kodavsnitt, och du kan skapa egna som passar ditt sätt att arbeta." #: ../../../__w/calibre/calibre/manual/snippets.rst:24 msgid "" "The following discussion of the built-in snippets should help illustrate the" " power of the snippets system." msgstr "Genomgången av de inbyggda kodavsnitten nedan visar hur kraftfullt systemet är." #: ../../../__w/calibre/calibre/manual/snippets.rst:28 msgid "" "You can also use snippets in the text entry fields in the :guilabel:`Search " "& replace` panel, however, placeholders (using |ct| to jump around) will not" " work." msgstr "Du kan också använda kodavsnitt i textfälten på panelen :guilabel:`Sök och ersätt`. Platshållare där du hoppar mellan positioner med |ct| fungerar dock inte där." #: ../../../__w/calibre/calibre/manual/snippets.rst:33 msgid "The built-in snippets" msgstr "Inbyggda kodavsnitt" #: ../../../__w/calibre/calibre/manual/snippets.rst:35 msgid "" "The built-in snippets are described below. Note that you can override them " "by creating your own snippets with the same trigger text." msgstr "De inbyggda kodavsnitten beskrivs nedan. Observera att du kan åsidosätta dem genom att skapa dina egna kodavsnitt med samma utlösartext." #: ../../../__w/calibre/calibre/manual/snippets.rst:39 msgid "Inserting filler text [Lorem]" msgstr "Infoga fyllnadstext [Lorem]" #: ../../../__w/calibre/calibre/manual/snippets.rst:41 msgid "" "The first built-in snippet, and the simplest is used to insert filler text " "into a document. The filler text is taken from `De finibus bonorum et " "malorum `_ a " "philosophical work by Cicero (translated to English). To use it simply type " "``Lorem`` in an HTML file and press |ct|. It will be replaced by a couple of" " paragraphs of filler." msgstr "Det första inbyggda kodavsnittet, som också är det enklaste, används för att infoga fyllnadstext i ett dokument. Fyllnadstexten hämtas från `De finibus bonorum et malorum `_, ett filosofiskt verk av Cicero som har översatts till engelska. För att använda kodavsnittet skriver du helt enkelt ``Lorem`` i en HTML-fil och trycker på |ct|. Texten ersätts då med ett par stycken fyllnadstext." #: ../../../__w/calibre/calibre/manual/snippets.rst:48 msgid "" "The definition of this snippet is very simple, the trigger text is defined " "as ``Lorem`` and the template is defined simply as the literal text to be " "inserted. You can easily customize it to use your favorite form of filler " "text." msgstr "Definitionen av kodavsnittet är mycket enkel. Utlösartexten är ``Lorem`` och mallen består av den bokstavliga text som ska infogas. Du kan enkelt byta ut den mot den fyllnadstext du föredrar." #: ../../../__w/calibre/calibre/manual/snippets.rst:53 msgid "Inserting a self-closing HTML tag [<>]" msgstr "Infoga en självstängande HTML-tagg [<>]" #: ../../../__w/calibre/calibre/manual/snippets.rst:55 msgid "" "Now let's look at a simple example of the powerful concept of " "*placeholders*. Say you want to insert the self-closing tag ``
``. Just " "type ``<>``, and press |ct|, the editor will expand the snippet to::" msgstr "Nu tittar vi på ett enkelt exempel på det kraftfulla begreppet *platshållare*. Anta att du vill infoga den självstängande taggen ``
``. Skriv ``<>`` och tryck på |ct|, så expanderar redigeraren kodavsnittet till::" #: ../../../__w/calibre/calibre/manual/snippets.rst:61 msgid "" "Here, the ``|`` symbol represents the current cursor position. You can then " "type ``hr`` and press |ct| to move the cursor to after the end of the tag. " "This snippet is defined as::" msgstr "Här anger symbolen ``|`` markörens aktuella position. Skriv ``hr`` och tryck på |ct| för att flytta markören till positionen efter taggen. Kodavsnittet definieras så här::" #: ../../../__w/calibre/calibre/manual/snippets.rst:68 msgid "" "Placeholders are simply the dollar ($) sign followed by a number. When the " "snippet is expanded by pressing |ct| the cursor is positioned at the first " "placeholder (the placeholder with the lowest number). When you press |ct| " "again the cursor jumps to the next placeholder (the placeholder with the " "next higher number)." msgstr "Platshållare består av ett dollartecken ($) följt av ett tal. När kodavsnittet expanderas med |ct| placeras markören vid den första platshållaren, alltså den med lägst nummer. Nästa gång du trycker på |ct| flyttas markören till platshållaren med närmast högre nummer." #: ../../../__w/calibre/calibre/manual/snippets.rst:75 msgid "Inserting an HTML link tag [`` tags so you can easily type in the text for " "the link. After you are done typing the text, press |ct| again to jump to " "the point after the closing tag. This snippet is defined as::" msgstr "Dessutom markeras ordet ``filename`` och markören placeras på det, så att du enkelt kan skriva det verkliga filnamnet med redigerarens praktiska :ref:`editor_auto_complete`-funktion. När filnamnet är klart trycker du på |ct| igen. Markören flyttas då till positionen mellan ``
``-taggarna, där du skriver länktexten. Tryck på |ct| ännu en gång för att flytta markören till positionen efter sluttaggen. Kodavsnittet definieras så här::" #: ../../../__w/calibre/calibre/manual/snippets.rst:96 msgid "" "There are a couple of new features here. First the ``$1`` placeholder has " "become more complex. It now includes some *default text* (the word " "``filename``). If a placeholder contains default text, the default text is " "substituted for the placeholder when the snippet is expanded. Also when you " "jump to a placeholder with default text using |ct|, the default text is " "selected. In this way, you can use default text to act as a reminder to you " "to fill in important parts of the template. You can specify default text for" " a placeholder by using the syntax: ``${:default text}``." msgstr "Här finns ett par nya funktioner. Platshållaren ``$1`` har blivit mer avancerad och innehåller nu *standardtexten* ``filename``. När kodavsnittet expanderas ersätter standardtexten platshållaren. När du sedan hoppar till platshållaren med |ct| markeras standardtexten. Den kan därför fungera som en påminnelse om att fylla i viktiga delar av mallen. Standardtext anges med syntaxen ``${:default text}``." #: ../../../__w/calibre/calibre/manual/snippets.rst:105 msgid "" "The other new feature is that the second placeholder has an asterisk after " "it (``${2*}``). This means that any text that was selected before expanding " "the template is substituted for the placeholder. To see this in action, " "select some text in the editor, press |ct|, type ```` tag" " and jump between the ``src`` and ``alt`` attributes::" msgstr "Detta fungerar ungefär som att infoga en HTML-länk, vilket vi såg ovan. Du kan snabbt infoga taggen ``\"description\"`` och hoppa mellan attributen ``src`` och ``alt``::" #: ../../../__w/calibre/calibre/manual/snippets.rst:124 msgid "Insert an arbitrary HTML tag [<<]" msgstr "Infoga en godtycklig HTML-tagg [<<]" #: ../../../__w/calibre/calibre/manual/snippets.rst:126 msgid "" "This allows you to insert an arbitrary full HTML tag (or wrap previously " "selected text in the tag). To use it, simply type ``<<`` and press |ct|. If " "you want to wrap selected text, first select the text, press |ct| then type " "``<<`` and press |ct| again. The editor will expand it to::" msgstr "Med detta kodavsnitt kan du infoga en valfri fullständig HTML-tagg eller omsluta tidigare markerad text med taggen. Skriv ``<<`` och tryck på |ct|. Om du vill omsluta markerad text markerar du den först, trycker på |ct|, skriver ``<<`` och trycker på |ct| igen. Redigeraren expanderar kodavsnittet till::" #: ../../../__w/calibre/calibre/manual/snippets.rst:134 msgid "" "Type the tag name, for example: ``span`` and press |ct|, that will result " "in::" msgstr "Skriv taggnamnet, till exempel ``span``, och tryck på |ct|. Resultatet blir::" #: ../../../__w/calibre/calibre/manual/snippets.rst:138 msgid "" "You will note that the closing tag has been automatically filled with " "``span``. This is achieved with yet another feature of placeholders, " "*mirroring*. Mirroring simply means that if you specify the same placeholder" " more than once in a template, the second and all later positions will be " "automatically filled in with whatever you type in the first position, when " "you press |ct|. The definition for this snippet is::" msgstr "Du märker att sluttaggen automatiskt har fyllts i med ``span``. Det görs med en annan platshållarfunktion: *spegling*. Om samma platshållare anges flera gånger i en mall fylls den andra och alla senare förekomster automatiskt i med det du skrev vid den första positionen när du trycker på |ct|. Kodavsnittet definieras så här::" #: ../../../__w/calibre/calibre/manual/snippets.rst:148 msgid "" "As you can see, the first placeholder ($1) has been specified twice, the " "second time in the closing tag, which will simply copy whatever you type in " "the opening tag." msgstr "Som du ser har den första platshållaren ($1) angetts två gånger. Den andra förekomsten finns i sluttaggen och kopierar helt enkelt det du skriver i starttaggen." #: ../../../__w/calibre/calibre/manual/snippets.rst:153 msgid "Inserting an arbitrary HTML tag with a class attribute [Preferences->Editor settings->Manage snippets` in the " "editor. This will pop-up an easy to use dialog to help you create your own " "snippets. Simply click the :guilabel:`Add snippet` button and you will see a" " dialog that looks like:" msgstr "Kodavsnitt blir särskilt användbara eftersom du kan skapa egna som passar ditt arbetssätt. Gå till :guilabel:`Redigera->Inställningar->Redigerarinställningar->Hantera kodavsnitt` i redigeraren. Då öppnas en lättanvänd dialogruta. Klicka på :guilabel:`Lägg till kodavsnitt` för att visa följande dialogruta:" #: ../../../__w/calibre/calibre/manual/snippets.rst:175 msgid "The create your own snippets tool" msgstr "Verktyget för att skapa egna kodavsnitt" #: ../../../__w/calibre/calibre/manual/snippets.rst:180 msgid "" "First give your snippet a name, something descriptive, to help identify the " "snippet in the future. Then specify the *trigger*. A trigger is simply the " "text that you have to type in the editor before pressing |ct| in order to " "expand the snippet." msgstr "Ge först kodavsnittet ett beskrivande namn så att du kan identifiera det senare. Ange sedan *utlösaren*, alltså den text som ska skrivas i redigeraren innan du trycker på |ct| för att expandera kodavsnittet." #: ../../../__w/calibre/calibre/manual/snippets.rst:185 msgid "" "Then specify the snippet template. You should start with one of the examples" " above and modify it to suit your needs. Finally, specify which file types " "you want the snippet to be active for. This way you can have multiple " "snippets with the same trigger text that work differently in different file " "types." msgstr "Ange sedan kodavsnittets mall. Utgå gärna från något av exemplen ovan och anpassa det efter dina behov. Ange slutligen vilka filtyper kodavsnittet ska vara aktivt för. På så sätt kan flera kodavsnitt ha samma utlösartext men fungera olika i olika filtyper." #: ../../../__w/calibre/calibre/manual/snippets.rst:190 msgid "" "The next step is to test your newly created snippet. Use the " ":guilabel:`Test` box at the bottom. Type in the trigger text and press |ct| " "to expand the snippet and jump between placeholders." msgstr "Nästa steg är att testa det nya kodavsnittet. Använd rutan :guilabel:`Test` längst ned. Skriv utlösartexten och tryck på |ct| för att expandera kodavsnittet och hoppa mellan platshållarna."