refactor: Use better nesting for locales key

This commit is contained in:
Ben Woo 2023-02-10 17:11:05 +08:00
parent 19ad1db5fb
commit f3addfbf4e
4 changed files with 31 additions and 31 deletions

View File

@ -81,21 +81,21 @@ public class CreateCommand extends MultiverseCommand {
@CommandPermission("multiverse.core.create")
@CommandCompletion("@empty @flags:groupName=mvcreate")
@Syntax("<name> <environment> --seed [seed] --generator [generator[:id]] --world-type [worldtype] --adjust-spawn --no-structures")
@Description("{@@mv-core.create_description}")
@Description("{@@mv-core.create.description}")
public void onCreateCommand(BukkitCommandIssuer issuer,
@Conditions("validWorldName:scope=new")
@Syntax("<name>")
@Description("{@@mv-core.create_name_description}")
@Description("{@@mv-core.create.name.description}")
String worldName,
@Syntax("<environment>")
@Description("{@@mv-core.create_environment_description}")
@Description("{@@mv-core.create.environment.description}")
World.Environment environment,
@Optional
@Syntax("--seed [seed] --generator [generator[:id]] --world-type [worldtype] --adjust-spawn --no-structures")
@Description("{@@mv-core.create_flags_description}")
@Description("{@@mv-core.create.flags.description}")
String[] flags
) {
ParsedCommandFlags parsedFlags = parseFlags(flags);

View File

@ -20,7 +20,7 @@ public class DebugCommand extends MultiverseCommand {
@Subcommand("debug")
@CommandPermission("multiverse.core.debug")
@Description("{@@mv-core.debug_info_description}")
@Description("{@@mv-core.debug.info.description}")
public void onShowDebugCommand(BukkitCommandIssuer issuer) {
this.displayDebugMode(issuer);
}
@ -28,12 +28,12 @@ public class DebugCommand extends MultiverseCommand {
@Subcommand("debug")
@CommandPermission("multiverse.core.debug")
@CommandCompletion("@range:3")
@Syntax("<{@@mv-core.debug_change_syntax}>")
@Description("{@@mv-core.debug_change_description}")
@Syntax("<{@@mv-core.debug.change.syntax}>")
@Description("{@@mv-core.debug.change.description}")
public void onChangeDebugCommand(BukkitCommandIssuer issuer,
@Syntax("<{@@mv-core.debug_change_syntax}>")
@Description("{@@mv-core.debug_change_level_description}")
@Syntax("<{@@mv-core.debug.change.syntax}>")
@Description("{@@mv-core.debug.change.level.description}")
int level) {
this.plugin.getMVConfig().setGlobalDebug(level);

View File

@ -20,7 +20,7 @@ public enum MVCorei18n implements MessageKeyProvider {
DEBUG_INFO_OFF,
DEBUG_INFO_ON;
private final MessageKey key = MessageKey.of("mv-core." + this.name().toLowerCase());
private final MessageKey key = MessageKey.of("mv-core." + this.name().replace('_', '.').toLowerCase());
@Override
public MessageKey getMessageKey() {

View File

@ -1,23 +1,23 @@
mv-core.config_save_failed=§cUnable to save Multiverse-Core config.yml. Your changes will be temporary!
mv-core.config.save.failed=§cUnable to save Multiverse-Core config.yml. Your changes will be temporary!
mv-core.create_description=Creates a new world and loads it.
mv-core.create_name_description=New world name.
mv-core.create_environment_description=The world's environment. See: /mv environments
mv-core.create_flags_description=Additional world settings. See http://gg.gg/nn8bl for all possible flags.
mv-core.create_properties=Creating world {worldName} with the following properties:
mv-core.create_properties_environment=- Environment: {environment}
mv-core.create_properties_seed=- Seed: {seed}
mv-core.create_properties_worldtype=- World Type: {worldType}
mv-core.create_properties_adjustspawn=- Adjust Spawn: {adjustSpawn}
mv-core.create_properties_generator=- Generator: {generator}
mv-core.create_properties_structures=- Structures: {structures}
mv-core.create_loading=Creating world...
mv-core.create_failed=§cFailed to create world '{worldName}'! See console for details.
mv-core.create_success=§aWorld '{worldName}' created successfully!
mv-core.create.description=Creates a new world and loads it.
mv-core.create.name.description=New world name.
mv-core.create.environment.description=The world's environment. See: /mv environments
mv-core.create.flags.description=Additional world settings. See http://gg.gg/nn8bl for all possible flags.
mv-core.create.properties=Creating world {worldName} with the following properties:
mv-core.create.properties.environment=- Environment: {environment}
mv-core.create.properties.seed=- Seed: {seed}
mv-core.create.properties.worldtype=- World Type: {worldType}
mv-core.create.properties.adjustspawn=- Adjust Spawn: {adjustSpawn}
mv-core.create.properties.generator=- Generator: {generator}
mv-core.create.properties.structures=- Structures: {structures}
mv-core.create.loading=Creating world...
mv-core.create.failed=§cFailed to create world '{worldName}'! See console for details.
mv-core.create.success=§aWorld '{worldName}' created successfully!
mv-core.debug_info_description=Show the current debug level.
mv-core.debug_info_off=§fMultiverse Debug mode is §cOFF§f.
mv-core.debug_info_on=§fMultiverse Debug mode is at §alevel {level}§f.
mv-core.debug_change_description=Change debug level.
mv-core.debug_change_syntax=level
mv-core.debug_change_level_description=Debug level to set to.
mv-core.debug.info.description=Show the current debug level.
mv-core.debug.info.off=§fMultiverse Debug mode is §cOFF§f.
mv-core.debug.info.on=§fMultiverse Debug mode is at §alevel {level}§f.
mv-core.debug.change.description=Change debug level.
mv-core.debug.change.syntax=level
mv-core.debug.change.level.description=Debug level to set to.