X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FWebInterface.java;h=e7ea688b771d87e146107c39124d001974bbd2e2;hp=125f4966aa270d5f36f0bbe5234dcc9849d243cb;hb=c9b4749797931ab804673640f4a15511900f150a;hpb=a10fb632973651096c8fdba923c932732d09eedc diff --git a/src/main/java/net/pterodactylus/sone/web/WebInterface.java b/src/main/java/net/pterodactylus/sone/web/WebInterface.java index 125f496..e7ea688 100644 --- a/src/main/java/net/pterodactylus/sone/web/WebInterface.java +++ b/src/main/java/net/pterodactylus/sone/web/WebInterface.java @@ -260,7 +260,7 @@ public class WebInterface implements SessionProvider { private final ElementLoader elementLoader; private final LinkedElementRenderFilter linkedElementRenderFilter; private final TimeTextConverter timeTextConverter = new TimeTextConverter(); - private final L10nFilter l10nFilter = new L10nFilter(this); + private final L10nFilter l10nFilter; /** The “new Sone” notification. */ private final ListNotification newSoneNotification; @@ -320,6 +320,7 @@ public class WebInterface implements SessionProvider { this.elementLoader = elementLoader; formPassword = sonePlugin.pluginRespirator().getToadletContainer().getFormPassword(); soneTextParser = new SoneTextParser(getCore(), getCore()); + l10nFilter = new L10nFilter(getL10n()); templateContextFactory = new TemplateContextFactory(); templateContextFactory.addAccessor(Object.class, new ReflectionAccessor()); @@ -337,7 +338,7 @@ public class WebInterface implements SessionProvider { templateContextFactory.addFilter("html", new HtmlFilter()); templateContextFactory.addFilter("replace", new ReplaceFilter()); templateContextFactory.addFilter("store", new StoreFilter()); - templateContextFactory.addFilter("l10n", new L10nFilter(this)); + templateContextFactory.addFilter("l10n", l10nFilter); templateContextFactory.addFilter("substring", new SubstringFilter()); templateContextFactory.addFilter("xml", new XmlFilter()); templateContextFactory.addFilter("change", new RequestChangeFilter());