Skip to content

Commit

Permalink
FIX Correctly identify i18n yaml dir for colymba module (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli authored Aug 21, 2023
1 parent ba32165 commit 7886360
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Translator.php
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ private function log(string $message, bool $isVerbose = false): void
/**
* Gets the module lang dir
*/
private function getYmlLangDirectory(string $modulePath): string
private function getYmlLangDirectory(string $modulePath): ?string
{
$sources = $this->getTransifexSources($modulePath);
foreach ($sources as $source) {
Expand Down Expand Up @@ -599,7 +599,7 @@ private function getTransifexSources(string $modulePath): array
$content = file_get_contents($path);
$sources = [];
foreach (preg_split('#\R#u', $content) as $line) {
if (preg_match('#source_file\s=\s(?<path>\S+)#', $line, $matches)) {
if (preg_match('#source_file\s+=\s+(?<path>\S+)#', $line, $matches)) {
$sources[] = $matches['path'];
}
}
Expand Down

0 comments on commit 7886360

Please sign in to comment.