jet icon indicating copy to clipboard operation
jet copied to clipboard

Why can't use 'msg' as template variable name?

Open dxvgef opened this issue 7 years ago • 2 comments

If use 'msg' as template variable name, will appear this error: unexpected token <msg> on operand

dxvgef avatar May 30 '17 16:05 dxvgef

Looked into the source briefly – looks like msg is an identifier in the lexer but if I read this correctly, it isn't used yet. It is supposed to be used for translating messages (right, @jhsx?). I pushed a new branch with a failing test case. For a possible fix, I'm gonna have to defer this one to @jhsx.

annismckenzie avatar May 31 '17 11:05 annismckenzie

Hi, you're correct, the idea was to add msg statement as the example,

<b>{{msg "myKey"}}Default Value{{end}}</b>

But after think more i'm considering to add internationalization support as a sub project, without a new type of statement, i will open an describing issue soon.

jhsx avatar Jun 01 '17 21:06 jhsx