1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-01 12:24:28 +01:00

(i18n) translate new errors

This commit is contained in:
Sylvain 2023-01-04 16:17:37 +01:00
parent bbaac2c122
commit cdc7dc963d
4 changed files with 5 additions and 3 deletions

View File

@ -41,7 +41,7 @@ class CartItem::PrepaidPack < CartItem::BaseItem
return false return false
end end
if pack.group_id != customer.group_id if pack.group_id != customer.group_id
errors.add(:group, "pack is reserved for members of group #{pack.group.name}") errors.add(:group, I18n.t('cart_item_validation.pack_group', { GROUP: pack.group.name }))
return false return false
end end
true true

View File

@ -72,7 +72,7 @@ class CartItem::Reservation < CartItem::BaseItem
end end
if slot.full? if slot.full?
errors.add(:slot, I18n.t('cart_item_validation.full') errors.add(:slot, I18n.t('cart_item_validation.full'))
return false return false
end end

View File

@ -38,7 +38,7 @@ class CartItem::Subscription < CartItem::BaseItem
return false return false
end end
if plan.group_id != customer.group_id if plan.group_id != customer.group_id
errors.add(:group, "plan is reserved for members of group #{plan.group.name}") errors.add(:group, I18n.t('cart_item_validation.plan_group', { GROUP: plan.group.name }))
return false return false
end end
true true

View File

@ -517,8 +517,10 @@ en:
deadline: "You can't reserve a slot %{MINUTES} minutes prior to its start" deadline: "You can't reserve a slot %{MINUTES} minutes prior to its start"
restricted: "This availability is restricted for subscribers" restricted: "This availability is restricted for subscribers"
plan: "This subscription plan is disabled" plan: "This subscription plan is disabled"
plan_group: "This subscription plan is reserved for members of group %{GROUP}"
reserved: "This slot is already reserved" reserved: "This slot is already reserved"
pack: "This prepaid pack is disabled" pack: "This prepaid pack is disabled"
pack_group: "This prepaid pack is reserved for members of group %{GROUP}"
space: "This space is disabled" space: "This space is disabled"
machine: "This machine is disabled" machine: "This machine is disabled"
reservable: "This machine is not reservable" reservable: "This machine is not reservable"