mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
It maybe worth load pluralizations rules before compile?
This commit is contained in:
parent
06b7085287
commit
ae81523aa5
1 changed files with 1 additions and 0 deletions
|
@ -73,6 +73,7 @@ module JsLocaleHelper
|
||||||
def self.compile_message_format(locale, format)
|
def self.compile_message_format(locale, format)
|
||||||
ctx = V8::Context.new
|
ctx = V8::Context.new
|
||||||
ctx.load(Rails.root + 'lib/javascripts/messageformat.js')
|
ctx.load(Rails.root + 'lib/javascripts/messageformat.js')
|
||||||
|
ctx.load(Rails.root + "lib/javascripts/locale/#{locale}.js")
|
||||||
ctx.eval("mf = new MessageFormat('#{locale}');")
|
ctx.eval("mf = new MessageFormat('#{locale}');")
|
||||||
ctx.eval("mf.precompile(mf.parse(#{format.inspect}))")
|
ctx.eval("mf.precompile(mf.parse(#{format.inspect}))")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue