Skip to content

Commit

Permalink
Add talk language
Browse files Browse the repository at this point in the history
Fixes #195
  • Loading branch information
sdeleuze committed Apr 1, 2017
1 parent 7f9cd93 commit 2e27ba7
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/main/kotlin/mixit/web/handler/TalkHandler.kt
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class TalkDto(
val title: String,
val summary: String,
val speakers: List<User>,
val language: Language,
val language: String,
val addedAt: LocalDateTime,
val description: String?,
val topic: String?,
Expand All @@ -71,10 +71,10 @@ class TalkDto(
val date: String?
)

fun Talk.toDto(language: Language, speakers: List<User>, markdownConverter: MarkdownConverter) = TalkDto(
fun Talk.toDto(lang: Language, speakers: List<User>, markdownConverter: MarkdownConverter) = TalkDto(
id, slug, format, event, title,
markdownConverter.toHTML(summary), speakers, language, addedAt,
markdownConverter.toHTML(summary), speakers, language.name.toLowerCase(), addedAt,
markdownConverter.toHTML(description), topic,
video, "rooms.${room?.name?.toLowerCase()}" , start?.formatTalkTime(language), end?.formatTalkTime(language),
start?.formatTalkDate(language)
video, "rooms.${room?.name?.toLowerCase()}" , start?.formatTalkTime(lang), end?.formatTalkTime(lang),
start?.formatTalkDate(lang)
)
4 changes: 4 additions & 0 deletions src/main/resources/messages_en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ talk.title=Talk
talk.html.title=Talk {0}
talk.video.watch=Watch
talk.video.thevideo=the video
talk.in=in
talk.language.french=French
talk.language.english=English

talks.title=Talks
talks.html.title=Talks {0}
talks.readmore=Read more
Expand Down
4 changes: 4 additions & 0 deletions src/main/resources/messages_fr.properties
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ talk.title=Talk
talk.html.title=Talk {0}
talk.video.watch=Regarder
talk.video.thevideo=la vidéo
talk.in=en
talk.language.french=Français
talk.language.english=Anglais

talks.title=Talks
talks.html.title=Talks {0}
talks.readmore=Lire la suite
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/templates/talk.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
{{#talk.topic}}<a href="{{localePrefix}}/{{talk.event}}/{{talk.topic}}"><img src="/images/svg/mxt-icon--{{talk.topic}}.svg" class="mxt-icon--cat mxt-icon--cat__talks" alt="{{#i18n}}home.topics.{{talk.topic}}.title{{/i18n}}"></a>
<p class="mxt-text--cat mxt-text--cat5">{{#i18n}}home.topics.{{talk.topic}}.title{{/i18n}}</p>
<p>—</p>{{/talk.topic}}
<div><strong>#{{talk.format}}</strong></div>
<div><strong>#{{talk.format}}</strong> {{#i18n}}talk.in{{/i18n}} {{#i18n}}talk.language.{{talk.language}}{{/i18n}}</div>
<ul class="menu vertical">
<li>{{#talk.date}}{{talk.date}}{{/talk.date}}</li>
<li>{{#talk.start}}{{talk.start}} - {{talk.end}}{{/talk.start}}</li>
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/templates/talks.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
</ul>
<div class="hide-for-small-only">
<hr />
<p>#{{format}}</p>
<p>#{{format}} {{#i18n}}talk.in{{/i18n}} {{#i18n}}talk.language.{{language}}{{/i18n}}</p>
</div>
</div>
<div class="small-12 medium-3 columns mxt-text--talktime">
Expand Down

0 comments on commit 2e27ba7

Please sign in to comment.