mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Localize item amount
This commit is contained in:
parent
127c0ce0aa
commit
009ca07303
1
assets/voxygen/i18n/en/item/common.ftl
Normal file
1
assets/voxygen/i18n/en/item/common.ftl
Normal file
@ -0,0 +1 @@
|
||||
items-common-amount = Amount: { $amount }
|
@ -577,9 +577,14 @@ impl<'a> Widget for ItemTooltip<'a> {
|
||||
.color(quality)
|
||||
.set(state.ids.title, ui);
|
||||
|
||||
let amount = i18n.get_msg_ctx(
|
||||
"items-common-amount",
|
||||
&i18n::fluent_args! { "amount" => self.item.amount().get() },
|
||||
);
|
||||
|
||||
// Amount
|
||||
let (subtitle_relative_id, spacing) = if self.item.amount().get() > 1 {
|
||||
widget::Text::new(&format!("Amount: {}", self.item.amount().get()))
|
||||
widget::Text::new(&amount)
|
||||
.w(title_w)
|
||||
.graphics_for(id)
|
||||
.parent(id)
|
||||
|
Loading…
Reference in New Issue
Block a user