| 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 |
# Usama Khalil, 2025 |
| 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: Usama Khalil, 2025\n" |
| 14 |
"Language-Team: Arabic (http://app.transifex.com/calibre/calibre/language/ar/)\n" |
| 15 |
"MIME-Version: 1.0\n" |
| 16 |
"Content-Type: text/plain; charset=UTF-8\n" |
| 17 |
"Content-Transfer-Encoding: 8bit\n" |
| 18 |
"Language: ar\n" |
| 19 |
"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\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 "" |
| 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 "في وضع *regexp* القياسي للبحث والاستبدال، تحدد تعبيرًا عاديًا للبحث عنه بالإضافة إلى قالب يستخدم لاستبدال جميع التطابقات التي تم العثور عليها. في وضع الدالة، بدلاً من استخدام قالب ثابت، تحدد دالة عشوائية، بلغة `برمجة بايثون <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 "" |
| 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 "" |
| 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:`إنشاء/تحرير` لـ إنشاء دالة جديدة ونسخ كود بايثون من أدناه." |
| 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، تقبل جميع الوسائط الموضحة أعلاه. في الوقت الحالي، لن نقلق بشأن جميع الوسائط المختلفة لدالة ``replace()``. ركز فقط على وسيطة ``match``. إنها تمثل تطابقًا عند تشغيل بحث واستبدال. وثائقها الكاملة متاحة `هنا <https://docs.python.org/library/re.html#match-objects>`_. ``match.group()`` ببساطة يعيد جميع النصوص المطابقة وكل ما نفعله هو استبدال الواصلات في ذلك النص بشرطات طويلة (em-dashes)، أولاً استبدال الواصلات المزدوجة ثم الواصلات الفردية." |
| 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-dashes)، ولكن فقط في النص الفعلي وليس داخل تعريفات علامات 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 "وسوف تقوم بتصحيح جميع الكلمات ذات الواصلات الخاطئة في نص الكتاب بطريقة سحرية. الخدعة الرئيسية هي استخدام إحدى الوسائط الإضافية المفيدة لدالة الاستبدال، ``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:`استبدال الكل`، يتم زيادة الرقم تلقائيًا لكل تطابق متتالي. التطابق الأول يحمل الرقم 1." |
| 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 "" |
| 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`` هو *قاموس* بايثون يستمر بين جميع الاستدعاءات المتتالية لـ ``replace()`` أثناء عملية :guilabel:`استبدال الكل` الواحدة." |
| 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`` -- تعيين هذا إلى ``True`` في دالة ``replace()`` يعني أن المحرر سيستدعي ``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 "واجهة برمجة تطبيقات وضع الدالة" |
| 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، مع التوقيع التالي::" |
| 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`` التطابق الذي تم العثور عليه حاليًا. إنها `كائن مطابقة بايثون <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 "هذا قاموس بايثون بسيط. عندما تقوم بتشغيل :guilabel:`استبدال الكل`، كل تطابق متتالي سيؤدي إلى استدعاء ``replace()`` بنفس ``dictionary`` كبيانات. وبالتالي يمكنك استخدامه لتخزين بيانات عشوائية بين استدعاءات ``replace()`` أثناء عملية :guilabel:`استبدال الكل`." |
| 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 "" |
| 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 "يمكنك أيضًا استخدام كائن الدوال لتخزين بيانات مستمرة، يمكن إعادة استخدامها بواسطة دوال أخرى. على سبيل المثال، يمكنك أن يكون لديك دالة عند تشغيلها مع :guilabel:`استبدال الكل` تجمع بعض البيانات ودالة أخرى تستخدمها عند تشغيلها لاحقًا. ضع في اعتبارك الدالتين التاليتين:" |
| 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 "يمكنك تصحيح أخطاء الدوال التي تنشئها باستخدام دالة ``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 "" |
| 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`` مما يتسبب في معالجة البحث لملفات متعددة بالترتيب الذي تظهر به في الكتاب، إما للأمام أو للخلف، على التوالي." |
| 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 "" |
| 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>`_." |