public function actionReport($sourcePath, $translationPath, $title = 'Translation report')
    {
        $sourcePath = trim($sourcePath, '/\\');
        $translationPath = trim($translationPath, '/\\');

        $results = [];

        $dir = new DirectoryIterator($sourcePath);
        foreach ($dir as $fileinfo) {
            /* @var $fileinfo DirectoryIterator */
            if (!$fileinfo->isDot() && !$fileinfo->isDir()) {
                $translatedFilePath = $translationPath . '/' . $fileinfo->getFilename();
                $sourceFilePath = $sourcePath . '/' . $fileinfo->getFilename();

                $errors = $this->checkFiles($translatedFilePath);
                $diff = empty($errors) ? $this->getDiff($translatedFilePath, $sourceFilePath) : '';
                if (!empty($diff)) {
                    $errors[] = 'Translation outdated.';
                }

                $result = [
                    'errors' => $errors,
                    'diff' => $diff,
                ];

                $results[$fileinfo->getFilename()] = $result;
            }
        }

        // checking if there are obsolete translation files
        $dir = new DirectoryIterator($translationPath);
        foreach ($dir as $fileinfo) {
            /* @var $fileinfo \DirectoryIterator */
            if (!$fileinfo->isDot() && !$fileinfo->isDir()) {
                $translatedFilePath = $translationPath . '/' . $fileinfo->getFilename();

                $errors = $this->checkFiles(null, $translatedFilePath);
                if (!empty($errors)) {
                    $results[$fileinfo->getFilename()]['errors'] = $errors;
                }
            }
        }

        echo $this->renderFile(__DIR__ . '/views/translation/report_html.php', [
            'results' => $results,
            'sourcePath' => $sourcePath,
            'translationPath' => $translationPath,
            'title' => $title,
        ]);
    }