julienrf / play-jsmessages

Library to compute localized messages of your Play application on client side

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

subset filtering is done on each request which is suboptimal

francisdb opened this issue · comments

title says it all

Well, with 0afffee you can partially apply subset in order to perform the filtering process only once:

val jsMessages = new JsMessages
val filteredMessages = jsMessages.subset("foo", "bar")

val index = Action { implicit request =>
  Ok(filteredMessages(Some("window.Messages")))
}