Skip to content

Commit

Permalink
Add Locale.INDONESIAN (#738)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukellmann committed Jan 24, 2023
1 parent d8cd751 commit 008c0b1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions common/api/common.api
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ public final class dev/kord/common/Locale$Companion {
public final fun getGREEK ()Ldev/kord/common/Locale;
public final fun getHINDI ()Ldev/kord/common/Locale;
public final fun getHUNGARIAN ()Ldev/kord/common/Locale;
public final fun getINDONESIAN ()Ldev/kord/common/Locale;
public final fun getITALIAN ()Ldev/kord/common/Locale;
public final fun getJAPANESE ()Ldev/kord/common/Locale;
public final fun getKOREAN ()Ldev/kord/common/Locale;
Expand Down
7 changes: 6 additions & 1 deletion common/src/main/kotlin/Locale.kt
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,13 @@ public data class Locale(val language: String, val country: String? = null) {
*/
public fun asJavaLocale(): JLocale = JLocale(language, country ?: "")

@Suppress("MemberVisibilityCanBePrivate")
public companion object {

/**
* Indonesian.
*/
public val INDONESIAN: Locale = Locale("id")

/**
* Danish.
*/
Expand Down Expand Up @@ -180,6 +184,7 @@ public data class Locale(val language: String, val country: String? = null) {
* All languages [supported by Discord](https://discord.com/developers/docs/reference#locales).
*/
public val ALL: List<Locale> = listOf(
INDONESIAN,
DANISH,
GERMAN,
ENGLISH_GREAT_BRITAIN,
Expand Down
1 change: 1 addition & 0 deletions common/src/test/kotlin/LocaleTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class LocaleTest {

private val all = with(Locale) {
listOf(
"id" to INDONESIAN,
"da" to DANISH,
"de" to GERMAN,
"en-GB" to ENGLISH_GREAT_BRITAIN,
Expand Down

0 comments on commit 008c0b1

Please sign in to comment.