Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Persian translation #158

Merged
merged 13 commits into from
Apr 26, 2023
Binary file modified resources/fonts/full/sarasa-mono-sc-bold.ttf
Binary file not shown.
Binary file modified resources/fonts/full/sarasa-mono-sc-regular.ttf
Binary file not shown.
39 changes: 38 additions & 1 deletion resources/fonts/full/subset_characters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ z
υ
φ
χ
ψ
ω
ό
ύ
Expand Down Expand Up @@ -244,6 +243,44 @@ z
є
і
ї
،
؛
؟
آ
ئ
ا
ب
ت
ث
ج
ح
خ
د
ذ
ر
ز
س
ش
ص
ض
ط
ظ
ع
ف
ق
ل
م
ن
ه
و
ٔ
پ
چ
ک
گ
ی
۰
۳
Expand Down
Binary file modified resources/fonts/subset/sarasa-mono-sc-bold.subset.ttf
Binary file not shown.
Binary file modified resources/fonts/subset/sarasa-mono-sc-regular.subset.ttf
Binary file not shown.
82 changes: 82 additions & 0 deletions src/translations/translations.rs

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/translations/translations_2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ pub fn new_version_available_translation(language: Language) -> &'static str {
Language::IT => "Una versione più recente è disponibile su GitHub",
Language::RU => "Новая версия доступна на GitHub",
Language::EL => "Μια νεότερη έκδοση είναι διαθέσιμη στο GitHub",
Language::FA => "یک نسخه جدیدتر روی GitHub موجود است",
_ => "A newer version is available on GitHub",
}
}
15 changes: 12 additions & 3 deletions src/translations/types/language.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ pub enum Language {
RU,
/// Greek
EL,
/// Persian
FA,
}

impl Default for Language {
Expand All @@ -43,18 +45,24 @@ impl Language {
pub(crate) const COL1: [Language; 5] = [
Language::EN,
Language::ES,
Language::IT,
Language::PT,
Language::TR,
];
pub(crate) const COL2: [Language; 5] = [
Language::DE,
Language::FA,
Language::KO,
Language::RO,
Language::UK,
];
pub(crate) const COL2: [Language; 5] = [
Language::DE,
pub(crate) const COL3: [Language; 5] = [
Language::EL,
Language::FR,
Language::PL,
Language::RU,
Language::ZH,
];
pub(crate) const COL3: [Language; 4] = [Language::EL, Language::IT, Language::PT, Language::TR];

pub fn get_radio_label(&self) -> &str {
match self {
Expand All @@ -72,6 +80,7 @@ impl Language {
Language::RU => "Русский",
Language::PT => "Português",
Language::EL => "Ελληνικά",
Language::FA => "فارسی",
}
}
}
1 change: 1 addition & 0 deletions src/utils/countries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,7 @@ pub fn get_flag_from_language_code(language: &str) -> Image {
"TR" => TR,
"UK" => UA,
"EL" => GR,
"FA" => IR,
_ => UNKNOWN,
})))
.width(Length::Fixed(FLAGS_WIDTH))
Expand Down