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