Fix translation when using a custom baseURL

When the baseURL is not / using $translation.URL is ignoring the baseURL. In order to sort this behavior, $translation.Permalink is working just fine.
This commit is contained in:
Pierre Adam 2019-01-30 01:55:40 +01:00 committed by Matthew Taylor
parent 07addb4c99
commit 2dbd46d4ec

View file

@ -57,9 +57,9 @@
{{ if eq $translation.Lang .Lang }} {{ if eq $translation.Lang .Lang }}
{{ $selected := false }} {{ $selected := false }}
{{ if eq $pageLang .Lang}} {{ if eq $pageLang .Lang}}
<option id="{{ $translation.Language }}" value="{{ $translation.URL }}" selected>{{ .LanguageName }}</option> <option id="{{ $translation.Language }}" value="{{ $translation.Permalink }}" selected>{{ .LanguageName }}</option>
{{ else }} {{ else }}
<option id="{{ $translation.Language }}" value="{{ $translation.URL }}">{{ .LanguageName }}</option> <option id="{{ $translation.Language }}" value="{{ $translation.Permalink }}">{{ .LanguageName }}</option>
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ end }} {{ end }}