Skip to content

Commit

Permalink
Fix translation when using a custom baseURL
Browse files Browse the repository at this point in the history
When the baseURL is not / using $translation.URL is ignoring the baseURL. In order to sort this behavior, $translation.Permalink is working just fine.
  • Loading branch information
PierreAdam authored and matalo33 committed Mar 15, 2019
1 parent 07addb4 commit 2dbd46d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions layouts/partials/menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ <h3>{{ if not $disableShortcutsTitle}}{{ T "Shortcuts-Title"}}{{ end }}</h3>
{{ if eq $translation.Lang .Lang }}
{{ $selected := false }}
{{ 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 }}
<option id="{{ $translation.Language }}" value="{{ $translation.URL }}">{{ .LanguageName }}</option>
<option id="{{ $translation.Language }}" value="{{ $translation.Permalink }}">{{ .LanguageName }}</option>
{{ end }}
{{ end }}
{{ end }}
Expand Down

0 comments on commit 2dbd46d

Please sign in to comment.