Skip to content
This repository was archived by the owner on Jul 16, 2020. It is now read-only.

Fix locale association #121

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ private function allocateLocaleArray($path, $multiLocales = false)
{
$data = [];
$dir = new DirectoryIterator($path);
$lastLocale = last($this->availableLocales);

foreach ($dir as $fileinfo) {
// Do not mess with dotfiles at all.
if ($fileinfo->isDot()) {
Expand All @@ -222,6 +222,7 @@ private function allocateLocaleArray($path, $multiLocales = false)
} else {
$noExt = $this->removeExtension($fileinfo->getFilename());
$fileName = $path . DIRECTORY_SEPARATOR . $fileinfo->getFilename();
$lastLocale = basename(dirname($fileName));

// Ignore non *.php files (ex.: .gitignore, vim swap files etc.)
if (pathinfo($fileName, PATHINFO_EXTENSION) !== 'php') {
Expand Down