Debian Codegraph @

translations/manual/ja/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 # akihiko tanae (tanaeakihiko), 2025-2026
7 msgid ""
8 msgstr ""
9 "Project-Id-Version: calibre\n"
10 "Report-Msgid-Bugs-To: \n"
11 "POT-Creation-Date: 2026-02-25 10:21+0000\n"
12 "PO-Revision-Date: 2014-11-21 02:54+0000\n"
13 "Last-Translator: akihiko tanae (tanaeakihiko), 2025-2026\n"
14 "Language-Team: Japanese (http://app.transifex.com/calibre/calibre/language/ja/)\n"
15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
18 "Language: ja\n"
19 "Plural-Forms: nplurals=1; plural=0;\n"
20
21 #: ../../../__w/calibre/calibre/manual/function_mode.rst:2
22 msgid "Function mode for Search & replace in the Editor"
23 msgstr "エディタの検索と置換用の関数モード"
24
25 #: ../../../__w/calibre/calibre/manual/function_mode.rst:4
26 msgid ""
27 "The :guilabel:`Search & replace` tool in the editor supports a *function "
28 "mode*. In this mode, you can combine regular expressions (see :doc:`regexp`)"
29 " with arbitrarily powerful Python functions to do all sorts of advanced text"
30 " processing."
31 msgstr "エディタの :guilabel:`検索と置換` ツールは *関数モード* をサポートしています。このモードでは、正規表現( :doc:`regexp` を参照)と任意の強力な Python 関数を組み合わせて、あらゆる種類の高度なテキスト処理を行うことができます。"
32
33 #: ../../../__w/calibre/calibre/manual/function_mode.rst:9
34 msgid ""
35 "In the standard *regexp* mode for search and replace, you specify both a "
36 "regular expression to search for as well as a template that is used to "
37 "replace all found matches. In function mode, instead of using a fixed "
38 "template, you specify an arbitrary function, in the `Python programming "
39 "language <https://docs.python.org>`_. This allows you to do lots of things "
40 "that are not possible with simple templates."
41 msgstr "検索と置換のための *正規表現* モードでは、検索のための正規表現とあわせて見つかったマッチをすべて置換するために使用するテンプレートの両方を指定します。関数モードでは、固定のテンプレートを使用する代わりに、 `Python プログラミング言語 <https://docs.python.org>`_ の任意の関数を指定します。これにより単純なテンプレートでは不可能だった多くのことを実行できるようになります。"
42
43 #: ../../../__w/calibre/calibre/manual/function_mode.rst:16
44 msgid ""
45 "Techniques for using function mode and the syntax will be described by means"
46 " of examples, showing you how to create functions to perform progressively "
47 "more complex tasks."
48 msgstr "関数モードを使用するテクニックと構文を、例を用いて説明します。どのように関数を作成するかを、実行するタスクを少しずつ複雑にしながら説明します。"
49
50 #: ../../../__w/calibre/calibre/manual/function_mode.rst:21
51 msgid "The Function mode"
52 msgstr "関数モード"
53
54 #: ../../../__w/calibre/calibre/manual/function_mode.rst:26
55 msgid "Automatically fixing the case of headings in the document"
56 msgstr "ドキュメントの見出しの大文字と小文字を自動修正"
57
58 #: ../../../__w/calibre/calibre/manual/function_mode.rst:28
59 msgid ""
60 "Here, we will leverage one of the builtin functions in the editor to "
61 "automatically change the case of all text inside heading tags to title "
62 "case::"
63 msgstr "ここではエディタのビルトイン関数を利用して、見出しタグ内のすべてのテキストの大文字と小文字を自動的にタイトルケースに変更します::"
64
65 #: ../../../__w/calibre/calibre/manual/function_mode.rst:33
66 msgid ""
67 "For the function, simply choose the :guilabel:`Title-case text (ignore "
68 "tags)` builtin function. This will change titles that look like: ``<h1>some "
69 "titLE</h1>`` to ``<h1>Some Title</h1>``. It will work even if there are "
70 "other HTML tags inside the heading tags."
71 msgstr "関数を使用するには、組み込み関数 :guilabel:`タイトルケーステキスト (タグを無視)` を選択してください。これにより、 ``<h1>some title</h1>`` のようなタイトルが ``<h1>Some Title</h1>`` に変更されます。見出しタグ内に他のHTMLタグが含まれていても機能します。"
72
73 #: ../../../__w/calibre/calibre/manual/function_mode.rst:40
74 msgid "Your first custom function - smartening hyphens"
75 msgstr "最初のカスタム関数 - ハイフンをスマート化"
76
77 #: ../../../__w/calibre/calibre/manual/function_mode.rst:42
78 msgid ""
79 "The real power of function mode comes from being able to create your own "
80 "functions to process text in arbitrary ways. The Smarten Punctuation tool in"
81 " the editor leaves individual hyphens alone, so you can use this function to"
82 " replace them with em-dashes."
83 msgstr "関数モードの真の強みは、独自の関数を作成してテキストを任意の方法で処理できることです。エディターのスマート句読点ツールは個々のハイフンをそのまま残すので、この機能を使ってハイフンをemダッシュに置き換えることができます。"
84
85 #: ../../../__w/calibre/calibre/manual/function_mode.rst:47
86 msgid ""
87 "To create a new function, simply click the :guilabel:`Create/edit` button to"
88 " create a new function and copy the Python code from below."
89 msgstr "新しい関数を作成するには、:guilabel:`作成/編集` ボタンをクリックして新しい関数を作成し、下の Python コードをコピーします。"
90
91 #: ../../../__w/calibre/calibre/manual/function_mode.rst:55
92 msgid ""
93 "Every :guilabel:`Search & replace` custom function must have a unique name "
94 "and consist of a Python function named replace, that accepts all the "
95 "arguments shown above. For the moment, we won't worry about all the "
96 "different arguments to ``replace()`` function. Just focus on the ``match`` "
97 "argument. It represents a match when running a search and replace. Its full "
98 "documentation in available `here "
99 "<https://docs.python.org/library/re.html#match-objects>`_. ``match.group()``"
100 " simply returns all the matched text and all we do is replace hyphens in "
101 "that text with em-dashes, first replacing double hyphens and then single "
102 "hyphens."
103 msgstr ":guilabel:`検索 & 置換` カスタム関数は一意の名前を持ち、replace という名前の Python 関数で構成される必要があります。この関数は上に示すすべての引数を受け付けます。今のところは ``replace()`` 関数のすべての異なる引数について頭を悩ませる必要はありません。引数 ``match`` にだけ注目してください。これは検索と置換を実行するときのマッチを表します。詳細な説明は `こちら<https://docs.python.org/library/re.html#match-objects>`_ です。``match.group()`` は、マッチしたテキストをすべて返します。そのテキスト内のハイフンを em-dash に置換すればよいのですが、その際にまずダブルハイフンを置換してから、次にシングルハイフンを置換します。"
104
105 #: ../../../__w/calibre/calibre/manual/function_mode.rst:65
106 msgid "Use this function with the find regular expression::"
107 msgstr "この関数を次の検索正規表現とともに使用してください::"
108
109 #: ../../../__w/calibre/calibre/manual/function_mode.rst:69
110 msgid ""
111 "And it will replace all hyphens with em-dashes, but only in actual text and "
112 "not inside HTML tag definitions."
113 msgstr "そしてこれはすべてのハイフンを em-dash に置換しますが、置換するのは実際のテキストだけで、HTML のタグ定義の内側は置換しません。"
114
115 #: ../../../__w/calibre/calibre/manual/function_mode.rst:74
116 msgid ""
117 "The power of function mode - using a spelling dictionary to fix mis-"
118 "hyphenated words"
119 msgstr "関数モードの力 - スペル辞書を利用して誤ってハイフンでつながれた単語を修正"
120
121 #: ../../../__w/calibre/calibre/manual/function_mode.rst:76
122 msgid ""
123 "Often, e-books created from scans of printed books contain mis-hyphenated "
124 "words -- words that were split at the end of the line on the printed page. "
125 "We will write a simple function to automatically find and fix such words."
126 msgstr "印刷された本をスキャンして作られた電子書籍には、間違ってハイフンでつながれた単語、つまり印刷されたページの行末で分割された単語がしばしば含まれています。簡単な関数を書いて、そのような単語を自動的に探して修正してみましょう。"
127
128 #: ../../../__w/calibre/calibre/manual/function_mode.rst:101
129 msgid "Use this function with the same find expression as before, namely::"
130 msgstr "この関数は以前と同じ検索式で使用します。つまり次のようになります::"
131
132 #: ../../../__w/calibre/calibre/manual/function_mode.rst:105
133 msgid ""
134 "And it will magically fix all mis-hyphenated words in the text of the book. "
135 "The main trick is to use one of the useful extra arguments to the replace "
136 "function, ``dictionaries``. This refers to the dictionaries the editor "
137 "itself uses to spell check text in the book. What this function does is look"
138 " for words separated by a hyphen, remove the hyphen and check if the "
139 "dictionary recognizes the composite word, if it does, the original words are"
140 " replaced by the hyphen free composite word."
141 msgstr "そして、これは本のテキストの中にある誤ってハイフンでつながれたすべての単語を魔法のように修正します。主な秘訣は、replace 関数の便利な追加引数のひとつである ``dictionaries`` を利用することです。これはエディタ自身が本のテキストのスペルチェックに使用する辞書を参照します。この関数が行うのは、ハイフンで区切られた単語を探し、ハイフンを削除して合成した単語を辞書が認識するか確認し、認識した場合にはもとの単語をハイフンなしの合成語で置換します。"
142
143 #: ../../../__w/calibre/calibre/manual/function_mode.rst:113
144 msgid ""
145 "Note that one limitation of this technique is it will only work for mono-"
146 "lingual books, because, by default, ``dictionaries.recognized()`` uses the "
147 "main language of the book."
148 msgstr "ただしこのテクニックの限界は、単一の言語で書かれた本にしか使えないことです。なぜならデフォルトでは ``dictionaries.recognized()`` は本の主要な言語を使用するからです。"
149
150 #: ../../../__w/calibre/calibre/manual/function_mode.rst:119
151 msgid "Auto numbering sections"
152 msgstr "章番号を自動割り当て"
153
154 #: ../../../__w/calibre/calibre/manual/function_mode.rst:121
155 msgid ""
156 "Now we will see something a little different. Suppose your HTML file has "
157 "many sections, each with a heading in an :code:`<h2>` tag that looks like "
158 ":code:`<h2>Some text</h2>`. You can create a custom function that will "
159 "automatically number these headings with consecutive section numbers, so "
160 "that they look like :code:`<h2>1. Some text</h2>`."
161 msgstr "さて、少し違うものを見てみましょう。HTML ファイルの中に多くの章があっていずれも :code:`<h2>` で囲ってあり、:code:`<h2>Some text</h2>` のようになっているとします。カスタム関数を作れば、この見出しに自動的に連番を振って :code:`<h2>1. Some text</h2>` のようにすることができます。"
162
163 #: ../../../__w/calibre/calibre/manual/function_mode.rst:137
164 msgid "Use it with the find expression::"
165 msgstr "次の検索式を使用してください::"
166
167 #: ../../../__w/calibre/calibre/manual/function_mode.rst:141
168 msgid ""
169 "Place the cursor at the top of the file and click :guilabel:`Replace all`."
170 msgstr "カーソルをファイルの先頭に置いて :guilabel:`すべて置換` をクリックします。"
171
172 #: ../../../__w/calibre/calibre/manual/function_mode.rst:143
173 msgid ""
174 "This function uses another of the useful extra arguments to ``replace()``: "
175 "the ``number`` argument. When doing a :guilabel:`Replace All` number is "
176 "automatically incremented for every successive match."
177 msgstr "この関数では、``replace()`` の便利なもうひとつの追加引数である ``number`` を使用しています。:guilabel:`すべて置換` を実行するとき、number はマッチが成功するたびに自動的に数が増やされます。"
178
179 #: ../../../__w/calibre/calibre/manual/function_mode.rst:147
180 msgid ""
181 "Another new feature is the use of ``replace.file_order`` -- setting that to "
182 "``'spine'`` means that if this search is run on multiple HTML files, the "
183 "files are processed in the order in which they appear in the book. See "
184 ":ref:`file_order_replace_all` for details."
185 msgstr "もうひとつの新しい機能は、``replace.file_order`` の利用です。これを ``'spine'`` に設定すると、この関数を複数の HTML ファイルに対して実行したときに、本に表示される順番でファイルを処理します。詳しくは :ref:`file_order_replace_all` を参照してください。"
186
187 #: ../../../__w/calibre/calibre/manual/function_mode.rst:154
188 msgid "Auto create a Table of Contents"
189 msgstr "目次の自動生成"
190
191 #: ../../../__w/calibre/calibre/manual/function_mode.rst:156
192 msgid ""
193 "Finally, let's try something a little more ambitious. Suppose your book has "
194 "headings in ``h1`` and ``h2`` tags that look like ``<h1 id=\"someid\">Some "
195 "Text</h1>``. We will auto-generate an HTML Table of Contents based on these "
196 "headings. Create the custom function below:"
197 msgstr "最後に、もう少し大胆なことを試してみましょう。例えば、本の ``h1`` タグと ``h2`` タグに ``<h1 id=\"someid\">Some Text</h1>`` のような見出しが含まれているとします。これらの見出しに基づいて、HTMLの目次を自動生成します。以下のカスタム関数を作成してください:"
198
199 #: ../../../__w/calibre/calibre/manual/function_mode.rst:199
200 msgid "And use it with the find expression::"
201 msgstr "そしてこれを次の検索式で使用します::"
202
203 #: ../../../__w/calibre/calibre/manual/function_mode.rst:203
204 msgid ""
205 "Run the search on :guilabel:`All text files` and at the end of the search, a"
206 " window will popup with \"Debug output from your function\" which will have "
207 "the HTML Table of Contents, ready to be pasted into :file:`toc.html`."
208 msgstr "検索を :guilabel:`すべてのテキストファイル` に実行すると、\"関数からのデバッグ出力\" のウィンドウがポップアップ表示され、そこに HTML の目次が出力されているので、そのまま :file:`toc.html` に貼り付けて利用できます。"
209
210 #: ../../../__w/calibre/calibre/manual/function_mode.rst:207
211 msgid ""
212 "The function above is heavily commented, so it should be easy to follow. The"
213 " key new feature is the use of another useful extra argument to the "
214 "``replace()`` function, the ``data`` object. The ``data`` object is a Python"
215 " *dictionary* that persists between all successive invocations of "
216 "``replace()`` during a single :guilabel:`Replace All` operation."
217 msgstr "上記の関数には多くのコメントが付いているので、簡単にフォローできるはずです。重要な新機能は、``replace()`` 関数にもう一つの便利な追加引数である ``data`` オブジェクトの使用です。``data`` オブジェクトは Python *辞書* であり、:guilabel:`Replace All` 操作中に連続して実行される ``replace()`` 間で保持されます。"
218
219 #: ../../../__w/calibre/calibre/manual/function_mode.rst:213
220 msgid ""
221 "Another new feature is the use of ``call_after_last_match`` -- setting that "
222 "to ``True`` on the ``replace()`` function means that the editor will call "
223 "``replace()`` one extra time after all matches have been found. For this "
224 "extra call, the match object will be ``None``."
225 msgstr "もうひとつの新機能は ``call_after_last_match`` の利用です。``replace()`` 関数でこれを ``True`` に設定すると、すべてのマッチが見つかった後にエディタがもう一度 ``replace()`` を呼び出し、マッチオブジェクトは ``None`` になります。"
226
227 #: ../../../__w/calibre/calibre/manual/function_mode.rst:218
228 msgid ""
229 "This was just a demonstration to show you the power of function mode, if you"
230 " really needed to generate a Table of Contents from headings in your book, "
231 "you would be better off using the dedicated Table of Contents tool in "
232 ":guilabel:`Tools->Table of Contents`."
233 msgstr "これは関数モードの威力を紹介するための単なるデモにすぎません。もし本当に見出しから目次を生成する必要があるなら、:guilabel:`ツール->目次` にある目次専用のツールを使うことをお勧めします。"
234
235 #: ../../../__w/calibre/calibre/manual/function_mode.rst:224
236 msgid "The API for the function mode"
237 msgstr "関数モードの API"
238
239 #: ../../../__w/calibre/calibre/manual/function_mode.rst:226
240 msgid ""
241 "All function mode functions must be Python functions named replace, with the"
242 " following signature::"
243 msgstr "関数モードの関数はすべて replace という名前の Python 関数でなくてはなりません。そして次のシグネチャを持ちます::"
244
245 #: ../../../__w/calibre/calibre/manual/function_mode.rst:232
246 msgid ""
247 "When a find/replace is run, for every match that is found, the ``replace()``"
248 " function will be called, it must return the replacement string for that "
249 "match. If no replacements are to be done, it should return ``match.group()``"
250 " which is the original string. The various arguments to the ``replace()`` "
251 "function are documented below."
252 msgstr "検索/置換が実行されると、マッチが見つかるたびに ``replace()`` 関数が呼び出され、そのマッチに対する置換文字列が返されます。置換が行われない場合には、もとの文字列である `match.group()`` を返します。``replace()`` の引数については下で説明します。"
253
254 #: ../../../__w/calibre/calibre/manual/function_mode.rst:239
255 msgid "The ``match`` argument"
256 msgstr "引数 ``match``"
257
258 #: ../../../__w/calibre/calibre/manual/function_mode.rst:241
259 msgid ""
260 "The ``match`` argument represents the currently found match. It is a `Python"
261 " Match object <https://docs.python.org/library/re.html#match-objects>`_. Its"
262 " most useful method is ``group()`` which can be used to get the matched text"
263 " corresponding to individual capture groups in the search regular "
264 "expression."
265 msgstr "引数 ``match`` は現在見つかったマッチを表します。これは `Python Match オブジェクト<https://docs.python.org/library/re.html#match-objects>`_ です。その最も便利なメソッドは ``group()`` で、これを使用すると検索正規表現の中の個別のキャプチャグループに対応するマッチしたテキストを取得できます。"
266
267 #: ../../../__w/calibre/calibre/manual/function_mode.rst:248
268 msgid "The ``number`` argument"
269 msgstr "引数 ``number``"
270
271 #: ../../../__w/calibre/calibre/manual/function_mode.rst:250
272 msgid ""
273 "The ``number`` argument is the number of the current match. When you run "
274 ":guilabel:`Replace All`, every successive match will cause ``replace()`` to "
275 "be called with an increasing number. The first match has number 1."
276 msgstr "引数 ``number`` は現在のマッチの番号です。:guilabel:`すべて置換`を実行すると、マッチが成功するたびに連番とともに ``replace()`` が呼び出されます。最初のマッチの番号は 1 です。"
277
278 #: ../../../__w/calibre/calibre/manual/function_mode.rst:255
279 msgid "The ``file_name`` argument"
280 msgstr "引数 `file_name``"
281
282 #: ../../../__w/calibre/calibre/manual/function_mode.rst:257
283 msgid ""
284 "This is the filename of the file in which the current match was found. When "
285 "searching inside marked text, the ``file_name`` is empty. The ``file_name`` "
286 "is in canonical form, a path relative to the root of the book, using ``/`` "
287 "as the path separator."
288 msgstr "現在のマッチが見つかったファイルのファイル名です。マークしたテキスト内を検索するときには、``file_name`` は空です。``file_name`` は基準形で、セパレータに ``/`` を使用した本のルートの相対パスです。"
289
290 #: ../../../__w/calibre/calibre/manual/function_mode.rst:263
291 msgid "The ``metadata`` argument"
292 msgstr "引数 ``metadata``"
293
294 #: ../../../__w/calibre/calibre/manual/function_mode.rst:265
295 msgid ""
296 "This represents the metadata of the current book, such as title, authors, "
297 "language, etc. It is an object of class "
298 ":class:`calibre.ebooks.metadata.book.base.Metadata`. Useful attributes "
299 "include, ``title``, ``authors`` (a list of authors) and ``language`` (the "
300 "language code)."
301 msgstr "これは現在の本の書誌を表します。タイトル、著者、言語などです。これは :class:`calibre.ebooks.metadata.book.base.Metadata` クラスのオブジェクトです。便利な属性には、``title``, ``authors`` (著者のリスト) および ``language`` (言語コード) があります。"
302
303 #: ../../../__w/calibre/calibre/manual/function_mode.rst:271
304 msgid "The ``dictionaries`` argument"
305 msgstr "引数 ``dictionaries``"
306
307 #: ../../../__w/calibre/calibre/manual/function_mode.rst:273
308 msgid ""
309 "This represents the collection of dictionaries used for spell checking the "
310 "current book. Its most useful method is ``dictionaries.recognized(word)`` "
311 "which will return ``True`` if the passed in word is recognized by the "
312 "dictionary for the current book's language."
313 msgstr "現在の本のスペルチェックに使われた辞書のコレクションを表します。その最も便利なメソッドは `dictionaries.recognized(word)`` で、渡された単語が現在の本の言語用の辞書で認識さたら `True`` を返します。"
314
315 #: ../../../__w/calibre/calibre/manual/function_mode.rst:279
316 msgid "The ``data`` argument"
317 msgstr "引数 ``data``"
318
319 #: ../../../__w/calibre/calibre/manual/function_mode.rst:281
320 msgid ""
321 "This a simple Python ``dictionary``. When you run :guilabel:`Replace all`, "
322 "every successive match will cause ``replace()`` to be called with the same "
323 "``dictionary`` as data. You can thus use it to store arbitrary data between "
324 "invocations of ``replace()`` during a :guilabel:`Replace all` operation."
325 msgstr "これは単純なPythonの ``辞書`` です。:guilabel:`Replace all`を実行すると、連続する一致ごとに、データと同じ ``辞書`` を使って ``replace()`` が呼び出されます。そのため、:guilabel:`Replace all` 実行中に ``replace()`` の呼び出しの間で、任意のデータを保存するために使用できます。"
326
327 #: ../../../__w/calibre/calibre/manual/function_mode.rst:288
328 msgid "The ``functions`` argument"
329 msgstr "引数 ``functions``"
330
331 #: ../../../__w/calibre/calibre/manual/function_mode.rst:290
332 msgid ""
333 "The ``functions`` argument gives you access to all other user defined "
334 "functions. This is useful for code re-use. You can define utility functions "
335 "in one place and re-use them in all your other functions. For example, "
336 "suppose you create a function named ``My Function`` like this:"
337 msgstr "``functions`` 引数は、他のすべてのユーザー定義関数へのアクセスを可能にします。これはコードの再利用に便利です。ユーティリティ関数を1か所で定義しておけば、他のすべての関数で再利用できます。例えば、次のように ``My Function`` という名前の関数を作成したとします:"
338
339 #: ../../../__w/calibre/calibre/manual/function_mode.rst:303
340 msgid ""
341 "Then, in another function, you can access the ``utility()`` function like "
342 "this:"
343 msgstr "そして別の関数では、``utility()`` 関数に次のようにしてアクセスできます:"
344
345 #: ../../../__w/calibre/calibre/manual/function_mode.rst:311
346 msgid ""
347 "You can also use the functions object to store persistent data, that can be "
348 "re-used by other functions. For example, you could have one function that "
349 "when run with :guilabel:`Replace All` collects some data and another "
350 "function that uses it when it is run afterwards. Consider the following two "
351 "functions:"
352 msgstr "functions オブジェクトを使って、他の関数から再利用できる永続データを格納することもできます。たとえば :guilabel:`すべて置換` で実行されたときにデータを収集し、後で別の関数が実行されたときにそれを使用するといったことが可能です。次の 2 つの関数のようなものを考えてみてください:"
353
354 #: ../../../__w/calibre/calibre/manual/function_mode.rst:331
355 msgid "Debugging your functions"
356 msgstr "関数のデバッグ"
357
358 #: ../../../__w/calibre/calibre/manual/function_mode.rst:333
359 msgid ""
360 "You can debug the functions you create by using the standard ``print()`` "
361 "function from Python. The output of print will be displayed in a popup "
362 "window after the Find/replace has completed. You saw an example of using "
363 "``print()`` to output an entire table of contents above."
364 msgstr "作成した関数をデバッグするには Python から標準の ``print()`` 関数を使用します。print の出力は検索/置換が完了した後にポップアップウィンドウに表示されます。``print()`` の使用例は、上で目次全体を出力する説明にあります。"
365
366 #: ../../../__w/calibre/calibre/manual/function_mode.rst:341
367 msgid "Choose file order when running on multiple HTML files"
368 msgstr "複数の HTML ファイルに実行する際にファイル順を選択"
369
370 #: ../../../__w/calibre/calibre/manual/function_mode.rst:343
371 msgid ""
372 "When you run a :guilabel:`Replace all` on multiple HTML files, the order in "
373 "which the files are processed depends on what files you have open for "
374 "editing. You can force the search to process files in the order in which "
375 "they appear by setting the ``file_order`` attribute on your function, like "
376 "this:"
377 msgstr "複数のHTMLファイルに対して :guilabel:`すべて置換` を実行する場合、ファイルの処理順序は編集用に開いているファイルによって異なります。関数に ``file_order`` 属性を設定することで、ファイルの出現順に検索を強制的に実行できます。例として:"
378
379 #: ../../../__w/calibre/calibre/manual/function_mode.rst:355
380 msgid ""
381 "``file_order`` accepts two values, ``spine`` and ``spine-reverse`` which "
382 "cause the search to process multiple files in the order they appear in the "
383 "book, either forwards or backwards, respectively."
384 msgstr "``file_order`` は ``spine`` と ``spine-reverse`` という 2 つの値を受け取り、検索が複数ファイルを処理するのに本の中に現れた順で、それぞれ降順または昇順に処理するようにします。"
385
386 #: ../../../__w/calibre/calibre/manual/function_mode.rst:360
387 msgid ""
388 "Having your function called an extra time after the last match is found"
389 msgstr "最後のマッチが見つかった後にもう一度関数を呼び出させる"
390
391 #: ../../../__w/calibre/calibre/manual/function_mode.rst:362
392 msgid ""
393 "Sometimes, as in the auto generate table of contents example above, it is "
394 "useful to have your function called an extra time after the last match is "
395 "found. You can do this by setting the ``call_after_last_match`` attribute on"
396 " your function, like this:"
397 msgstr "上で説明した目次の自動生成の例のように、最後のマッチが見つかった後に関数をもう一度呼び出させると便利な場合があります。これを行うには、次のように、関数の ``call_after_last_match`` 属性を設定します:"
398
399 #: ../../../__w/calibre/calibre/manual/function_mode.rst:376
400 msgid "Appending the output from the function to marked text"
401 msgstr "関数の出力をマークしたテキストに追加"
402
403 #: ../../../__w/calibre/calibre/manual/function_mode.rst:378
404 msgid ""
405 "When running search and replace on marked text, it is sometimes useful to "
406 "append some text to the end of the marked text. You can do that by setting "
407 "the ``append_final_output_to_marked`` attribute on your function (note that "
408 "you also need to set ``call_after_last_match``), like this:"
409 msgstr "マークされたテキストに対して検索と置換を実行する際、マークされたテキストの末尾にテキストを追加すると便利な場合があります。これは、関数に ``append_final_output_to_marked`` 属性を設定することで実現できます( ``call_after_last_match`` 属性も設定する必要があることに注意してください)。例:"
410
411 #: ../../../__w/calibre/calibre/manual/function_mode.rst:393
412 msgid "Suppressing the result dialog when performing searches on marked text"
413 msgstr "マークしたテキストに検索を実行したとき結果ダイアログを抑制"
414
415 #: ../../../__w/calibre/calibre/manual/function_mode.rst:395
416 msgid ""
417 "You can also suppress the result dialog (which can slow down the repeated "
418 "application of a search/replace on many blocks of text) by setting the "
419 "``suppress_result_dialog`` attribute on your function, like this:"
420 msgstr "結果ダイアログ (これがあると、検索/置換を数多くのテキストブロックに対して適用を繰り返すのが遅くなります) を抑制するには、次のように、関数の ``suppress_result_dialog`` 属性を設定します:"
421
422 #: ../../../__w/calibre/calibre/manual/function_mode.rst:408
423 msgid "More examples"
424 msgstr "その他の例"
425
426 #: ../../../__w/calibre/calibre/manual/function_mode.rst:410
427 msgid ""
428 "More useful examples, contributed by calibre users, can be found in the "
429 "`calibre E-book editor forum "
430 "<https://www.mobileread.com/forums/showthread.php?t=237181>`_."
431 msgstr "この他にも calibre ユーザによって投稿された便利な例が `calibre 電子書籍エディタフォーラム <https://www.mobileread.com/forums/showthread.php?t=237181>`_ にあります。"