mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-01-07 17:08:25 +01:00
Translate a few more strings
This commit is contained in:
parent
803ce5e483
commit
03cbb6baf9
@ -16,6 +16,7 @@ import net.citizensnpcs.api.event.NPCRemoveEvent;
|
|||||||
import net.citizensnpcs.api.npc.NPC;
|
import net.citizensnpcs.api.npc.NPC;
|
||||||
import net.citizensnpcs.api.util.DataKey;
|
import net.citizensnpcs.api.util.DataKey;
|
||||||
import net.citizensnpcs.editor.Editor;
|
import net.citizensnpcs.editor.Editor;
|
||||||
|
import net.citizensnpcs.util.Messages;
|
||||||
import net.citizensnpcs.util.Messaging;
|
import net.citizensnpcs.util.Messaging;
|
||||||
import net.citizensnpcs.util.NMS;
|
import net.citizensnpcs.util.NMS;
|
||||||
import net.citizensnpcs.util.StringHelper;
|
import net.citizensnpcs.util.StringHelper;
|
||||||
@ -104,15 +105,14 @@ public class LinearWaypointProvider implements WaypointProvider {
|
|||||||
private final Player player;
|
private final Player player;
|
||||||
private boolean showPath;
|
private boolean showPath;
|
||||||
Map<Waypoint, Entity> waypointMarkers = Maps.newHashMap();
|
Map<Waypoint, Entity> waypointMarkers = Maps.newHashMap();
|
||||||
|
|
||||||
private LinearWaypointEditor(Player player) {
|
private LinearWaypointEditor(Player player) {
|
||||||
this.player = player;
|
this.player = player;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void begin() {
|
public void begin() {
|
||||||
Messaging.send(player, ChatColor.AQUA + "Entered the linear waypoint editor!");
|
Messaging.sendTr(player, ChatColor.AQUA, Messages.LINEAR_WAYPOINT_EDITOR_BEGIN);
|
||||||
Messaging.send(player, "<e>Left click<a> to add a waypoint, <e>right click<a> to remove.");
|
|
||||||
Messaging.send(player, "<a>Type <e>toggle path<a> to toggle showing entities at waypoints.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createWaypointMarker(int index, Waypoint waypoint) {
|
private void createWaypointMarker(int index, Waypoint waypoint) {
|
||||||
@ -138,7 +138,7 @@ public class LinearWaypointProvider implements WaypointProvider {
|
|||||||
public void end() {
|
public void end() {
|
||||||
if (!editing)
|
if (!editing)
|
||||||
return;
|
return;
|
||||||
Messaging.send(player, ChatColor.AQUA + "Exited the linear waypoint editor.");
|
Messaging.sendTr(player, ChatColor.AQUA, Messages.LINEAR_WAYPOINT_EDITOR_END);
|
||||||
editing = false;
|
editing = false;
|
||||||
if (!showPath)
|
if (!showPath)
|
||||||
return;
|
return;
|
||||||
@ -204,8 +204,7 @@ public class LinearWaypointProvider implements WaypointProvider {
|
|||||||
double distance = at.distanceSquared(prev);
|
double distance = at.distanceSquared(prev);
|
||||||
double maxDistance = Math.pow(npc.getNavigator().getDefaultParameters().range(), 2);
|
double maxDistance = Math.pow(npc.getNavigator().getDefaultParameters().range(), 2);
|
||||||
if (distance > maxDistance) {
|
if (distance > maxDistance) {
|
||||||
Messaging.sendF(player, ChatColor.RED
|
Messaging.sendErrorTr(player, Messages.LINEAR_WAYPOINT_EDITOR_RANGE_EXCEEDED,
|
||||||
+ "Previous waypoint is %s blocks away but the distance limit is %s.",
|
|
||||||
StringHelper.wrap(Math.sqrt(distance), ChatColor.RED),
|
StringHelper.wrap(Math.sqrt(distance), ChatColor.RED),
|
||||||
StringHelper.wrap(Math.sqrt(maxDistance), ChatColor.RED));
|
StringHelper.wrap(Math.sqrt(maxDistance), ChatColor.RED));
|
||||||
return;
|
return;
|
||||||
|
@ -68,6 +68,9 @@ public class Messages {
|
|||||||
public static final String TEXT_EDITOR_INVALID_INDEX = "citizens.editors.text.invalid-index";
|
public static final String TEXT_EDITOR_INVALID_INDEX = "citizens.editors.text.invalid-index";
|
||||||
public static final String TEXT_EDITOR_INVALID_INPUT = "citizens.editors.text.invalid-input";
|
public static final String TEXT_EDITOR_INVALID_INPUT = "citizens.editors.text.invalid-input";
|
||||||
public static final String TEXT_EDITOR_EDIT_BEGIN_PROMPT = "citizens.editors.text.edit-begin-prompt";
|
public static final String TEXT_EDITOR_EDIT_BEGIN_PROMPT = "citizens.editors.text.edit-begin-prompt";
|
||||||
|
public static final String LINEAR_WAYPOINT_EDITOR_BEGIN = "citizens.editors.waypoints.linear.begin-message";
|
||||||
|
public static final String LINEAR_WAYPOINT_EDITOR_END = "citizens.editors.waypoints.linear.end-message";
|
||||||
|
public static final String LINEAR_WAYPOINT_EDITOR_RANGE_EXCEEDED = "citizens.editors.waypoints.linear.range-exceeded-message";
|
||||||
|
|
||||||
private static Properties getDefaultBundleProperties() {
|
private static Properties getDefaultBundleProperties() {
|
||||||
Properties defaults = new Properties();
|
Properties defaults = new Properties();
|
||||||
|
@ -92,7 +92,6 @@ public class Translator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static Translator instance;
|
private static Translator instance;
|
||||||
|
|
||||||
public static final String PREFIX = "messages";
|
public static final String PREFIX = "messages";
|
||||||
|
|
||||||
public static void setInstance(File resourceFile, Locale locale) {
|
public static void setInstance(File resourceFile, Locale locale) {
|
||||||
|
@ -50,3 +50,6 @@ citizens.notifications.unknown-npc-type=NPC type '{0}' was not recognized. Did y
|
|||||||
citizens.waypoints.available-providers-message=List of available providers
|
citizens.waypoints.available-providers-message=List of available providers
|
||||||
citizens.waypoints.current-provider-message=The current waypoint provider is {0}.
|
citizens.waypoints.current-provider-message=The current waypoint provider is {0}.
|
||||||
citizens.waypoints.set-provider-message=Set the waypoint provider to {0}.
|
citizens.waypoints.set-provider-message=Set the waypoint provider to {0}.
|
||||||
|
citizens.editors.waypoints.linear.begin-message=Entered the linear waypoint editor!<br><e>Left click<a> to add a waypoint, <e>right click<a> to remove.<br><a>Type <e>toggle path<a> to toggle showing entities at waypoints.
|
||||||
|
citizens.editors.waypoints.linear.end-message=Exited the linear waypoint editor.
|
||||||
|
citizens.editors.waypoints.linear.range-exceeded-message=Previous waypoint is {0} blocks away but the distance limit is {1}.
|
Loading…
Reference in New Issue
Block a user