| 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 |
# abuyop <[email protected]>, 2015-2017 |
| 7 |
msgid "" |
| 8 |
msgstr "" |
| 9 |
"Project-Id-Version: calibre\n" |
| 10 |
"Report-Msgid-Bugs-To: \n" |
| 11 |
"POT-Creation-Date: 2026-02-17 16:44+0000\n" |
| 12 |
"PO-Revision-Date: 2014-11-21 02:54+0000\n" |
| 13 |
"Last-Translator: abuyop <[email protected]>, 2015-2017\n" |
| 14 |
"Language-Team: Malay (http://app.transifex.com/calibre/calibre/language/ms/)\n" |
| 15 |
"MIME-Version: 1.0\n" |
| 16 |
"Content-Type: text/plain; charset=UTF-8\n" |
| 17 |
"Content-Transfer-Encoding: 8bit\n" |
| 18 |
"Language: ms\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 "Mod Fungsi untuk Gelintar & Ganti di dalam Penyunting" |
| 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 "" |
| 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 "" |
| 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 "Teknik penggunaan mod fungsi dan sintaks akan dijelaskan bersama-sama dengan contoh, memudahkan penjelasan bagaimana hendak cipta fungsi yang dapat melakukan tugas yang lebih kompleks." |
| 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 "Membaiki huruf (case) tajuk dokumen secara automatik" |
| 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 "Di sini, kita akan guna salah satu fungsi terbina-dalam di dalam penyunting untuk mengubah huruf semua teks dalam tag tajuk menjadi title case iaitu huruf besar pertama dalam setiap perkataan::" |
| 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 "" |
| 72 |
|
| 73 |
#: ../../../__w/calibre/calibre/manual/function_mode.rst:40 |
| 74 |
msgid "Your first custom function - smartening hyphens" |
| 75 |
msgstr "Fungsi suai pertama anda - hypen pintar" |
| 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 "" |
| 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 "Untuk mencipta satu fungsi baharu, hanya klik butang :guilabel:`Cipta/sunting` untuk mencipta satu fungsi baharu dan salin kod Python dari bawah." |
| 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 "" |
| 104 |
|
| 105 |
#: ../../../__w/calibre/calibre/manual/function_mode.rst:65 |
| 106 |
msgid "Use this function with the find regular expression::" |
| 107 |
msgstr "Guna fungsi ini dengan ungkapan nalar find::" |
| 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 "Dan ia akan gantikan semua tanda sengkang dengan sengkang-em, tetapi hanya dalam teks sebenar dan tidak di dalam takrifan tag 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 "Kehebatan mod fungsi - menggunakan kamus ejaan untuk baiki perkataan tertinggal-sempang" |
| 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 "Biasanya, e-buku dicipta dari imbasan buku bercetak yang menganfungi perkataan tertinggal-sempang -- perkataan yang mana dipisah pada akhir baris pada halaman bercetak. Kami akan hasilkan fungsi ringkas untuk cari dan baiki perkataan tersebut secara automatik." |
| 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 "Guna fungsi ini dengan ungkapan find yang sama sebelum ini, iaitu::" |
| 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 "Dan ia akan membaiki secara magik semua perkataan yang tiada-sempang dalam teks buku. Caranya adalah guna salah satu argumen tambahan untuk menggantikan fungsi, ``dictionaries``. Ini merujuk pada kamus penyunting itu sendiri menggunakan semakan ejaan teks di dalam buku tersebut. Fungsi ini mencari perkataan yang diasing dengan tanda sempang, buang tanda sempang tersebut dan periksa jika kamus mengenalpasti perkataan komposit itu, jika ada, perkataan asal akan digantikan dengan perkataan yang tidak menggunakan tanda sempang tersebut." |
| 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 "Perhatian satu kekangan bagi teknik ini adalah ia hanya berfungsi baik dengan buku satu bahasa, kerana, secara lalai, ``dictionaries.recognized()`` menggunakan bahasa utama buku." |
| 149 |
|
| 150 |
#: ../../../__w/calibre/calibre/manual/function_mode.rst:119 |
| 151 |
msgid "Auto numbering sections" |
| 152 |
msgstr "Seksyen pernomboran automatik" |
| 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 "Sekarang kita dapati ada beberapa perkara berlainan. Anggaplah fail HTML anda mempunyai banyak seksyen, setiapnya dengan pengepala dengan :code:`<h2>` tag seperti :code:`<h2>Some text</h2>`. Anda boleh hasilkan fungsi suai yang dapat menomborkan pengepala ini dengan nombor seksyen yang berturuan, supaya ia kelihatan seperti :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 "Guna ia dengan ungkapan cari::" |
| 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 "Letak kursor di bahagian atas fail dan klik :guilabel:`Ganti semua`." |
| 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 "Fungsi ini menggunakan argumen tambahan yang berguna pada ``replace()``: argumen ``number``. Ketika membuat :guilabel:`Replace All` nombor secara automatik ditokok bagi setiap padanan yang berjaya." |
| 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 "Satu fitur baharu lain yang boleh digunakan ialah penggunaan ``replace.file_order`` -- menetapkan ``'spine'`` bermaksud jika gelintar ini dijalankan pada fail HTML berbilang, fail diproses dengan tertib mengikut kemunculannya di dalam buku. Sila rujuk :ref:`file_order_replace_all` untuk perinciannya." |
| 186 |
|
| 187 |
#: ../../../__w/calibre/calibre/manual/function_mode.rst:154 |
| 188 |
msgid "Auto create a Table of Contents" |
| 189 |
msgstr "Auto jana Senarai Kandungan" |
| 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 "" |
| 198 |
|
| 199 |
#: ../../../__w/calibre/calibre/manual/function_mode.rst:199 |
| 200 |
msgid "And use it with the find expression::" |
| 201 |
msgstr "Guna ia dengan ungkapan cari::" |
| 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 "Jalankan penggelintaran pada :guilabel:`All text files` dan dipenghujung gelintar, satu tetingkap timbul dengan \"Debug output from your function\" yang mana akan mempunyai Senarai Kandungan HTML, sedia untuk ditampal ke dalam :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 "" |
| 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 "Lain-lain fitur baharu yang digunakan ialah ``call_after_last_match`` -- menetapkannya ``True`` pada fungsi ``replace()`` bermaksud penyunting akan memanggil ``replace()`` sekali laig selepas semua padanan telah ditemui. Untuk panggilan ekstra ini, objek padanan akan menjadi ``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 "Ini hanyalah demonstrasi untuk menunjukkan kehebatan mod fungsi, jika anda perlu jana Senarai Kandungan dari pengepala dalam buku anda, anda digalakkan guna alat Senarai Kandungan yang disediakan dalam :guilabel:`Alat->Senarai Kandungan`." |
| 234 |
|
| 235 |
#: ../../../__w/calibre/calibre/manual/function_mode.rst:224 |
| 236 |
msgid "The API for the function mode" |
| 237 |
msgstr "API untuk mod fungsi" |
| 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 "Semua fungsi mod fungsi mestilah fungsi Python yang bernama replace, dengan tandatangan berikut::" |
| 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 "Bila cari/ganti dijalankan, bagi setiap padanan yang ditemui, fungsi ``replace()`` akan dipanggilkan, ia mesti kembalikan rentetan penggantian untuk padanan tersebut. Jika tiada penggantian dibuat, ia seharusnya kembalikan ``match.group()`` yang mana merupakan rentetan asal. Pelbagai dokumentasi argumen berkenaan fungsi ``replace()`` seperti di bawah." |
| 253 |
|
| 254 |
#: ../../../__w/calibre/calibre/manual/function_mode.rst:239 |
| 255 |
msgid "The ``match`` argument" |
| 256 |
msgstr "Argumen ``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 "" |
| 266 |
|
| 267 |
#: ../../../__w/calibre/calibre/manual/function_mode.rst:248 |
| 268 |
msgid "The ``number`` argument" |
| 269 |
msgstr "Argumen ``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 "Argumen ``number`` ialah bilangan padanan semasa. Ketika anda menjalankan :guilabel:`Ganti Semua`, setiap padanan yang berjaya akan menyebabkan ``replace()`` diganti dengan bilangan menaik. Padanan pertama mempunyai nilai 1." |
| 277 |
|
| 278 |
#: ../../../__w/calibre/calibre/manual/function_mode.rst:255 |
| 279 |
msgid "The ``file_name`` argument" |
| 280 |
msgstr "Argumen ``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 "Ia merupaakn nama fail bagi fail yang mana padanan semasa ditemui. Ketika menggelintar di dalam teks bertanda, ``file_name`` adalah kosong. ``file_name`` adalah dalam bentuk canonical, iaitu laluan berkaitan dengan root buku, menggunakan ``/`` sebagai pemisah laluan." |
| 289 |
|
| 290 |
#: ../../../__w/calibre/calibre/manual/function_mode.rst:263 |
| 291 |
msgid "The ``metadata`` argument" |
| 292 |
msgstr "Argumen ``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 "Ia mewakili data meta bagi sesebuah buku, seperti tajuk, pengarang, bahasa, dll. Ia merupakan objek bagi sesebuah kelas :class:`calibre.ebooks.metadata.book.base.Metadata`. Atribut yang berguna termasuklah, ``title``, ``authors`` (senarai pengarang) dan ``language`` (kod bahasa)." |
| 302 |
|
| 303 |
#: ../../../__w/calibre/calibre/manual/function_mode.rst:271 |
| 304 |
msgid "The ``dictionaries`` argument" |
| 305 |
msgstr "Argumen ``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 "Ia mewakili koleksi kamus yang digunakan untuk penyemakan ejaan buku semasa. Merupakan kaedah paling berguna iaitu ``dictionaries.recognized(word)`` yang akan kembalikan ``True`` jika perkataan dikenalpasti oleh kamus bagi bahasa buku semasa." |
| 314 |
|
| 315 |
#: ../../../__w/calibre/calibre/manual/function_mode.rst:279 |
| 316 |
msgid "The ``data`` argument" |
| 317 |
msgstr "Argumen ``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 "" |
| 326 |
|
| 327 |
#: ../../../__w/calibre/calibre/manual/function_mode.rst:288 |
| 328 |
msgid "The ``functions`` argument" |
| 329 |
msgstr "Argumen ``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 "" |
| 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 "Oleh itu, dalam fungsi lain, anda boleh boleh mencapai fungsi ``utility()`` seperti ini:" |
| 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 "Anda juga boleh menggunakan objek fungsi untuk menyimpan data tekal, yang boleh diguna-semula oleh fungsi lain. Sebagai contoh, anda boleh mempunyai satu fungsi yang mana bila dijalankan dengan :guilabel:`Ganti Semua` dapat mengutip beberapa data dan lain-lain fungsi yang menggunakannya jika ia dijalankan selepas itu. Pertimbangkan dua fungsi berikut:" |
| 353 |
|
| 354 |
#: ../../../__w/calibre/calibre/manual/function_mode.rst:331 |
| 355 |
msgid "Debugging your functions" |
| 356 |
msgstr "Meyahpepijat fungsi anda" |
| 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 "Anda boleh menyahpepijat fungsi yang telah dicipta menggunakan fungsi piawai ``print()`` daripada Python. Output print akan dipaparkan dalam tetingkap timbul selepas Find/replace telah selesai. Didapati terdapat contoh penggunaan ``print()`` untuk outputkan keseluruhan jadual kandungan di atas." |
| 365 |
|
| 366 |
#: ../../../__w/calibre/calibre/manual/function_mode.rst:341 |
| 367 |
msgid "Choose file order when running on multiple HTML files" |
| 368 |
msgstr "Pilih tertib fail bila dijalankan pada fail HTML berbilang" |
| 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 "" |
| 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`` menerima dua nilai, ``spine`` dan ``spine-reverse`` yang menyebabkan gelintar memproses fail berbilang mengikut tertib muncul di dalam buku, sama ada maju atau mengundur." |
| 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 "Menambah masa tambahan ke dalam fungsi anda selepas padanan terakhir ditemui" |
| 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 "Dalam senarai kandungan diauto-jana seperti ciontoh di atas, Lebih berguna anda menambah masa tambahan selepas padanan terakhir ditemui. Anda boleh membuatnya dengan menetapkan atribut ``call_after_last_match`` ke dalam fungsi anda, seperti di bawah:" |
| 398 |
|
| 399 |
#: ../../../__w/calibre/calibre/manual/function_mode.rst:376 |
| 400 |
msgid "Appending the output from the function to marked text" |
| 401 |
msgstr "Menambah output dari fungsi ke teks betanda" |
| 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 "" |
| 410 |
|
| 411 |
#: ../../../__w/calibre/calibre/manual/function_mode.rst:393 |
| 412 |
msgid "Suppressing the result dialog when performing searches on marked text" |
| 413 |
msgstr "Memaksa dialog keputusan ketika membuat penggelintaran pada teks bertanda" |
| 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 "Anda juga memaksa dialog keputusan (yang boleh memperlahankan aplikasi menggelintar/mengganti yang berulang pada kebanyakan blok teks) dengan menetapkan atribut ``suppress_result_dialog`` pada fungsi anda, seperti ini:" |
| 421 |
|
| 422 |
#: ../../../__w/calibre/calibre/manual/function_mode.rst:408 |
| 423 |
msgid "More examples" |
| 424 |
msgstr "Lagi banyak contoh" |
| 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 "" |