From 5864ee90ff9ac5e0bf6e79ae98a2431eda51089d Mon Sep 17 00:00:00 2001 From: javad-jafari <65780584+javad-jafari@users.noreply.github.com> Date: Fri, 6 Sep 2024 00:41:59 +0330 Subject: [PATCH] fa: add src/user-defined-types/named-structs (#2351) Co-authored-by: Danny Khosravi --- po/fa.po | 58 ++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 37 insertions(+), 21 deletions(-) diff --git a/po/fa.po b/po/fa.po index cbe022e5..423e42f6 100644 --- a/po/fa.po +++ b/po/fa.po @@ -247,11 +247,11 @@ msgstr "Enums" #: src/SUMMARY.md src/user-defined-types.md msgid "Static" -msgstr "" +msgstr "Static" #: src/SUMMARY.md msgid "Const" -msgstr "" +msgstr "Const" #: src/SUMMARY.md src/user-defined-types.md src/user-defined-types/aliases.md:1 msgid "Type Aliases" @@ -4376,24 +4376,24 @@ msgstr "`str&` تکه‌ای از بایت‌های رمزگذاری‌شده UT #: src/references/strings.md:17 src/std-traits/read-and-write.md:36 msgid "\"World\"" -msgstr "" +msgstr "\"World\"" #: src/references/strings.md:18 msgid "\"s1: {s1}\"" -msgstr "" +msgstr "\"s1: {s1}\"" #: src/references/strings.md:20 msgid "\"Hello \"" -msgstr "" +msgstr "\"Hello \"" #: src/references/strings.md:21 src/references/strings.md:23 #: src/memory-management/move.md:9 msgid "\"s2: {s2}\"" -msgstr "" +msgstr "\"s2: {s2}\"" #: src/references/strings.md:26 msgid "\"s3: {s3}\"" -msgstr "" +msgstr "\"s3: {s3}\"" #: src/references/strings.md:33 msgid "" @@ -4495,38 +4495,43 @@ msgid "" "square\n" "// root, like `v.sqrt()`.\n" msgstr "" +"// اندازه یک بردار را با جمع مربعات مختصات آن محاسبه کنید\n" +"// و سپس جذر آن را بگیرید. از متد `sqrt()` برای محاسبه جذر استفاده کنید، مثل " +"`v.sqrt()`.\n" #: src/references/exercise.md:15 msgid "" "// Normalize a vector by calculating its magnitude and dividing all of its\n" "// coordinates by that magnitude.\n" msgstr "" +"// یک بردار را با محاسبه اندازه‌ی آن و تقسیم تمام مختصات آن\n" +"// بر آن اندازه، نرمال‌سازی کنید.\n" #: src/references/exercise.md:23 msgid "// Use the following `main` to test your work.\n" -msgstr "" +msgstr "// از `main` زیر برای تست کار خود استفاده کنید.\n" #: src/references/exercise.md:27 src/references/solution.md:22 msgid "\"Magnitude of a unit vector: {}\"" -msgstr "" +msgstr "\"اندازه‌ی یک بردار واحد: {}\"" #: src/references/exercise.md:30 src/references/solution.md:25 msgid "\"Magnitude of {v:?}: {}\"" -msgstr "" +msgstr "\"اندازه‌ی {v:?}: {}\"" #: src/references/exercise.md:32 src/references/solution.md:27 msgid "\"Magnitude of {v:?} after normalization: {}\"" -msgstr "" +msgstr "\"اندازه‌ی {v:?} پس از نرمال‌سازی: {}\"" #: src/references/solution.md:4 msgid "/// Calculate the magnitude of the given vector.\n" -msgstr "" +msgstr "/// اندازه‌ی بردار داده شده را محاسبه کنید.\n" #: src/references/solution.md:12 msgid "" "/// Change the magnitude of the vector to 1.0 without changing its " "direction.\n" -msgstr "" +msgstr "/// اندازه‌ی بردار را به 1.0 تغییر دهید بدون اینکه جهت آن تغییر کند.\n" #: src/user-defined-types.md src/methods-and-traits.md src/lifetimes.md msgid "This segment should take about 50 minutes. It contains:" @@ -4534,24 +4539,24 @@ msgstr "این بخش حدود ۵۰ دقیقه طول خواهد کشید. شا #: src/user-defined-types/named-structs.md:3 msgid "Like C and C++, Rust has support for custom structs:" -msgstr "" +msgstr "‏مانند C و C++، زبان Rust از ساختارهای سفارشی پشتیبانی می‌کند:" #: src/user-defined-types/named-structs.md:12 msgid "\"{} is {} years old\"" -msgstr "" +msgstr "‏\"{} {} ساله است\"" #: src/user-defined-types/named-structs.md:16 #: src/android/interoperability/with-c/bindgen.md:87 msgid "\"Peter\"" -msgstr "" +msgstr "\"پیتر\"" #: src/user-defined-types/named-structs.md:22 msgid "\"Avery\"" -msgstr "" +msgstr "\"ایوری\"" #: src/user-defined-types/named-structs.md:27 msgid "\"Jackie\"" -msgstr "" +msgstr "\"جکی\"" #: src/user-defined-types/named-structs.md:35 #: src/user-defined-types/enums.md:29 src/pattern-matching/match.md:38 @@ -4561,21 +4566,23 @@ msgstr "نکات کلیدی:" #: src/user-defined-types/named-structs.md:37 msgid "Structs work like in C or C++." -msgstr "" +msgstr "‏ساختارها (Structs) در Rust مانند C یا C++ عمل می‌کنند." #: src/user-defined-types/named-structs.md:38 msgid "Like in C++, and unlike in C, no typedef is needed to define a type." -msgstr "" +msgstr "‏مانند C++ و برخلاف C، برای تعریف یک نوع نیازی به `typedef` نیست." #: src/user-defined-types/named-structs.md:39 msgid "Unlike in C++, there is no inheritance between structs." -msgstr "" +msgstr "‏برخلاف C++، در Rust بین ساختارها ارث‌بری وجود ندارد." #: src/user-defined-types/named-structs.md:40 msgid "" "This may be a good time to let people know there are different types of " "structs." msgstr "" +"این زمان مناسبی است تا به مردمان اطلاع دهیم که انواع مختلفی از ساختارها وجود " +"دارد." #: src/user-defined-types/named-structs.md:42 msgid "" @@ -4583,18 +4590,25 @@ msgid "" "trait on some type but don’t have any data that you want to store in the " "value itself." msgstr "" +"ساختارهای بدون اندازه (مانند `struct Foo;`) ممکن است زمانی استفاده شوند که " +"می‌خواهید یک صفت (trait) را بر روی یک نوع پیاده‌سازی کنید، اما داده‌ای ندارید " +"که بخواهید در خود مقدار ذخیره کنید." #: src/user-defined-types/named-structs.md:45 msgid "" "The next slide will introduce Tuple structs, used when the field names are " "not important." msgstr "" +"اسلاید بعدی ساختارهای تاپل (Tuple structs) را معرفی خواهد کرد، که زمانی " +"استفاده می‌شوند که نام فیلدها مهم نیستند." #: src/user-defined-types/named-structs.md:47 msgid "" "If you already have variables with the right names, then you can create the " "struct using a shorthand." msgstr "" +"اگر از قبل متغیرهایی با نام‌های مناسب دارید، می‌توانید ساختار را با استفاده از " +"یک روش میانبر ایجاد کنید." #: src/user-defined-types/named-structs.md:49 msgid "" @@ -4602,6 +4616,8 @@ msgid "" "old struct without having to explicitly type it all out. It must always be " "the last element." msgstr "" +"سینتکس `..avery` به ما اجازه می‌دهد که اکثر فیلدها را از ساختار قدیمی کپی " +"کنیم بدون اینکه همه آن‌ها را صریحاً تایپ کنیم. این باید همیشه آخرین عنصر باشد." #: src/user-defined-types/tuple-structs.md:7 msgid "If the field names are unimportant, you can use a tuple struct:"