This commit is contained in:
@@ -19,7 +19,7 @@ public enum HelpSection {
|
||||
|
||||
CHILDREN("children");
|
||||
|
||||
|
||||
private static final String PREFIX = "section.";
|
||||
private final String key;
|
||||
|
||||
/**
|
||||
@@ -28,11 +28,17 @@ public enum HelpSection {
|
||||
* @param key the message key
|
||||
*/
|
||||
HelpSection(String key) {
|
||||
this.key = "section." + key;
|
||||
this.key = PREFIX + key;
|
||||
}
|
||||
|
||||
/** @return the message key */
|
||||
public String getKey() {
|
||||
return key;
|
||||
}
|
||||
|
||||
/** @return the key without the common prefix */
|
||||
public String getEntryKey() {
|
||||
// Note ljacqu 20171008: #getKey is called more often than this method, so we optimize for the former method
|
||||
return key.substring(PREFIX.length());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user