aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/pl/treksoft/kvision/html/Template.kt
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2018-08-22 13:34:08 +0200
committerRobert Jaros <rjaros@finn.pl>2018-08-22 13:34:08 +0200
commit6bf1d12f6d64474af60c42bf1ee9bedc0d3dc8e5 (patch)
tree70e57852b0ba2c608d2ec8dcf386baacd1c32f8f /src/main/kotlin/pl/treksoft/kvision/html/Template.kt
parent0ad1af65697fd147270972599704eecda6e81a41 (diff)
downloadkvision-6bf1d12f6d64474af60c42bf1ee9bedc0d3dc8e5.tar.gz
kvision-6bf1d12f6d64474af60c42bf1ee9bedc0d3dc8e5.tar.bz2
kvision-6bf1d12f6d64474af60c42bf1ee9bedc0d3dc8e5.zip
I18n support in Handlebars templates.
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/html/Template.kt')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/html/Template.kt4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/html/Template.kt b/src/main/kotlin/pl/treksoft/kvision/html/Template.kt
index 31155209..d430d8ff 100644
--- a/src/main/kotlin/pl/treksoft/kvision/html/Template.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/html/Template.kt
@@ -30,7 +30,7 @@ interface Template {
var content: String?
var rich: Boolean
var template: ((Any?) -> String)?
- val templates: Map<String, (Any?) -> String>?
+ val templates: Map<String, (Any?) -> String>
/**
* Handlebars template data object.
@@ -41,6 +41,6 @@ interface Template {
}
set(value) {
if (!rich) rich = true
- content = template?.invoke(value) ?: templates?.get(I18n.language)?.invoke(value)
+ content = template?.invoke(value) ?: templates.get(I18n.language)?.invoke(value)
}
}