Use traditional getter name.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 5 Nov 2010 09:29:31 +0000 (10:29 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 5 Nov 2010 09:29:31 +0000 (10:29 +0100)
src/main/java/net/pterodactylus/sone/web/SoneTemplatePage.java
src/main/java/net/pterodactylus/sone/web/WebInterface.java
src/main/java/net/pterodactylus/sone/web/ajax/GetTranslationPage.java

index 1646935..f38e845 100644 (file)
@@ -73,7 +73,7 @@ public class SoneTemplatePage extends TemplatePage {
         *            Whether this page requires a login
         */
        public SoneTemplatePage(String path, Template template, String pageTitleKey, WebInterface webInterface, boolean requireLogin) {
-               super(path, template, webInterface.l10n(), pageTitleKey, "noPermission.html");
+               super(path, template, webInterface.getL10n(), pageTitleKey, "noPermission.html");
                this.webInterface = webInterface;
                this.requireLogin = requireLogin;
                template.set("webInterface", webInterface);
index 2ba96ec..c6dbca9 100644 (file)
@@ -120,7 +120,7 @@ public class WebInterface {
         *
         * @return The node’s l10n helper
         */
-       public BaseL10n l10n() {
+       public BaseL10n getL10n() {
                return sonePlugin.l10n().getBase();
        }
 
@@ -181,7 +181,7 @@ public class WebInterface {
                templateFactory.addAccessor(Reply.class, new ReplyAccessor(core()));
                templateFactory.addAccessor(Identity.class, new IdentityAccessor(core()));
                templateFactory.addFilter("date", new DateFilter());
-               templateFactory.addFilter("l10n", new L10nFilter(l10n()));
+               templateFactory.addFilter("l10n", new L10nFilter(getL10n()));
                templateFactory.addFilter("substring", new SubstringFilter());
                templateFactory.addFilter("xml", new XmlFilter());
                templateFactory.addFilter("change", new RequestChangeFilter());
index 68f1777..20f1636 100644 (file)
@@ -47,7 +47,7 @@ public class GetTranslationPage extends JsonPage {
        @Override
        protected JsonObject createJsonObject(Request request) {
                String key = request.getHttpRequest().getParam("key");
-               String translation = webInterface.l10n().getString(key);
+               String translation = webInterface.getL10n().getString(key);
                return new JsonObject().put("value", translation);
        }