Skip to content

Commit

Permalink
Update ValidationCommand.php
Browse files Browse the repository at this point in the history
  • Loading branch information
AidasK authored Apr 11, 2022
1 parent 9c77648 commit e1a46b5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Console/ValidationCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ private function validatePlaceholders($targetTranslations, $baseTranslations, $l
{
$this->info('Searching for missing placeholers...');
foreach (LangListService::validatePlaceholders($targetTranslations, $baseTranslations) as $errors) {
$this->warn("resources/lang/$locale/{$errors['group']}.php {$errors['key']} is missing \"{$errors['placeholder']}\".");
$this->warn("lang/$locale/{$errors['group']}.php {$errors['key']} is missing \"{$errors['placeholder']}\".");
$this->info($errors['translation'], 'v');
$this->info($errors['baseTranslation'], 'vv');
}
Expand All @@ -91,7 +91,7 @@ private function validateHTML($targetTranslations, $baseTranslations, $locale)
{
$this->info('Searching for HTML differences...');
foreach (LangListService::validateHTML($targetTranslations, $baseTranslations) as $errors) {
$this->warn("resources/lang/$locale/{$errors['group']}.php {$errors['key']} is missing \"{$errors['tag']}\" html tag.");
$this->warn("lang/$locale/{$errors['group']}.php {$errors['key']} is missing \"{$errors['tag']}\" html tag.");
$this->info($errors['translation'], 'v');
$this->info($errors['baseTranslation'], 'vv');
}
Expand All @@ -102,12 +102,12 @@ private function showMissing($targetTranslations, $baseTranslations, $locale)
$this->info('Searching for missing keys...');
foreach ($baseTranslations as $group => $translations) {
if (!isset($targetTranslations[$group])) {
$this->warn("resources/lang/$locale/$group.php entire group is missing");
$this->warn("lang/$locale/$group.php entire group is missing");
continue;
}
foreach ($translations as $key => $translation) {
if (!empty($baseTranslations[$group][$key]) && !isset($targetTranslations[$group][$key])) {
$this->warn("resources/lang/$locale/$group.php $key is missing");
$this->warn("lang/$locale/$group.php $key is missing");
}
}
}
Expand Down

0 comments on commit e1a46b5

Please sign in to comment.