Fixes #3906 by fine-graining the help menu generation localization support

This commit is contained in:
Alexander Brandes 2023-01-14 00:42:46 +01:00
parent 8d9a387587
commit 1448d8d4af
No known key found for this signature in database
GPG Key ID: 158F5701A6AAD00C
2 changed files with 7 additions and 7 deletions

View File

@ -120,9 +120,9 @@ public class Help extends Command {
.deserialize( .deserialize(
TranslatableCaption.of("help.help_info_item").getComponent(player), TranslatableCaption.of("help.help_info_item").getComponent(player),
TagResolver.builder() TagResolver.builder()
.tag("command", Tag.inserting(Component.text("/plot help"))) .tag("command", Tag.inserting(Component.text("/plot help")))
.tag("category", Tag.inserting(Component.text(c.name().toLowerCase()))) .tag("category", Tag.inserting(Component.text(c.name().toLowerCase())))
.tag("category_desc", Tag.inserting(c.toComponent(player))) .tag("category_desc", Tag.inserting(c.toComponent(player)))
.build() .build()
)); ));
} }
@ -130,9 +130,9 @@ public class Help extends Command {
.deserialize( .deserialize(
TranslatableCaption.of("help.help_info_item").getComponent(player), TranslatableCaption.of("help.help_info_item").getComponent(player),
TagResolver.builder() TagResolver.builder()
.tag("command", Tag.inserting(Component.text("/plot help"))) .tag("command", Tag.inserting(Component.text("/plot help")))
.tag("category", Tag.inserting(Component.text("all"))) .tag("category", Tag.inserting(Component.text("all")))
.tag("category_desc", Tag.inserting(Component.text("Display all commands"))) .tag("category_desc", Tag.inserting(TranslatableCaption.of("help.help_display_all_commands").toComponent(player)))
.build() .build()
)); ));
builder.append(Component.newline()).append(MINI_MESSAGE.deserialize(TranslatableCaption builder.append(Component.newline()).append(MINI_MESSAGE.deserialize(TranslatableCaption

View File

@ -437,7 +437,7 @@
"help.help_footer": "<dark_gray><strikethrough>---------<reset> <gold>PlotSquared Help </gold><dark_gray><strikethrough>---------<reset>", "help.help_footer": "<dark_gray><strikethrough>---------<reset> <gold>PlotSquared Help </gold><dark_gray><strikethrough>---------<reset>",
"help.help_info_item": "<gold><command> <gray><category> </gray><dark_gray>- </dark_gray><gray><category_desc></gray>", "help.help_info_item": "<gold><command> <gray><category> </gray><dark_gray>- </dark_gray><gray><category_desc></gray>",
"help.help_item": "<gold><usage> <gray>[<gold><alias></gold>]</gray>\n <dark_gray>- </dark_gray><gray><desc></gray>\n", "help.help_item": "<gold><usage> <gray>[<gold><alias></gold>]</gray>\n <dark_gray>- </dark_gray><gray><desc></gray>\n",
"help.help_display_all_commands": "<prefix><gray>Display all commands.</gray>", "help.help_display_all_commands": "<gray>Display all commands.</gray>",
"help.direction": "<prefix><gold>Current direction: </gold><gray><dir></gray>", "help.direction": "<prefix><gold>Current direction: </gold><gray><dir></gray>",
"help.no_permission": "<prefix><red>You have no permission to access commands of that sub category, hence you cannot access the help page.</red>", "help.no_permission": "<prefix><red>You have no permission to access commands of that sub category, hence you cannot access the help page.</red>",
"category.command_category_claiming": "<gray>Claiming</gray>", "category.command_category_claiming": "<gray>Claiming</gray>",