Sat, 23 May 2020 13:34:41 +0200
bloat removal 1/3 - configurable resource keys
1.1 --- a/src/main/java/de/uapcore/lightpit/LightPITModule.java Sat May 23 13:24:49 2020 +0200 1.2 +++ b/src/main/java/de/uapcore/lightpit/LightPITModule.java Sat May 23 13:34:41 2020 +0200 1.3 @@ -60,25 +60,6 @@ 1.4 String modulePath(); 1.5 1.6 /** 1.7 - * Returns the properties key for the menu label. 1.8 - * <p> 1.9 - * Set this string to empty string, if the module should be hidden from 1.10 - * the menu. 1.11 - * 1.12 - * @return the properties key 1.13 - */ 1.14 - String menuKey() default "menuLabel"; 1.15 - 1.16 - /** 1.17 - * Returns the properties key for the page title. 1.18 - * <p> 1.19 - * By default this is the same as the menu label. 1.20 - * 1.21 - * @return the properties key 1.22 - */ 1.23 - String titleKey() default "menuLabel"; 1.24 - 1.25 - /** 1.26 * If set to <code>true</code>, this module is always loaded, but never 1.27 * visible in the menu or the Web UI module manager. 1.28 * 1.29 @@ -103,29 +84,18 @@ 1.30 * are proxied by this object. 1.31 */ 1.32 class ELProxy { 1.33 - private final String bundleBaseName, modulePath, menuKey, titleKey; 1.34 + private final String bundleBaseName, modulePath; 1.35 1.36 public ELProxy(LightPITModule annotation) { 1.37 bundleBaseName = annotation.bundleBaseName(); 1.38 modulePath = annotation.modulePath(); 1.39 - menuKey = annotation.menuKey(); 1.40 - titleKey = annotation.titleKey(); 1.41 } 1.42 1.43 public String getBundleBaseName() { 1.44 return bundleBaseName; 1.45 } 1.46 - 1.47 - public String getMenuKey() { 1.48 - return menuKey; 1.49 - } 1.50 - 1.51 public String getModulePath() { 1.52 return modulePath; 1.53 } 1.54 - 1.55 - public String getTitleKey() { 1.56 - return titleKey; 1.57 - } 1.58 } 1.59 }
2.1 --- a/src/main/java/de/uapcore/lightpit/ModuleManager.java Sat May 23 13:24:49 2020 +0200 2.2 +++ b/src/main/java/de/uapcore/lightpit/ModuleManager.java Sat May 23 13:34:41 2020 +0200 2.3 @@ -154,7 +154,7 @@ 2.4 .map(mod -> new MenuEntry( 2.5 new ResourceKey( 2.6 mod.bundleBaseName(), 2.7 - mod.menuKey()), 2.8 + "menuLabel"), 2.9 mod.modulePath() + "/", 2.10 mod.defaultPriority())) 2.11 .sorted()
3.1 --- a/src/main/java/de/uapcore/lightpit/modules/ErrorModule.java Sat May 23 13:24:49 2020 +0200 3.2 +++ b/src/main/java/de/uapcore/lightpit/modules/ErrorModule.java Sat May 23 13:34:41 2020 +0200 3.3 @@ -41,7 +41,6 @@ 3.4 @LightPITModule( 3.5 bundleBaseName = "localization.error", 3.6 modulePath = "error", 3.7 - titleKey = "title", 3.8 systemModule = true 3.9 ) 3.10 @WebServlet(
4.1 --- a/src/main/resources/localization/error.properties Sat May 23 13:24:49 2020 +0200 4.2 +++ b/src/main/resources/localization/error.properties Sat May 23 13:34:41 2020 +0200 4.3 @@ -21,7 +21,7 @@ 4.4 # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 4.5 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 4.6 4.7 -title = Error 4.8 +pageTitle = Error 4.9 4.10 h1 = The requested page cannot be displayed. 4.11 errorCode = Code
5.1 --- a/src/main/resources/localization/error_de.properties Sat May 23 13:24:49 2020 +0200 5.2 +++ b/src/main/resources/localization/error_de.properties Sat May 23 13:34:41 2020 +0200 5.3 @@ -21,7 +21,7 @@ 5.4 # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 5.5 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 5.6 5.7 -title = Fehler 5.8 +pageTitle = Fehler 5.9 5.10 h1 = Die angeforderte Seite kann nicht angezeigt werden. 5.11 errorCode = Fehlercode
6.1 --- a/src/main/resources/localization/language.properties Sat May 23 13:24:49 2020 +0200 6.2 +++ b/src/main/resources/localization/language.properties Sat May 23 13:34:41 2020 +0200 6.3 @@ -21,6 +21,7 @@ 6.4 # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 6.5 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 6.6 6.7 +pageTitle=Language Selection 6.8 menuLabel=Language 6.9 6.10 submit = Switch language
7.1 --- a/src/main/resources/localization/language_de.properties Sat May 23 13:24:49 2020 +0200 7.2 +++ b/src/main/resources/localization/language_de.properties Sat May 23 13:34:41 2020 +0200 7.3 @@ -21,6 +21,7 @@ 7.4 # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 7.5 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 7.6 7.7 +pageTitle=Sprachauswahl 7.8 menuLabel = Sprache 7.9 7.10 submit = Sprache ausw\u00e4hlen
8.1 --- a/src/main/resources/localization/projects.properties Sat May 23 13:24:49 2020 +0200 8.2 +++ b/src/main/resources/localization/projects.properties Sat May 23 13:34:41 2020 +0200 8.3 @@ -21,6 +21,7 @@ 8.4 # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 8.5 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 8.6 8.7 +pageTitle=Project Tracking 8.8 menuLabel=Projects 8.9 8.10 button.create=New Project
9.1 --- a/src/main/resources/localization/projects_de.properties Sat May 23 13:24:49 2020 +0200 9.2 +++ b/src/main/resources/localization/projects_de.properties Sat May 23 13:34:41 2020 +0200 9.3 @@ -21,6 +21,7 @@ 9.4 # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 9.5 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 9.6 9.7 +pageTitle=Projektverwaltung 9.8 menuLabel=Projekte 9.9 9.10 button.create=Neues Projekt
10.1 --- a/src/main/resources/localization/users.properties Sat May 23 13:24:49 2020 +0200 10.2 +++ b/src/main/resources/localization/users.properties Sat May 23 13:34:41 2020 +0200 10.3 @@ -21,6 +21,7 @@ 10.4 # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 10.5 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 10.6 10.7 +pageTitle=User Management 10.8 menuLabel=Developer 10.9 10.10 button.create=Add Developer
11.1 --- a/src/main/resources/localization/users_de.properties Sat May 23 13:24:49 2020 +0200 11.2 +++ b/src/main/resources/localization/users_de.properties Sat May 23 13:34:41 2020 +0200 11.3 @@ -21,6 +21,7 @@ 11.4 # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 11.5 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 11.6 11.7 +pageTitle=Benutzerverwaltung 11.8 menuLabel=Entwickler 11.9 11.10 button.create=Neuer Entwickler
12.1 --- a/src/main/webapp/WEB-INF/jsp/site.jsp Sat May 23 13:24:49 2020 +0200 12.2 +++ b/src/main/webapp/WEB-INF/jsp/site.jsp Sat May 23 13:34:41 2020 +0200 12.3 @@ -69,7 +69,7 @@ 12.4 <base href="${baseHref}"> 12.5 <title>LightPIT - 12.6 <fmt:bundle basename="${moduleInfo.bundleBaseName}"> 12.7 - <fmt:message key="${moduleInfo.titleKey}"/> 12.8 + <fmt:message key="pageTitle"/> 12.9 </fmt:bundle> 12.10 </title> 12.11 <meta charset="UTF-8">