feat: lang middleware and filament translations
This commit is contained in:
@@ -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'),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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'),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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'),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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'),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user