translation

This commit is contained in:
nea
2022-08-27 15:41:16 +02:00
parent 2019473c50
commit d9353ff54c
7 changed files with 51 additions and 27 deletions

View File

@@ -1,31 +1,31 @@
package moe.nea.notenoughupdates.gui
import moe.nea.notenoughupdates.repo.RepoManager
import net.minecraft.text.Text
import moe.nea.notenoughupdates.repo.RepoManager
fun repoGui(): ConfigGui<RepoManager.Config> {
return ConfigGui(RepoManager) {
title(Text.literal("NotEnoughUpdates Repo Settings"))
toggle(Text.literal("Auto Update"), RepoManager.Config::autoUpdate)
title(Text.translatable("notenoughupdates.gui.repo.title"))
toggle(Text.translatable("notenoughupdates.gui.repo.autoupdate"), RepoManager.Config::autoUpdate)
textfield(
Text.literal("Repo Username"),
Text.literal("<github user>"),
Text.translatable("notenoughupdates.gui.repo.username"),
Text.translatable("notenoughupdates.gui.repo.hint.username"),
RepoManager.Config::user,
maxLength = 255
)
textfield(
Text.literal("Repo Name"),
Text.literal("<repo name>"),
Text.translatable("notenoughupdates.gui.repo.reponame"),
Text.translatable("notenoughupdates.gui.repo.hint.reponame"),
RepoManager.Config::repo
)
textfield(
Text.literal("Repo Branch"),
Text.literal("<repo branch>"),
Text.translatable("notenoughupdates.gui.repo.branch"),
Text.translatable("notenoughupdates.gui.repo.hint.branch"),
RepoManager.Config::branch
)
button(
Text.literal("Reset to Defaults"),
Text.literal("Reset"),
Text.translatable("notenoughupdates.gui.repo.reset.label"),
Text.translatable("notenoughupdates.gui.repo.reset"),
) {
RepoManager.config.user = "NotEnoughUpdates"
RepoManager.config.repo = "NotEnoughUpdates-REPO"