# HG changeset patch # User Mike Becker # Date 1590233681 -7200 # Node ID 192298f8161f57e8c5ec55ec3d2ddcd601d3a6cb # Parent 82f71fb1758ab3e2d6611762aaec580320ee1c3c bloat removal 1/3 - configurable resource keys diff -r 82f71fb1758a -r 192298f8161f src/main/java/de/uapcore/lightpit/LightPITModule.java --- a/src/main/java/de/uapcore/lightpit/LightPITModule.java Sat May 23 13:24:49 2020 +0200 +++ b/src/main/java/de/uapcore/lightpit/LightPITModule.java Sat May 23 13:34:41 2020 +0200 @@ -60,25 +60,6 @@ String modulePath(); /** - * Returns the properties key for the menu label. - *

- * Set this string to empty string, if the module should be hidden from - * the menu. - * - * @return the properties key - */ - String menuKey() default "menuLabel"; - - /** - * Returns the properties key for the page title. - *

- * By default this is the same as the menu label. - * - * @return the properties key - */ - String titleKey() default "menuLabel"; - - /** * If set to true, this module is always loaded, but never * visible in the menu or the Web UI module manager. * @@ -103,29 +84,18 @@ * are proxied by this object. */ class ELProxy { - private final String bundleBaseName, modulePath, menuKey, titleKey; + private final String bundleBaseName, modulePath; public ELProxy(LightPITModule annotation) { bundleBaseName = annotation.bundleBaseName(); modulePath = annotation.modulePath(); - menuKey = annotation.menuKey(); - titleKey = annotation.titleKey(); } public String getBundleBaseName() { return bundleBaseName; } - - public String getMenuKey() { - return menuKey; - } - public String getModulePath() { return modulePath; } - - public String getTitleKey() { - return titleKey; - } } } diff -r 82f71fb1758a -r 192298f8161f src/main/java/de/uapcore/lightpit/ModuleManager.java --- a/src/main/java/de/uapcore/lightpit/ModuleManager.java Sat May 23 13:24:49 2020 +0200 +++ b/src/main/java/de/uapcore/lightpit/ModuleManager.java Sat May 23 13:34:41 2020 +0200 @@ -154,7 +154,7 @@ .map(mod -> new MenuEntry( new ResourceKey( mod.bundleBaseName(), - mod.menuKey()), + "menuLabel"), mod.modulePath() + "/", mod.defaultPriority())) .sorted() diff -r 82f71fb1758a -r 192298f8161f src/main/java/de/uapcore/lightpit/modules/ErrorModule.java --- a/src/main/java/de/uapcore/lightpit/modules/ErrorModule.java Sat May 23 13:24:49 2020 +0200 +++ b/src/main/java/de/uapcore/lightpit/modules/ErrorModule.java Sat May 23 13:34:41 2020 +0200 @@ -41,7 +41,6 @@ @LightPITModule( bundleBaseName = "localization.error", modulePath = "error", - titleKey = "title", systemModule = true ) @WebServlet( diff -r 82f71fb1758a -r 192298f8161f src/main/resources/localization/error.properties --- a/src/main/resources/localization/error.properties Sat May 23 13:24:49 2020 +0200 +++ b/src/main/resources/localization/error.properties Sat May 23 13:34:41 2020 +0200 @@ -21,7 +21,7 @@ # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -title = Error +pageTitle = Error h1 = The requested page cannot be displayed. errorCode = Code diff -r 82f71fb1758a -r 192298f8161f src/main/resources/localization/error_de.properties --- a/src/main/resources/localization/error_de.properties Sat May 23 13:24:49 2020 +0200 +++ b/src/main/resources/localization/error_de.properties Sat May 23 13:34:41 2020 +0200 @@ -21,7 +21,7 @@ # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -title = Fehler +pageTitle = Fehler h1 = Die angeforderte Seite kann nicht angezeigt werden. errorCode = Fehlercode diff -r 82f71fb1758a -r 192298f8161f src/main/resources/localization/language.properties --- a/src/main/resources/localization/language.properties Sat May 23 13:24:49 2020 +0200 +++ b/src/main/resources/localization/language.properties Sat May 23 13:34:41 2020 +0200 @@ -21,6 +21,7 @@ # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +pageTitle=Language Selection menuLabel=Language submit = Switch language diff -r 82f71fb1758a -r 192298f8161f src/main/resources/localization/language_de.properties --- a/src/main/resources/localization/language_de.properties Sat May 23 13:24:49 2020 +0200 +++ b/src/main/resources/localization/language_de.properties Sat May 23 13:34:41 2020 +0200 @@ -21,6 +21,7 @@ # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +pageTitle=Sprachauswahl menuLabel = Sprache submit = Sprache ausw\u00e4hlen diff -r 82f71fb1758a -r 192298f8161f src/main/resources/localization/projects.properties --- a/src/main/resources/localization/projects.properties Sat May 23 13:24:49 2020 +0200 +++ b/src/main/resources/localization/projects.properties Sat May 23 13:34:41 2020 +0200 @@ -21,6 +21,7 @@ # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +pageTitle=Project Tracking menuLabel=Projects button.create=New Project diff -r 82f71fb1758a -r 192298f8161f src/main/resources/localization/projects_de.properties --- a/src/main/resources/localization/projects_de.properties Sat May 23 13:24:49 2020 +0200 +++ b/src/main/resources/localization/projects_de.properties Sat May 23 13:34:41 2020 +0200 @@ -21,6 +21,7 @@ # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +pageTitle=Projektverwaltung menuLabel=Projekte button.create=Neues Projekt diff -r 82f71fb1758a -r 192298f8161f src/main/resources/localization/users.properties --- a/src/main/resources/localization/users.properties Sat May 23 13:24:49 2020 +0200 +++ b/src/main/resources/localization/users.properties Sat May 23 13:34:41 2020 +0200 @@ -21,6 +21,7 @@ # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +pageTitle=User Management menuLabel=Developer button.create=Add Developer diff -r 82f71fb1758a -r 192298f8161f src/main/resources/localization/users_de.properties --- a/src/main/resources/localization/users_de.properties Sat May 23 13:24:49 2020 +0200 +++ b/src/main/resources/localization/users_de.properties Sat May 23 13:34:41 2020 +0200 @@ -21,6 +21,7 @@ # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +pageTitle=Benutzerverwaltung menuLabel=Entwickler button.create=Neuer Entwickler diff -r 82f71fb1758a -r 192298f8161f src/main/webapp/WEB-INF/jsp/site.jsp --- a/src/main/webapp/WEB-INF/jsp/site.jsp Sat May 23 13:24:49 2020 +0200 +++ b/src/main/webapp/WEB-INF/jsp/site.jsp Sat May 23 13:34:41 2020 +0200 @@ -69,7 +69,7 @@ LightPIT - <fmt:bundle basename="${moduleInfo.bundleBaseName}"> - <fmt:message key="${moduleInfo.titleKey}"/> + <fmt:message key="pageTitle"/> </fmt:bundle>