aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/pl/treksoft/kvision/form
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/form')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/form/select/SelectInput.kt2
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/form/select/SelectOptGroup.kt2
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/form/select/SelectOption.kt4
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/form/spinner/SpinnerInput.kt2
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/form/text/AbstractTextInput.kt2
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/form/text/RichTextInput.kt2
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/form/time/DateTimeInput.kt2
7 files changed, 8 insertions, 8 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/form/select/SelectInput.kt b/src/main/kotlin/pl/treksoft/kvision/form/select/SelectInput.kt
index 97f3989c..6d6f0fc5 100644
--- a/src/main/kotlin/pl/treksoft/kvision/form/select/SelectInput.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/form/select/SelectInput.kt
@@ -255,7 +255,7 @@ open class SelectInput(
sn.add("data-live-search" to "true")
}
placeholder?.let {
- sn.add("title" to it)
+ sn.add("title" to translate(it))
}
autofocus?.let {
if (it) {
diff --git a/src/main/kotlin/pl/treksoft/kvision/form/select/SelectOptGroup.kt b/src/main/kotlin/pl/treksoft/kvision/form/select/SelectOptGroup.kt
index 3b523314..e33b3457 100644
--- a/src/main/kotlin/pl/treksoft/kvision/form/select/SelectOptGroup.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/form/select/SelectOptGroup.kt
@@ -79,7 +79,7 @@ open class SelectOptGroup(
override fun getSnAttrs(): List<StringPair> {
val sn = super.getSnAttrs().toMutableList()
- sn.add("label" to label)
+ sn.add("label" to translate(label))
maxOptions?.let {
sn.add("data-max-options" to "" + it)
}
diff --git a/src/main/kotlin/pl/treksoft/kvision/form/select/SelectOption.kt b/src/main/kotlin/pl/treksoft/kvision/form/select/SelectOption.kt
index 5cd23582..d1bb636e 100644
--- a/src/main/kotlin/pl/treksoft/kvision/form/select/SelectOption.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/form/select/SelectOption.kt
@@ -70,7 +70,7 @@ open class SelectOption(
override fun render(): VNode {
return if (!divider) {
- render("option", arrayOf(label ?: value))
+ render("option", arrayOf(translate(label) ?: value))
} else {
render("option")
}
@@ -83,7 +83,7 @@ open class SelectOption(
sn.add("value" to it)
}
subtext?.let {
- sn.add("data-subtext" to it)
+ sn.add("data-subtext" to translate(it))
}
icon?.let {
if (it.startsWith("fa-")) {
diff --git a/src/main/kotlin/pl/treksoft/kvision/form/spinner/SpinnerInput.kt b/src/main/kotlin/pl/treksoft/kvision/form/spinner/SpinnerInput.kt
index d0bde3fe..7d3af684 100644
--- a/src/main/kotlin/pl/treksoft/kvision/form/spinner/SpinnerInput.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/form/spinner/SpinnerInput.kt
@@ -177,7 +177,7 @@ open class SpinnerInput(
sn.add("value" to it.toString())
}
placeholder?.let {
- sn.add("placeholder" to it)
+ sn.add("placeholder" to translate(it))
}
name?.let {
sn.add("name" to it)
diff --git a/src/main/kotlin/pl/treksoft/kvision/form/text/AbstractTextInput.kt b/src/main/kotlin/pl/treksoft/kvision/form/text/AbstractTextInput.kt
index 52cc7792..e41cfb8f 100644
--- a/src/main/kotlin/pl/treksoft/kvision/form/text/AbstractTextInput.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/form/text/AbstractTextInput.kt
@@ -99,7 +99,7 @@ abstract class AbstractTextInput(
override fun getSnAttrs(): List<StringPair> {
val sn = super.getSnAttrs().toMutableList()
placeholder?.let {
- sn.add("placeholder" to it)
+ sn.add("placeholder" to translate(it))
}
name?.let {
sn.add("name" to it)
diff --git a/src/main/kotlin/pl/treksoft/kvision/form/text/RichTextInput.kt b/src/main/kotlin/pl/treksoft/kvision/form/text/RichTextInput.kt
index 43e522d8..88cb3b86 100644
--- a/src/main/kotlin/pl/treksoft/kvision/form/text/RichTextInput.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/form/text/RichTextInput.kt
@@ -46,7 +46,7 @@ open class RichTextInput(value: String? = null, classes: Set<String> = setOf())
override fun getSnAttrs(): List<StringPair> {
val sn = super.getSnAttrs().toMutableList()
placeholder?.let {
- sn.add("placeholder" to it)
+ sn.add("placeholder" to translate(it))
}
name?.let {
sn.add("name" to it)
diff --git a/src/main/kotlin/pl/treksoft/kvision/form/time/DateTimeInput.kt b/src/main/kotlin/pl/treksoft/kvision/form/time/DateTimeInput.kt
index 3a40d1af..6ce4d0c3 100644
--- a/src/main/kotlin/pl/treksoft/kvision/form/time/DateTimeInput.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/form/time/DateTimeInput.kt
@@ -136,7 +136,7 @@ open class DateTimeInput(
val sn = super.getSnAttrs().toMutableList()
sn.add("type" to "text")
placeholder?.let {
- sn.add("placeholder" to it)
+ sn.add("placeholder" to translate(it))
}
name?.let {
sn.add("name" to it)