diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-01-10 20:56:54 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-10 20:56:54 -0400 |
commit | 13c81e08805b1de24119c589872dc594af588dcf (patch) | |
tree | f23afc29f3e5da987bb9757d042f827e5fe50eb5 /src/misc-templates.js | |
parent | 41d35c9b3c22b20cf3291563d299b9d1f347927d (diff) | |
parent | 7f6d21d480e22765f438d5a80227f89c416b770b (diff) |
Merge pull request #134 from hsmusic/url-path-cleanup
URL & path utilities cleanup
Diffstat (limited to 'src/misc-templates.js')
-rw-r--r-- | src/misc-templates.js | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/misc-templates.js b/src/misc-templates.js index 6659d72b..7cfdc86c 100644 --- a/src/misc-templates.js +++ b/src/misc-templates.js @@ -968,15 +968,13 @@ function unbound_generateStickyHeadingContainer({ // Footer stuff -function unbound_getFooterLocalizationLinks(pathname, { +function unbound_getFooterLocalizationLinks({ html, defaultLanguage, language, languages, + pagePath, to, - - pageSubKey, - urlArgs, }) { const links = Object.entries(languages) .filter(([code, language]) => code !== 'default' && !language.hidden) @@ -989,11 +987,12 @@ function unbound_getFooterLocalizationLinks(pathname, { href: language === defaultLanguage ? to( - 'localizedDefaultLanguage.' + pageSubKey, - ...urlArgs) + 'localizedDefaultLanguage.' + pagePath[0], + ...pagePath.slice(1)) : to( - 'localizedWithBaseDirectory.' + pageSubKey, - language.code, ...urlArgs), + 'localizedWithBaseDirectory.' + pagePath[0], + language.code, + ...pagePath.slice(1)), }, language.name))); |