Address hard-coded Options prompt strings, per #1570

This commit is contained in:
PikaMug 2021-01-19 01:04:24 -05:00
parent e77a3ccefe
commit 3a8c8661f7
2 changed files with 7 additions and 9 deletions

View File

@ -128,10 +128,8 @@ public class OptionsPrompt extends QuestsEditorNumericPrompt {
@Override
public String getQueryText(final ConversationContext context) {
String text = "Select '<true>' or '<false>'";
text = text.replace("<true>", Lang.get("true"));
text = text.replace("<false>", Lang.get("false"));
return text;
return Lang.get("optBooleanQuery").replace("<true>", Lang.get("true"))
.replace("<false>", Lang.get("false"));
}
public String getSelectionText(final ConversationContext context, final int number) {
@ -154,10 +152,8 @@ public class OptionsPrompt extends QuestsEditorNumericPrompt {
final QuestsEditorPostOpenStringPromptEvent event = new QuestsEditorPostOpenStringPromptEvent(context, this);
context.getPlugin().getServer().getPluginManager().callEvent(event);
String text = Lang.get("optBooleanPrompt");
text = text.replace("<true>", Lang.get("true"));
text = text.replace("<false>", Lang.get("false"));
return ChatColor.YELLOW + text;
return ChatColor.YELLOW + Lang.get("optBooleanPrompt").replace("<true>", Lang.get("true"))
.replace("<false>", Lang.get("false"));
}
@Override
@ -200,7 +196,7 @@ public class OptionsPrompt extends QuestsEditorNumericPrompt {
@Override
public String getQueryText(final ConversationContext context) {
return "Pick level of progress sharing";
return Lang.get("optNumberQuery");
}
public String getSelectionText(final ConversationContext context, final int number) {

View File

@ -484,7 +484,9 @@ plnTooEarly: "<quest> will be active in <time>."
plnTooLate: "<quest> was last active <time> ago."
optGeneral: "General"
optMultiplayer: "Multiplayer"
optBooleanQuery: "Select '<true>' or '<false>'"
optBooleanPrompt: "Enter '<true>' or '<false>', <clear>, <cancel>"
optNumberQuery: "Pick level of progress sharing"
optNumberPrompt: "Enter a level (number) for tracking progress, <clear>, <cancel>"
optAllowCommands: "Allow commands during quest"
optAllowQuitting: "Allow quitting during quest"