Refactor SMS and Coupon resources to utilize localization for labels and messages, enhancing internationalization support. Update .env.example to change APP_LOCALE to 'tk'.
This commit is contained in:
@@ -55,11 +55,16 @@ class SmsMessageAnalyzer
|
||||
$parts = $this->estimatedParts($message);
|
||||
|
||||
if ($parts === 0) {
|
||||
return '0 characters';
|
||||
return __('filament.sms_analyzer.zero_characters');
|
||||
}
|
||||
|
||||
$partLabel = $parts === 1 ? '1 SMS' : "{$parts} SMS";
|
||||
$smsLabel = $parts === 1
|
||||
? __('filament.sms_analyzer.one_sms')
|
||||
: __('filament.sms_analyzer.multiple_sms', ['count' => $parts]);
|
||||
|
||||
return "{$characters} characters · {$partLabel}";
|
||||
return __('filament.sms_analyzer.characters_sms', [
|
||||
'characters' => $characters,
|
||||
'sms' => $smsLabel,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user