Debian Codegraph @

translations/manual/de/function_mode.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 # Ettore Atalan <[email protected]>, 2014
7 # cde8219c602e00fba7a6323daf1bc8c4_7bef17c <1f2ef1d4e82fac5e8fcc2d877b797bcf_238988>, 2016
8 # cde8219c602e00fba7a6323daf1bc8c4_7bef17c <1f2ef1d4e82fac5e8fcc2d877b797bcf_238988>, 2016
9 # Moritz, 2015
10 # rs_bitbucket, 2016
11 # 75b2456ff925a21e1fb1c9b0eec898b6_dd7fae1 <eacf3b7eb4b0679577492913a01c86b6_200915>, 2015
12 # Simon Schütte, 2015
13 # RiseT, 2016
14 msgid ""
15 msgstr ""
16 "Project-Id-Version: calibre\n"
17 "Report-Msgid-Bugs-To: \n"
18 "POT-Creation-Date: 2026-02-17 16:44+0000\n"
19 "PO-Revision-Date: 2014-11-21 02:54+0000\n"
20 "Last-Translator: rs_bitbucket, 2016\n"
21 "Language-Team: German (http://app.transifex.com/calibre/calibre/language/de/)\n"
22 "MIME-Version: 1.0\n"
23 "Content-Type: text/plain; charset=UTF-8\n"
24 "Content-Transfer-Encoding: 8bit\n"
25 "Language: de\n"
26 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
27
28 #: ../../../__w/calibre/calibre/manual/function_mode.rst:2
29 msgid "Function mode for Search & replace in the Editor"
30 msgstr ""
31
32 #: ../../../__w/calibre/calibre/manual/function_mode.rst:4
33 msgid ""
34 "The :guilabel:`Search & replace` tool in the editor supports a *function "
35 "mode*. In this mode, you can combine regular expressions (see :doc:`regexp`)"
36 " with arbitrarily powerful Python functions to do all sorts of advanced text"
37 " processing."
38 msgstr ""
39
40 #: ../../../__w/calibre/calibre/manual/function_mode.rst:9
41 msgid ""
42 "In the standard *regexp* mode for search and replace, you specify both a "
43 "regular expression to search for as well as a template that is used to "
44 "replace all found matches. In function mode, instead of using a fixed "
45 "template, you specify an arbitrary function, in the `Python programming "
46 "language <https://docs.python.org>`_. This allows you to do lots of things "
47 "that are not possible with simple templates."
48 msgstr ""
49
50 #: ../../../__w/calibre/calibre/manual/function_mode.rst:16
51 msgid ""
52 "Techniques for using function mode and the syntax will be described by means"
53 " of examples, showing you how to create functions to perform progressively "
54 "more complex tasks."
55 msgstr "Techniken und Syntax des Funktions Modus werden mithilfe von Beispielen beschrieben, welche zeigen wie zunehmend schwierigere Aufgaben erledigt werden."
56
57 #: ../../../__w/calibre/calibre/manual/function_mode.rst:21
58 msgid "The Function mode"
59 msgstr ""
60
61 #: ../../../__w/calibre/calibre/manual/function_mode.rst:26
62 msgid "Automatically fixing the case of headings in the document"
63 msgstr "Automatisches Anpassen der Groß/Kleinschreibung der Dokumentüberschriften"
64
65 #: ../../../__w/calibre/calibre/manual/function_mode.rst:28
66 msgid ""
67 "Here, we will leverage one of the builtin functions in the editor to "
68 "automatically change the case of all text inside heading tags to title "
69 "case::"
70 msgstr "Hier verwenden wir eine der eingebauten Funktionen des Editors um automatisch die Groß/Kleinschreibung aller Texte innerhalb eines Überschriften Tags in Titel Schreibweise zu ändern:"
71
72 #: ../../../__w/calibre/calibre/manual/function_mode.rst:33
73 msgid ""
74 "For the function, simply choose the :guilabel:`Title-case text (ignore "
75 "tags)` builtin function. This will change titles that look like: ``<h1>some "
76 "titLE</h1>`` to ``<h1>Some Title</h1>``. It will work even if there are "
77 "other HTML tags inside the heading tags."
78 msgstr ""
79
80 #: ../../../__w/calibre/calibre/manual/function_mode.rst:40
81 msgid "Your first custom function - smartening hyphens"
82 msgstr "Die erste benutzerdefinierte Funktion - Trennstriche typografisieren"
83
84 #: ../../../__w/calibre/calibre/manual/function_mode.rst:42
85 msgid ""
86 "The real power of function mode comes from being able to create your own "
87 "functions to process text in arbitrary ways. The Smarten Punctuation tool in"
88 " the editor leaves individual hyphens alone, so you can use this function to"
89 " replace them with em-dashes."
90 msgstr ""
91
92 #: ../../../__w/calibre/calibre/manual/function_mode.rst:47
93 msgid ""
94 "To create a new function, simply click the :guilabel:`Create/edit` button to"
95 " create a new function and copy the Python code from below."
96 msgstr ""
97
98 #: ../../../__w/calibre/calibre/manual/function_mode.rst:55
99 msgid ""
100 "Every :guilabel:`Search & replace` custom function must have a unique name "
101 "and consist of a Python function named replace, that accepts all the "
102 "arguments shown above. For the moment, we won't worry about all the "
103 "different arguments to ``replace()`` function. Just focus on the ``match`` "
104 "argument. It represents a match when running a search and replace. Its full "
105 "documentation in available `here "
106 "<https://docs.python.org/library/re.html#match-objects>`_. ``match.group()``"
107 " simply returns all the matched text and all we do is replace hyphens in "
108 "that text with em-dashes, first replacing double hyphens and then single "
109 "hyphens."
110 msgstr ""
111
112 #: ../../../__w/calibre/calibre/manual/function_mode.rst:65
113 msgid "Use this function with the find regular expression::"
114 msgstr "Verwendet man diese Funktion um den folgenden Regulären Ausdruck zu suchen::"
115
116 #: ../../../__w/calibre/calibre/manual/function_mode.rst:69
117 msgid ""
118 "And it will replace all hyphens with em-dashes, but only in actual text and "
119 "not inside HTML tag definitions."
120 msgstr "Wird sie alle Trennstriche mit Gedankenstrichen ersetzen. Allerdings nur im tatsächlichen Text und nicht innerhalb von HTML Tags."
121
122 #: ../../../__w/calibre/calibre/manual/function_mode.rst:74
123 msgid ""
124 "The power of function mode - using a spelling dictionary to fix mis-"
125 "hyphenated words"
126 msgstr "Die Macht des Funktions Modus - Mit einem Rechtschreibbuch schlecht getrennte Wörter korrigieren"
127
128 #: ../../../__w/calibre/calibre/manual/function_mode.rst:76
129 msgid ""
130 "Often, e-books created from scans of printed books contain mis-hyphenated "
131 "words -- words that were split at the end of the line on the printed page. "
132 "We will write a simple function to automatically find and fix such words."
133 msgstr ""
134
135 #: ../../../__w/calibre/calibre/manual/function_mode.rst:101
136 msgid "Use this function with the same find expression as before, namely::"
137 msgstr "Diese Funktion wird mit dem selben Regulären Ausdruck verwendet wie die vorherige und zwar::"
138
139 #: ../../../__w/calibre/calibre/manual/function_mode.rst:105
140 msgid ""
141 "And it will magically fix all mis-hyphenated words in the text of the book. "
142 "The main trick is to use one of the useful extra arguments to the replace "
143 "function, ``dictionaries``. This refers to the dictionaries the editor "
144 "itself uses to spell check text in the book. What this function does is look"
145 " for words separated by a hyphen, remove the hyphen and check if the "
146 "dictionary recognizes the composite word, if it does, the original words are"
147 " replaced by the hyphen free composite word."
148 msgstr "Damit werden wie durch Magie alle inkorrekt getrennten Wörter im Buchtext korrigiert. Diese Funktion bedients sich hauptsächlich einem der zusätzlichen Argumente der replace Funktion und zwar ``dictionaries``. Dieses Argument verweißt auf die Wörterbücher die vom Editor selbst verwendet werden um die Rechtschreibkontrolle des Buches durchzuführen. Was diese Funktion mach ist sich alle Wörter die durch einen Bindestrich getrennt sind zu nehmen, den Bindestrich zu entfernen und zu überprüfen ob das Wort ohne Bindestrich im Wörterbuch steht. Wenn ja werden die ürsprünglichen Wörter durch das zusammengesetzte Wort ohne Bindestrich ersetzt. "
149
150 #: ../../../__w/calibre/calibre/manual/function_mode.rst:113
151 msgid ""
152 "Note that one limitation of this technique is it will only work for mono-"
153 "lingual books, because, by default, ``dictionaries.recognized()`` uses the "
154 "main language of the book."
155 msgstr "Zu Beachten ist, dass diese Technik nur bei einsprachigen Büchern funktioniert, da ``dictionaries.recognized()`` im Normalfall nur die Hauptsprache des Buches verwendet."
156
157 #: ../../../__w/calibre/calibre/manual/function_mode.rst:119
158 msgid "Auto numbering sections"
159 msgstr "Automatisches Nummerieren von Abschnitten"
160
161 #: ../../../__w/calibre/calibre/manual/function_mode.rst:121
162 msgid ""
163 "Now we will see something a little different. Suppose your HTML file has "
164 "many sections, each with a heading in an :code:`<h2>` tag that looks like "
165 ":code:`<h2>Some text</h2>`. You can create a custom function that will "
166 "automatically number these headings with consecutive section numbers, so "
167 "that they look like :code:`<h2>1. Some text</h2>`."
168 msgstr ""
169
170 #: ../../../__w/calibre/calibre/manual/function_mode.rst:137
171 msgid "Use it with the find expression::"
172 msgstr "Verwendung mit dem Suchausdruck::"
173
174 #: ../../../__w/calibre/calibre/manual/function_mode.rst:141
175 msgid ""
176 "Place the cursor at the top of the file and click :guilabel:`Replace all`."
177 msgstr "Positioniere die Schreibmarke am Anfang der Datei und klicke :guilabel:`Alles ersetzen`."
178
179 #: ../../../__w/calibre/calibre/manual/function_mode.rst:143
180 msgid ""
181 "This function uses another of the useful extra arguments to ``replace()``: "
182 "the ``number`` argument. When doing a :guilabel:`Replace All` number is "
183 "automatically incremented for every successive match."
184 msgstr ""
185
186 #: ../../../__w/calibre/calibre/manual/function_mode.rst:147
187 msgid ""
188 "Another new feature is the use of ``replace.file_order`` -- setting that to "
189 "``'spine'`` means that if this search is run on multiple HTML files, the "
190 "files are processed in the order in which they appear in the book. See "
191 ":ref:`file_order_replace_all` for details."
192 msgstr ""
193
194 #: ../../../__w/calibre/calibre/manual/function_mode.rst:154
195 msgid "Auto create a Table of Contents"
196 msgstr "Inhaltsverzeichnis automatisch erstellen"
197
198 #: ../../../__w/calibre/calibre/manual/function_mode.rst:156
199 msgid ""
200 "Finally, let's try something a little more ambitious. Suppose your book has "
201 "headings in ``h1`` and ``h2`` tags that look like ``<h1 id=\"someid\">Some "
202 "Text</h1>``. We will auto-generate an HTML Table of Contents based on these "
203 "headings. Create the custom function below:"
204 msgstr ""
205
206 #: ../../../__w/calibre/calibre/manual/function_mode.rst:199
207 msgid "And use it with the find expression::"
208 msgstr "Und Verwendung mit dem Suchausdruck::"
209
210 #: ../../../__w/calibre/calibre/manual/function_mode.rst:203
211 msgid ""
212 "Run the search on :guilabel:`All text files` and at the end of the search, a"
213 " window will popup with \"Debug output from your function\" which will have "
214 "the HTML Table of Contents, ready to be pasted into :file:`toc.html`."
215 msgstr ""
216
217 #: ../../../__w/calibre/calibre/manual/function_mode.rst:207
218 msgid ""
219 "The function above is heavily commented, so it should be easy to follow. The"
220 " key new feature is the use of another useful extra argument to the "
221 "``replace()`` function, the ``data`` object. The ``data`` object is a Python"
222 " *dictionary* that persists between all successive invocations of "
223 "``replace()`` during a single :guilabel:`Replace All` operation."
224 msgstr ""
225
226 #: ../../../__w/calibre/calibre/manual/function_mode.rst:213
227 msgid ""
228 "Another new feature is the use of ``call_after_last_match`` -- setting that "
229 "to ``True`` on the ``replace()`` function means that the editor will call "
230 "``replace()`` one extra time after all matches have been found. For this "
231 "extra call, the match object will be ``None``."
232 msgstr ""
233
234 #: ../../../__w/calibre/calibre/manual/function_mode.rst:218
235 msgid ""
236 "This was just a demonstration to show you the power of function mode, if you"
237 " really needed to generate a Table of Contents from headings in your book, "
238 "you would be better off using the dedicated Table of Contents tool in "
239 ":guilabel:`Tools->Table of Contents`."
240 msgstr ""
241
242 #: ../../../__w/calibre/calibre/manual/function_mode.rst:224
243 msgid "The API for the function mode"
244 msgstr "Die API für den Funktionsmodus"
245
246 #: ../../../__w/calibre/calibre/manual/function_mode.rst:226
247 msgid ""
248 "All function mode functions must be Python functions named replace, with the"
249 " following signature::"
250 msgstr ""
251
252 #: ../../../__w/calibre/calibre/manual/function_mode.rst:232
253 msgid ""
254 "When a find/replace is run, for every match that is found, the ``replace()``"
255 " function will be called, it must return the replacement string for that "
256 "match. If no replacements are to be done, it should return ``match.group()``"
257 " which is the original string. The various arguments to the ``replace()`` "
258 "function are documented below."
259 msgstr ""
260
261 #: ../../../__w/calibre/calibre/manual/function_mode.rst:239
262 msgid "The ``match`` argument"
263 msgstr "Das ``match``-Argument"
264
265 #: ../../../__w/calibre/calibre/manual/function_mode.rst:241
266 msgid ""
267 "The ``match`` argument represents the currently found match. It is a `Python"
268 " Match object <https://docs.python.org/library/re.html#match-objects>`_. Its"
269 " most useful method is ``group()`` which can be used to get the matched text"
270 " corresponding to individual capture groups in the search regular "
271 "expression."
272 msgstr ""
273
274 #: ../../../__w/calibre/calibre/manual/function_mode.rst:248
275 msgid "The ``number`` argument"
276 msgstr "Das ``number``-Argument"
277
278 #: ../../../__w/calibre/calibre/manual/function_mode.rst:250
279 msgid ""
280 "The ``number`` argument is the number of the current match. When you run "
281 ":guilabel:`Replace All`, every successive match will cause ``replace()`` to "
282 "be called with an increasing number. The first match has number 1."
283 msgstr ""
284
285 #: ../../../__w/calibre/calibre/manual/function_mode.rst:255
286 msgid "The ``file_name`` argument"
287 msgstr "Das Argument ``file_name``"
288
289 #: ../../../__w/calibre/calibre/manual/function_mode.rst:257
290 msgid ""
291 "This is the filename of the file in which the current match was found. When "
292 "searching inside marked text, the ``file_name`` is empty. The ``file_name`` "
293 "is in canonical form, a path relative to the root of the book, using ``/`` "
294 "as the path separator."
295 msgstr ""
296
297 #: ../../../__w/calibre/calibre/manual/function_mode.rst:263
298 msgid "The ``metadata`` argument"
299 msgstr "Das Argument ``metadata``"
300
301 #: ../../../__w/calibre/calibre/manual/function_mode.rst:265
302 msgid ""
303 "This represents the metadata of the current book, such as title, authors, "
304 "language, etc. It is an object of class "
305 ":class:`calibre.ebooks.metadata.book.base.Metadata`. Useful attributes "
306 "include, ``title``, ``authors`` (a list of authors) and ``language`` (the "
307 "language code)."
308 msgstr ""
309
310 #: ../../../__w/calibre/calibre/manual/function_mode.rst:271
311 msgid "The ``dictionaries`` argument"
312 msgstr "Das Argument ``dictionaries``"
313
314 #: ../../../__w/calibre/calibre/manual/function_mode.rst:273
315 msgid ""
316 "This represents the collection of dictionaries used for spell checking the "
317 "current book. Its most useful method is ``dictionaries.recognized(word)`` "
318 "which will return ``True`` if the passed in word is recognized by the "
319 "dictionary for the current book's language."
320 msgstr ""
321
322 #: ../../../__w/calibre/calibre/manual/function_mode.rst:279
323 msgid "The ``data`` argument"
324 msgstr "Das Argument ``data``"
325
326 #: ../../../__w/calibre/calibre/manual/function_mode.rst:281
327 msgid ""
328 "This a simple Python ``dictionary``. When you run :guilabel:`Replace all`, "
329 "every successive match will cause ``replace()`` to be called with the same "
330 "``dictionary`` as data. You can thus use it to store arbitrary data between "
331 "invocations of ``replace()`` during a :guilabel:`Replace all` operation."
332 msgstr ""
333
334 #: ../../../__w/calibre/calibre/manual/function_mode.rst:288
335 msgid "The ``functions`` argument"
336 msgstr "Das Argument ``functions``"
337
338 #: ../../../__w/calibre/calibre/manual/function_mode.rst:290
339 msgid ""
340 "The ``functions`` argument gives you access to all other user defined "
341 "functions. This is useful for code re-use. You can define utility functions "
342 "in one place and re-use them in all your other functions. For example, "
343 "suppose you create a function named ``My Function`` like this:"
344 msgstr ""
345
346 #: ../../../__w/calibre/calibre/manual/function_mode.rst:303
347 msgid ""
348 "Then, in another function, you can access the ``utility()`` function like "
349 "this:"
350 msgstr ""
351
352 #: ../../../__w/calibre/calibre/manual/function_mode.rst:311
353 msgid ""
354 "You can also use the functions object to store persistent data, that can be "
355 "re-used by other functions. For example, you could have one function that "
356 "when run with :guilabel:`Replace All` collects some data and another "
357 "function that uses it when it is run afterwards. Consider the following two "
358 "functions:"
359 msgstr ""
360
361 #: ../../../__w/calibre/calibre/manual/function_mode.rst:331
362 msgid "Debugging your functions"
363 msgstr "Fehlersuche in deinen Funktionen"
364
365 #: ../../../__w/calibre/calibre/manual/function_mode.rst:333
366 msgid ""
367 "You can debug the functions you create by using the standard ``print()`` "
368 "function from Python. The output of print will be displayed in a popup "
369 "window after the Find/replace has completed. You saw an example of using "
370 "``print()`` to output an entire table of contents above."
371 msgstr ""
372
373 #: ../../../__w/calibre/calibre/manual/function_mode.rst:341
374 msgid "Choose file order when running on multiple HTML files"
375 msgstr "Wenn auf mehrere HTML-Dateien anzuwenden, wähle die Dateireihenfolge"
376
377 #: ../../../__w/calibre/calibre/manual/function_mode.rst:343
378 msgid ""
379 "When you run a :guilabel:`Replace all` on multiple HTML files, the order in "
380 "which the files are processed depends on what files you have open for "
381 "editing. You can force the search to process files in the order in which "
382 "they appear by setting the ``file_order`` attribute on your function, like "
383 "this:"
384 msgstr ""
385
386 #: ../../../__w/calibre/calibre/manual/function_mode.rst:355
387 msgid ""
388 "``file_order`` accepts two values, ``spine`` and ``spine-reverse`` which "
389 "cause the search to process multiple files in the order they appear in the "
390 "book, either forwards or backwards, respectively."
391 msgstr ""
392
393 #: ../../../__w/calibre/calibre/manual/function_mode.rst:360
394 msgid ""
395 "Having your function called an extra time after the last match is found"
396 msgstr "Die Funktion nach dem letzten Fund ein zusätzliches Mal aufrufen"
397
398 #: ../../../__w/calibre/calibre/manual/function_mode.rst:362
399 msgid ""
400 "Sometimes, as in the auto generate table of contents example above, it is "
401 "useful to have your function called an extra time after the last match is "
402 "found. You can do this by setting the ``call_after_last_match`` attribute on"
403 " your function, like this:"
404 msgstr ""
405
406 #: ../../../__w/calibre/calibre/manual/function_mode.rst:376
407 msgid "Appending the output from the function to marked text"
408 msgstr "Die Ausgabe der Funktion an den markierten Text anhängen"
409
410 #: ../../../__w/calibre/calibre/manual/function_mode.rst:378
411 msgid ""
412 "When running search and replace on marked text, it is sometimes useful to "
413 "append some text to the end of the marked text. You can do that by setting "
414 "the ``append_final_output_to_marked`` attribute on your function (note that "
415 "you also need to set ``call_after_last_match``), like this:"
416 msgstr ""
417
418 #: ../../../__w/calibre/calibre/manual/function_mode.rst:393
419 msgid "Suppressing the result dialog when performing searches on marked text"
420 msgstr "Beim Durchsuchen von markiertem Text das Ergebnisfenster unterdrücken"
421
422 #: ../../../__w/calibre/calibre/manual/function_mode.rst:395
423 msgid ""
424 "You can also suppress the result dialog (which can slow down the repeated "
425 "application of a search/replace on many blocks of text) by setting the "
426 "``suppress_result_dialog`` attribute on your function, like this:"
427 msgstr ""
428
429 #: ../../../__w/calibre/calibre/manual/function_mode.rst:408
430 msgid "More examples"
431 msgstr ""
432
433 #: ../../../__w/calibre/calibre/manual/function_mode.rst:410
434 msgid ""
435 "More useful examples, contributed by calibre users, can be found in the "
436 "`calibre E-book editor forum "
437 "<https://www.mobileread.com/forums/showthread.php?t=237181>`_."
438 msgstr ""