| 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-06-17 08:34+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/template_lang.rst:4 |
| 22 |
msgid "The calibre template language" |
| 23 |
msgstr "لغة قوالب calibre" |
| 24 |
|
| 25 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:6 |
| 26 |
msgid "" |
| 27 |
"The calibre template language is a calibre-specific language used throughout" |
| 28 |
" calibre for tasks such as specifying file paths, formatting values, and " |
| 29 |
"computing the value for user-specified columns. Examples:" |
| 30 |
msgstr "لغة قوالب calibre هي لغة خاصة بـ calibre تُستخدم في جميع أنحاء calibre لمهام مثل تحديد مسارات الملفات، وتنسيق القيم، و حساب القيمة للأعمدة المحددة من قبل المستخدم. أمثلة:" |
| 31 |
|
| 32 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:8 |
| 33 |
msgid "" |
| 34 |
"Specify the folder structure and file names when saving files from the " |
| 35 |
"calibre library to the disk or e-book reader." |
| 36 |
msgstr "تحديد هيكل المجلد وأسماء الملفات عند حفظ الملفات من مكتبة calibre إلى القرص أو قارئ الكتب الإلكترونية." |
| 37 |
|
| 38 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:9 |
| 39 |
msgid "Define rules for adding icons and colors to the calibre book list." |
| 40 |
msgstr "تحديد قواعد لإضافة الأيقونات والألوان إلى قائمة كتب calibre." |
| 41 |
|
| 42 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:10 |
| 43 |
msgid "Define `virtual columns` that contain data from other columns." |
| 44 |
msgstr "تحديد `أعمدة افتراضية` تحتوي على بيانات من أعمدة أخرى." |
| 45 |
|
| 46 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:11 |
| 47 |
msgid "Advanced library searching." |
| 48 |
msgstr "بحث متقدم في المكتبة." |
| 49 |
|
| 50 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:12 |
| 51 |
msgid "Advanced metadata search and replace." |
| 52 |
msgstr "بحث واستبدال متقدم للبيانات الوصفية." |
| 53 |
|
| 54 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:14 |
| 55 |
msgid "" |
| 56 |
"The language is built around the notion of a `template`, which specifies " |
| 57 |
"which book metadata to use, computations on that metadata, and how it is to " |
| 58 |
"be formatted." |
| 59 |
msgstr "تعتمد اللغة على مفهوم `القالب`، الذي يحدد أي بيانات وصفية للكتاب يجب استخدامها، والعمليات الحسابية على تلك البيانات الوصفية، وكيفية تنسيقها." |
| 60 |
|
| 61 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:17 |
| 62 |
msgid "Basic templates" |
| 63 |
msgstr "القوالب الأساسية" |
| 64 |
|
| 65 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:19 |
| 66 |
msgid "" |
| 67 |
"A basic template consists of one or more ``template expressions``. A " |
| 68 |
"``template expression`` consists of text and names in curly brackets " |
| 69 |
"(``{}``) that is replaced by the corresponding metadata from the book being " |
| 70 |
"processed. For example, the default template in calibre used for saving " |
| 71 |
"books to device has 4 ``template expressions``::" |
| 72 |
msgstr "" |
| 73 |
|
| 74 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:23 |
| 75 |
msgid "For the book \"The Foundation\" by \"Isaac Asimov\" the template will become::" |
| 76 |
msgstr "" |
| 77 |
|
| 78 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:27 |
| 79 |
msgid "" |
| 80 |
"The slashes are not ``template expressions`` because they are not in between" |
| 81 |
" ``{}``. Such text is left where it appears. For example, if the template " |
| 82 |
"is::" |
| 83 |
msgstr "" |
| 84 |
|
| 85 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:31 |
| 86 |
msgid "then for \"The Foundation\" the template produces::" |
| 87 |
msgstr "فبالنسبة لـ \"المؤسسة\"، ينتج القالب::" |
| 88 |
|
| 89 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:35 |
| 90 |
msgid "" |
| 91 |
"A ``template expression`` can access all the metadata available in calibre, " |
| 92 |
"including custom columns (columns you create yourself), by using a column's " |
| 93 |
"``lookup name``. To find the lookup name for a `column` (sometimes called " |
| 94 |
"`fields`), hover your mouse over the column header in calibre's book list. " |
| 95 |
"Lookup names for custom columns always begin with ``#``. For series type " |
| 96 |
"columns there is an additional field named ``#lookup name_index`` that is " |
| 97 |
"the series index for that book in the series. For example, if you have a " |
| 98 |
"custom series column named ``#myseries``, there will also be a column named " |
| 99 |
"``#myseries_index``. The standard series column's index is named " |
| 100 |
"``series_index``." |
| 101 |
msgstr "يمكن لتعبير ``القالب`` الوصول إلى جميع البيانات الوصفية المتاحة في calibre، بما في ذلك الأعمدة المخصصة (الأعمدة التي تنشئها بنفسك)، باستخدام ``اسم البحث`` الخاص بالعمود. للعثور على اسم البحث لـ `عمود` (يُسمى أحيانًا `حقول`)، مرر الماوس فوق رأس العمود في قائمة كتب calibre. تبدأ أسماء البحث للأعمدة المخصصة دائمًا بـ ``#``. بالنسبة لأعمدة نوع السلسلة، يوجد حقل إضافي يسمى ``#اسم_البحث_فهرس`` وهو فهرس السلسلة لذلك الكتاب في السلسلة. على سبيل المثال، إذا كان لديك عمود سلسلة مخصص يسمى ``#myseries``، فسيكون هناك أيضًا عمود يسمى ``#myseries_index``. فهرس عمود السلسلة القياسي يسمى ``series_index``." |
| 102 |
|
| 103 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:37 |
| 104 |
msgid "In addition to the standard column based fields, you also can use:" |
| 105 |
msgstr "بالإضافة إلى الحقول المستندة إلى الأعمدة القياسية، يمكنك أيضًا استخدام:" |
| 106 |
|
| 107 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:39 |
| 108 |
msgid "" |
| 109 |
"``{formats}`` - A list of formats available in the calibre library for a " |
| 110 |
"book" |
| 111 |
msgstr "``{formats}`` - قائمة بالتنسيقات المتاحة في مكتبة calibre لـ كتاب" |
| 112 |
|
| 113 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:40 |
| 114 |
msgid "``{identifiers:select(isbn)}`` - The ISBN of the book" |
| 115 |
msgstr "``{identifiers:select(isbn)}`` - الرقم المعياري الدولي للكتاب (ISBN) الخاص بالكتاب" |
| 116 |
|
| 117 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:42 |
| 118 |
msgid "" |
| 119 |
"If the metadata for the field for a given book is not defined then the field" |
| 120 |
" in the template is replaced by the empty string (``''``). For example, " |
| 121 |
"consider the following template::" |
| 122 |
msgstr "إذا لم يتم تعريف البيانات الوصفية للحقل لكتاب معين، فسيتم استبدال الحقل في القالب بسلسلة فارغة (``''``). على سبيل المثال، النظر في القالب التالي::" |
| 123 |
|
| 124 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:46 |
| 125 |
msgid "" |
| 126 |
"If Asimov's book \"Second Foundation\" is in the series \"Foundation\" then " |
| 127 |
"the template produces::" |
| 128 |
msgstr "إذا كان كتاب أسيموف \"المؤسسة الثانية\" ضمن سلسلة \"المؤسسة\"، فإن القالب ينتج::" |
| 129 |
|
| 130 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:50 |
| 131 |
msgid "" |
| 132 |
"If a series has not been entered for the book then the template produces::" |
| 133 |
msgstr "إذا لم يتم إدخال سلسلة للكتاب، فإن القالب ينتج::" |
| 134 |
|
| 135 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:54 |
| 136 |
msgid "" |
| 137 |
"The template processor automatically removes multiple slashes and leading or" |
| 138 |
" trailing spaces." |
| 139 |
msgstr "يزيل معالج القوالب تلقائيًا الشرطات المائلة المتعددة والمسافات البادئة أو اللاحقة." |
| 140 |
|
| 141 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:57 |
| 142 |
msgid "Advanced formatting" |
| 143 |
msgstr "تنسيق متقدم" |
| 144 |
|
| 145 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:59 |
| 146 |
msgid "" |
| 147 |
"In addition to metadata substitution, templates can conditionally include " |
| 148 |
"additional text and control how substituted data is formatted." |
| 149 |
msgstr "بالإضافة إلى استبدال البيانات الوصفية، يمكن للقوالب تضمين نص إضافي بشكل شرطي والتحكم في كيفية تنسيق البيانات المستبدلة." |
| 150 |
|
| 151 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:61 |
| 152 |
msgid "**Conditionally including text**" |
| 153 |
msgstr "**تضمين النص بشكل شرطي**" |
| 154 |
|
| 155 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:63 |
| 156 |
msgid "" |
| 157 |
"Sometimes you want text to appear in the output only if a field is not " |
| 158 |
"empty. A common case is ``series`` and ``series_index`` where you want " |
| 159 |
"either nothing or the two values separated by a hyphen. calibre handles this" |
| 160 |
" case using a special ``template expression`` syntax." |
| 161 |
msgstr "أحيانًا ترغب في ظهور نص في الإخراج فقط إذا لم يكن الحقل فارغًا. حالة شائعة هي ``series`` و ``series_index`` حيث تريد إما لا شيء أو القيمتين مفصولتين بشرطة. يتعامل calibre مع هذه الحالة باستخدام صيغة خاصة لـ ``تعبير القالب``." |
| 162 |
|
| 163 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:65 |
| 164 |
msgid "" |
| 165 |
"For example and using the above Foundation example, assume you want the " |
| 166 |
"template to produce `Foundation - 3 - Second Foundation`. This template " |
| 167 |
"produces that output:" |
| 168 |
msgstr "على سبيل المثال، وباستخدام مثال المؤسسة أعلاه، افترض أنك تريد أن ينتج القالب `Foundation - 3 - Second Foundation`. ينتج هذا القالب هذا الإخراج:" |
| 169 |
|
| 170 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:67 |
| 171 |
msgid "``{series} - {series_index} - {title}``" |
| 172 |
msgstr "``{series} - {series_index} - {title}``" |
| 173 |
|
| 174 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:69 |
| 175 |
msgid "" |
| 176 |
"However, if a book has no series the template will produce `- - the title`, " |
| 177 |
"which is probably not what you want. Generally, people want the result be " |
| 178 |
"the title without the extraneous hyphens. You can accomplish this using the " |
| 179 |
"following template syntax:" |
| 180 |
msgstr "ومع ذلك، إذا لم يكن للكتاب سلسلة، فسينتج القالب `- - العنوان`، وهو على الأرجح ليس ما تريده. بشكل عام، يريد الناس أن تكون النتيجة العنوان بدون الشرطات الزائدة. يمكنك تحقيق ذلك باستخدام صيغة القالب التالية:" |
| 181 |
|
| 182 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:71 |
| 183 |
msgid "``{field:|prefix_text|suffix_text}``" |
| 184 |
msgstr "``{field:|نص_بادئة|نص_لاحقة}``" |
| 185 |
|
| 186 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:73 |
| 187 |
msgid "" |
| 188 |
"This ``template expression`` says that if ``field`` has the value `XXXX` " |
| 189 |
"then the result will be `prefix_textXXXXXsuffix_text`. If ``field`` is empty" |
| 190 |
" (has no value) then the result will be the empty string (nothing) because " |
| 191 |
"the prefix and suffix are ignored. The prefix and suffix can contain blanks." |
| 192 |
msgstr "يقول ``تعبير القالب`` هذا أنه إذا كان ``field`` يحتوي على القيمة `XXXX` فإن النتيجة ستكون `نص_بادئةXXXXXنص_لاحقة`. إذا كان ``field`` فارغًا (لا يحتوي على قيمة) فستكون النتيجة سلسلة فارغة (لا شيء) لأن البادئة واللاحقة يتم تجاهلهما. يمكن أن تحتوي البادئة واللاحقة على مسافات فارغة." |
| 193 |
|
| 194 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:75 |
| 195 |
msgid "" |
| 196 |
"**Do not use subtemplates (`{ ... }`) or functions (see below) in the prefix" |
| 197 |
" or the suffix.**" |
| 198 |
msgstr "**لا تستخدم القوالب الفرعية (``{ ... }``) أو الدوال (انظر أدناه) في البادئة أو اللاحقة.**" |
| 199 |
|
| 200 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:77 |
| 201 |
msgid "" |
| 202 |
"Using this syntax, we can solve the above no-series problem with the " |
| 203 |
"template::" |
| 204 |
msgstr "باستخدام هذه الصيغة، يمكننا حل مشكلة عدم وجود سلسلة أعلاه باستخدام القالب::" |
| 205 |
|
| 206 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:81 |
| 207 |
msgid "" |
| 208 |
"The hyphens will be included only if the book has a series index, which it " |
| 209 |
"has only if it has a series. Continuing the Foundation example again, the " |
| 210 |
"template will produce `Foundation - 1 - Second Foundation`." |
| 211 |
msgstr "سيتم تضمين الشرطات فقط إذا كان الكتاب يحتوي على فهرس سلسلة، وهو ما يحدث فقط إذا كان يحتوي على سلسلة. استمرارًا لمثال المؤسسة مرة أخرى، سينتج القالب `Foundation - 1 - Second Foundation`." |
| 212 |
|
| 213 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:83 |
| 214 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:293 |
| 215 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:469 |
| 216 |
msgid "Notes:" |
| 217 |
msgstr "ملاحظات:" |
| 218 |
|
| 219 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:85 |
| 220 |
msgid "" |
| 221 |
"You must include the colon after the ``lookup name`` if you are using a " |
| 222 |
"prefix or a suffix." |
| 223 |
msgstr "يجب عليك تضمين النقطتين بعد ``اسم البحث`` إذا كنت تستخدم بادئة أو لاحقة." |
| 224 |
|
| 225 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:86 |
| 226 |
msgid "" |
| 227 |
"You must use either no or both ``|`` characters. Using one, as in ``{field:|" |
| 228 |
" - }``, is not allowed." |
| 229 |
msgstr "" |
| 230 |
|
| 231 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:87 |
| 232 |
msgid "" |
| 233 |
"It is OK to provide no text for either the prefix or the suffix, such as in " |
| 234 |
"``{series:|| - }``. The template ``{title:||}`` is the same as ``{title}``." |
| 235 |
msgstr "لا بأس بتقديم نص فارغ للبادئة أو اللاحقة، كما في ``{series:|| - }``. القالب ``{title:||}`` هو نفسه ``{title}``." |
| 236 |
|
| 237 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:89 |
| 238 |
msgid "**Formatting**" |
| 239 |
msgstr "**التنسيق**" |
| 240 |
|
| 241 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:91 |
| 242 |
msgid "" |
| 243 |
"Suppose you want the ``series_index`` to be formatted as three digits with " |
| 244 |
"leading zeros. This does the trick:" |
| 245 |
msgstr "افترض أنك تريد تنسيق ``series_index`` بثلاثة أرقام مع أصفار بادئة. هذا يؤدي الغرض:" |
| 246 |
|
| 247 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:93 |
| 248 |
msgid "``{series_index:0>3s}`` - Three digits with leading zeros" |
| 249 |
msgstr "``{series_index:0>3s}`` - ثلاثة أرقام مع أصفار بادئة" |
| 250 |
|
| 251 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:95 |
| 252 |
msgid "For trailing zeros, use:" |
| 253 |
msgstr "للأصفار اللاحقة، استخدم:" |
| 254 |
|
| 255 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:97 |
| 256 |
msgid "``{series_index:0<3s}`` - Three digits with trailing zeros" |
| 257 |
msgstr "``{series_index:0<3s}`` - ثلاثة أرقام مع أصفار لاحقة" |
| 258 |
|
| 259 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:99 |
| 260 |
msgid "" |
| 261 |
"If you use series indices with fractional values, e.g., 1.1, you might want " |
| 262 |
"the decimal points to line up. For example, you might want the indices 1 and" |
| 263 |
" 2.5 to appear as 01.00 and 02.50 so that they will sort correctly on a " |
| 264 |
"device that does lexical sorting. To do this, use:" |
| 265 |
msgstr "إذا كنت تستخدم فهارس سلسلة ذات قيم كسرية، على سبيل المثال، 1.1، فقد ترغب في محاذاة النقاط العشرية. على سبيل المثال، قد ترغب في ظهور الفهارس 1 و 2.5 كـ 01.00 و 02.50 بحيث يتم فرزها بشكل صحيح على جهاز يقوم بالفرز المعجمي. للقيام بذلك، استخدم:" |
| 266 |
|
| 267 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:101 |
| 268 |
msgid "" |
| 269 |
"``{series_index:0>5.2f}`` - Five characters consisting of two digits with " |
| 270 |
"leading zeros, a decimal point, then 2 digits after the decimal point." |
| 271 |
msgstr "``{series_index:0>5.2f}`` - خمسة أحرف تتكون من رقمين مع أصفار بادئة، نقطة عشرية، ثم رقمين بعد النقطة العشرية." |
| 272 |
|
| 273 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:103 |
| 274 |
msgid "If you want only the first two letters of the data, use:" |
| 275 |
msgstr "إذا كنت تريد فقط الحرفين الأولين من البيانات، استخدم:" |
| 276 |
|
| 277 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:105 |
| 278 |
msgid "" |
| 279 |
"``{author_sort:.2}`` - Only the first two letters of the author sort name" |
| 280 |
msgstr "``{author_sort:.2}`` - أول حرفين فقط من اسم ترتيب المؤلف" |
| 281 |
|
| 282 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:107 |
| 283 |
msgid "" |
| 284 |
"Much of the calibre template language formatting comes from Python. For more" |
| 285 |
" details on the syntax of these advanced formatting operations see the " |
| 286 |
"`Python documentation " |
| 287 |
"<https://docs.python.org/3/library/string.html#formatstrings>`_." |
| 288 |
msgstr "يأتي جزء كبير من تنسيق لغة قوالب calibre من Python. لمزيد من التفاصيل حول صيغة عمليات التنسيق المتقدمة هذه، راجع `وثائق Python <https://docs.python.org/3/library/string.html#formatstrings>`_." |
| 289 |
|
| 290 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:111 |
| 291 |
msgid "Using templates to define custom columns" |
| 292 |
msgstr "استخدام القوالب لتعريف الأعمدة المخصصة" |
| 293 |
|
| 294 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:113 |
| 295 |
msgid "" |
| 296 |
"Templates can be used to display information that isn't in calibre metadata," |
| 297 |
" or to display metadata differently from calibre's normal format. For " |
| 298 |
"example, you might want to show the ``ISBN``, a field that calibre does not " |
| 299 |
"display. You can accomplish this creating a custom column with the type " |
| 300 |
"`Column built from other columns` (hereafter called `composite columns`) and" |
| 301 |
" providing a template to generate the displayed text. The column will " |
| 302 |
"display the result of evaluating the template. For example, to display the " |
| 303 |
"ISBN, create the column and enter ``{identifiers:select(isbn)}`` in the " |
| 304 |
"template box. To display a column containing the values of two series custom" |
| 305 |
" columns, separated by a comma, use ``{#series1:||,}{#series2}``." |
| 306 |
msgstr "يمكن استخدام القوالب لعرض معلومات غير موجودة في البيانات الوصفية لـ calibre، أو لعرض البيانات الوصفية بشكل مختلف عن التنسيق العادي لـ calibre. على سبيل المثال، قد ترغب في عرض ``ISBN``، وهو حقل لا يعرضه calibre. يمكنك تحقيق ذلك بإنشاء عمود مخصص من نوع `عمود مبني من أعمدة أخرى` (يُشار إليه فيما بعد بـ `الأعمدة المركبة`) و توفير قالب لإنشاء النص المعروض. سيعرض العمود نتيجة تقييم القالب. على سبيل المثال، لعرض ISBN، أنشئ العمود وأدخل ``{identifiers:select(isbn)}`` في مربع القالب. لعرض عمود يحتوي على قيم عمودين مخصصين من السلسلة، مفصولين بفاصلة، استخدم ``{#series1:||,}{#series2}``." |
| 307 |
|
| 308 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:115 |
| 309 |
msgid "Composite columns can use any template option, including formatting." |
| 310 |
msgstr "يمكن للأعمدة المركبة استخدام أي خيار قالب، بما في ذلك التنسيق." |
| 311 |
|
| 312 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:117 |
| 313 |
msgid "" |
| 314 |
"Note: You cannot edit the data displayed in a composite column. Instead you " |
| 315 |
"edit the source columns. If you edit a composite column, for example by " |
| 316 |
"double-clicking it, calibre will open the template for editing, not the " |
| 317 |
"underlying data." |
| 318 |
msgstr "ملاحظة: لا يمكنك تحرير البيانات المعروضة في عمود مركب. بدلاً من ذلك، تقوم بتحرير الأعمدة المصدر. إذا قمت بتحرير عمود مركب، على سبيل المثال عن طريق النقر المزدوج عليه، فسيفتح calibre القالب للتحرير، وليس البيانات الأساسية." |
| 319 |
|
| 320 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:121 |
| 321 |
msgid "Templates and plugboards" |
| 322 |
msgstr "القوالب ولوحات التوصيل" |
| 323 |
|
| 324 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:123 |
| 325 |
msgid "" |
| 326 |
"Plugboards are used for changing the metadata written into books during " |
| 327 |
"send-to-device and save-to-disk operations. A plugboard permits you to " |
| 328 |
"specify a template to provide the data to write into the book's metadata. " |
| 329 |
"You can use plugboards to modify the following fields: authors, author_sort," |
| 330 |
" language, publisher, tags, title, title_sort. This feature helps people who" |
| 331 |
" want to use different metadata in books on devices to solve sorting or " |
| 332 |
"display issues." |
| 333 |
msgstr "تُستخدم لوحات التوصيل لتغيير البيانات الوصفية المكتوبة في الكتب أثناء عمليات الإرسال إلى الجهاز والحفظ على القرص. تسمح لك لوحة التوصيل بتحديد قالب لتوفير البيانات التي ستُكتب في البيانات الوصفية للكتاب. يمكنك استخدام لوحات التوصيل لتعديل الحقول التالية: المؤلفون، ترتيب المؤلفين، اللغة، الناشر، العلامات، العنوان، ترتيب العنوان. تساعد هذه الميزة الأشخاص الذين يرغبون في استخدام بيانات وصفية مختلفة في الكتب على الأجهزة لحل مشاكل الفرز أو العرض." |
| 334 |
|
| 335 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:125 |
| 336 |
msgid "" |
| 337 |
"When you create a plugboard, you specify the format and device for which the" |
| 338 |
" plugboard is to be used. A special device is provided, ``save_to_disk``, " |
| 339 |
"that is used when saving formats (as opposed to sending them to a device). " |
| 340 |
"Once you have chosen the format and device, you choose the metadata fields " |
| 341 |
"to change, providing templates to supply the new values. These templates are" |
| 342 |
" `connected` to their destination fields, hence the name `plugboards`. You " |
| 343 |
"can of course use composite columns in these templates." |
| 344 |
msgstr "عند إنشاء لوحة توصيل، تحدد التنسيق والجهاز الذي ستُستخدم لوحة التوصيل من أجله. يتم توفير جهاز خاص، ``save_to_disk``، يُستخدم عند حفظ التنسيقات (على عكس إرسالها إلى جهاز). بمجرد اختيار التنسيق والجهاز، تختار حقول البيانات الوصفية التي سيتم تغييرها، وتوفر قوالب لتوفير القيم الجديدة. هذه القوالب `متصلة` بحقولها الوجهة، ومن هنا جاء اسم `لوحات التوصيل`. يمكنك بالطبع استخدام الأعمدة المركبة في هذه القوالب." |
| 345 |
|
| 346 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:127 |
| 347 |
msgid "" |
| 348 |
"Plugboards are quite flexible and can be written in Single Function Mode, " |
| 349 |
"Template Program Mode, General Program Mode, or Python Template mode." |
| 350 |
msgstr "لوحات التوصيل مرنة للغاية ويمكن كتابتها في وضع الدالة الواحدة، وضع برنامج القالب، وضع البرنامج العام، أو وضع قالب بايثون." |
| 351 |
|
| 352 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:129 |
| 353 |
msgid "" |
| 354 |
"When a plugboard might apply (Content server, save to disk, or send to " |
| 355 |
"device), calibre searches the defined plugboards to choose the correct one " |
| 356 |
"for the given format and device. For example, to find the appropriate " |
| 357 |
"plugboard for an EPUB book being sent to an ANDROID device, calibre searches" |
| 358 |
" the plugboards using the following search order:" |
| 359 |
msgstr "عندما قد تنطبق لوحة توصيل (خادم المحتوى، الحفظ على القرص، أو الإرسال إلى الجهاز)، يبحث calibre في لوحات التوصيل المحددة لاختيار الصحيحة للتنسيق والجهاز المعنيين. على سبيل المثال، للعثور على لوحة التوصيل المناسبة لكتاب EPUB يتم إرساله إلى جهاز ANDROID، يبحث calibre في لوحات التوصيل باستخدام ترتيب البحث التالي:" |
| 360 |
|
| 361 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:133 |
| 362 |
msgid "" |
| 363 |
"a plugboard with an exact match on format and device, e.g., ``EPUB`` and " |
| 364 |
"``ANDROID``" |
| 365 |
msgstr "لوحة توصيل تتطابق تمامًا مع التنسيق والجهاز، على سبيل المثال، ``EPUB`` و ``ANDROID``" |
| 366 |
|
| 367 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:134 |
| 368 |
msgid "" |
| 369 |
"a plugboard with an exact match on format and the special ``any device`` " |
| 370 |
"choice, e.g., ``EPUB`` and ``any device``" |
| 371 |
msgstr "لوحة توصيل تتطابق تمامًا مع التنسيق وخيار ``أي جهاز`` الخاص، على سبيل المثال، ``EPUB`` و ``أي جهاز``" |
| 372 |
|
| 373 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:135 |
| 374 |
msgid "" |
| 375 |
"a plugboard with the special ``any format`` choice and an exact match on " |
| 376 |
"device, e.g., ``any format`` and ``ANDROID``" |
| 377 |
msgstr "لوحة توصيل مع خيار ``أي تنسيق`` الخاص ومطابقة دقيقة لـ الجهاز، على سبيل المثال، ``أي تنسيق`` و ``ANDROID``" |
| 378 |
|
| 379 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:136 |
| 380 |
msgid "a plugboard with ``any format`` and ``any device``" |
| 381 |
msgstr "لوحة توصيل مع ``أي تنسيق`` و ``أي جهاز``" |
| 382 |
|
| 383 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:138 |
| 384 |
msgid "" |
| 385 |
"The tags and authors fields have special treatment, because both of these " |
| 386 |
"fields can hold more than one item. A book can have many tags and many " |
| 387 |
"authors. When you specify that one of these two fields is to be changed, the" |
| 388 |
" template's result is examined to see if more than one item is there. For " |
| 389 |
"tags, the result is cut apart wherever calibre finds a comma. For example, " |
| 390 |
"if the template produces the value ``Thriller, Horror``, then the result " |
| 391 |
"will be two tags, ``Thriller`` and ``Horror``. There is no way to put a " |
| 392 |
"comma in the middle of a tag." |
| 393 |
msgstr "يتم التعامل مع حقلي العلامات والمؤلفين بشكل خاص، لأن كلا هذين الحقلين يمكن أن يحملا أكثر من عنصر واحد. يمكن أن يحتوي الكتاب على العديد من العلامات والعديد من المؤلفين. عندما تحدد أن أحد هذين الحقلين سيتم تغييره، يتم فحص نتيجة القالب لمعرفة ما إذا كان هناك أكثر من عنصر واحد. بالنسبة للعلامات، يتم تقسيم النتيجة حيثما يجد calibre فاصلة. على سبيل المثال، إذا أنتج القالب القيمة ``Thriller, Horror``، فستكون النتيجة علامتين، ``Thriller`` و ``Horror``. لا توجد طريقة لوضع فاصلة في منتصف علامة." |
| 394 |
|
| 395 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:141 |
| 396 |
msgid "" |
| 397 |
"The same thing happens for authors, but using a different character for the " |
| 398 |
"cut, a `&` (ampersand) instead of a comma. For example, if the template " |
| 399 |
"produces the value ``Blogs, Joe&Posts, Susan``, then the book will end up " |
| 400 |
"with two authors, ``Blogs, Joe`` and ``Posts, Susan``. If the template " |
| 401 |
"produces the value ``Blogs, Joe;Posts, Susan``, then the book will have one " |
| 402 |
"author with a rather strange name." |
| 403 |
msgstr "يحدث نفس الشيء للمؤلفين، ولكن باستخدام حرف مختلف للقطع، وهو `&` (علامة العطف) بدلاً من الفاصلة. على سبيل المثال، إذا أنتج القالب القيمة ``Blogs, Joe&Posts, Susan``، فسينتهي الأمر بالكتاب بمؤلفين، ``Blogs, Joe`` و ``Posts, Susan``. إذا أنتج القالب القيمة ``Blogs, Joe;Posts, Susan``، فسيحتوي الكتاب على مؤلف واحد باسم غريب نوعًا ما." |
| 404 |
|
| 405 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:143 |
| 406 |
msgid "" |
| 407 |
"Plugboards affect the metadata written into the book when it is saved to " |
| 408 |
"disk or written to the device. Plugboards do not affect the metadata used by" |
| 409 |
" ``save to disk`` and ``send to device`` to create the file names. Instead, " |
| 410 |
"file names are constructed using the templates entered on the appropriate " |
| 411 |
"preferences window." |
| 412 |
msgstr "تؤثر لوحات التوصيل على البيانات الوصفية المكتوبة في الكتاب عند حفظه على القرص أو كتابته على الجهاز. لا تؤثر لوحات التوصيل على البيانات الوصفية المستخدمة بواسطة ``الحفظ على القرص`` و ``الإرسال إلى الجهاز`` لإنشاء أسماء الملفات. بدلاً من ذلك، يتم إنشاء أسماء الملفات باستخدام القوالب المدخلة في نافذة التفضيلات المناسبة." |
| 413 |
|
| 414 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:148 |
| 415 |
msgid "Using functions in templates - Single Function Mode" |
| 416 |
msgstr "استخدام الدوال في القوالب - وضع الدالة الواحدة" |
| 417 |
|
| 418 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:150 |
| 419 |
msgid "" |
| 420 |
"Suppose you want to display the value of a field in upper case when that " |
| 421 |
"field is normally in title case. You can do this using `template functions`." |
| 422 |
" For example, to display the title in upper case use the ``uppercase`` " |
| 423 |
"function, as in ``{title:uppercase()}``. To display it in title case, use " |
| 424 |
"``{title:titlecase()}``." |
| 425 |
msgstr "افترض أنك تريد عرض قيمة حقل بأحرف كبيرة عندما يكون هذا الحقل عادةً بحالة عنوان. يمكنك القيام بذلك باستخدام `دوال القالب`. على سبيل المثال، لعرض العنوان بأحرف كبيرة استخدم دالة ``uppercase``، كما في ``{title:uppercase()}``. لعرضه بحالة عنوان، استخدم ``{title:titlecase()}``." |
| 426 |
|
| 427 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:152 |
| 428 |
msgid "" |
| 429 |
"Functions go into the format part of the template, after the ``:`` and " |
| 430 |
"before the first ``|`` or the closing ``}`` if no prefix/suffix is used. If " |
| 431 |
"you have both a format and a function reference, the function comes after a " |
| 432 |
"second ``:``. Functions return the value of the column specified in the " |
| 433 |
"template, suitably modified." |
| 434 |
msgstr "توضع الدوال في جزء التنسيق من القالب، بعد ``:`` و قبل أول ``|`` أو القوس الختامي ``}`` إذا لم يتم استخدام بادئة/لاحقة. إذا كان لديك كل من تنسيق ومرجع دالة، فإن الدالة تأتي بعد ``:`` ثانية. تعيد الدوال قيمة العمود المحدد في القالب، معدلة بشكل مناسب." |
| 435 |
|
| 436 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:154 |
| 437 |
msgid "The syntax for using functions is one of::" |
| 438 |
msgstr "صيغة استخدام الدوال هي إحدى::" |
| 439 |
|
| 440 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:161 |
| 441 |
msgid "" |
| 442 |
"Function names must always be followed by opening and closing parentheses. " |
| 443 |
"Some functions require extra values (arguments), and these go inside the " |
| 444 |
"parentheses. Arguments are separated by commas. Literal commas (commas as " |
| 445 |
"text, not argument separators) must be preceded by a backslash (``\\``) . " |
| 446 |
"The last (or only) argument cannot contain a textual closing parenthesis." |
| 447 |
msgstr "يجب أن تتبع أسماء الدوال دائمًا أقواس فتح وإغلاق. تتطلب بعض الدوال قيمًا إضافية (وسائط)، وتوضع هذه داخل الأقواس. تُفصل الوسائط بفاصلات. يجب أن تسبق الفواصل الحرفية (الفواصل كنص، وليس فواصل وسيطة) بفاصلة خلفية (``\\``). لا يمكن أن يحتوي الوسيط الأخير (أو الوحيد) على قوس إغلاق نصي." |
| 448 |
|
| 449 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:163 |
| 450 |
msgid "" |
| 451 |
"Functions are evaluated before format specifications and the prefix/suffix. " |
| 452 |
"See further down for an example of using both a format and a function." |
| 453 |
msgstr "يتم تقييم الدوال قبل مواصفات التنسيق والبادئة/اللاحقة. انظر أدناه للحصول على مثال لاستخدام كل من التنسيق والدالة." |
| 454 |
|
| 455 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:165 |
| 456 |
msgid "" |
| 457 |
"**Important**: If you have programming experience, please note that the " |
| 458 |
"syntax in `Single Function Mode` is not what you expect. Strings are not " |
| 459 |
"quoted and spaces are significant. All arguments are considered to be " |
| 460 |
"constants; there are no expressions." |
| 461 |
msgstr "**هام**: إذا كان لديك خبرة في البرمجة، يرجى ملاحظة أن صيغة `وضع الدالة الواحدة` ليست ما تتوقعه. السلاسل ليست مقتبسة والمسافات مهمة. تعتبر جميع الوسائط ثوابت؛ لا توجد تعبيرات." |
| 462 |
|
| 463 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:167 |
| 464 |
msgid "" |
| 465 |
"**Do not use subtemplates (`{ ... }`) as function arguments.** Instead, use " |
| 466 |
":ref:`Template Program Mode <template_mode>` and :ref:`General Program Mode " |
| 467 |
"<general_mode>`." |
| 468 |
msgstr "**لا تستخدم القوالب الفرعية (``{ ... }``) كوسائط دالة.** بدلاً من ذلك، استخدم :ref:`وضع برنامج القالب <template_mode>` و :ref:`وضع البرنامج العام <general_mode>`." |
| 469 |
|
| 470 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:169 |
| 471 |
msgid "Notes on calling functions in Single Function Mode:" |
| 472 |
msgstr "ملاحظات حول استدعاء الدوال في وضع الدالة الواحدة:" |
| 473 |
|
| 474 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:171 |
| 475 |
msgid "" |
| 476 |
"When functions are used in Single Function Mode, the first parameter, " |
| 477 |
"``value``, is automatically replaced by the content of the field specified " |
| 478 |
"in the template. For example, when the template ``{title:capitalize()}`` is " |
| 479 |
"processed, the content of the ``title`` field is passed as the parameter " |
| 480 |
"``value`` to the capitalize function." |
| 481 |
msgstr "عند استخدام الدوال في وضع الدالة الواحدة، يتم استبدال المعامل الأول، ``value``، تلقائيًا بمحتوى الحقل المحدد في القالب. على سبيل المثال، عندما يتم معالجة القالب ``{title:capitalize()}``، يتم تمرير محتوى حقل ``title`` كمعامل ``value`` إلى دالة capitalize." |
| 482 |
|
| 483 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:172 |
| 484 |
msgid "" |
| 485 |
"In the function documentation, the notation ``[something]*`` means that " |
| 486 |
"``something`` can be repeated zero or more times. The notation " |
| 487 |
"``[something]+`` means that the ``something`` is repeated one or more times " |
| 488 |
"(must exist at least one time)." |
| 489 |
msgstr "في وثائق الدالة، تعني الرموز ``[شيء]*`` أن ``الشيء`` يمكن أن يتكرر صفرًا أو أكثر من المرات. وتعني الرموز ``[شيء]+`` أن ``الشيء`` يتكرر مرة واحدة أو أكثر (يجب أن يوجد مرة واحدة على الأقل)." |
| 490 |
|
| 491 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:173 |
| 492 |
msgid "" |
| 493 |
"Some functions use regular expressions. In the template language regular " |
| 494 |
"expression matching is case-insensitive." |
| 495 |
msgstr "تستخدم بعض الدوال تعبيرات نمطية. في لغة القوالب، مطابقة التعبيرات النمطية غير حساسة لحالة الأحرف." |
| 496 |
|
| 497 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:175 |
| 498 |
msgid "" |
| 499 |
"Functions are documented in :ref:`template_functions_reference`. The " |
| 500 |
"documentation tells you what arguments the functions require and what the " |
| 501 |
"functions do. For example, here is the documentation of the " |
| 502 |
":ref:`ff_ifempty` function." |
| 503 |
msgstr "تم توثيق الدوال في :ref:`template_functions_reference`. تخبرك الوثائق بالوسائط التي تتطلبها الدوال وما تفعله الدوال. على سبيل المثال، إليك وثائق دالة :ref:`ff_ifempty`." |
| 504 |
|
| 505 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:179 |
| 506 |
msgid "" |
| 507 |
"You see that the function requires two arguments, ``value`` and " |
| 508 |
"``text_if_empty``. However, because we are using Single Function Mode, we " |
| 509 |
"omit the ``value`` argument, passing only ``text_if_empty``. For example, " |
| 510 |
"this template::" |
| 511 |
msgstr "ترى أن الدالة تتطلب وسيطين، ``value`` و ``text_if_empty``. ومع ذلك، نظرًا لأننا نستخدم وضع الدالة الواحدة، فإننا نحذف الوسيط ``value``، ونمرر فقط ``text_if_empty``. على سبيل المثال، هذا القالب::" |
| 512 |
|
| 513 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:183 |
| 514 |
msgid "" |
| 515 |
"shows the tags for a book, if any. If it has no tags then it shows `No tags " |
| 516 |
"on this book`." |
| 517 |
msgstr "" |
| 518 |
|
| 519 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:185 |
| 520 |
msgid "" |
| 521 |
"The following functions are usable in Single Function Mode because their " |
| 522 |
"first parameter is ``value``." |
| 523 |
msgstr "الدوال التالية قابلة للاستخدام في وضع الدالة الواحدة لأن معاملها الأول هو ``value``." |
| 524 |
|
| 525 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:227 |
| 526 |
msgid "**Using functions and formatting in the same template**" |
| 527 |
msgstr "**استخدام الدوال والتنسيق في نفس القالب**" |
| 528 |
|
| 529 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:229 |
| 530 |
msgid "" |
| 531 |
"Suppose you have an integer custom column ``#myint`` that you want displayed" |
| 532 |
" with leading zeros, as in ``003``. One way to do this is to use a format of" |
| 533 |
" ``0>3s``. However, by default if a number (integer or float) equals zero " |
| 534 |
"then the value is displayed as the empty string so zero values will produce " |
| 535 |
"the empty string, not ``000``. If you want to see ``000`` values then you " |
| 536 |
"use both the format string and the ``ifempty`` function to change the empty " |
| 537 |
"value back to a zero. The template would be::" |
| 538 |
msgstr "افترض أن لديك عمودًا مخصصًا من نوع عدد صحيح ``#myint`` وتريد عرضه بأصفار بادئة، كما في ``003``. إحدى الطرق للقيام بذلك هي استخدام تنسيق ``0>3s``. ومع ذلك، افتراضيًا إذا كان الرقم (صحيح أو عشري) يساوي صفرًا، فإن القيمة تُعرض كسلسلة فارغة، لذا ستنتج القيم الصفرية سلسلة فارغة، وليس ``000``. إذا كنت تريد رؤية قيم ``000``، فاستخدم سلسلة التنسيق ودالة ``ifempty`` لتغيير القيمة الفارغة مرة أخرى إلى صفر. سيكون القالب::" |
| 539 |
|
| 540 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:233 |
| 541 |
msgid "" |
| 542 |
"Note that you can use the prefix and suffix as well. If you want the number " |
| 543 |
"to appear as ``[003]`` or ``[000]``, then use the template::" |
| 544 |
msgstr "لاحظ أنه يمكنك استخدام البادئة واللاحقة أيضًا. إذا كنت تريد أن يظهر الرقم كـ ``[003]`` أو ``[000]``، فاستخدم القالب::" |
| 545 |
|
| 546 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:240 |
| 547 |
msgid "General Program Mode" |
| 548 |
msgstr "وضع البرنامج العام" |
| 549 |
|
| 550 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:242 |
| 551 |
msgid "" |
| 552 |
"`General Program Mode` (`GPM`) replaces `template expressions` with a " |
| 553 |
"program written in the `template language`. The syntax of the language is " |
| 554 |
"defined by the following grammar::" |
| 555 |
msgstr "`وضع البرنامج العام` (`GPM`) يستبدل `تعبيرات القالب` بـ برنامج مكتوب بلغة `القالب`. يتم تعريف صيغة اللغة بالقواعد النحوية التالية::" |
| 556 |
|
| 557 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:295 |
| 558 |
msgid "" |
| 559 |
"a ``top_expression`` always has a value. The value of an ``expression_list``" |
| 560 |
" is the value of the last ``top_expression`` in the list. For example, the " |
| 561 |
"value of the expression list ``1;2;'foobar';3`` is ``3``." |
| 562 |
msgstr "لـ ``تعبير_أعلى`` دائمًا قيمة. قيمة ``قائمة_التعبيرات`` هي قيمة آخر ``تعبير_أعلى`` في القائمة. على سبيل المثال، قيمة قائمة التعبيرات ``1;2;'foobar';3`` هي ``3``." |
| 563 |
|
| 564 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:296 |
| 565 |
msgid "In a logical context, any non-empty value is ``True``" |
| 566 |
msgstr "في سياق منطقي، أي قيمة غير فارغة هي ``True``" |
| 567 |
|
| 568 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:297 |
| 569 |
msgid "In a logical context, the empty value is ``False``" |
| 570 |
msgstr "في سياق منطقي، القيمة الفارغة هي ``False``" |
| 571 |
|
| 572 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:298 |
| 573 |
msgid "" |
| 574 |
"Strings and numbers can be used interchangeably. For example, ``10`` and " |
| 575 |
"``'10'`` are the same thing." |
| 576 |
msgstr "يمكن استخدام السلاسل والأرقام بالتبادل. على سبيل المثال، ``10`` و ``'10'`` هما نفس الشيء." |
| 577 |
|
| 578 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:299 |
| 579 |
msgid "" |
| 580 |
"Comments are lines starting with a '#' character, possibly preceded by " |
| 581 |
"blanks or tabs." |
| 582 |
msgstr "" |
| 583 |
|
| 584 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:301 |
| 585 |
msgid "**Operator precedence**" |
| 586 |
msgstr "**أسبقية العوامل**" |
| 587 |
|
| 588 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:303 |
| 589 |
msgid "" |
| 590 |
"The operator precedence (order of evaluation) from highest (evaluated first)" |
| 591 |
" to lowest (evaluated last) is:" |
| 592 |
msgstr "أسبقية العوامل (ترتيب التقييم) من الأعلى (يتم تقييمه أولاً) إلى الأدنى (يتم تقييمه أخيرًا) هي:" |
| 593 |
|
| 594 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:305 |
| 595 |
msgid "" |
| 596 |
"Function calls, constants, parenthesized expressions, statement expressions," |
| 597 |
" assignment expressions, field references." |
| 598 |
msgstr "استدعاءات الدوال، الثوابت، التعبيرات بين قوسين، تعبيرات الجمل، تعبيرات الإسناد، مراجع الحقول." |
| 599 |
|
| 600 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:306 |
| 601 |
msgid "" |
| 602 |
"Unary plus (``+``) and minus (``-``). These operators evaluate right to " |
| 603 |
"left." |
| 604 |
msgstr "الجمع الأحادي (``+``) والطرح الأحادي (``-``). يتم تقييم هذه العوامل من اليمين إلى اليسار." |
| 605 |
|
| 606 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:308 |
| 607 |
msgid "" |
| 608 |
"These and all the other arithmetic operators return integers if the " |
| 609 |
"expression results in a fractional part equal to zero. For example, if an " |
| 610 |
"expression returns ``3.0`` it is changed to ``3``." |
| 611 |
msgstr "تعيد هذه العوامل وجميع العوامل الحسابية الأخرى أعدادًا صحيحة إذا كانت النتيجة تحتوي على جزء كسري يساوي صفرًا. على سبيل المثال، إذا كان التعبير يعيد ``3.0`` فإنه يتغير إلى ``3``." |
| 612 |
|
| 613 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:309 |
| 614 |
msgid "" |
| 615 |
"Multiply (``*``) and divide (``/``). These operators are associative and " |
| 616 |
"evaluate left to right. Use parentheses if you want to change the order of " |
| 617 |
"evaluation." |
| 618 |
msgstr "الضرب (``*``) والقسمة (``/``). هذه العوامل ترابطية و تُقيّم من اليسار إلى اليمين. استخدم الأقواس إذا كنت ترغب في تغيير ترتيب التقييم." |
| 619 |
|
| 620 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:310 |
| 621 |
msgid "" |
| 622 |
"Add (``+``) and subtract (``-``). These operators are associative and " |
| 623 |
"evaluate left to right." |
| 624 |
msgstr "الجمع (``+``) والطرح (``-``). هذه العوامل ترابطية و تُقيّم من اليسار إلى اليمين." |
| 625 |
|
| 626 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:311 |
| 627 |
msgid "" |
| 628 |
"Numeric and string comparisons. These operators return ``'1'`` if the " |
| 629 |
"comparison succeeds, otherwise the empty string (``''``). Comparisons are " |
| 630 |
"not associative: ``a < b < c`` is a syntax error." |
| 631 |
msgstr "المقارنات العددية والنصية. تعيد هذه العوامل ``'1'`` إذا نجحت المقارنة، وإلا فإنها تعيد السلسلة الفارغة (``''``). المقارنات ليست ترابطية: ``a < b < c`` هو خطأ في الصيغة." |
| 632 |
|
| 633 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:312 |
| 634 |
msgid "" |
| 635 |
"String concatenation (``&``). The ``&`` operator returns a string formed by " |
| 636 |
"concatenating the left-hand and right-hand expressions. Example: ``'aaa' & " |
| 637 |
"'bbb'`` returns ``'aaabbb'``. The operator is associative and evaluates left" |
| 638 |
" to right." |
| 639 |
msgstr "سلسلة الربط (``&``). تعيد عامل التشغيل ``&`` سلسلة مكونة من ربط التعبيرات اليسرى واليمنى. مثال: ``'aaa' & 'bbb'`` يعيد ``'aaabbb'``. عامل التشغيل ترابطي ويُقيّم من اليسار إلى اليمين." |
| 640 |
|
| 641 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:313 |
| 642 |
msgid "" |
| 643 |
"Unary logical not (``!``). This operator returns ``'1'`` if the expression " |
| 644 |
"is False (evaluates to the empty string), otherwise ``''``." |
| 645 |
msgstr "النفي المنطقي الأحادي (``!``). يعيد هذا العامل ``'1'`` إذا كان التعبير خاطئًا (يُقيّم إلى سلسلة فارغة)، وإلا فإنه يعيد ``''``." |
| 646 |
|
| 647 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:314 |
| 648 |
msgid "" |
| 649 |
"Logical and (``&&``). This operator returns '1' if both the left-hand and " |
| 650 |
"right-hand expressions are True, or the empty string ``''`` if either is " |
| 651 |
"False. It is associative, evaluates left to right, and does `short-" |
| 652 |
"circuiting <https://chortle.ccsu.edu/java5/Notes/chap40/ch40_2.html>`_." |
| 653 |
msgstr "المنطقي و (``&&``). يعيد هذا العامل '1' إذا كان كلا التعبيرين الأيسر و الأيمن صحيحين، أو السلسلة الفارغة ``''`` إذا كان أحدهما خاطئًا. إنه ترابطي، يُقيّم من اليسار إلى اليمين، ويقوم بـ `التقصير <https://chortle.ccsu.edu/java5/Notes/chap40/ch40_2.html>`_." |
| 654 |
|
| 655 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:315 |
| 656 |
msgid "" |
| 657 |
"Logical or (``||``). This operator returns ``'1'`` if either the left-hand " |
| 658 |
"or right-hand expression is True, or ``''`` if both are False. It is " |
| 659 |
"associative, evaluates left to right, and does `short-circuiting " |
| 660 |
"<https://chortle.ccsu.edu/java5/Notes/chap40/ch40_2.html>`_. It is an " |
| 661 |
"`inclusive or`, returning ``'1'`` if both the left- and right-hand " |
| 662 |
"expressions are True." |
| 663 |
msgstr "المنطقي أو (``||``). يعيد هذا العامل ``'1'`` إذا كان التعبير الأيسر أو الأيمن صحيحًا، أو ``''`` إذا كان كلاهما خاطئًا. إنه ترابطي، يُقيّم من اليسار إلى اليمين، ويقوم بـ `التقصير <https://chortle.ccsu.edu/java5/Notes/chap40/ch40_2.html>`_. إنه `أو شامل`، يعيد ``'1'`` إذا كان كلا التعبيرين الأيسر والأيمن صحيحين." |
| 664 |
|
| 665 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:317 |
| 666 |
msgid "**Field references**" |
| 667 |
msgstr "**مراجع الحقول**" |
| 668 |
|
| 669 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:319 |
| 670 |
msgid "" |
| 671 |
"A ``field_reference`` evaluates to the value of the metadata field named by " |
| 672 |
"lookup name that follows the ``$`` or ``$$``. Using ``$`` is equivalent to " |
| 673 |
"using the :ref:`ff_field` function. Using ``$$`` is equivalent to using the " |
| 674 |
":ref:`ff_raw_field` function. Examples::" |
| 675 |
msgstr "يُقيّم ``field_reference`` إلى قيمة حقل البيانات الوصفية المسمى بواسطة اسم البحث الذي يتبع ``$`` أو ``$$``. استخدام ``$`` يعادل استخدام دالة :ref:`ff_field`. استخدام ``$$`` يعادل استخدام دالة :ref:`ff_raw_field`. أمثلة::" |
| 676 |
|
| 677 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:326 |
| 678 |
msgid "**If expressions**" |
| 679 |
msgstr "**تعبيرات الشرط (If)**" |
| 680 |
|
| 681 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:328 |
| 682 |
msgid "" |
| 683 |
"``If`` expressions first evaluate the ``condition``. If the ``condition`` is" |
| 684 |
" True (a non-empty value) then the ``expression_list`` in the ``then`` " |
| 685 |
"clause is evaluated. If it is False then if present the ``expression_list`` " |
| 686 |
"in the ``elif`` or ``else`` clause is evaluated. The ``elif`` and ``else`` " |
| 687 |
"parts are optional. The words ``if``, ``then``, ``elif``, ``else``, and " |
| 688 |
"``fi`` are reserved; you cannot use them as identifier names. You can put " |
| 689 |
"newlines and white space wherever they make sense. The ``condition`` is a " |
| 690 |
"``top_expression`` not an ``expression_list``; semicolons are not allowed. " |
| 691 |
"The ``expression_lists`` are semicolon-separated sequences of " |
| 692 |
"``top_expressions``. An ``if`` expression returns the result of the last " |
| 693 |
"``top_expression`` in the evaluated ``expression_list``, or the empty string" |
| 694 |
" if no expression list was evaluated." |
| 695 |
msgstr "تعبيرات ``If`` تُقيّم أولاً ``الشرط``. إذا كان ``الشرط`` صحيحًا (قيمة غير فارغة) فسيتم تقييم ``قائمة_التعبيرات`` في بند ``then``. إذا كان خاطئًا، فسيتم تقييم ``قائمة_التعبيرات`` في بند ``elif`` أو ``else`` إن وجدت. أجزاء ``elif`` و ``else`` اختيارية. الكلمات ``if``، ``then``، ``elif``، ``else``، و ``fi`` محجوزة؛ لا يمكنك استخدامها كأسماء معرفات. يمكنك وضع أسطر جديدة ومسافات بيضاء حيثما يكون ذلك منطقيًا. ``الشرط`` هو ``تعبير_أعلى`` وليس ``قائمة_تعبيرات``؛ لا يُسمح بالفواصل المنقوطة. ``قوائم_التعبيرات`` هي تسلسلات مفصولة بفاصلة منقوطة من ``تعبيرات_أعلى``. يعيد تعبير ``if`` نتيجة آخر ``تعبير_أعلى`` في ``قائمة_التعبيرات`` التي تم تقييمها، أو سلسلة فارغة إذا لم يتم تقييم أي قائمة تعبيرات." |
| 696 |
|
| 697 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:330 |
| 698 |
msgid "Examples::" |
| 699 |
msgstr "أمثلة::" |
| 700 |
|
| 701 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:343 |
| 702 |
msgid "Nested ``if`` example::" |
| 703 |
msgstr "مثال ``if`` المتداخل::" |
| 704 |
|
| 705 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:356 |
| 706 |
msgid "" |
| 707 |
"As said above, an ``if`` produces a value. This means that all the following" |
| 708 |
" are equivalent::" |
| 709 |
msgstr "كما ذكر أعلاه، ينتج ``if`` قيمة. هذا يعني أن جميع ما يلي متكافئ::" |
| 710 |
|
| 711 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:362 |
| 712 |
msgid "" |
| 713 |
"For example, this program returns the value of the ``series`` column if the " |
| 714 |
"book has a series, otherwise the value of the ``title`` column::" |
| 715 |
msgstr "على سبيل المثال، يعيد هذا البرنامج قيمة عمود ``series`` إذا كان الكتاب يحتوي على سلسلة، وإلا فإنه يعيد قيمة عمود ``title``::" |
| 716 |
|
| 717 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:366 |
| 718 |
msgid "**For expressions**" |
| 719 |
msgstr "**تعبيرات For**" |
| 720 |
|
| 721 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:368 |
| 722 |
msgid "" |
| 723 |
"The ``for`` expression iterates over a list of values, processing them one " |
| 724 |
"at a time. The ``list_expression`` must evaluate either to a metadata field " |
| 725 |
"``lookup name`` e.g., ``tags`` or ``#genre``, or to a list of values. The " |
| 726 |
":ref:`ff_range` generates a list of numbers. If the result is a valid " |
| 727 |
"``lookup name`` then the field's value is fetched and the separator " |
| 728 |
"specified for that field type is used. If the result isn't a valid lookup " |
| 729 |
"name then it is assumed to be a list of values. The list is assumed to be " |
| 730 |
"separated by commas unless the optional keyword ``separator`` is supplied, " |
| 731 |
"in which case the list values must be separated by the result of evaluating " |
| 732 |
"the ``separator_expr``. A separator cannot be used if the list is generated " |
| 733 |
"by ``range()``. Each value in the list is assigned to the specified variable" |
| 734 |
" then the ``expression_list`` is evaluated. You can use ``break`` to jump " |
| 735 |
"out of the loop, and ``continue`` to jump to the beginning of the loop for " |
| 736 |
"the next iteration." |
| 737 |
msgstr "تعبير ``for`` يتكرر على قائمة من القيم، ويعالجها واحدة تلو الأخرى. يجب أن تُقيّم ``list_expression`` إما إلى حقل بيانات وصفية ``اسم البحث``، على سبيل المثال، ``tags`` أو ``#genre``، أو إلى قائمة من القيم. تُنشئ :ref:`ff_range` قائمة من الأرقام. إذا كانت النتيجة ``اسم بحث`` صالحًا، فسيتم جلب قيمة الحقل واستخدام الفاصل المحدد لنوع الحقل هذا. إذا لم تكن النتيجة اسم بحث صالحًا، فإنها تُفترض أنها قائمة من القيم. تُفترض القائمة أنها مفصولة بفاصلات ما لم يتم توفير الكلمة المفتاحية الاختيارية ``separator``، وفي هذه الحالة يجب فصل قيم القائمة بنتيجة تقييم ``separator_expr``. لا يمكن استخدام الفاصل إذا تم إنشاء القائمة بواسطة ``range()``. يتم تعيين كل قيمة في القائمة إلى المتغير المحدد ثم يتم تقييم ``expression_list``. يمكنك استخدام ``break`` للقفز خارج الحلقة، و ``continue`` للقفز إلى بداية الحلقة لـ التكرار التالي." |
| 738 |
|
| 739 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:370 |
| 740 |
msgid "" |
| 741 |
"Example: This template removes the first hierarchical name for each value in" |
| 742 |
" Genre (``#genre``), constructing a list with the new names::" |
| 743 |
msgstr "مثال: يقوم هذا القالب بإزالة الاسم الهرمي الأول لكل قيمة في النوع (``#genre``)، مكونًا قائمة بالأسماء الجديدة::" |
| 744 |
|
| 745 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:380 |
| 746 |
msgid "" |
| 747 |
"If the original Genre is `History.Military, Science Fiction.Alternate " |
| 748 |
"History, ReadMe` then the template returns `Military, Alternate History, " |
| 749 |
"ReadMe`. You could use this template in calibre's :guilabel:`Edit metadata " |
| 750 |
"in bulk -> Search & replace` with :guilabel:`Search for` set to ``template``" |
| 751 |
" to strip off the first level of the hierarchy and assign the resulting " |
| 752 |
"value to Genre." |
| 753 |
msgstr "إذا كان النوع الأصلي هو `History.Military, Science Fiction.Alternate History, ReadMe`، فإن القالب يعيد `Military, Alternate History, ReadMe`. يمكنك استخدام هذا القالب في calibre's :guilabel:`تحرير البيانات الوصفية بالجملة -> بحث واستبدال` مع تعيين :guilabel:`البحث عن` إلى ``template`` لإزالة المستوى الأول من التسلسل الهرمي وتعيين القيمة الناتجة إلى النوع." |
| 754 |
|
| 755 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:383 |
| 756 |
msgid "" |
| 757 |
"Note: the last line in the template, ``new_tags``, isn't strictly necessary " |
| 758 |
"in this case because ``for`` returns the value of the last top_expression in" |
| 759 |
" the expression list. The value of an assignment is the value of its " |
| 760 |
"expression, so the value of the ``for`` statement is what was assigned to " |
| 761 |
"``new_tags``." |
| 762 |
msgstr "ملاحظة: السطر الأخير في القالب، ``new_tags``، ليس ضروريًا تمامًا في هذه الحالة لأن ``for`` يعيد قيمة آخر تعبير علوي في قائمة التعبيرات. قيمة التعيين هي قيمة تعبيره، لذا فإن قيمة عبارة ``for`` هي ما تم تعيينه لـ ``new_tags``." |
| 763 |
|
| 764 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:385 |
| 765 |
msgid "**with expressions**" |
| 766 |
msgstr "" |
| 767 |
|
| 768 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:387 |
| 769 |
msgid "The ``with`` expression:" |
| 770 |
msgstr "" |
| 771 |
|
| 772 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:389 |
| 773 |
msgid "" |
| 774 |
"changes the current book to the book with calibre book id (an integer) " |
| 775 |
"produced by evaluating the ``top_expression``." |
| 776 |
msgstr "" |
| 777 |
|
| 778 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:390 |
| 779 |
msgid "runs the ``expression_list``." |
| 780 |
msgstr "" |
| 781 |
|
| 782 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:391 |
| 783 |
msgid "then resets the current book back to what it was." |
| 784 |
msgstr "" |
| 785 |
|
| 786 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:393 |
| 787 |
msgid "" |
| 788 |
"The ``with`` expression returns the result of the last ``top_expression`` in" |
| 789 |
" the evaluated ``expression_list``, or the empty string if no expression " |
| 790 |
"list was evaluated." |
| 791 |
msgstr "" |
| 792 |
|
| 793 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:396 |
| 794 |
msgid "" |
| 795 |
"For example, this template returns a list of the titles of each book " |
| 796 |
"selected in the GUI::" |
| 797 |
msgstr "" |
| 798 |
|
| 799 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:408 |
| 800 |
msgid "**Return stmt**" |
| 801 |
msgstr "" |
| 802 |
|
| 803 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:410 |
| 804 |
msgid "" |
| 805 |
"Return the value of the ``expression``. If executed in a function then it " |
| 806 |
"returns the value of the expression to the caller. If executed in the " |
| 807 |
"outermost context (the template) then it sets the value of the template to " |
| 808 |
"the value of the expression and exits the template." |
| 809 |
msgstr "" |
| 810 |
|
| 811 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:412 |
| 812 |
msgid "**Function definition**" |
| 813 |
msgstr "**تعريف الدالة**" |
| 814 |
|
| 815 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:414 |
| 816 |
msgid "" |
| 817 |
"If you have repeated code in a template then you can put that code into a " |
| 818 |
"local function. The ``def`` keyword starts the definition. It is followed by" |
| 819 |
" the function name, the argument list, then the code in the function. The " |
| 820 |
"function definition ends with the ``fed`` keyword." |
| 821 |
msgstr "إذا كان لديك رمز متكرر في قالب، فيمكنك وضع هذا الرمز في دالة محلية. تبدأ الكلمة المفتاحية ``def`` التعريف. تتبعها اسم الدالة، قائمة الوسائط، ثم الرمز في الدالة. ينتهي تعريف الدالة بالكلمة المفتاحية ``fed``." |
| 822 |
|
| 823 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:416 |
| 824 |
msgid "" |
| 825 |
"Arguments are positional. When a function is called the supplied arguments " |
| 826 |
"are matched left to right against the defined parameters, with the value of " |
| 827 |
"the argument assigned to the parameter. It is an error to provide more " |
| 828 |
"arguments than defined parameters. Parameters can have default values, such " |
| 829 |
"as ``a = 25``. If an argument is not supplied for that parameter then the " |
| 830 |
"default value is used, otherwise the parameter is set to the empty string." |
| 831 |
msgstr "الوسائط موضعية. عند استدعاء دالة، تتم مطابقة الوسائط المقدمة من اليسار إلى اليمين مع المعلمات المحددة، مع تعيين قيمة الوسيط إلى المعلمة. يعد خطأً توفير عدد من الوسائط أكثر من المعلمات المحددة. يمكن أن تحتوي المعلمات على قيم افتراضية، مثل ``a = 25``. إذا لم يتم توفير وسيط لتلك المعلمة، فسيتم استخدام القيمة الافتراضية، وإلا فسيتم تعيين المعلمة إلى سلسلة فارغة." |
| 832 |
|
| 833 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:418 |
| 834 |
msgid "The ``return`` statement can be used in a local function." |
| 835 |
msgstr "يمكن استخدام عبارة ``return`` في دالة محلية." |
| 836 |
|
| 837 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:420 |
| 838 |
msgid "A function must be defined before it can be used." |
| 839 |
msgstr "يجب تعريف الدالة قبل استخدامها." |
| 840 |
|
| 841 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:422 |
| 842 |
msgid "" |
| 843 |
"Example: This template computes an approximate duration in years, months, " |
| 844 |
"and days from a number of days. The function ``to_plural()`` formats the " |
| 845 |
"computed values. Note that the example also uses the ``&`` operator::" |
| 846 |
msgstr "مثال: يحسب هذا القالب مدة تقريبية بالسنوات والأشهر والأيام من عدد من الأيام. تقوم الدالة ``to_plural()`` بتنسيق القيم المحسوبة. لاحظ أن المثال يستخدم أيضًا عامل التشغيل ``&``::" |
| 847 |
|
| 848 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:437 |
| 849 |
msgid "**Relational operators**" |
| 850 |
msgstr "**عوامل التشغيل العلائقية**" |
| 851 |
|
| 852 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:439 |
| 853 |
msgid "" |
| 854 |
"Relational operators return ``'1'`` if the comparison is true, otherwise the" |
| 855 |
" empty string (``''``)." |
| 856 |
msgstr "تعيد عوامل التشغيل العلائقية ``'1'`` إذا كانت المقارنة صحيحة، وإلا فإنها تعيد السلسلة الفارغة (``''``)." |
| 857 |
|
| 858 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:441 |
| 859 |
msgid "" |
| 860 |
"There are two forms of relational operators: string comparisons and numeric " |
| 861 |
"comparisons." |
| 862 |
msgstr "هناك شكلان من عوامل التشغيل العلائقية: مقارنات السلاسل و مقارنات الأرقام." |
| 863 |
|
| 864 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:443 |
| 865 |
msgid "" |
| 866 |
"String comparisons do case-insensitive string comparison using lexical " |
| 867 |
"order. The supported string comparison operators are ``==``, ``!=``, ``<``, " |
| 868 |
"``<=``, ``>``, ``>=``, ``in``, ``inlist``, and ``inlist_field``. For the " |
| 869 |
"``in``, ``inlist``, and ``inlist_field`` operators, the result of the left " |
| 870 |
"hand expression is interpreted as a regular expression pattern. They are " |
| 871 |
"true if the value of left-hand regular expression matches the value of the " |
| 872 |
"right hand expression. The regular expressions are case-insensitive." |
| 873 |
msgstr "تقوم مقارنات السلاسل بمقارنة سلاسل غير حساسة لحالة الأحرف باستخدام الترتيب المعجمي. عوامل مقارنة السلاسل المدعومة هي ``==``، ``!=``، ``<``، ``<=``، ``>``، ``>=``، ``in``، ``inlist``، و ``inlist_field``. بالنسبة لـ عوامل التشغيل ``in``، ``inlist``، و ``inlist_field``، يتم تفسير نتيجة التعبير الأيسر كنمط تعبير نمطي. وهي صحيحة إذا كانت قيمة التعبير النمطي الأيسر تطابق قيمة التعبير الأيمن. التعبيرات النمطية غير حساسة لحالة الأحرف." |
| 874 |
|
| 875 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:446 |
| 876 |
msgid "" |
| 877 |
"The ``inlist`` operator is true if the left hand regular expression matches " |
| 878 |
"any one of the items in the right hand list where the items in the list are " |
| 879 |
"separated by commas. The ``inlist_field`` operator is true if the left hand " |
| 880 |
"regular expression matches any of the items in the field (column) named by " |
| 881 |
"the right hand expression, using the separator defined for the field. NB: " |
| 882 |
"the ``inlist_field`` operator requires the right hand expression to evaluate" |
| 883 |
" to a field name, while the ``inlist`` operator requires the right hand " |
| 884 |
"expression to evaluate to a string containing a comma-separated list. " |
| 885 |
"Because of this difference, ``inlist_field`` is substantially faster than " |
| 886 |
"``inlist`` because no string conversions or list constructions are done." |
| 887 |
msgstr "عامل التشغيل ``inlist`` يكون صحيحًا إذا كان التعبير النمطي الأيسر يطابق أي عنصر من العناصر في القائمة اليمنى حيث يتم فصل العناصر في القائمة بفاصلات. عامل التشغيل ``inlist_field`` يكون صحيحًا إذا كان التعبير النمطي الأيسر يطابق أي من العناصر في الحقل (العمود) المسمى بواسطة التعبير الأيمن، باستخدام الفاصل المحدد للحقل. ملاحظة: يتطلب عامل التشغيل ``inlist_field`` أن يُقيّم التعبير الأيمن إلى اسم حقل، بينما يتطلب عامل التشغيل ``inlist`` أن يُقيّم التعبير الأيمن إلى سلسلة تحتوي على قائمة مفصولة بفاصلات. بسبب هذا الاختلاف، ``inlist_field`` أسرع بكثير من ``inlist`` لأنه لا يتم إجراء تحويلات سلاسل أو إنشاء قوائم." |
| 888 |
|
| 889 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:448 |
| 890 |
msgid "" |
| 891 |
"The numeric comparison operators are ``==#``, ``!=#``, ``<#``, ``<=#``, " |
| 892 |
"``>#``, ``>=#``. The left and right expressions must evaluate to numeric " |
| 893 |
"values with two exceptions: both the string value \"None\" (undefined field)" |
| 894 |
" and the empty string evaluate to the value zero." |
| 895 |
msgstr "عوامل المقارنة العددية هي ``==#``، ``!=#``، ``<#``، ``<=#``، ``>#``، ``>=#``. يجب أن تُقيّم التعبيرات اليسرى واليمنى إلى قيم عددية باستثناءين: كل من القيمة النصية \"None\" (حقل غير معرف) والسلسلة الفارغة تُقيّم إلى القيمة صفر." |
| 896 |
|
| 897 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:450 |
| 898 |
msgid "Examples:" |
| 899 |
msgstr "أمثلة:" |
| 900 |
|
| 901 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:452 |
| 902 |
msgid "" |
| 903 |
"``program: field('series') == 'foo'`` returns ``'1'`` if the book's series " |
| 904 |
"is `foo`, otherwise ``''``." |
| 905 |
msgstr "``program: field('series') == 'foo'`` يعيد ``'1'`` إذا كانت سلسلة الكتاب هي `foo`، وإلا ``''``." |
| 906 |
|
| 907 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:453 |
| 908 |
msgid "" |
| 909 |
"``program: 'f.o' in field('series')`` returns ``'1'`` if the book's series " |
| 910 |
"matches the regular expression ``f.o`` (e.g., `foo`, `Off Onyx`, etc.), " |
| 911 |
"otherwise ``''``." |
| 912 |
msgstr "``program: 'f.o' in field('series')`` يعيد ``'1'`` إذا كانت سلسلة الكتاب تطابق التعبير النمطي ``f.o`` (مثل `foo`, `Off Onyx`, إلخ)، وإلا ``''``." |
| 913 |
|
| 914 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:454 |
| 915 |
msgid "" |
| 916 |
"``program: 'science' inlist $#genre`` returns ``'1'`` if any of the values " |
| 917 |
"retrieved from the book's genres match the regular expression ``science``, " |
| 918 |
"e.g., `Science`, `History of Science`, `Science Fiction` etc., otherwise " |
| 919 |
"``''``." |
| 920 |
msgstr "``program: 'science' inlist $#genre`` يعيد ``'1'`` إذا كانت أي من القيم المستردة من أنواع الكتاب تطابق التعبير النمطي ``science``، مثل `Science`, `History of Science`, `Science Fiction` إلخ، وإلا ``''``." |
| 921 |
|
| 922 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:455 |
| 923 |
msgid "" |
| 924 |
"``program: '^science$' inlist $#genre`` returns ``'1'`` if any of the book's" |
| 925 |
" genres exactly match the regular expression ``^science$``, e.g., `Science`," |
| 926 |
" otherwise ``''``. The genres `History of Science` and `Science Fiction` " |
| 927 |
"don't match." |
| 928 |
msgstr "``program: '^science$' inlist $#genre`` يعيد ``'1'`` إذا كانت أي من أنواع الكتاب تطابق تمامًا التعبير النمطي ``^science$``، مثل `Science`، وإلا ``''``. لا تتطابق أنواع `History of Science` و `Science Fiction`." |
| 929 |
|
| 930 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:456 |
| 931 |
msgid "" |
| 932 |
"``program: 'asimov' inlist $authors`` returns ``'1'`` if any author matches " |
| 933 |
"the regular expression ``asimov``, e.g., `Asimov, Isaac` or `Isaac Asimov`, " |
| 934 |
"otherwise ``''``." |
| 935 |
msgstr "``program: 'asimov' inlist $authors`` يعيد ``'1'`` إذا كان أي مؤلف يطابق التعبير النمطي ``asimov``، مثل `Asimov, Isaac` أو `Isaac Asimov`، وإلا ``''``." |
| 936 |
|
| 937 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:457 |
| 938 |
msgid "" |
| 939 |
"``program: 'asimov' inlist_field 'authors'`` returns ``'1'`` if any author " |
| 940 |
"matches the regular expression ``asimov``, e.g., `Asimov, Isaac` or `Isaac " |
| 941 |
"Asimov`, otherwise ``''``." |
| 942 |
msgstr "``program: 'asimov' inlist_field 'authors'`` يعيد ``'1'`` إذا كان أي مؤلف يطابق التعبير النمطي ``asimov``، مثل `Asimov, Isaac` أو `Isaac Asimov`، وإلا ``''``." |
| 943 |
|
| 944 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:458 |
| 945 |
msgid "" |
| 946 |
"``program: 'asimov$' inlist_field 'authors'`` returns ``'1'`` if any author " |
| 947 |
"matches the regular expression ``asimov$``, e.g., `Isaac Asimov`, otherwise " |
| 948 |
"``''``. It doesn't match `Asimov, Isaac` because of the ``$`` anchor in the " |
| 949 |
"regular expression." |
| 950 |
msgstr "``program: 'asimov$' inlist_field 'authors'`` يعيد ``'1'`` إذا كان أي مؤلف يطابق التعبير النمطي ``asimov$``، مثل `Isaac Asimov`، وإلا ``''``. لا يطابق `Asimov, Isaac` بسبب علامة ``$`` في التعبير النمطي." |
| 951 |
|
| 952 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:459 |
| 953 |
msgid "" |
| 954 |
"``program: if field('series') != 'foo' then 'bar' else 'mumble' fi`` returns" |
| 955 |
" ``'bar'`` if the book's series is not `foo`. Otherwise it returns " |
| 956 |
"``'mumble'``." |
| 957 |
msgstr "``program: if field('series') != 'foo' then 'bar' else 'mumble' fi`` يعيد ``'bar'`` إذا لم تكن سلسلة الكتاب `foo`. وإلا فإنه يعيد ``'mumble'``." |
| 958 |
|
| 959 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:460 |
| 960 |
msgid "" |
| 961 |
"``program: if field('series') == 'foo' || field('series') == '1632' then " |
| 962 |
"'yes' else 'no' fi`` returns ``'yes'`` if series is either `foo` or `1632`, " |
| 963 |
"otherwise ``'no'``." |
| 964 |
msgstr "``program: if field('series') == 'foo' || field('series') == '1632' then 'yes' else 'no' fi`` يعيد ``'yes'`` إذا كانت السلسلة إما `foo` أو `1632`، وإلا ``'no'``." |
| 965 |
|
| 966 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:461 |
| 967 |
msgid "" |
| 968 |
"``program: if '^(foo|1632)$' in field('series') then 'yes' else 'no' fi`` " |
| 969 |
"returns ``'yes'`` if series is either `foo` or `1632`, otherwise ``'no'``." |
| 970 |
msgstr "``program: if '^(foo|1632)$' in field('series') then 'yes' else 'no' fi`` يعيد ``'yes'`` إذا كانت السلسلة إما `foo` أو `1632`، وإلا ``'no'``." |
| 971 |
|
| 972 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:462 |
| 973 |
msgid "" |
| 974 |
"``program: if 11 > 2 then 'yes' else 'no' fi`` returns ``'no'`` because the " |
| 975 |
"``>`` operator does a lexical comparison." |
| 976 |
msgstr "``program: if 11 > 2 then 'yes' else 'no' fi`` يعيد ``'no'`` لأن عامل التشغيل ``>`` يقوم بمقارنة معجمية." |
| 977 |
|
| 978 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:463 |
| 979 |
msgid "" |
| 980 |
"``program: if 11 ># 2 then 'yes' else 'no' fi`` returns ``'yes'`` because " |
| 981 |
"the ``>#`` operator does a numeric comparison." |
| 982 |
msgstr "``program: if 11 ># 2 then 'yes' else 'no' fi`` يعيد ``'yes'`` لأن عامل التشغيل ``>#`` يقوم بمقارنة عددية." |
| 983 |
|
| 984 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:465 |
| 985 |
msgid "**Functions in General Program Mode**" |
| 986 |
msgstr "**الدوال في وضع البرنامج العام**" |
| 987 |
|
| 988 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:467 |
| 989 |
msgid "" |
| 990 |
"See :ref:`template_functions_reference` for the list of functions built into" |
| 991 |
" the template language." |
| 992 |
msgstr "راجع :ref:`template_functions_reference` للحصول على قائمة بالدوال المضمنة في لغة القوالب." |
| 993 |
|
| 994 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:471 |
| 995 |
msgid "" |
| 996 |
"As opposed to :ref:`Single Function Mode <single_mode>`, in General Program " |
| 997 |
"Mode you must specify the first parameter ``value``." |
| 998 |
msgstr "على عكس :ref:`وضع الدالة الواحدة <single_mode>`، في وضع البرنامج العام يجب عليك تحديد المعامل الأول ``value``." |
| 999 |
|
| 1000 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:472 |
| 1001 |
msgid "All parameters are expression_lists (see the grammar above)." |
| 1002 |
msgstr "جميع المعلمات هي expression_lists (انظر القواعد النحوية أعلاه)." |
| 1003 |
|
| 1004 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:477 |
| 1005 |
msgid "More complex programs in template expressions - Template Program Mode" |
| 1006 |
msgstr "برامج أكثر تعقيدًا في تعبيرات القوالب - وضع برنامج القالب" |
| 1007 |
|
| 1008 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:479 |
| 1009 |
msgid "" |
| 1010 |
"`Template Program Mode` (`TPM`) is a blend of :ref:`General Program Mode " |
| 1011 |
"<general_mode>` and :ref:`Single Function Mode <single_mode>`. `TPM` differs" |
| 1012 |
" from Single Function Mode in that it permits writing template expressions " |
| 1013 |
"that refer to other metadata fields, use nested functions, modify variables," |
| 1014 |
" and do arithmetic. It differs from `General Program Mode` in that the " |
| 1015 |
"template is contained between ``{`` and ``}`` characters and doesn't begin " |
| 1016 |
"with the word ``program:``. The program portion of the template is a General" |
| 1017 |
" Program Mode expression list." |
| 1018 |
msgstr "`وضع برنامج القالب` (`TPM`) هو مزيج من :ref:`وضع البرنامج العام <general_mode>` و :ref:`وضع الدالة الواحدة <single_mode>`. يختلف `TPM` عن وضع الدالة الواحدة في أنه يسمح بكتابة تعبيرات القالب التي تشير إلى حقول بيانات وصفية أخرى، وتستخدم دوال متداخلة، وتعديل المتغيرات، وتقوم بالعمليات الحسابية. يختلف عن `وضع البرنامج العام` في أن القالب محتوى بين أحرف ``{`` و ``}`` ولا يبدأ بالكلمة ``program:``. جزء البرنامج من القالب هو قائمة تعبيرات وضع البرنامج العام." |
| 1019 |
|
| 1020 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:482 |
| 1021 |
msgid "" |
| 1022 |
"Example: assume you want a template to show the series for a book if it has " |
| 1023 |
"one, otherwise show the value of a custom field #genre. You cannot do this " |
| 1024 |
"in the :ref:`Single Function Mode <single_mode>` because you cannot make " |
| 1025 |
"reference to another metadata field within a template expression. In `TPM` " |
| 1026 |
"you can, as the following expression demonstrates::" |
| 1027 |
msgstr "مثال: افترض أنك تريد قالبًا لعرض سلسلة كتاب إذا كان لديه واحدة، وإلا فعرض قيمة حقل مخصص #genre. لا يمكنك القيام بذلك في :ref:`وضع الدالة الواحدة <single_mode>` لأنه لا يمكنك الإشارة إلى حقل بيانات وصفية آخر ضمن تعبير قالب. في `TPM` يمكنك ذلك، كما يوضح التعبير التالي::" |
| 1028 |
|
| 1029 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:487 |
| 1030 |
msgid "The example shows several things:" |
| 1031 |
msgstr "يوضح المثال عدة أمور:" |
| 1032 |
|
| 1033 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:489 |
| 1034 |
msgid "" |
| 1035 |
"`TPM` is used if the expression begins with ``:'`` and ends with ``'}``. " |
| 1036 |
"Anything else is assumed to be in :ref:`Single Function Mode <single_mode>`." |
| 1037 |
msgstr "يُستخدم `TPM` إذا بدأ التعبير بـ ``:'`` وانتهى بـ ``'}``. يُفترض أن أي شيء آخر هو في :ref:`وضع الدالة الواحدة <single_mode>`." |
| 1038 |
|
| 1039 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:491 |
| 1040 |
msgid "" |
| 1041 |
"If the template contains a prefix and suffix, the expression ends with " |
| 1042 |
"``'|`` where the ``|`` is the delimiter for the prefix. Example::" |
| 1043 |
msgstr "إذا كان القالب يحتوي على بادئة ولاحقة، ينتهي التعبير بـ ``'|`` حيث ``|`` هو الفاصل للبادئة. مثال::" |
| 1044 |
|
| 1045 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:495 |
| 1046 |
msgid "" |
| 1047 |
"Functions must be given all their arguments. For example, the standard " |
| 1048 |
"built-in functions must be given the initial parameter ``value``." |
| 1049 |
msgstr "يجب إعطاء الدوال جميع وسائطها. على سبيل المثال، الدوال المدمجة القياسية يجب أن تُعطى المعامل الأولي ``value``." |
| 1050 |
|
| 1051 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:496 |
| 1052 |
msgid "" |
| 1053 |
"The variable ``$`` is usable as the ``value`` argument and stands for the " |
| 1054 |
"value of the field named in the template, ``series`` in this case." |
| 1055 |
msgstr "المتغير ``$`` قابل للاستخدام كوسيط ``value`` ويمثل قيمة الحقل المسمى في القالب، ``series`` في هذه الحالة." |
| 1056 |
|
| 1057 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:497 |
| 1058 |
msgid "white space is ignored and can be used anywhere within the expression." |
| 1059 |
msgstr "يتم تجاهل المسافات البيضاء ويمكن استخدامها في أي مكان داخل التعبير." |
| 1060 |
|
| 1061 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:498 |
| 1062 |
msgid "" |
| 1063 |
"constant strings are enclosed in matching quotes, either ``'`` or ``\"``." |
| 1064 |
msgstr "السلاسل الثابتة محاطة بعلامات اقتباس متطابقة، إما ``'`` أو ``\"``." |
| 1065 |
|
| 1066 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:500 |
| 1067 |
msgid "" |
| 1068 |
"In `TPM`, using ``{`` and ``}`` characters in string literals can lead to " |
| 1069 |
"errors or unexpected results because they confuse the template processor. It" |
| 1070 |
" tries to treat them as template expression boundaries, not characters. In " |
| 1071 |
"some but not all cases you can replace a ``{`` with ``[[`` and a ``}`` with " |
| 1072 |
"`]]`. Advice: if your program contains ``{`` and ``}`` characters then you " |
| 1073 |
"should use `General Program Mode`." |
| 1074 |
msgstr "في `TPM`، يمكن أن يؤدي استخدام الأحرف ``{`` و ``}`` في السلاسل الحرفية إلى أخطاء أو نتائج غير متوقعة لأنها تربك معالج القوالب. فهو يحاول التعامل معها كحدود لتعبير القالب، وليس كأحرف. في بعض الحالات وليس كلها، يمكنك استبدال ``{`` بـ ``[[`` و ``}`` بـ ``]]``. نصيحة: إذا كان برنامجك يحتوي على أحرف ``{`` و ``}``، يجب عليك استخدام `وضع البرنامج العام`." |
| 1075 |
|
| 1076 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:505 |
| 1077 |
msgid "Python Template Mode" |
| 1078 |
msgstr "وضع قالب بايثون" |
| 1079 |
|
| 1080 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:507 |
| 1081 |
msgid "" |
| 1082 |
"Python Template Mode (PTM) lets you write templates using native Python and " |
| 1083 |
"the `calibre API <https://manual.calibre-ebook.com/develop.html#api-" |
| 1084 |
"documentation-for-various-parts-of-calibre>`_. The database API will be of " |
| 1085 |
"most use; further discussion is beyond the scope of this manual. PTM " |
| 1086 |
"templates are faster and can do more complicated operations but you must " |
| 1087 |
"know how to write code in Python using the calibre API." |
| 1088 |
msgstr "يسمح لك وضع قالب بايثون (PTM) بكتابة القوالب باستخدام بايثون الأصلي و `واجهة برمجة تطبيقات calibre <https://manual.calibre-ebook.com/develop.html#api-documentation-for-various-parts-of-calibre>`_. ستكون واجهة برمجة تطبيقات قاعدة البيانات الأكثر فائدة؛ المزيد من المناقشة خارج نطاق هذا الدليل. قوالب PTM أسرع ويمكنها القيام بعمليات أكثر تعقيدًا ولكن يجب عليك معرفة كيفية كتابة التعليمات البرمجية في بايثون باستخدام واجهة برمجة تطبيقات calibre." |
| 1089 |
|
| 1090 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:509 |
| 1091 |
msgid "A PTM template begins with:" |
| 1092 |
msgstr "يبدأ قالب PTM بـ:" |
| 1093 |
|
| 1094 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:527 |
| 1095 |
msgid "" |
| 1096 |
"You can add the above text to your template using the context menu, usually " |
| 1097 |
"accessed with a right click. The comments are not significant and can be " |
| 1098 |
"removed. You must use python indenting." |
| 1099 |
msgstr "يمكنك إضافة النص أعلاه إلى القالب الخاص بك باستخدام قائمة السياق، والتي يتم الوصول إليها عادةً بالنقر بزر الماوس الأيمن. التعليقات ليست مهمة ويمكن إزالتها. يجب عليك استخدام المسافة البادئة في بايثون." |
| 1100 |
|
| 1101 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:529 |
| 1102 |
msgid "" |
| 1103 |
"The context object supports ``str(context)`` that returns a string of the " |
| 1104 |
"context's contents, and ``context.attributes`` that returns a list of the " |
| 1105 |
"attribute names in the context." |
| 1106 |
msgstr "يدعم كائن السياق ``str(context)`` الذي يعيد سلسلة من محتويات السياق، و ``context.attributes`` الذي يعيد قائمة بأسماء السمات في السياق." |
| 1107 |
|
| 1108 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:531 |
| 1109 |
msgid "" |
| 1110 |
"The ``context.funcs`` attribute allows calling Built-in and User template " |
| 1111 |
"functions, and Stored GPM/Python templates, so that you can execute them " |
| 1112 |
"directly in your code. The functions are retrieved using their names. If the" |
| 1113 |
" name conflicts with a Python keyword, add an underscore to the end of the " |
| 1114 |
"name. Examples:" |
| 1115 |
msgstr "تسمح السمة ``context.funcs`` باستدعاء دوال القوالب المدمجة والمستخدمة، وقوالب GPM/Python المخزنة، بحيث يمكنك تنفيذها مباشرة في التعليمات البرمجية الخاصة بك. يتم استرداد الدوال باستخدام أسمائها. إذا تعارض الاسم مع كلمة مفتاحية في Python، أضف شرطة سفلية إلى نهاية الاسم. أمثلة:" |
| 1116 |
|
| 1117 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:538 |
| 1118 |
msgid "" |
| 1119 |
"Here is an example of a PTM template that produces a list of all the authors" |
| 1120 |
" for a series. The list is stored in a `Column built from other columns, " |
| 1121 |
"behaves like tags`. It shows in :guilabel:`Book details` and has the " |
| 1122 |
":guilabel:`on separate lines` checked (in :guilabel:`Preferences->Look & " |
| 1123 |
"feel->Book details`). That option requires the list to be comma-separated. " |
| 1124 |
"To satisfy that requirement the template converts commas in author names to " |
| 1125 |
"semicolons then builds a comma-separated list of authors. The authors are " |
| 1126 |
"then sorted, which is why the template uses author_sort." |
| 1127 |
msgstr "إليك مثال لقالب PTM ينتج قائمة بجميع المؤلفين لسلسلة. يتم تخزين القائمة في `عمود مبني من أعمدة أخرى، يتصرف مثل العلامات`. يظهر في :guilabel:`تفاصيل الكتاب` ويحتوي على :guilabel:`على أسطر منفصلة` محدد (في :guilabel:`التفضيلات->المظهر و الشعور->تفاصيل الكتاب`). يتطلب هذا الخيار أن تكون القائمة مفصولة بفاصلات. لتلبية هذا الشرط، يقوم القالب بتحويل الفواصل في أسماء المؤلفين إلى فواصل منقوطة ثم يبني قائمة مفصولة بفاصلات من المؤلفين. يتم فرز المؤلفين بعد ذلك، وهذا هو السبب في أن القالب يستخدم author_sort." |
| 1128 |
|
| 1129 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:559 |
| 1130 |
msgid "The output in :guilabel:`Book details` looks like this:" |
| 1131 |
msgstr "الإخراج في :guilabel:`تفاصيل الكتاب` يبدو كالتالي:" |
| 1132 |
|
| 1133 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:561 |
| 1134 |
msgid "E-book conversion dialog" |
| 1135 |
msgstr "مربع حوار تحويل الكتاب الإلكتروني" |
| 1136 |
|
| 1137 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:569 |
| 1138 |
msgid "Templates and URLs" |
| 1139 |
msgstr "القوالب وعناوين URL" |
| 1140 |
|
| 1141 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:571 |
| 1142 |
msgid "You can use templates to construct URLs. Two cases are described here:" |
| 1143 |
msgstr "يمكنك استخدام القوالب لإنشاء عناوين URL. يتم وصف حالتين هنا:" |
| 1144 |
|
| 1145 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:573 |
| 1146 |
msgid "Custom column :guilabel:`Book details` search URLs" |
| 1147 |
msgstr "أعمدة مخصصة :guilabel:`تفاصيل الكتاب` عناوين URL للبحث" |
| 1148 |
|
| 1149 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:574 |
| 1150 |
msgid "The calibre URL scheme" |
| 1151 |
msgstr "مخطط عنوان URL لـ calibre" |
| 1152 |
|
| 1153 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:576 |
| 1154 |
msgid "**Custom column book details search URLs**" |
| 1155 |
msgstr "**عناوين URL للبحث في تفاصيل الكتاب في العمود المخصص**" |
| 1156 |
|
| 1157 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:578 |
| 1158 |
msgid "" |
| 1159 |
"When you create a custom column you can provide a URL to be used in " |
| 1160 |
":guilabel:`Book details` using a template. For example, if you have a custom" |
| 1161 |
" column for `Translators` you can define a URL to take you to a site for " |
| 1162 |
"translators. Book details search URLs can be provided for `Text`, " |
| 1163 |
"`Enumerated`, `Series`, and `Column built from other column` column types." |
| 1164 |
msgstr "عند إنشاء عمود مخصص، يمكنك توفير عنوان URL لاستخدامه في :guilabel:`تفاصيل الكتاب` باستخدام قالب. على سبيل المثال، إذا كان لديك عمود مخصص لـ `المترجمين`، يمكنك تحديد عنوان URL يأخذك إلى موقع للمترجمين. يمكن توفير عناوين URL للبحث في تفاصيل الكتاب لأنواع الأعمدة `نص`، `معدود`، `سلسلة`، و `عمود مبني من عمود آخر`." |
| 1165 |
|
| 1166 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:580 |
| 1167 |
msgid "" |
| 1168 |
"When an item with a `search template` is clicked in :guilabel:`Book details`" |
| 1169 |
" the template is evaluated. It is provided the normal book metadata. It is " |
| 1170 |
"also provided three additional fields:" |
| 1171 |
msgstr "عند النقر على عنصر يحتوي على `قالب بحث` في :guilabel:`تفاصيل الكتاب`، يتم تقييم القالب. يتم توفير البيانات الوصفية العادية للكتاب. كما يتم توفير ثلاثة حقول إضافية:" |
| 1172 |
|
| 1173 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:582 |
| 1174 |
msgid "``item_value``: the value of the clicked item." |
| 1175 |
msgstr "``item_value``: قيمة العنصر الذي تم النقر عليه." |
| 1176 |
|
| 1177 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:583 |
| 1178 |
msgid "" |
| 1179 |
"``item_value_quoted``: the value of clicked item, URL-encoded. Special " |
| 1180 |
"characters are escaped to make them valid in URLs and spaces are replaced by" |
| 1181 |
" ``'+'`` (plus) signs." |
| 1182 |
msgstr "``item_value_quoted``: قيمة العنصر الذي تم النقر عليه، مشفرة لعنوان URL. يتم الهروب من الأحرف الخاصة لجعلها صالحة في عناوين URL ويتم استبدال المسافات بـ علامات ``'+'`` (زائد)." |
| 1183 |
|
| 1184 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:584 |
| 1185 |
msgid "" |
| 1186 |
"``item_value_no_plus``: the value of clicked item, URL-encoded. Special " |
| 1187 |
"characters are escaped to make them valid in URLs and spaces are replaced by" |
| 1188 |
" the ``%20``, not plus." |
| 1189 |
msgstr "``item_value_no_plus``: قيمة العنصر الذي تم النقر عليه، مشفرة لعنوان URL. يتم الهروب من الأحرف الخاصة لجعلها صالحة في عناوين URL ويتم استبدال المسافات بـ ``%20``، وليس علامة زائد." |
| 1190 |
|
| 1191 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:586 |
| 1192 |
msgid "" |
| 1193 |
"There are several ways to construct the URL. The following use Wikipedia as " |
| 1194 |
"an example." |
| 1195 |
msgstr "هناك عدة طرق لإنشاء عنوان URL. تستخدم الأمثلة التالية ويكيبيديا كـ مثال." |
| 1196 |
|
| 1197 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:588 |
| 1198 |
msgid "The simplest is a basic template::" |
| 1199 |
msgstr "الأبسط هو قالب أساسي::" |
| 1200 |
|
| 1201 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:592 |
| 1202 |
msgid "" |
| 1203 |
"In some cases you might want to do more processing. There are four template " |
| 1204 |
"functions you can use, depending on the complexity of the processing." |
| 1205 |
msgstr "في بعض الحالات قد ترغب في إجراء المزيد من المعالجة. هناك أربع دوال قالب يمكنك استخدامها، اعتمادًا على تعقيد المعالجة." |
| 1206 |
|
| 1207 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:599 |
| 1208 |
msgid "" |
| 1209 |
"For example, assume you have a custom column `Translators` " |
| 1210 |
"(``#translators``) where the names are `Last name, First name`. You might " |
| 1211 |
"need to convert the name to `First name Last name` when creating the URL. " |
| 1212 |
"You can use the :ref:`ff_make_url` function to do this::" |
| 1213 |
msgstr "على سبيل المثال، افترض أن لديك عمودًا مخصصًا `المترجمون` (``#translators``) حيث الأسماء هي `اسم العائلة، الاسم الأول`. قد تحتاج إلى تحويل الاسم إلى `الاسم الأول اسم العائلة` عند إنشاء عنوان URL. يمكنك استخدام دالة :ref:`ff_make_url` للقيام بذلك::" |
| 1214 |
|
| 1215 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:603 |
| 1216 |
msgid "" |
| 1217 |
"If we assume that the translator's name is `Boy-Żeleński, Tadeusz` then the " |
| 1218 |
"above template produces the link::" |
| 1219 |
msgstr "إذا افترضنا أن اسم المترجم هو `Boy-Żeleński, Tadeusz`، فإن القالب أعلاه ينتج الرابط::" |
| 1220 |
|
| 1221 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:607 |
| 1222 |
msgid "" |
| 1223 |
"Note that the person's first name is now first, the space is now a plus, and" |
| 1224 |
" that the non-English characters in the last name are URL-encoded." |
| 1225 |
msgstr "لاحظ أن الاسم الأول للشخص أصبح الآن أولاً، والمسافة أصبحت علامة زائد، و أن الأحرف غير الإنجليزية في اسم العائلة مشفرة لعنوان URL." |
| 1226 |
|
| 1227 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:609 |
| 1228 |
msgid "" |
| 1229 |
"The functions :ref:`ff_make_url_extended`, :ref:`ff_query_string`, and " |
| 1230 |
":ref:`ff_encode_for_url` might be useful depending upon any additional " |
| 1231 |
"processing complexity." |
| 1232 |
msgstr "قد تكون الدوال :ref:`ff_make_url_extended`، :ref:`ff_query_string`، و :ref:`ff_encode_for_url` مفيدة اعتمادًا على أي تعقيد معالجة إضافي." |
| 1233 |
|
| 1234 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:611 |
| 1235 |
msgid "**The calibre URL scheme**" |
| 1236 |
msgstr "**مخطط عنوان URL لـ calibre**" |
| 1237 |
|
| 1238 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:613 |
| 1239 |
msgid "" |
| 1240 |
"Calibre supports several different URLs to navigate your calibre libraries. " |
| 1241 |
"This section shows how to use templates to construct some of the URLs. See " |
| 1242 |
":doc:`url_scheme` for details on the URLs available." |
| 1243 |
msgstr "يدعم Calibre عدة عناوين URL مختلفة للتنقل في مكتبات calibre الخاصة بك. يوضح هذا القسم كيفية استخدام القوالب لإنشاء بعض عناوين URL. راجع :doc:`url_scheme` للحصول على تفاصيل حول عناوين URL المتاحة." |
| 1244 |
|
| 1245 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:616 |
| 1246 |
msgid "Switch to a specific library. The syntax of this URL is::" |
| 1247 |
msgstr "التبديل إلى مكتبة معينة. صيغة عنوان URL هذا هي::" |
| 1248 |
|
| 1249 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:620 |
| 1250 |
msgid "" |
| 1251 |
"``Library_Name`` must be replaced with the name of the calibre library you " |
| 1252 |
"wish to open. The library name is shown in the title bar of the window. It " |
| 1253 |
"is a simple name, not the file path to the library. You must spell it as " |
| 1254 |
"shown in the title bar, including letter case. The character ``_`` " |
| 1255 |
"(underscore) stands for the current library. If the name contains any spaces" |
| 1256 |
" or special characters then it must be hex encoded using the " |
| 1257 |
":ref:`ff_to_hex` function, as in the following example::" |
| 1258 |
msgstr "يجب استبدال ``Library_Name`` باسم مكتبة calibre التي ترغب في فتحها. يظهر اسم المكتبة في شريط عنوان النافذة. إنه اسم بسيط، وليس مسار الملف إلى المكتبة. يجب أن تكتبه كما يظهر في شريط العنوان، بما في ذلك حالة الأحرف. الحرف ``_`` (شرطة سفلية) يرمز إلى المكتبة الحالية. إذا كان الاسم يحتوي على أي مسافات أو أحرف خاصة، فيجب ترميزه سداسيًا عشريًا باستخدام دالة :ref:`ff_to_hex`، كما في المثال التالي::" |
| 1259 |
|
| 1260 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:628 |
| 1261 |
msgid "The template generates the URL::" |
| 1262 |
msgstr "ينشئ القالب عنوان URL::" |
| 1263 |
|
| 1264 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:632 |
| 1265 |
msgid "" |
| 1266 |
"You can replace the ``current_library_name()`` function with the actual name" |
| 1267 |
" of the library, as in::" |
| 1268 |
msgstr "يمكنك استبدال دالة ``current_library_name()`` بالاسم الفعلي للمكتبة، كما في::" |
| 1269 |
|
| 1270 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:636 |
| 1271 |
msgid "" |
| 1272 |
"Links to show books. These links select a book in the calibre library. The " |
| 1273 |
"syntax for this URL is::" |
| 1274 |
msgstr "روابط لعرض الكتب. تحدد هذه الروابط كتابًا في مكتبة calibre. صيغة عنوان URL هذا هي::" |
| 1275 |
|
| 1276 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:640 |
| 1277 |
msgid "" |
| 1278 |
"The ``book id`` is the numeric calibre id for the book, available to " |
| 1279 |
"templates as ``$id``. As above, the library name might need to be hex " |
| 1280 |
"encoded. Here is an example::" |
| 1281 |
msgstr "معرف ``book id`` هو معرف calibre الرقمي للكتاب، متاح لـ القوالب كـ ``$id``. كما هو الحال أعلاه، قد يحتاج اسم المكتبة إلى ترميز سداسي عشري. إليك مثال::" |
| 1282 |
|
| 1283 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:645 |
| 1284 |
msgid "It produces the URL::" |
| 1285 |
msgstr "ينتج عنوان URL::" |
| 1286 |
|
| 1287 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:649 |
| 1288 |
msgid "" |
| 1289 |
"Searching for books. These links search for books in the specified calibre " |
| 1290 |
"library. The syntax for this URL is::" |
| 1291 |
msgstr "البحث عن الكتب. تبحث هذه الروابط عن الكتب في مكتبة calibre المحددة. صيغة عنوان URL هذا هي::" |
| 1292 |
|
| 1293 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:654 |
| 1294 |
msgid "" |
| 1295 |
"where `query` is any valid calibre search expression. You must hex encode " |
| 1296 |
"any query containing spaces or special characters, which generally means all" |
| 1297 |
" of them. For example, the calibre search expression for searching for a " |
| 1298 |
"hierarchical tag beginning with 'AA' is ``tags:\"=.AA\"``. This template " |
| 1299 |
"constructs a search URL for that expression::" |
| 1300 |
msgstr "حيث `query` هو أي تعبير بحث صالح في calibre. يجب عليك ترميز سداسي عشري لأي استعلام يحتوي على مسافات أو أحرف خاصة، مما يعني عمومًا جميعها. على سبيل المثال، تعبير البحث في calibre للبحث عن علامة هرمية تبدأ بـ 'AA' هو ``tags:\"=.AA\"``. ينشئ هذا القالب عنوان URL للبحث عن هذا التعبير::" |
| 1301 |
|
| 1302 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:660 |
| 1303 |
msgid "The resulting URL is::" |
| 1304 |
msgstr "عنوان URL الناتج هو::" |
| 1305 |
|
| 1306 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:664 |
| 1307 |
msgid "" |
| 1308 |
"Here is an example of the same URL built using the " |
| 1309 |
":ref:``ff_make_url_extended`` function instead of :ref:`ff_strcat`::" |
| 1310 |
msgstr "إليك مثال على نفس عنوان URL تم إنشاؤه باستخدام دالة :ref:``ff_make_url_extended`` بدلاً من :ref:`ff_strcat`::" |
| 1311 |
|
| 1312 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:669 |
| 1313 |
msgid "" |
| 1314 |
"Open a book details window on a book in some library. The syntax for this " |
| 1315 |
"URL is::" |
| 1316 |
msgstr "فتح نافذة تفاصيل كتاب لكتاب في مكتبة ما. صيغة عنوان URL هذا هي::" |
| 1317 |
|
| 1318 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:673 |
| 1319 |
msgid "An example template is::" |
| 1320 |
msgstr "مثال على قالب هو::" |
| 1321 |
|
| 1322 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:677 |
| 1323 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:694 |
| 1324 |
msgid "which produces the URL::" |
| 1325 |
msgstr "الذي ينتج عنوان URL::" |
| 1326 |
|
| 1327 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:681 |
| 1328 |
msgid "" |
| 1329 |
"Open the notes associated with an author/series/etc. The syntax of the URL " |
| 1330 |
"is::" |
| 1331 |
msgstr "فتح الملاحظات المرتبطة بمؤلف/سلسلة/إلخ. صيغة عنوان URL هي::" |
| 1332 |
|
| 1333 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:686 |
| 1334 |
msgid "" |
| 1335 |
"``Field_Name`` is the lookup name of the field. If the field is a custom " |
| 1336 |
"column then replace the ``#`` character with an underscore (``_``). " |
| 1337 |
"``Item_Id`` is the internal numeric ID of the value in the field. There " |
| 1338 |
"isn't a template function that returns the ``Item_Id``, so templates will " |
| 1339 |
"normally use the second form, ``Hex_Encoded_Item_Name``. Here is a sample " |
| 1340 |
"template that opens the note for the person ``Boy-Żeleński, Tadeusz`` in the" |
| 1341 |
" field ``#authtest``::" |
| 1342 |
msgstr "``Field_Name`` هو اسم البحث للحقل. إذا كان الحقل عمودًا مخصصًا، فاستبدل الحرف ``#`` بشرطة سفلية (``_``). ``Item_Id`` هو المعرف الرقمي الداخلي للقيمة في الحقل. لا توجد دالة قالب تعيد ``Item_Id``، لذا ستستخدم القوالب عادةً الشكل الثاني، ``Hex_Encoded_Item_Name``. إليك قالب مثال يفتح الملاحظة للشخص ``Boy-Żeleński, Tadeusz`` في الحقل ``#authtest``::" |
| 1343 |
|
| 1344 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:700 |
| 1345 |
msgid "Stored templates" |
| 1346 |
msgstr "القوالب المخزنة" |
| 1347 |
|
| 1348 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:702 |
| 1349 |
msgid "" |
| 1350 |
"Both :ref:`General Program Mode <general_mode>` and :ref:`Python Template " |
| 1351 |
"Mode <python_mode>` support saving templates and calling those templates " |
| 1352 |
"from another template, much like calling stored functions. You save " |
| 1353 |
"templates using :guilabel:`Preferences->Advanced->Template functions`. More " |
| 1354 |
"information is provided in that dialog. You call a template the same way you" |
| 1355 |
" call a function, passing positional arguments if desired. An argument can " |
| 1356 |
"be any expression. Examples of calling a template, assuming the stored " |
| 1357 |
"template is named ``foo``:" |
| 1358 |
msgstr "يدعم كل من :ref:`وضع البرنامج العام <general_mode>` و :ref:`وضع قالب بايثون <python_mode>` حفظ القوالب واستدعاء تلك القوالب من قالب آخر، تمامًا مثل استدعاء الدوال المخزنة. يمكنك حفظ القوالب باستخدام :guilabel:`التفضيلات->متقدم->دوال القوالب`. يتم توفير المزيد من المعلومات في هذا الحوار. يمكنك استدعاء قالب بنفس الطريقة التي تستدعي بها دالة، مع تمرير الوسائط الموضعية إذا رغبت في ذلك. يمكن أن يكون الوسيط أي تعبير. أمثلة على استدعاء قالب، بافتراض أن القالب المخزن يسمى ``foo``:" |
| 1359 |
|
| 1360 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:704 |
| 1361 |
msgid "``foo()`` -- call the template passing no arguments." |
| 1362 |
msgstr "``foo()`` -- استدعاء القالب دون تمرير أي وسائط." |
| 1363 |
|
| 1364 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:705 |
| 1365 |
msgid "" |
| 1366 |
"``foo(a, b)`` call the template passing the values of the two variables " |
| 1367 |
"``a`` and ``b``." |
| 1368 |
msgstr "``foo(a, b)`` استدعاء القالب مع تمرير قيم المتغيرين ``a`` و ``b``." |
| 1369 |
|
| 1370 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:706 |
| 1371 |
msgid "" |
| 1372 |
"``foo(if field('series') then field('series_index') else 0 fi)`` -- if the " |
| 1373 |
"book has a ``series`` then pass the ``series_index``, otherwise pass the " |
| 1374 |
"value ``0``." |
| 1375 |
msgstr "``foo(if field('series') then field('series_index') else 0 fi)`` -- إذا كان الكتاب يحتوي على ``سلسلة``، فمرر ``series_index``، وإلا فمرر القيمة ``0``." |
| 1376 |
|
| 1377 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:708 |
| 1378 |
msgid "" |
| 1379 |
"In GPM you retrieve the arguments passed in the call to the stored template " |
| 1380 |
"using the ``arguments`` function. It both declares and initializes local " |
| 1381 |
"variables, effectively parameters. The variables are positional; they get " |
| 1382 |
"the value of the parameter given in the call in the same position. If the " |
| 1383 |
"corresponding parameter is not provided in the call then ``arguments`` " |
| 1384 |
"assigns that variable the provided default value. If there is no default " |
| 1385 |
"value then the variable is set to the empty string. For example, the " |
| 1386 |
"following ``arguments`` function declares 2 variables, ``key``, " |
| 1387 |
"``alternate``::" |
| 1388 |
msgstr "في GPM، تسترد الوسائط التي تم تمريرها في استدعاء القالب المخزن باستخدام دالة ``arguments``. إنها تعلن وتهيئ المتغيرات المحلية، وهي في الواقع معلمات. المتغيرات موضعية؛ تحصل على قيمة المعلمة المعطاة في الاستدعاء في نفس الموضع. إذا لم يتم توفير المعلمة المقابلة في الاستدعاء، فإن ``arguments`` تعين هذا المتغير القيمة الافتراضية المقدمة. إذا لم تكن هناك قيمة افتراضية، فإن المتغير يتم تعيينه إلى سلسلة فارغة. على سبيل المثال، دالة ``arguments`` التالية تعلن متغيرين، ``key``، ``alternate``::" |
| 1389 |
|
| 1390 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:712 |
| 1391 |
msgid "Examples, again assuming the stored template is named ``foo``:" |
| 1392 |
msgstr "أمثلة، بافتراض مرة أخرى أن القالب المخزن يسمى ``foo``:" |
| 1393 |
|
| 1394 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:714 |
| 1395 |
msgid "" |
| 1396 |
"``foo('#myseries')`` -- argument ``key`` is assigned the value " |
| 1397 |
"``'myseries'`` and the argument ``alternate`` is assigned the default value " |
| 1398 |
"``'series'``." |
| 1399 |
msgstr "``foo('#myseries')`` -- يتم تعيين الوسيط ``key`` للقيمة ``'myseries'`` ويتم تعيين الوسيط ``alternate`` للقيمة الافتراضية ``'series'``." |
| 1400 |
|
| 1401 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:715 |
| 1402 |
msgid "" |
| 1403 |
"``foo('series', '#genre')`` the variable ``key`` is assigned the value " |
| 1404 |
"``'series'`` and the variable ``alternate`` is assigned the value " |
| 1405 |
"``'#genre'``." |
| 1406 |
msgstr "``foo('series', '#genre')`` يتم تعيين المتغير ``key`` للقيمة ``'series'`` ويتم تعيين المتغير ``alternate`` للقيمة ``'#genre'``." |
| 1407 |
|
| 1408 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:716 |
| 1409 |
msgid "" |
| 1410 |
"``foo()`` -- the variable ``key`` is assigned the empty string and the " |
| 1411 |
"variable ``alternate`` is assigned the value ``'series'``." |
| 1412 |
msgstr "``foo()`` -- يتم تعيين المتغير ``key`` للسلسلة الفارغة ويتم تعيين المتغير ``alternate`` للقيمة ``'series'``." |
| 1413 |
|
| 1414 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:718 |
| 1415 |
msgid "" |
| 1416 |
"In PTM the arguments are passed in the ``arguments`` parameter, which is a " |
| 1417 |
"list of strings. There isn't any way to specify default values. You must " |
| 1418 |
"check the length of the ``arguments`` list to be sure that the number of " |
| 1419 |
"arguments is what you expect." |
| 1420 |
msgstr "في PTM، يتم تمرير الوسائط في المعامل ``arguments``، وهو قائمة من السلاسل. لا توجد أي طريقة لتحديد قيم افتراضية. يجب عليك التحقق من طول قائمة ``arguments`` للتأكد من أن عدد الوسائط هو ما تتوقعه." |
| 1421 |
|
| 1422 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:720 |
| 1423 |
msgid "" |
| 1424 |
"An easy way to test stored templates is using the ``Template tester`` " |
| 1425 |
"dialog. For ease of access give it a keyboard shortcut in " |
| 1426 |
":guilabel:`Preferences->Advanced->Keyboard shortcuts->Template tester`. " |
| 1427 |
"Giving the ``Stored templates`` dialog a shortcut will help switching more " |
| 1428 |
"rapidly between the tester and editing the stored template's source code." |
| 1429 |
msgstr "طريقة سهلة لاختبار القوالب المخزنة هي استخدام مربع حوار ``اختبار القوالب``. لسهولة الوصول، امنحه اختصار لوحة مفاتيح في :guilabel:`التفضيلات->متقدم->اختصارات لوحة المفاتيح->اختبار القوالب`. إعطاء مربع حوار ``القوالب المخزنة`` اختصارًا سيساعد في التبديل بسرعة أكبر بين المختبر وتحرير الكود المصدري للقالب المخزن." |
| 1430 |
|
| 1431 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:723 |
| 1432 |
msgid "Providing additional information to templates" |
| 1433 |
msgstr "توفير معلومات إضافية للقوالب" |
| 1434 |
|
| 1435 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:725 |
| 1436 |
msgid "" |
| 1437 |
"A developer can choose to pass additional information to the template " |
| 1438 |
"processor, such as application-specific book metadata or information about " |
| 1439 |
"what the processor is being asked to do. A template can access this " |
| 1440 |
"information and use it during the evaluation." |
| 1441 |
msgstr "يمكن للمطور اختيار تمرير معلومات إضافية إلى معالج القوالب، مثل البيانات الوصفية الخاصة بالكتب لتطبيق معين أو معلومات حول ما يُطلب من المعالج القيام به. يمكن للقالب الوصول إلى هذه المعلومات واستخدامها أثناء التقييم." |
| 1442 |
|
| 1443 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:727 |
| 1444 |
msgid "**Developer: how to pass additional information**" |
| 1445 |
msgstr "**المطور: كيفية تمرير معلومات إضافية**" |
| 1446 |
|
| 1447 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:729 |
| 1448 |
msgid "" |
| 1449 |
"The additional information is a Python dictionary containing pairs " |
| 1450 |
"``variable_name: variable_value`` where the values must be strings. The " |
| 1451 |
"template can access the dictionary, creating template local variables named " |
| 1452 |
"``variable_name`` containing the value ``variable_value``. The user cannot " |
| 1453 |
"change the name so it is best to use names that won't collide with other " |
| 1454 |
"template local variables, for example by prefixing the name with an " |
| 1455 |
"underscore." |
| 1456 |
msgstr "المعلومات الإضافية هي قاموس بايثون يحتوي على أزواج ``variable_name: variable_value`` حيث يجب أن تكون القيم سلاسل. يمكن للقالب الوصول إلى القاموس، وإنشاء متغيرات محلية للقالب تسمى ``variable_name`` تحتوي على القيمة ``variable_value``. لا يمكن للمستخدم تغيير الاسم لذا من الأفضل استخدام أسماء لن تتعارض مع متغيرات محلية أخرى للقالب، على سبيل المثال عن طريق إضافة بادئة للاسم بشرطة سفلية." |
| 1457 |
|
| 1458 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:731 |
| 1459 |
msgid "" |
| 1460 |
"This dictionary is passed to the template processor (the ``formatter``) " |
| 1461 |
"using the named parameter ``global_vars=your_dict``. The full method " |
| 1462 |
"signature is::" |
| 1463 |
msgstr "يتم تمرير هذا القاموس إلى معالج القوالب (``formatter``) باستخدام المعامل المسمى ``global_vars=your_dict``. توقيع الدالة الكامل هو::" |
| 1464 |
|
| 1465 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:739 |
| 1466 |
msgid "**Template writer: how to access the additional information**" |
| 1467 |
msgstr "**كاتب القالب: كيفية الوصول إلى المعلومات الإضافية**" |
| 1468 |
|
| 1469 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:741 |
| 1470 |
msgid "" |
| 1471 |
"You access the additional information (the ``globals`` dictionary) in a " |
| 1472 |
"template using the template function::" |
| 1473 |
msgstr "يمكنك الوصول إلى المعلومات الإضافية (قاموس ``globals``) في قالب باستخدام دالة القالب::" |
| 1474 |
|
| 1475 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:745 |
| 1476 |
msgid "" |
| 1477 |
"where ``id`` is any legal variable name. This function checks whether the " |
| 1478 |
"additional information provided by the developer contains the name. If it " |
| 1479 |
"does then the function assigns the provided value to a template local " |
| 1480 |
"variable with that name. If the name is not in the additional information " |
| 1481 |
"and if an ``expression`` is provided, the ``expression`` is evaluated and " |
| 1482 |
"the result is assigned to the local variable. If neither a value nor an " |
| 1483 |
"expression is provided, the function assigns the empty string (``''``) to " |
| 1484 |
"the local variable." |
| 1485 |
msgstr "حيث ``id`` هو أي اسم متغير قانوني. تتحقق هذه الدالة مما إذا كانت المعلومات الإضافية المقدمة من المطور تحتوي على الاسم. إذا كانت تحتوي عليه، فإن الدالة تعين القيمة المقدمة لمتغير محلي للقالب بهذا الاسم. إذا لم يكن الاسم موجودًا في المعلومات الإضافية وإذا تم توفير ``expression``، يتم تقييم ``expression`` و يتم تعيين النتيجة للمتغير المحلي. إذا لم يتم توفير قيمة ولا تعبير، فإن الدالة تعين السلسلة الفارغة (``''``) لـ المتغير المحلي." |
| 1486 |
|
| 1487 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:747 |
| 1488 |
msgid "" |
| 1489 |
"A template can set a value in the ``globals`` dictionary using the template " |
| 1490 |
"function::" |
| 1491 |
msgstr "يمكن للقالب تعيين قيمة في قاموس ``globals`` باستخدام دالة القالب::" |
| 1492 |
|
| 1493 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:751 |
| 1494 |
msgid "" |
| 1495 |
"This function sets the ``globals`` dictionary key:value pair ``id:value`` " |
| 1496 |
"where ``value`` is the value of the template local variable ``id``. If that " |
| 1497 |
"local variable doesn't exist then ``value`` is set to the result of " |
| 1498 |
"evaluating ``expression``." |
| 1499 |
msgstr "تقوم هذه الدالة بتعيين زوج المفتاح:القيمة ``id:value`` في قاموس ``globals`` حيث ``value`` هي قيمة المتغير المحلي للقالب ``id``. إذا لم يكن هذا المتغير المحلي موجودًا، فسيتم تعيين ``value`` إلى نتيجة تقييم ``expression``." |
| 1500 |
|
| 1501 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:754 |
| 1502 |
msgid "Notes on the difference between modes" |
| 1503 |
msgstr "ملاحظات حول الفرق بين الأوضاع" |
| 1504 |
|
| 1505 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:756 |
| 1506 |
msgid "" |
| 1507 |
"The three program modes, :ref:`Single Function Mode <single_mode>` (SFM), " |
| 1508 |
":ref:`Template Program Mode <template_mode>` (`TPM`), and :ref:`General " |
| 1509 |
"Program Mode <general_mode>` (`GPM`), work differently. SFM is intended to " |
| 1510 |
"be 'simple' so it hides a lot of programming language bits." |
| 1511 |
msgstr "تعمل أوضاع البرمجة الثلاثة، :ref:`وضع الدالة الواحدة <single_mode>` (SFM)، :ref:`وضع برنامج القالب <template_mode>` (`TPM`)، و :ref:`وضع البرنامج العام <general_mode>` (`GPM`)، بشكل مختلف. يهدف SFM إلى أن يكون 'بسيطًا' لذا فإنه يخفي الكثير من أجزاء لغة البرمجة." |
| 1512 |
|
| 1513 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:758 |
| 1514 |
msgid "Differences:" |
| 1515 |
msgstr "الفروقات:" |
| 1516 |
|
| 1517 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:760 |
| 1518 |
msgid "" |
| 1519 |
"In SFM the value of the column is always passed as an 'invisible' first " |
| 1520 |
"argument to a function included in the template." |
| 1521 |
msgstr "في SFM، يتم دائمًا تمرير قيمة العمود كوسيط أول 'غير مرئي' لدالة مضمنة في القالب." |
| 1522 |
|
| 1523 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:761 |
| 1524 |
msgid "" |
| 1525 |
"SFM doesn't support the difference between variables and strings; all values" |
| 1526 |
" are strings." |
| 1527 |
msgstr "لا يدعم SFM الفرق بين المتغيرات والسلاسل؛ جميع القيم هي سلاسل." |
| 1528 |
|
| 1529 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:762 |
| 1530 |
msgid "" |
| 1531 |
"The following SFM template returns either the series name or the string \"no" |
| 1532 |
" series\"::" |
| 1533 |
msgstr "يعيد قالب SFM التالي إما اسم السلسلة أو السلسلة النصية \"لا توجد سلسلة\"::" |
| 1534 |
|
| 1535 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:766 |
| 1536 |
msgid "The equivalent template in `TPM` is ::" |
| 1537 |
msgstr "القالب المكافئ في `TPM` هو::" |
| 1538 |
|
| 1539 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:770 |
| 1540 |
msgid "The equivalent template in `GPM` is::" |
| 1541 |
msgstr "القالب المكافئ في `GPM` هو::" |
| 1542 |
|
| 1543 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:774 |
| 1544 |
msgid "" |
| 1545 |
"The first argument to ``ifempty`` is the value of the field ``series``. The " |
| 1546 |
"second argument is the string ``no series``. In SFM the first argument, the " |
| 1547 |
"value of the field, is automatically passed (the invisible argument)." |
| 1548 |
msgstr "الوسيط الأول لدالة ``ifempty`` هو قيمة الحقل ``series``. الوسيط الثاني هو السلسلة النصية ``no series``. في SFM، يتم تمرير الوسيط الأول، وهو قيمة الحقل، تلقائيًا (الوسيط غير المرئي)." |
| 1549 |
|
| 1550 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:775 |
| 1551 |
msgid "" |
| 1552 |
"Several template functions, for example ``booksize()`` and " |
| 1553 |
"``current_library_name()``, take no arguments. Because of the 'invisible " |
| 1554 |
"argument' you cannot use these functions in SFM." |
| 1555 |
msgstr "العديد من دوال القوالب، على سبيل المثال ``booksize()`` و ``current_library_name()``، لا تأخذ أي وسائط. بسبب 'الوسيط غير المرئي'، لا يمكنك استخدام هذه الدوال في SFM." |
| 1556 |
|
| 1557 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:776 |
| 1558 |
msgid "" |
| 1559 |
"Nested functions, where a function calls another function to compute an " |
| 1560 |
"argument, cannot be used in SFM. For example this template, intended to " |
| 1561 |
"return the first 5 characters of the series value uppercased, won't work in " |
| 1562 |
"SFM::" |
| 1563 |
msgstr "لا يمكن استخدام الدوال المتداخلة، حيث تستدعي دالة دالة أخرى لحساب وسيط، في SFM. على سبيل المثال، هذا القالب، الذي يهدف إلى إرجاع أول 5 أحرف من قيمة السلسلة بأحرف كبيرة، لن يعمل في SFM::" |
| 1564 |
|
| 1565 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:780 |
| 1566 |
msgid "" |
| 1567 |
"`TPM` and `GPM` support nested functions. The above template in `TPM` would " |
| 1568 |
"be::" |
| 1569 |
msgstr "يدعم `TPM` و `GPM` الدوال المتداخلة. القالب أعلاه في `TPM` سيكون::" |
| 1570 |
|
| 1571 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:784 |
| 1572 |
msgid "In `GPM` it would be::" |
| 1573 |
msgstr "في `GPM` سيكون::" |
| 1574 |
|
| 1575 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:788 |
| 1576 |
msgid "" |
| 1577 |
"As noted in the above :ref:`Template Program Mode <template_mode>` section, " |
| 1578 |
"using ``{`` and ``}`` characters in `TPM` string literals can lead to errors" |
| 1579 |
" or unexpected results because they confuse the template processor. It tries" |
| 1580 |
" to treat them as template boundaries, not characters. In some but not all " |
| 1581 |
"cases you can replace a ``{`` with ``[[`` and a ``}`` with `]]`. Generally, " |
| 1582 |
"if your program contains ``{`` and ``}`` characters then you should use " |
| 1583 |
"`General Program Mode`." |
| 1584 |
msgstr "كما هو مذكور في قسم :ref:`وضع برنامج القالب <template_mode>` أعلاه، يمكن أن يؤدي استخدام الأحرف ``{`` و ``}`` في سلاسل `TPM` الحرفية إلى أخطاء أو نتائج غير متوقعة لأنها تربك معالج القوالب. فهو يحاول التعامل معها كحدود للقالب، وليس كأحرف. في بعض الحالات وليس كلها، يمكنك استبدال ``{`` بـ ``[[`` و ``}`` بـ ``]]``. بشكل عام، إذا كان برنامجك يحتوي على أحرف ``{`` و ``}``، فيجب عليك استخدام `وضع البرنامج العام`." |
| 1585 |
|
| 1586 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:792 |
| 1587 |
msgid "User-defined Python template functions" |
| 1588 |
msgstr "دوال قالب بايثون المعرفة من قبل المستخدم" |
| 1589 |
|
| 1590 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:794 |
| 1591 |
msgid "" |
| 1592 |
"You can add your own Python functions to the template processor. Such " |
| 1593 |
"functions can be used in any of the three template programming modes. The " |
| 1594 |
"functions are added by going to :guilabel:`Preferences -> Advanced -> " |
| 1595 |
"Template functions`. Instructions are shown in that dialog. Note that you " |
| 1596 |
"can use `Python Templates` for a similar purpose. As calling user-defined " |
| 1597 |
"functions is faster than calling a Python template, user-defined functions " |
| 1598 |
"might be more efficient depending on the complexity of what the function or " |
| 1599 |
"template does." |
| 1600 |
msgstr "يمكنك إضافة دوال بايثون الخاصة بك إلى معالج القوالب. يمكن استخدام هذه الدوال في أي من أوضاع برمجة القوالب الثلاثة. يتم إضافة الدوال بالانتقال إلى :guilabel:`التفضيلات -> متقدم -> دوال القوالب`. تظهر التعليمات في هذا الحوار. لاحظ أنه يمكنك استخدام `قوالب بايثون` لغرض مماثل. نظرًا لأن استدعاء الدوال المعرفة من قبل المستخدم أسرع من استدعاء قالب بايثون، فقد تكون الدوال المعرفة من قبل المستخدم أكثر كفاءة اعتمادًا على تعقيد ما تفعله الدالة أو القالب." |
| 1601 |
|
| 1602 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:797 |
| 1603 |
msgid "Special notes for using templates in different contexts" |
| 1604 |
msgstr "ملاحظات خاصة لاستخدام القوالب في سياقات مختلفة" |
| 1605 |
|
| 1606 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:799 |
| 1607 |
msgid "" |
| 1608 |
"In the GUI (:guilabel:`Columns made from other columns` and " |
| 1609 |
":guilabel:`Template searches`):" |
| 1610 |
msgstr "في واجهة المستخدم الرسومية (:guilabel:`الأعمدة المصنوعة من أعمدة أخرى` و :guilabel:`عمليات البحث بالقالب`):" |
| 1611 |
|
| 1612 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:801 |
| 1613 |
msgid "GPM templates work as before." |
| 1614 |
msgstr "تعمل قوالب GPM كما كانت من قبل." |
| 1615 |
|
| 1616 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:802 |
| 1617 |
msgid "Python templates have full access to the calibre database." |
| 1618 |
msgstr "تتمتع قوالب بايثون بوصول كامل إلى قاعدة بيانات calibre." |
| 1619 |
|
| 1620 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:804 |
| 1621 |
msgid "In icon rules:" |
| 1622 |
msgstr "في قواعد الأيقونات:" |
| 1623 |
|
| 1624 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:806 |
| 1625 |
msgid "" |
| 1626 |
"icon rule templates have no book data so field-based functions such as " |
| 1627 |
":ref:`ff_format_date_field`, :ref:`ff_list_count_field`, and " |
| 1628 |
":ref:`ff_check_yes_no` won't work." |
| 1629 |
msgstr "لا تحتوي قوالب قواعد الأيقونات على بيانات كتاب، لذا فإن الدوال المستندة إلى الحقول مثل :ref:`ff_format_date_field`، :ref:`ff_list_count_field`، و :ref:`ff_check_yes_no` لن تعمل." |
| 1630 |
|
| 1631 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:808 |
| 1632 |
msgid "In the Content server:" |
| 1633 |
msgstr "في خادم المحتوى:" |
| 1634 |
|
| 1635 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:810 |
| 1636 |
msgid "" |
| 1637 |
"Templates have access to the new API but not the old API (LibraryDatabase)." |
| 1638 |
msgstr "تتمتع القوالب بالوصول إلى واجهة برمجة التطبيقات الجديدة ولكن ليس إلى واجهة برمجة التطبيقات القديمة (LibraryDatabase)." |
| 1639 |
|
| 1640 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:811 |
| 1641 |
msgid "" |
| 1642 |
"Because of the above, the following formatter functions are not guaranteed " |
| 1643 |
"to work in GPM templates (composite columns, icon rules, etc) and should be " |
| 1644 |
"avoided if you use the content server:" |
| 1645 |
msgstr "بسبب ما سبق، لا يُضمن عمل دوال التنسيق التالية في قوالب GPM (الأعمدة المركبة، قواعد الأيقونات، إلخ) ويجب تجنبها إذا كنت تستخدم خادم المحتوى:" |
| 1646 |
|
| 1647 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:813 |
| 1648 |
msgid ":ref:`ff_connected_device_name`" |
| 1649 |
msgstr ":ref:`ff_connected_device_name`" |
| 1650 |
|
| 1651 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:814 |
| 1652 |
msgid ":ref:`ff_connected_device_uuid`" |
| 1653 |
msgstr ":ref:`ff_connected_device_uuid`" |
| 1654 |
|
| 1655 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:815 |
| 1656 |
msgid ":ref:`ff_current_virtual_library_name`" |
| 1657 |
msgstr ":ref:`ff_current_virtual_library_name`" |
| 1658 |
|
| 1659 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:816 |
| 1660 |
msgid ":ref:`ff_is_marked`" |
| 1661 |
msgstr ":ref:`ff_is_marked`" |
| 1662 |
|
| 1663 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:817 |
| 1664 |
msgid ":ref:`ff_virtual_libraries`" |
| 1665 |
msgstr ":ref:`ff_virtual_libraries`" |
| 1666 |
|
| 1667 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:820 |
| 1668 |
msgid "Special notes for save/send templates" |
| 1669 |
msgstr "ملاحظات خاصة لقوالب الحفظ/الإرسال" |
| 1670 |
|
| 1671 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:822 |
| 1672 |
msgid "" |
| 1673 |
"Special processing is applied when a template is used in a :guilabel:`Save " |
| 1674 |
"to disk` or :guilabel:`Send to device` template. The values of the fields " |
| 1675 |
"are cleaned, replacing characters that are special to file systems with " |
| 1676 |
"underscores, including slashes. This means that field text cannot be used to" |
| 1677 |
" create folders. However, slashes are not changed in prefix or suffix " |
| 1678 |
"strings, so slashes in these strings will cause folders to be created. " |
| 1679 |
"Because of this, you can create variable-depth folder structure." |
| 1680 |
msgstr "يتم تطبيق معالجة خاصة عند استخدام قالب في قالب :guilabel:`حفظ إلى القرص` أو :guilabel:`إرسال إلى الجهاز`. يتم تنظيف قيم الحقول، واستبدال الأحرف الخاصة بأنظمة الملفات بشرطات سفلية، بما في ذلك الشرطات المائلة. هذا يعني أنه لا يمكن استخدام نص الحقل لإنشاء مجلدات. ومع ذلك، لا تتغير الشرطات المائلة في سلاسل البادئة أو اللاحقة، لذا ستؤدي الشرطات المائلة في هذه السلاسل إلى إنشاء مجلدات. بسبب هذا، يمكنك إنشاء هيكل مجلدات بعمق متغير." |
| 1681 |
|
| 1682 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:824 |
| 1683 |
msgid "" |
| 1684 |
"For example, assume we want the folder structure `series/series_index - " |
| 1685 |
"title`, with the caveat that if series does not exist, then the title should" |
| 1686 |
" be in the top folder. The template to do this is::" |
| 1687 |
msgstr "على سبيل المثال، افترض أننا نريد هيكل المجلد `سلسلة/فهرس_السلسلة - عنوان`، مع ملاحظة أنه إذا لم تكن السلسلة موجودة، فيجب أن يكون العنوان في المجلد العلوي. القالب للقيام بذلك هو::" |
| 1688 |
|
| 1689 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:828 |
| 1690 |
msgid "The slash and the hyphen appear only if series is not empty." |
| 1691 |
msgstr "تظهر الشرطة المائلة والواصلة فقط إذا لم تكن السلسلة فارغة." |
| 1692 |
|
| 1693 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:830 |
| 1694 |
msgid "" |
| 1695 |
"The lookup function lets us do even fancier processing. For example, assume " |
| 1696 |
"that if a book has a series, then we want the folder structure " |
| 1697 |
"`series/series index - title.fmt`. If the book does not have a series then " |
| 1698 |
"we want the folder structure `genre/author_sort/title.fmt`. If the book has " |
| 1699 |
"no genre then we want to use 'Unknown'. We want two completely different " |
| 1700 |
"paths, depending on the value of series." |
| 1701 |
msgstr "تتيح لنا دالة البحث القيام بمعالجة أكثر تعقيدًا. على سبيل المثال، افترض أنه إذا كان الكتاب يحتوي على سلسلة، فإننا نريد هيكل المجلد `سلسلة/فهرس السلسلة - عنوان.fmt`. إذا لم يكن للكتاب سلسلة، فإننا نريد هيكل المجلد `نوع/ترتيب_المؤلف/عنوان.fmt`. إذا لم يكن للكتاب نوع، فإننا نريد استخدام 'غير معروف'. نريد مسارين مختلفين تمامًا، اعتمادًا على قيمة السلسلة." |
| 1702 |
|
| 1703 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:832 |
| 1704 |
msgid "To accomplish this, we:" |
| 1705 |
msgstr "لتحقيق ذلك، نقوم بـ:" |
| 1706 |
|
| 1707 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:834 |
| 1708 |
msgid "" |
| 1709 |
"Create a composite field (give it lookup name #aa) containing " |
| 1710 |
"``{series}/{series_index} - {title}``. If the series is not empty, then this" |
| 1711 |
" template will produce `series/series_index - title`." |
| 1712 |
msgstr "إنشاء حقل مركب (إعطائه اسم بحث #aa) يحتوي على ``{series}/{series_index} - {title}``. إذا لم تكن السلسلة فارغة، فإن هذا القالب سينتج `سلسلة/فهرس_السلسلة - عنوان`." |
| 1713 |
|
| 1714 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:835 |
| 1715 |
msgid "" |
| 1716 |
"Create a composite field (give it lookup name #bb) containing " |
| 1717 |
"``{#genre:ifempty(Unknown)}/{author_sort}/{title}``. This template produces " |
| 1718 |
"`genre/author_sort/title`, where an empty genre is replaced with `Unknown`." |
| 1719 |
msgstr "إنشاء حقل مركب (إعطائه اسم بحث #bb) يحتوي على ``{#genre:ifempty(Unknown)}/{author_sort}/{title}``. ينتج هذا القالب `نوع/ترتيب_المؤلف/عنوان`، حيث يتم استبدال النوع الفارغ بـ `غير معروف`." |
| 1720 |
|
| 1721 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:836 |
| 1722 |
msgid "" |
| 1723 |
"Set the save template to ``{series:lookup(.,#aa,#bb)}``. This template " |
| 1724 |
"chooses composite field ``#aa`` if series is not empty and composite field " |
| 1725 |
"``#bb`` if series is empty. We therefore have two completely different save " |
| 1726 |
"paths, depending on whether or not `series` is empty." |
| 1727 |
msgstr "تعيين قالب الحفظ إلى ``{series:lookup(.,#aa,#bb)}``. يختار هذا القالب الحقل المركب ``#aa`` إذا لم تكن السلسلة فارغة، والحقل المركب ``#bb`` إذا كانت السلسلة فارغة. لذلك لدينا مساران حفظ مختلفان تمامًا، اعتمادًا على ما إذا كانت `السلسلة` فارغة أم لا." |
| 1728 |
|
| 1729 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:839 |
| 1730 |
msgid "Tips" |
| 1731 |
msgstr "نصائح" |
| 1732 |
|
| 1733 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:841 |
| 1734 |
msgid "" |
| 1735 |
"Use the Template Tester to test templates. Add the tester to the context " |
| 1736 |
"menu for books in the library and/or give it a keyboard shortcut." |
| 1737 |
msgstr "استخدم \"اختبار القوالب\" لاختبار القوالب. أضف المختبر إلى قائمة السياق للكتب في المكتبة و/أو امنحه اختصار لوحة مفاتيح." |
| 1738 |
|
| 1739 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:842 |
| 1740 |
msgid "" |
| 1741 |
"Templates can use other templates by referencing composite columns built " |
| 1742 |
"with the desired template. Alternatively, you can use Stored Templates." |
| 1743 |
msgstr "يمكن للقوالب استخدام قوالب أخرى عن طريق الإشارة إلى أعمدة مركبة تم إنشاؤها باستخدام القالب المطلوب. بدلاً من ذلك، يمكنك استخدام القوالب المخزنة." |
| 1744 |
|
| 1745 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:843 |
| 1746 |
msgid "" |
| 1747 |
"In a plugboard, you can set a field to empty (or whatever is equivalent to " |
| 1748 |
"empty) by using the special template ``{}``. This template will always " |
| 1749 |
"evaluate to an empty string." |
| 1750 |
msgstr "في لوحة التوصيل، يمكنك تعيين حقل إلى فارغ (أو ما يعادله) باستخدام القالب الخاص ``{}``. سيُقيّم هذا القالب دائمًا إلى سلسلة فارغة." |
| 1751 |
|
| 1752 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:844 |
| 1753 |
msgid "" |
| 1754 |
"The technique described above to show numbers even if they have a zero value" |
| 1755 |
" works with the standard field series_index." |
| 1756 |
msgstr "التقنية الموصوفة أعلاه لعرض الأرقام حتى لو كانت قيمتها صفرًا تعمل مع حقل series_index القياسي." |
| 1757 |
|
| 1758 |
#: ../../../__w/calibre/calibre/manual/template_lang.rst:849 |
| 1759 |
msgid "Template function reference" |
| 1760 |
msgstr "مرجع دالة القالب" |