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

Add Polish translation #78

Merged
merged 2 commits into from
Feb 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/enums/language.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ pub enum Language {
FR,
/// Spanish.
ES,
/// Polish.
PL,
}

impl Default for Language {
Expand All @@ -20,14 +22,21 @@ impl Default for Language {
}

impl Language {
pub(crate) const ALL: [Language; 4] = [Language::EN, Language::IT, Language::FR, Language::ES];
pub(crate) const ALL: [Language; 5] = [
Language::EN,
Language::IT,
Language::FR,
Language::ES,
Language::PL,
];

pub fn get_radio_label(&self) -> &str {
match self {
Language::EN => "English",
Language::IT => "Italiano",
Language::FR => "Français",
Language::ES => "Español",
Language::PL => "Polski",
}
}
}
2 changes: 1 addition & 1 deletion src/gui/pages/settings_language_page.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ pub fn settings_language_page(sniffer: &Sniffer) -> Container<Message> {
.push(vertical_space(Units(30)))
.push(Container::new(Text::new("Support for more languages will come with the next releases.\n\n\
If you want to help me translating the app in your native language, give a look at Sniffnet issues on GitHub.")
.width(Length::Units(450))
.width(Length::Units(600))
.font(font)).padding(10).style(<StyleTuple as Into<iced::theme::Container>>::into(
StyleTuple(sniffer.style, ElementType::BorderedRound),
)));
Expand Down
Loading