Add chart time window translations
This commit is contained in:
parent
0f1c1f1653
commit
4e3cf276e9
@ -829,6 +829,13 @@ private fun gui(provider: MatteryLanguageProvider) {
|
|||||||
with(provider.english) {
|
with(provider.english) {
|
||||||
gui("ago", "%s ago")
|
gui("ago", "%s ago")
|
||||||
|
|
||||||
|
gui("time.short.5s", "5s")
|
||||||
|
gui("time.short.15s", "15s")
|
||||||
|
gui("time.short.1m", "1m")
|
||||||
|
gui("time.short.1h", "1h")
|
||||||
|
gui("time.short.6h", "6h")
|
||||||
|
gui("time.short.24h", "24h")
|
||||||
|
|
||||||
gui("part_of_multiblock", "Part of multiblock structure, useless on its own")
|
gui("part_of_multiblock", "Part of multiblock structure, useless on its own")
|
||||||
gui("quicksearch", "Quick search...")
|
gui("quicksearch", "Quick search...")
|
||||||
|
|
||||||
|
@ -834,6 +834,13 @@ private fun gui(provider: MatteryLanguageProvider) {
|
|||||||
with(provider.russian) {
|
with(provider.russian) {
|
||||||
gui("ago", "%s тому назад")
|
gui("ago", "%s тому назад")
|
||||||
|
|
||||||
|
gui("time.short.5s", "5с")
|
||||||
|
gui("time.short.15s", "15с")
|
||||||
|
gui("time.short.1m", "1м")
|
||||||
|
gui("time.short.1h", "1ч")
|
||||||
|
gui("time.short.6h", "6ч")
|
||||||
|
gui("time.short.24h", "24ч")
|
||||||
|
|
||||||
gui("part_of_multiblock", "Часть мультиблока, бесполезен сам по себе")
|
gui("part_of_multiblock", "Часть мультиблока, бесполезен сам по себе")
|
||||||
gui("quicksearch", "Быстрый поиск...")
|
gui("quicksearch", "Быстрый поиск...")
|
||||||
|
|
||||||
|
@ -12,7 +12,6 @@ import ru.dbotthepony.mc.otm.client.screen.panels.*
|
|||||||
import ru.dbotthepony.mc.otm.client.screen.panels.button.ButtonPanel
|
import ru.dbotthepony.mc.otm.client.screen.panels.button.ButtonPanel
|
||||||
import ru.dbotthepony.mc.otm.client.screen.panels.button.makeDeviceControls
|
import ru.dbotthepony.mc.otm.client.screen.panels.button.makeDeviceControls
|
||||||
import ru.dbotthepony.mc.otm.client.screen.panels.input.NetworkNumberInputPanel
|
import ru.dbotthepony.mc.otm.client.screen.panels.input.NetworkNumberInputPanel
|
||||||
import ru.dbotthepony.mc.otm.core.TextComponent
|
|
||||||
import ru.dbotthepony.mc.otm.core.util.formatPower
|
import ru.dbotthepony.mc.otm.core.util.formatPower
|
||||||
import ru.dbotthepony.mc.otm.menu.tech.EnergyCounterMenu
|
import ru.dbotthepony.mc.otm.menu.tech.EnergyCounterMenu
|
||||||
|
|
||||||
@ -24,16 +23,16 @@ class EnergyCounterScreen(menu: EnergyCounterMenu, inventory: Inventory, title:
|
|||||||
frame.width += 60f
|
frame.width += 60f
|
||||||
|
|
||||||
val graphs = linkedMapOf(
|
val graphs = linkedMapOf(
|
||||||
menu.history5s to "5s",
|
menu.history5s to "otm.gui.time.short.5s",
|
||||||
menu.history15s to "15s",
|
menu.history15s to "otm.gui.time.short.15s",
|
||||||
menu.history1m to "1m",
|
menu.history1m to "otm.gui.time.short.1m",
|
||||||
menu.history1h to "1h",
|
menu.history1h to "otm.gui.time.short.1h",
|
||||||
menu.history6h to "6h",
|
menu.history6h to "otm.gui.time.short.6h",
|
||||||
menu.history24h to "24h",
|
menu.history24h to "otm.gui.time.short.24h",
|
||||||
)
|
)
|
||||||
|
|
||||||
for ((graph, text) in graphs) {
|
for ((graph, text) in graphs) {
|
||||||
val tab = frame.Tab(activeIcon = TextIcon(color = RGBAColor.BLACK, font = font, text = TextComponent(text)))
|
val tab = frame.Tab(activeIcon = TextIcon(color = RGBAColor.BLACK, font = font, text = TranslatableComponent(text)))
|
||||||
val panel = DecimalHistoryChartPanel(this, tab.canvas, graph, formatText = { it.formatPower(formatAsReadable = ShiftPressedCond) })
|
val panel = DecimalHistoryChartPanel(this, tab.canvas, graph, formatText = { it.formatPower(formatAsReadable = ShiftPressedCond) })
|
||||||
panel.dock = Dock.FILL
|
panel.dock = Dock.FILL
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user