🔀 Merge branch 'release/v82'
[Sone.git] / src / main / kotlin / net / pterodactylus / sone / web / pages / ViewSonePage.kt
index 189b3eb..efaee3f 100644 (file)
@@ -14,8 +14,9 @@ import javax.inject.*
  * Lets the user browser another Sone.
  */
 @TemplatePath("/templates/viewSone.html")
+@ToadletPath("viewSone.html")
 class ViewSonePage @Inject constructor(webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer) :
-               SoneTemplatePage("viewSone.html", webInterface, loaders, templateRenderer) {
+               SoneTemplatePage(webInterface, loaders, templateRenderer) {
 
        override fun handleRequest(soneRequest: SoneRequest, templateContext: TemplateContext) {
                templateContext["soneId"] = soneRequest.parameters["sone"]
@@ -50,7 +51,7 @@ class ViewSonePage @Inject constructor(webInterface: WebInterface, loaders: Load
 
        override fun getPageTitle(soneRequest: SoneRequest): String =
                        soneRequest.parameters["sone"]!!.let(soneRequest.core::getSone)?.let { sone ->
-                               "${SoneAccessor.getNiceName(sone)} - ${soneRequest.l10n.getString("Page.ViewSone.Title")}"
-                       } ?: soneRequest.l10n.getString("Page.ViewSone.Page.TitleWithoutSone")
+                               "${SoneAccessor.getNiceName(sone)} - ${translation.translate("Page.ViewSone.Title")}"
+                       } ?: translation.translate("Page.ViewSone.Page.TitleWithoutSone")
 
 }