diff --git a/po/fa.po b/po/fa.po index 71817d4bf409..a8a72c9c74ea 100644 --- a/po/fa.po +++ b/po/fa.po @@ -18808,7 +18808,7 @@ msgstr "بلوک‌ها برای محدود کردن دامنه `LockGuard` تا #: src/concurrency/sync-exercises/dining-philosophers.md:3 msgid "The dining philosophers problem is a classic problem in concurrency:" -msgstr "" +msgstr "مسئله ناهار خوردن فیلسوفان، در واقع یک مسئله کلاسیک concurrency است:" #: src/concurrency/sync-exercises/dining-philosophers.md:5 msgid "" @@ -18821,6 +18821,14 @@ msgid "" "not eating. After an individual philosopher finishes eating, they will put " "down both forks." msgstr "" +"پنج فیلسوف در کنار هم دور یک میز غذا می‌خورند. هر فیلسوف جایگاه خاص خود را در " +"میز دارد. بین هر بشقاب یک چنگال قرار دارد. غذایی که سِرو می‌شود نوعی اسپاگتی " +"است که باید با دو چنگال خورده شود. هر فیلسوف فقط می‌تواند به طور متناوب فکر " +"کند و غذا بخورد. علاوه بر این، یک فیلسوف فقط می‌تواند اسپاگتی خود را زمانی " +"بخورد که هم چنگال چپ و هم چنگال راست را داشته باشد؛ بنابراین دو چنگال فقط " +"زمانی در دسترس خواهد بود که دو همسایه نزدیک آنها در حال فکرکردن باشند و نه " +"در حال غذاخوردن. پس از اینکه یک فیلسوف غذاخوردن را تمام کرد، هر دو چنگال را " +"پایین می‌گذارد." #: src/concurrency/sync-exercises/dining-philosophers.md:13 msgid "" @@ -18828,6 +18836,9 @@ msgid "" "for this exercise. Copy the code below to a file called `src/main.rs`, fill " "out the blanks, and test that `cargo run` does not deadlock:" msgstr "" +"برای این تمرین به یک [Cargo installation](../../cargo/running-locally.md) " +"محلی نیاز دارید. کد زیر را در فایلی به نام `src/main.rs` کپی کنید، جاهای " +"خالی را پر کنید و آزمایش کنید که `cargo run` به بن‌بست (deadlock) نمی‌خورد:" #: src/concurrency/sync-exercises/dining-philosophers.md:28 #: src/concurrency/async-exercises/dining-philosophers.md:23 @@ -18836,86 +18847,92 @@ msgid "" " // right_fork: ...\n" " // thoughts: ...\n" msgstr "" +"// left_fork: ...\n" +" // right_fork: ...\n" +" // thoughts: ...\n" #: src/concurrency/sync-exercises/dining-philosophers.md:36 #: src/concurrency/sync-exercises/solutions.md:22 #: src/concurrency/async-exercises/dining-philosophers.md:31 #: src/concurrency/async-exercises/solutions.md:23 msgid "\"Eureka! {} has a new idea!\"" -msgstr "" +msgstr "\"ایول! {} یک ایده جدید!\"" #: src/concurrency/sync-exercises/dining-philosophers.md:41 #: src/concurrency/async-exercises/solutions.md:31 +#, fuzzy msgid "// Pick up forks...\n" -msgstr "" +msgstr "// Pick up forks...\n" #: src/concurrency/sync-exercises/dining-philosophers.md:42 #: src/concurrency/sync-exercises/solutions.md:31 #: src/concurrency/async-exercises/dining-philosophers.md:38 #: src/concurrency/async-exercises/solutions.md:51 msgid "\"{} is eating...\"" -msgstr "" +msgstr "\"{} is eating...\"" #: src/concurrency/sync-exercises/dining-philosophers.md:48 #: src/concurrency/sync-exercises/solutions.md:37 #: src/concurrency/async-exercises/dining-philosophers.md:44 #: src/concurrency/async-exercises/solutions.md:59 msgid "\"Socrates\"" -msgstr "" +msgstr "\"Socrates\"" #: src/concurrency/sync-exercises/dining-philosophers.md:48 #: src/concurrency/sync-exercises/solutions.md:37 #: src/concurrency/async-exercises/dining-philosophers.md:44 #: src/concurrency/async-exercises/solutions.md:59 msgid "\"Hypatia\"" -msgstr "" +msgstr "\"Hypatia\"" #: src/concurrency/sync-exercises/dining-philosophers.md:48 #: src/concurrency/sync-exercises/solutions.md:37 #: src/concurrency/async-exercises/dining-philosophers.md:44 #: src/concurrency/async-exercises/solutions.md:59 msgid "\"Plato\"" -msgstr "" +msgstr "\"Plato\"" #: src/concurrency/sync-exercises/dining-philosophers.md:48 #: src/concurrency/sync-exercises/solutions.md:37 #: src/concurrency/async-exercises/dining-philosophers.md:44 #: src/concurrency/async-exercises/solutions.md:59 +#, fuzzy msgid "\"Aristotle\"" -msgstr "" +msgstr "\"Aristotle\"" #: src/concurrency/sync-exercises/dining-philosophers.md:48 #: src/concurrency/sync-exercises/solutions.md:37 #: src/concurrency/async-exercises/dining-philosophers.md:44 #: src/concurrency/async-exercises/solutions.md:59 msgid "\"Pythagoras\"" -msgstr "" +msgstr "\"Pythagoras\"" #: src/concurrency/sync-exercises/dining-philosophers.md:51 #: src/concurrency/async-exercises/dining-philosophers.md:48 #: src/concurrency/async-exercises/solutions.md:63 msgid "// Create forks\n" -msgstr "" +msgstr "// Create forks\n" #: src/concurrency/sync-exercises/dining-philosophers.md:53 #: src/concurrency/async-exercises/dining-philosophers.md:50 #: src/concurrency/async-exercises/solutions.md:67 msgid "// Create philosophers\n" -msgstr "" +msgstr "// Create philosophers\n" #: src/concurrency/sync-exercises/dining-philosophers.md:55 msgid "// Make each of them think and eat 100 times\n" -msgstr "" +msgstr "// Make each of them think and eat 100 times\n" #: src/concurrency/sync-exercises/dining-philosophers.md:57 #: src/concurrency/async-exercises/dining-philosophers.md:54 #: src/concurrency/async-exercises/solutions.md:95 +#, fuzzy msgid "// Output their thoughts\n" -msgstr "" +msgstr "// Output their thoughts\n" #: src/concurrency/sync-exercises/dining-philosophers.md:61 msgid "You can use the following `Cargo.toml`:" -msgstr "" +msgstr "می توانید از `Cargo.toml` زیر استفاده کنید:" #: src/concurrency/sync-exercises/dining-philosophers.md:65 msgid "" @@ -18926,6 +18943,12 @@ msgid "" "edition = \"2021\"\n" "```" msgstr "" +"```toml\n" +"[package]\n" +"name = \"dining-philosophers\"\n" +"version = \"0.1.0\"\n" +"edition = \"2021\"\n" +"```" #: src/concurrency/sync-exercises/link-checker.md:3 msgid "" @@ -18934,6 +18957,10 @@ msgid "" "should recursively check other pages on the same domain and keep doing this " "until all pages have been validated." msgstr "" +"اجازه دهید از دانش جدید خود برای ایجاد یک جستجوگر لینک multi-thread استفاده " +"کنیم. باید از یک صفحه وب شروع شود و بررسی کنید که لینک‌های موجود در صفحه " +"معتبر هستند. باید به‌صورت بازگشتی صفحات دیگر را در همان دامنه بررسی کند و این " +"کار را تا زمانی که همه صفحات تأیید نشده‌اند ادامه دهد." #: src/concurrency/sync-exercises/link-checker.md:8 msgid "" @@ -18942,21 +18969,32 @@ msgid "" "(https://docs.rs/scraper/). Finally, we'll need some way of handling errors, " "we will use [`thiserror`](https://docs.rs/thiserror/)." msgstr "" +"برای این کار به یک کلاینت HTTP مانند [`reqwest`](https://docs.rs/reqwest/) " +"نیاز دارید. شما همچنین به راهی برای یافتن لینک‌ها نیاز دارید، ما می توانیم از " +"[`reqwest`](https://docs.rs/reqwest/) استفاده کنیم. در نهایت، ما به روشی " +"برای رسیدگی به خطاها نیاز داریم پس درنتیجه از [`thiserror`](https://docs.rs/" +"thiserror/) استفاده خواهیم کرد." #: src/concurrency/sync-exercises/link-checker.md:12 +#, fuzzy msgid "Create a new Cargo project and `reqwest` it as a dependency with:" msgstr "" +"یک پروژه Cargo جدید ایجاد کنید و آن را به عنوان یک وابستگی با `reqwest` " +"اعلام کنید:" #: src/concurrency/sync-exercises/link-checker.md:22 msgid "" "If `cargo add` fails with `error: no such subcommand`, then please edit the " "`Cargo.toml` file by hand. Add the dependencies listed below." msgstr "" +"اگر`cargo add` با `error: no such subcommand` ناموفق بود، لطفاً فایل `Cargo." +"toml` را دستی ویرایش کنید و وابستگی‌های ذکر شده در زیر را اضافه کنید." #: src/concurrency/sync-exercises/link-checker.md:25 msgid "" "The `cargo add` calls will update the `Cargo.toml` file to look like this:" msgstr "" +"فراخوانی‌ها `cargo add` را در فایل `Cargo.toml` به‌صورت زیر به‌روزرسانی می‌کند:" #: src/concurrency/sync-exercises/link-checker.md:29 msgid "" @@ -18974,64 +19012,84 @@ msgid "" "thiserror = \"1.0.37\"\n" "```" msgstr "" +"```toml\n" +"[package]\n" +"name = \"link-checker\"\n" +"version = \"0.1.0\"\n" +"edition = \"2021\"\n" +"publish = false\n" +"\n" +"[dependencies]\n" +"reqwest = { version = \"0.11.12\", features = [\"blocking\", \"rustls-" +"tls\"] }\n" +"scraper = \"0.13.0\"\n" +"thiserror = \"1.0.37\"\n" +"```" #: src/concurrency/sync-exercises/link-checker.md:42 msgid "" "You can now download the start page. Try with a small site such as `https://" "www.google.org/`." msgstr "" +"اکنون می توانید صفحه شروع را دانلود کنید. با یک سایت کوچک مانند `https://www." +"google.org/` امتحان کنید." #: src/concurrency/sync-exercises/link-checker.md:45 msgid "Your `src/main.rs` file should look something like this:" -msgstr "" +msgstr "فایل `src/main.rs` شما باید چیزی شبیه به این باشد:" #: src/concurrency/sync-exercises/link-checker.md:57 #: src/concurrency/sync-exercises/solutions.md:93 msgid "\"request error: {0}\"" -msgstr "" +msgstr "\"request error: {0}\"" #: src/concurrency/sync-exercises/link-checker.md:59 #: src/concurrency/sync-exercises/solutions.md:95 +#, fuzzy msgid "\"bad http response: {0}\"" -msgstr "" +msgstr "\"bad http response: {0}\"" #: src/concurrency/sync-exercises/link-checker.md:70 #: src/concurrency/sync-exercises/solutions.md:106 msgid "\"Checking {:#}\"" -msgstr "" +msgstr "\"بررسی {:#}\"" #: src/concurrency/sync-exercises/link-checker.md:88 #: src/concurrency/sync-exercises/solutions.md:124 msgid "\"href\"" -msgstr "" +msgstr "\"href\"" #: src/concurrency/sync-exercises/link-checker.md:95 #: src/concurrency/sync-exercises/solutions.md:131 +#, fuzzy msgid "\"On {base_url:#}: ignored unparsable {href:?}: {err}\"" -msgstr "" +msgstr "\"On {base_url:#}: ignored unparsable {href:?}: {err}\"" #: src/concurrency/sync-exercises/link-checker.md:104 #: src/concurrency/sync-exercises/solutions.md:241 msgid "\"https://www.google.org\"" -msgstr "" +msgstr "\"https://www.google.org\"" #: src/concurrency/sync-exercises/link-checker.md:107 msgid "\"Links: {links:#?}\"" -msgstr "" +msgstr "\"Links: {links:#?}\"" #: src/concurrency/sync-exercises/link-checker.md:108 msgid "\"Could not extract links: {err:#}\"" -msgstr "" +msgstr "\"نمی‌تواند لینک را باز کند: {err:#}\"" #: src/concurrency/sync-exercises/link-checker.md:113 msgid "Run the code in `src/main.rs` with" -msgstr "" +msgstr "این کد را در `src/main.rs` اجرا کنید" #: src/concurrency/sync-exercises/link-checker.md:121 msgid "" "Use threads to check the links in parallel: send the URLs to be checked to a " "channel and let a few threads check the URLs in parallel." msgstr "" +"برای بررسی موازی لینک‌ها از threadها استفاده کنید: URLهایی را که باید بررسی " +"شوند به یک channel ارسال کنید و اجازه دهید چند thread به‌صورت موازی URLها را " +"بررسی کنند." #: src/concurrency/sync-exercises/link-checker.md:123 msgid "" @@ -19039,48 +19097,61 @@ msgid "" "org` domain. Put an upper limit of 100 pages or so so that you don't end up " "being blocked by the site." msgstr "" +"این را به صورت بازگشتی پیوندها گسترش دهید تا از همه صفحات را در دامنه «www." +"google.org» استخراج کنید. حد بالا را حدود ۱۰۰ صفحه یا بیشتر قرار دهید تا در " +"نهایت توسط سایت مسدود نشوید." #: src/concurrency/sync-exercises/solutions.md:27 msgid "\"{} is trying to eat\"" -msgstr "" +msgstr "\"{} is trying to eat\"" #: src/concurrency/sync-exercises/solutions.md:51 +#, fuzzy msgid "" "// To avoid a deadlock, we have to break the symmetry\n" " // somewhere. This will swap the forks without deinitializing\n" " // either of them.\n" msgstr "" +"// To avoid a deadlock, we have to break the symmetry\n" +" // somewhere. This will swap the forks without deinitializing\n" +" // either of them.\n" #: src/concurrency/sync-exercises/solutions.md:75 msgid "\"{thought}\"" -msgstr "" +msgstr "\"{thought}\"" #: src/concurrency/sync-exercises/solutions.md:80 msgid "Link Checker" -msgstr "" +msgstr "جستجوگر Link" #: src/concurrency/sync-exercises/solutions.md:150 +#, fuzzy msgid "" "/// Determine whether links within the given page should be extracted.\n" msgstr "" +"/// Determine whether links within the given page should be extracted.\n" #: src/concurrency/sync-exercises/solutions.md:158 +#, fuzzy msgid "" "/// Mark the given page as visited, returning false if it had already\n" " /// been visited.\n" msgstr "" +"/// Mark the given page as visited, returning false if it had already\n" +" /// been visited.\n" #: src/concurrency/sync-exercises/solutions.md:184 +#, fuzzy msgid "// The sender got dropped. No more commands coming in.\n" -msgstr "" +msgstr "// The sender got dropped. No more commands coming in.\n" #: src/concurrency/sync-exercises/solutions.md:225 msgid "\"Got crawling error: {:#}\"" -msgstr "" +msgstr "\"خطای crawling دریافت شد: {:#}\"" #: src/concurrency/sync-exercises/solutions.md:243 msgid "\"Bad URLs: {:#?}\"" -msgstr "" +msgstr "\"Bad URLs: {:#?}\"" #: src/concurrency/welcome-async.md msgid ""