Commit d803b6f4 by Qiang Xue

Fixes #1332: generate subdirectories when needed during message extraction process.

parent c4f7d024
......@@ -107,11 +107,13 @@ class MessageController extends Controller
@mkdir($dir);
}
foreach ($messages as $category => $msgs) {
$file = str_replace("\\", '/', "$dir/$category.php");
$path = dirname($file);
if (!is_dir($path)) {
mkdir($path, 0755, true);
}
$msgs = array_values(array_unique($msgs));
$this->generateMessageFile($msgs, $dir . DIRECTORY_SEPARATOR . $category . '.php',
$config['overwrite'],
$config['removeUnused'],
$config['sort']);
$this->generateMessageFile($msgs, $file, $config['overwrite'], $config['removeUnused'], $config['sort']);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment