* Lets the user browser another Sone.
*/
@TemplatePath("/templates/viewSone.html")
-class ViewSonePage @Inject constructor(webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer):
- SoneTemplatePage("viewSone.html", webInterface, loaders, templateRenderer) {
+@ToadletPath("viewSone.html")
+class ViewSonePage @Inject constructor(webInterface: WebInterface, loaders: Loaders, templateRenderer: TemplateRenderer) :
+ SoneTemplatePage(webInterface, loaders, templateRenderer) {
override fun handleRequest(soneRequest: SoneRequest, templateContext: TemplateContext) {
templateContext["soneId"] = soneRequest.parameters["sone"]
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")
}