feat: lang middleware and filament translations

This commit is contained in:
2026-05-21 14:57:52 +02:00
parent f24999d7fb
commit 52a2104fdf
16 changed files with 316 additions and 95 deletions
+3 -3
View File
@@ -13,9 +13,9 @@ enum PacePreference: string implements HasLabel
public function getLabel(): string
{
return match ($this) {
self::SLOW => 'Lent',
self::NORMAL => 'Normal',
self::FAST => 'Rapide',
self::SLOW => __('enums.pace_preference.slow'),
self::NORMAL => __('enums.pace_preference.normal'),
self::FAST => __('enums.pace_preference.fast'),
};
}
}
+5 -5
View File
@@ -15,11 +15,11 @@ enum PhysicalActivityLevel: string implements HasLabel
public function getLabel(): string
{
return match ($this) {
self::SEDENTARY => 'Sédentaire',
self::LIGHTLY_ACTIVE => 'Légèrement actif',
self::MODERATELY_ACTIVE => 'Modérément actif',
self::VERY_ACTIVE => 'Très actif',
self::ATHLETE => 'Athlète',
self::SEDENTARY => __('enums.physical_activity_level.sedentary'),
self::LIGHTLY_ACTIVE => __('enums.physical_activity_level.lightly_active'),
self::MODERATELY_ACTIVE => __('enums.physical_activity_level.moderately_active'),
self::VERY_ACTIVE => __('enums.physical_activity_level.very_active'),
self::ATHLETE => __('enums.physical_activity_level.athlete'),
};
}
}
+4 -4
View File
@@ -14,10 +14,10 @@ enum UserSex: string implements HasLabel
public function getLabel(): string
{
return match ($this) {
self::MAN => 'Homme',
self::WOMAN => 'Femme',
self::OTHER => 'Autre',
self::UNKNOWN => 'Non renseigné',
self::MAN => __('enums.user_sex.man'),
self::WOMAN => __('enums.user_sex.woman'),
self::OTHER => __('enums.user_sex.other'),
self::UNKNOWN => __('enums.user_sex.unknown'),
};
}
}
+3 -3
View File
@@ -13,9 +13,9 @@ enum WeightGoal: string implements HasLabel
public function getLabel(): string
{
return match ($this) {
self::LOSE_WEIGHT => 'Perdre du poids',
self::MAINTAIN_WEIGHT => 'Maintenir le poids',
self::GAIN_WEIGHT => 'Prendre du poids',
self::LOSE_WEIGHT => __('enums.weight_goal.lose_weight'),
self::MAINTAIN_WEIGHT => __('enums.weight_goal.maintain_weight'),
self::GAIN_WEIGHT => __('enums.weight_goal.gain_weight'),
};
}
}