Fixes some bugs regarding displaying the exact time remaining

This commit is contained in:
Kristian Knarvik 2022-10-20 12:03:16 +02:00
parent 64004e4267
commit 9f433cb0f1
3 changed files with 4 additions and 4 deletions

View File

@ -124,7 +124,7 @@ public final class TimeFormatter {
String durationFormat = Translator.getTranslatedMessage(TranslatableMessage.DURATION_FORMAT);
durationFormat = replacePlaceholder(durationFormat, "{unit}",
Translator.getTranslatedMessage(translatableMessage));
return replacePlaceholder(durationFormat, "{duration}", castToInt ? String.valueOf((int) duration) :
return replacePlaceholder(durationFormat, "{time}", castToInt ? String.valueOf((int) duration) :
String.valueOf(duration));
}

View File

@ -8,7 +8,7 @@ public enum TimeInterval {
/**
* Less than 10 seconds left
*/
INTERVAL_LESS_THAN_10_SECONDS("momentarily", 10),
INTERVAL_LESS_THAN_10_SECONDS("in just a moment", 10),
/**
* Less than 30 seconds left

View File

@ -18,13 +18,13 @@ en:
INVALID_FILTER_FOR_PRESET: "The specified filter is not valid for that preset"
INVALID_PRESET_OR_FILTER: "You specified an invalid preset or an invalid filter"
PRESET_MATERIALS: "Materials in preset: {materials}"
DURATION_FORMAT: "{time} {unit}"
DURATION_FORMAT: "in {time} {unit}"
UNIT_NOW: "imminently"
UNIT_SECOND: "second"
UNIT_SECONDS: "seconds"
UNIT_MINUTE: "minute"
UNIT_MINUTES: "minutes"
INTERVAL_LESS_THAN_10_SECONDS: "momentarily"
INTERVAL_LESS_THAN_10_SECONDS: "in just a moment"
INTERVAL_LESS_THAN_30_SECONDS: "in a little while"
INTERVAL_LESS_THAN_1_MINUTE: "in a while"
INTERVAL_LESS_THAN_5_MINUTES: "after some time"