Skip to content

Commit

Permalink
Translate About Commands, Checks and Utilities
Browse files Browse the repository at this point in the history
  • Loading branch information
NoComment1105 committed Nov 28, 2024
1 parent a854177 commit 5b35182
Show file tree
Hide file tree
Showing 9 changed files with 376 additions and 233 deletions.
5 changes: 5 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ repositories {
url = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
}

maven {
name = "Kord Snapshots"
url = uri("https://repo.kord.dev/snapshots")
}

maven {
name = "Kord Extensions (Releases)"
url = uri("https://releases-repo.kordex.dev")
Expand Down
40 changes: 12 additions & 28 deletions src/main/kotlin/org/hyacinthbots/lilybot/LilyBot.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import dev.kordex.modules.pluralkit.extPluralKit
import io.github.oshai.kotlinlogging.KotlinLogging
import kotlinx.datetime.TimeZone
import kotlinx.datetime.toLocalDateTime
import lilybot.i18n.Translations
import org.hyacinthbots.docgenerator.docsGenerator
import org.hyacinthbots.docgenerator.enums.CommandTypes
import org.hyacinthbots.docgenerator.enums.SupportedFileFormat
Expand Down Expand Up @@ -93,39 +94,28 @@ suspend fun main() {
general {
message { locale ->
embed {
title = "Info about LilyBot"
title = Translations.About.embedTitle.translate()

thumbnail {
url =
"https://github.com/HyacinthBots/LilyBot/blob/main/docs/lily-logo-transparent.png?raw=true"
}

description =
"Lily is a FOSS multi-purpose bot for Discord created by the HyacinthBots organization. " +
"Use `/help` for support or `/invite` to get an invite link."
description = Translations.About.embedDesc.translate()
field {
name = "How can I support the continued development of Lily?"

value = "Lily is developed primarily by NoComment#6411 in their free time. Hyacinth " +
"doesn't have the resources to invest in hosting, so financial donations via " +
"[Buy Me a Coffee](https://buymeacoffee.com/Hyacinthbots) help keep Lily afloat. " +
"Currently, we run lily on a Hetzner cloud server, which we can afford in our " +
"current situation. We also have domain costs for our website.\n\nContributions of " +
"code & documentation are also incredibly appreciated, and you can read our " +
"[contributing guide]($HYACINTH_GITHUB/LilyBot/blob/main/CONTRIBUTING.md) or " +
"[development guide]($HYACINTH_GITHUB/LilyBot/blob/main/docs/development-guide.md) " +
"to get started."
name = Translations.About.howSupportTitle.translate()
value = Translations.About.howSupportValue.translate(HYACINTH_GITHUB)
}

field {
name = "Version"
name = Translations.About.version.translate()
// To avoid IntelliJ shouting about build errors, use https://plugins.jetbrains.com/plugin/9407-pebble
value = "${BuildInfo.LILY_VERSION} (${BuildInfo.BUILD_ID})"
inline = true
}

field {
name = "Up Since"
name = Translations.About.upSince.translate()
value = "${
UptimeCollection().get()?.onTime?.toLocalDateTime(TimeZone.UTC)
?.time.toString().split(".")[0]
Expand All @@ -135,14 +125,8 @@ suspend fun main() {
}

field {
name = "Useful links"
value =
"Website: Coming Soon™️\n" +
"GitHub: ${HYACINTH_GITHUB}\n" +
"Buy Me a Coffee: https://buymeacoffee.com/HyacinthBots\n" +
"Twitter: https://twitter.com/HyacinthBots\n" +
"Email: `[email protected]`\n" +
"Discord: https://discord.gg/hy2329fcTZ"
name = Translations.Utility.InfoCommands.Help.usefulFieldName.translate()
value = Translations.Utility.InfoCommands.Help.usefulFieldValue.translate(HYACINTH_GITHUB)
}
}

Expand All @@ -151,15 +135,15 @@ suspend fun main() {
"https://discord.com/api/oauth2/authorize?client_id=876278900836139008&" +
"permissions=1151990787078&scope=bot%20applications.commands"
) {
label = "extensions.about.buttons.invite"
label = Translations.Utility.InfoCommands.Help.Button.invite.translate()
}

linkButton("$HYACINTH_GITHUB/LilyBot/blob/main/docs/privacy-policy.md") {
label = "Privacy Policy"
label = Translations.Utility.InfoCommands.Help.Button.privacy.translate()
}

linkButton("$HYACINTH_GITHUB/.github/blob/main/terms-of-service.md") {
label = "Terms of Service"
label = Translations.Utility.InfoCommands.Help.Button.tos.translate()
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -648,8 +648,8 @@ class Tags : Extension() {

/** The new appearance for the tag being edited. */
val newAppearance by optionalStringChoice {
name = Translations.Utility.Tags.Create.Arguments.Appearance.name
description = Translations.Utility.Tags.Create.Arguments.Appearance.description
name = Translations.Utility.Tags.Edit.Arguments.NewAppearance.name
description = Translations.Utility.Tags.Edit.Arguments.NewAppearance.description
choices = mutableMapOf(
Translations.Utility.Tags.Create.Arguments.Appearance.Choice.embed to "embed",
Translations.Utility.Tags.Create.Arguments.Appearance.Choice.message to "message"
Expand Down
Loading

0 comments on commit 5b35182

Please sign in to comment.