Use English for verification error messages

Because the log page is more consistent in English.
This commit is contained in:
hkcomori 2025-04-02 09:34:47 +09:00
parent dc0e28d161
commit 4cd359cd22
No known key found for this signature in database
GPG key ID: 2B81E7499B8B974C
4 changed files with 2 additions and 8 deletions

View file

@ -78,7 +78,7 @@ final class ReadingTimeExtension extends Minz_Extension {
/** @throws Minz_ConfigurationParamException */ /** @throws Minz_ConfigurationParamException */
private function validateSpeed(int $speed): int { private function validateSpeed(int $speed): int {
if ($speed <= 0) { if ($speed <= 0) {
throw new Minz_ConfigurationParamException(_t('ext.reading_time.speed.invalid')); throw new Minz_ConfigurationParamException('Reading speed must be greater than 0');
} }
return $speed; return $speed;
} }
@ -90,7 +90,7 @@ final class ReadingTimeExtension extends Minz_Extension {
case 'letters': case 'letters':
return $metrics; return $metrics;
default: default:
throw new Minz_ConfigurationParamException(_t('ext.reading_time.metrics.invalid')); throw new Minz_ConfigurationParamException('Unsupported source metrics');
} }
} }
} }

View file

@ -5,14 +5,12 @@ return array(
'speed' => array( 'speed' => array(
'label' => 'Reading speed', 'label' => 'Reading speed',
'help' => 'Conversion factor to reading time from metrics', 'help' => 'Conversion factor to reading time from metrics',
'invalid' => 'Reading speed must be greater than 0',
), ),
'metrics' => array( 'metrics' => array(
'label' => 'Source metrics', 'label' => 'Source metrics',
'help' => 'Source of reading time calculation', 'help' => 'Source of reading time calculation',
'words' => 'Number of words', 'words' => 'Number of words',
'letters' => 'Number of letters', 'letters' => 'Number of letters',
'invalid' => 'Unsupported source metrics',
), ),
), ),
); );

View file

@ -5,14 +5,12 @@ return array(
'speed' => array( 'speed' => array(
'label' => 'Vitesse de lecture', 'label' => 'Vitesse de lecture',
'help' => 'Paramètre de calcul, dépendant de la méthode', 'help' => 'Paramètre de calcul, dépendant de la méthode',
'invalid' => 'La vitesse de lecture doit être supérieure à 0',
), ),
'metrics' => array( 'metrics' => array(
'label' => 'Méthodes', 'label' => 'Méthodes',
'help' => 'Méthode de calcul du temps de lecture', 'help' => 'Méthode de calcul du temps de lecture',
'words' => 'Nombre de mots', 'words' => 'Nombre de mots',
'letters' => 'Nombre de lettres', 'letters' => 'Nombre de lettres',
'invalid' => 'Méthode non prise en charge',
), ),
), ),
); );

View file

@ -5,14 +5,12 @@ return array(
'speed' => array( 'speed' => array(
'label' => '読書速度', 'label' => '読書速度',
'help' => '基準値を読書時間に変換する係数', 'help' => '基準値を読書時間に変換する係数',
'invalid' => '読書速度は0より大きい値でなければなりません',
), ),
'metrics' => array( 'metrics' => array(
'label' => '基準値', 'label' => '基準値',
'help' => '読書時間を推定する基準値', 'help' => '読書時間を推定する基準値',
'words' => '単語数', 'words' => '単語数',
'letters' => '文字数', 'letters' => '文字数',
'invalid' => 'サポートされていない基準値です',
), ),
), ),
); );