use sitename rather than projectname in documentation

This commit is contained in:
Mike Macgirvin 2024-05-20 10:20:56 +10:00
parent 64ec20239d
commit 814784cc20
2 changed files with 6 additions and 3 deletions

View file

@ -226,7 +226,10 @@ function t($s, $ctx = '')
function translate_projectname($s)
{
if (str_contains($s, 'rojectname')) {
return str_replace([ '$projectname','$Projectname' ], [ System::get_project_name(), ucfirst(System::get_project_name()) ], $s);
$s = str_replace([ '$projectname','$Projectname' ], [ System::get_project_name(), ucfirst(System::get_project_name()) ], $s);
}
if (str_contains($s, 'itename')) {
$s = str_replace([ '$sitename','$Sitename' ], [ System::get_site_name(), ucfirst(System::get_site_name()) ], $s);
}
return $s;
}

View file

@ -39,7 +39,7 @@ class Help extends Controller
$o .= '<li><a href="help/' . (($path) ? $path . '/' : '') . $fname . '" >' . ucwords(str_replace('_', ' ', notags($fname))) . '</a><br>'
. '<b><i>' . 'help/' . (($path) ? $path . '/' : '') . $fname . '</i></b><br>'
. '...' . str_replace('$Projectname', System::get_platform_name(), $rr['text']) . '...<br><br></li>';
. '...' . str_replace(['$sitename', '$Projectname'], [System::get_site_name(), System::get_project_name()], $rr['text']) . '...<br><br></li>';
}
$o .= '</ul>';
$o .= '</div>';
@ -135,7 +135,7 @@ class Help extends Controller
}
return replace_macros(Theme::get_template('help.tpl'), [
'$title' => t('$Projectname Documentation'),
'$title' => t('$sitename Documentation'),
'$tocHeading' => t('Contents'),
'$content' => $content,
'$heading' => $heading,