Merge missing translations (#10355)
* Merge missing translations * Disable Norwegian
This commit is contained in:
committed by
k8s-ci-robot
parent
4b77af7466
commit
32014f94b3
+22
-12
@@ -1,27 +1,37 @@
|
||||
<a class="item" data-title="{{ .LinkTitle }}" href="{{ .RelPermalink }}"></a>
|
||||
{{ template "section-tree-nav" . }}
|
||||
{{ template "section-tree-nav" (dict "ctx" . "section" .) }}
|
||||
{{ define "section-tree-nav" }}
|
||||
{{ $sections := where (union .Pages .Sections).ByWeight ".Params.toc_hide" "!=" true }}
|
||||
{{ $pages := (union .section.Pages .section.Sections) }}
|
||||
{{ with $.ctx.Site.Params.language_alternatives }}
|
||||
{{ range . }}
|
||||
{{ with (where $.section.Translations ".Lang" . ) }}
|
||||
{{ $p := index . 0 }}
|
||||
{{ $pages = $pages | lang.Merge (union $p.Pages $p.Sections) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ $sections := where $pages.ByWeight ".Params.toc_hide" "!=" true }}
|
||||
{{ range $sections }}
|
||||
{{ if .IsPage }}
|
||||
{{ template "section-tree-nav-page" . }}
|
||||
{{ template "section-tree-nav-page" (dict "ctx" $.ctx "page" .) }}
|
||||
{{ else }}
|
||||
{{ template "section-tree-nav-section" . }}
|
||||
{{ template "section-tree-nav-section" (dict "ctx" $.ctx "section" .) }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ define "section-tree-nav-section" }}
|
||||
<div class="item" data-title="{{ .LinkTitle }}">
|
||||
<div class="container">
|
||||
{{ if ge (len .Content) 10 }}
|
||||
<div class="item" data-title="{{ .section.LinkTitle }}">
|
||||
<div class="container">
|
||||
{{ if ge (len .section.Content) 10 }}
|
||||
{{/* The section page has content, so link to it. */}}
|
||||
<a class="item" data-title="{{ .LinkTitle }}" href="{{ .RelPermalink }}"></a>
|
||||
{{ $isForeignLanguage := (ne .section.Lang $.ctx.Lang)}}
|
||||
<a class="item" {{ if $isForeignLanguage }}target="_blank" {{ end }}data-title="{{ .section.LinkTitle }}{{ if $isForeignLanguage }} <small>({{ .section.Lang | upper }})</small>{{ end }}" href="{{ .section.RelPermalink }}"></a>
|
||||
{{ end }}
|
||||
{{ template "section-tree-nav" . }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ define "section-tree-nav-page" }}
|
||||
<a class="item" data-title="{{ .LinkTitle }}" href="{{ .RelPermalink }}"></a>
|
||||
{{ end }}
|
||||
|
||||
{{ $isForeignLanguage := (ne .page.Lang $.ctx.Lang)}}
|
||||
<a class="item" {{ if $isForeignLanguage }}target="_blank" {{ end }}data-title="{{ .page.LinkTitle }}{{ if $isForeignLanguage }} <small>({{ .page.Lang | upper }})</small>{{ end }}" href="{{ .page.RelPermalink }}"></a>
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user