Merge branch 'coffee-compiler/localize_map_shape' into 'master'

Localize map shape for world generation

See merge request veloren/veloren!4563
This commit is contained in:
Illia Denysenko 2024-08-24 08:23:04 +00:00
commit 9971aa26a4
2 changed files with 10 additions and 1 deletions

View File

@ -42,6 +42,8 @@ main-singleplayer-world_name = World name
main-singleplayer-map_scale = Vertical scaling
main-singleplayer-map_erosion_quality = Erosion quality
main-singleplayer-map_shape = Shape
main-singleplayer-map_shape-circle = Circle
main-singleplayer-map_shape-square = Square
main-singleplayer-play = Play
main-singleplayer-generate_and_play = Generate & Play
menu-singleplayer-confirm_delete = Are you sure you want to delete "{ $world_name }"?

View File

@ -436,7 +436,7 @@ impl Screen {
Row::with_children(vec![
Space::new(Length::FillPortion(5), Length::Units(0))
.into(),
Text::new(shape.to_string())
Text::new(i18n.get_msg(Self::map_kind_key(shape)))
.width(Length::FillPortion(95))
.size(fonts.cyri.scale(14))
.vertical_alignment(iced::VerticalAlignment::Center)
@ -667,4 +667,11 @@ impl Screen {
all.into()
}
}
fn map_kind_key(map_kind: MapKind) -> &'static str {
match map_kind {
MapKind::Circle => "main-singleplayer-map_shape-circle",
MapKind::Square => "main-singleplayer-map_shape-square",
}
}
}