When trying to access a locale property inside a handlebars view like follows:
<h1>{{ __("someProperty") }} </h1>
I get a Parse Error with the following stack trace:
Error: Parse error on line 46:
... <h1>{{ __("someProperty") }} </h1>
-----------^
Expecting 'ID', 'STRING', 'NUMBER', 'BOOLEAN', 'UNDEFINED', 'NULL', 'DATA', got 'INVALID'
at Object.parseError (./node_modules/express-handlebars/node_modules/handlebars/dist/cjs/handlebars/compiler/parser.js:218:19)
at Object.parse (./node_modules/express-handlebars/node_modules/handlebars/dist/cjs/handlebars/compiler/parser.js:287:30)
at HandlebarsEnvironment.parse (./node_modules/express-handlebars/node_modules/handlebars/dist/cjs/handlebars/compiler/base.js:45:43)
at compileInput (./node_modules/express-handlebars/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js:477:19)
at ret (./node_modules/express-handlebars/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js:486:18)
at ExpressHandlebars._renderTemplate ./node_modules/express-handlebars/lib/express-handlebars.js:247:12)
at ExpressHandlebars.<anonymous> (./node_modules/express-handlebars/lib/express-handlebars.js:173:21)
I can only circumvent this by using:
<h1>{{ __ "someProperty" }} </h1>
Is this the intended use for handlebars or am I missing some helper function ?
When trying to access a locale property inside a handlebars view like follows:
I get a Parse Error with the following stack trace:
I can only circumvent this by using:
Is this the intended use for handlebars or am I missing some helper function ?