Created
May 1, 2013 04:52
-
-
Save shunjikonishi/5493795 to your computer and use it in GitHub Desktop.
Template of messages.js
(Playframework 1)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (typeof(flect) == "undefined") flect = {}; | |
if (typeof(flect.app) == "undefined") flect.app = {}; | |
if (typeof(flect.app.XXXX) == "undefined") flect.app.XXXX = {}; | |
flect.app.XXXX.MSG = { | |
#{list items:map.entrySet(), as:'entry' } | |
"${entry.getKey()}" : "${entry.getValue()}",#{/list} | |
"format" : function(fmt) { | |
for (i = 1; i < arguments.length; i++) { | |
var reg = new RegExp("\\{" + (i - 1) + "\\}", "g") | |
fmt = fmt.replace(reg,arguments[i]); | |
} | |
return fmt; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment