Localize function t doesn't work in Component #535

Closed
ungit opened this Issue May 20, 2015 · 2 comments

Projects

None yet

2 participants

@ungit
ungit commented May 20, 2015

Localize function t doesn't work in xitrum Component, language always "en"
https://github.com/xitrum-framework/xitrum/blob/master/src/main/scala/xitrum/I18n.scala#L47 (Line 47)

Reproduce:

package mypackage

import xitrum.{FutureAction, Component}
import xitrum.annotation.GET

class CompoWithoutView extends Component {
  def render() = {
    t("Hello World")
  }
}

@GET("foo/bar")
class MyAction extends FutureAction {
  def execute() {
    language = "ru"
    respondView()
  }
}

MyAction.jade:

- import mypackage._

!= newComponent[CompoWithoutView]().render()
@ngocdaothanh ngocdaothanh added this to the Xitrum 3.24 milestone May 22, 2015
@ngocdaothanh ngocdaothanh self-assigned this May 22, 2015
@ngocdaothanh ngocdaothanh added the Bug label May 22, 2015
@ngocdaothanh
Member

I've just fixed the problem via 236f2e8. I'll release a new Xitrum version in a few hours. Sorry for the inconvenience.

@ngocdaothanh
Member

@ungit Andrey Ustinov, thanks for reporting this problem, I've released Xitrum 3.24.0:
https://groups.google.com/forum/#!topic/xitrum-framework/RHv1cgXQAHI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment