« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/misc-templates.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/misc-templates.js')
-rw-r--r--src/misc-templates.js15
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)));