private function renderResources($resourcesMap)
{
$s = '';
$h = 'htmlSpecialChars';
ksort($resourcesMap);
foreach ($resourcesMap as $locale => $resources) {
foreach ($resources as $resourcePath => $domain) {
$s .= '<tr>';
$s .= '<td>' . $h($locale) . '</td>';
$s .= '<td>' . $h($domain) . '</td>';
$relativePath = str_replace(rtrim($this->rootDir, '/') . '/', '', $resourcePath);
if (Nette\Utils\Strings::startsWith($relativePath, 'vendor/')) {
$parts = explode('/', $relativePath, 4);
$left = array_pop($parts);
$relativePath = $h(implode('/', $parts) . '/.../') . '<b>' . $h(basename($left)) . '</b>';
} else {
$relativePath = $h(dirname($relativePath)) . '/<b>' . $h(basename($relativePath)) . '</b>';
}
$s .= '<td>' . self::editorLink($resourcePath, 1, $relativePath) . '</td>';
$s .= '</tr>';
}
}
return '<table style="width:100%"><tr><th>Locale</th><th>Domain</th><th>Resource filename</th></tr>' . $s . '</table>';
}