This commit is contained in:
E. S. 2024-04-21 01:49:13 +00:00
parent 9ddc847aee
commit 9876139a78
2 changed files with 2 additions and 2 deletions

View File

@ -221,7 +221,7 @@ function renderHeader(SkinContext $ctx,
bool $show_subtitle): string { bool $show_subtitle): string {
$icons = svg(); $icons = svg();
$items = []; $items = [];
$items[] = ['url' => '/articles/'.($articles_lang ? '?lang='.$articles_lang : ''), 'label' => 'articles', 'selected' => $section === 'articles']; $items[] = ['url' => '/articles/'.($articles_lang && $articles_lang != 'en' ? '?lang='.$articles_lang : ''), 'label' => 'articles', 'selected' => $section === 'articles'];
$items[] = ['url' => '/files/', 'label' => 'files', 'selected' => $section === 'files']; $items[] = ['url' => '/files/', 'label' => 'files', 'selected' => $section === 'files'];
$items[] = ['url' => '/info/', 'label' => 'about', 'selected' => $section === 'about']; $items[] = ['url' => '/info/', 'label' => 'about', 'selected' => $section === 'about'];
if (is_admin()) if (is_admin())

View File

@ -189,7 +189,7 @@ return [$html, js_markdownThemeChangeListener()];
function post_other_langs($ctx, $url, $other_langs) { function post_other_langs($ctx, $url, $other_langs) {
$buf = ''; $buf = '';
foreach ($other_langs as $lang) { foreach ($other_langs as $lang) {
$buf .= ' | <a href="'.$url.'?lang='.$lang.'">'.$ctx->lang('blog_read_in_'.$lang).'</a>'; $buf .= ' | <a href="'.$url.($lang != 'en' ? '?lang='.$lang : '').'">'.$ctx->lang('blog_read_in_'.$lang).'</a>';
} }
return $buf; return $buf;
} }