-
Notifications
You must be signed in to change notification settings - Fork 262
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Goliath] Display translation keys duplicates in the translation key
- Loading branch information
Showing
2 changed files
with
11 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -263,7 +263,14 @@ protected function importTranslationFiles($finder) | |
|
||
foreach ($finder as $file) { | ||
$this->output->write(sprintf('Importing <comment>"%s"</comment> ... ', $file->getPathname())); | ||
$number = $importer->import($file, $this->input->getOption('force'), $this->input->getOption('merge')); | ||
$forceUpdate = $this->input->getOption('force'); | ||
list($domain, $locale, $extention) = explode('.', $file->getFilename()); | ||
if(strpos($domain, 'messages') !== false) { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
bartmcleod
Collaborator
|
||
if ($domain != 'messages') { | ||
$forceUpdate = true; | ||
} | ||
} | ||
$number = $importer->import($file, $forceUpdate, $this->input->getOption('merge')); | ||
$this->output->writeln(sprintf('%d translations', $number)); | ||
|
||
$skipped = $importer->getSkippedKeys(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Any domain that includes "messages" somewhere in the string will be affected. I want to suggest creating an implementation that addresses the specific problem, maybe through some (default) configuration, that states which domains to merge in which order. For example: