aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/util/textutil.kt
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-11-18 15:59:40 +0100
committerLinnea Gräf <nea@nea.moe>2024-11-18 17:31:39 +0100
commit68948baff37e139a2a3f88ce3b233effb55955c4 (patch)
treea7dd3128491475ede150d269df128dd7ee19a431 /src/main/kotlin/util/textutil.kt
parentfba91100cb57b4359f235bfcca352c052ec0eefb (diff)
downloadFirmament-68948baff37e139a2a3f88ce3b233effb55955c4.tar.gz
Firmament-68948baff37e139a2a3f88ce3b233effb55955c4.tar.bz2
Firmament-68948baff37e139a2a3f88ce3b233effb55955c4.zip
feat: Add repo debug information
Diffstat (limited to 'src/main/kotlin/util/textutil.kt')
-rw-r--r--src/main/kotlin/util/textutil.kt6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/kotlin/util/textutil.kt b/src/main/kotlin/util/textutil.kt
index 2770b26..5d95d7a 100644
--- a/src/main/kotlin/util/textutil.kt
+++ b/src/main/kotlin/util/textutil.kt
@@ -130,6 +130,8 @@ fun MutableText.blue() = withColor(Formatting.BLUE)
fun MutableText.aqua() = withColor(Formatting.AQUA)
fun MutableText.lime() = withColor(Formatting.GREEN)
fun MutableText.darkGreen() = withColor(Formatting.DARK_GREEN)
+fun MutableText.purple() = withColor(Formatting.DARK_PURPLE)
+fun MutableText.pink() = withColor(Formatting.LIGHT_PURPLE)
fun MutableText.yellow() = withColor(Formatting.YELLOW)
fun MutableText.grey() = withColor(Formatting.GRAY)
fun MutableText.red() = withColor(Formatting.RED)
@@ -165,6 +167,6 @@ fun Text.transformEachRecursively(function: (Text) -> Text): Text {
}
}
-fun tr(key: String, default: String): Text = error("Compiler plugin did not run.")
-fun trResolved(key: String, vararg args: Any) = Text.translatable(key, *args)
+fun tr(key: String, default: String): MutableText = error("Compiler plugin did not run.")
+fun trResolved(key: String, vararg args: Any): MutableText = Text.stringifiedTranslatable(key, *args)