Closed tietang closed 10 years ago
Bad error message. Try &{"key.label"}
我的意思是能不能支持这样的单引号语法? 如果支持单引号语法,那么在很多使用时被包含到双引号中看起来更友好, 例如:html标签 value="&{'key.label'}" 这样会使编辑器更友好些
例如把代码修改成:
protected void message(String token) {
token = token.trim();
boolean isEndWith = token.endsWith("'") || token.endsWith("‘") || token.endsWith("“");
boolean isStartWith = token.startsWith("'") || token.startsWith("‘") || token.startsWith("“");
if(isStartWith&&isEndWith){
token="\""+token.substring(1,token.length()-1)+"\"";
}
List
只是个人意见。
如果这这个目的, 那么 &{key.label} 就可以了.
2013/8/29 王铁堂 notifications@github.com
只是个人意见。
— Reply to this email directly or view it on GitHubhttps://github.com/branaway/Japid/issues/57#issuecomment-23489100 .
wow,谢谢!我是如获至宝啊,这个特性很有帮助,看来还是需要详细学习学习文档啊。
我拿不准文档里面有这个方便之处的描述@
发自我的 iPad
在 2013-8-30,下午6:46,王铁堂 notifications@github.com 写道:
wow,谢谢!我是如获至宝啊,这个特性很有帮助,看来还是需要详细学习学习文档啊。
— Reply to this email directly or view it on GitHub.
&{'key.label'}
login: &{‘login.name’}
Exception in thread "main" cn.bran.japid.compiler.JapidCompilationException: : Message lookup commma nd takes arguments like in a Java method call. Don't use single quotation marks to quote a message name for instance. 'key.label' at cn.bran.japid.compiler.JapidAbstractCompiler.message(JapidAbstractCompiler.java:853) at cn.bran.japid.compiler.JapidAbstractCompiler.parse(JapidAbstractCompiler.java:157) at cn.bran.japid.compiler.JapidAbstractCompiler.hop(JapidAbstractCompiler.java:983) at cn.bran.japid.compiler.JapidAbstractCompiler.compile(JapidAbstractCompiler.java:99) at cn.bran.japid.compiler.JapidTemplateTransformer.generate(JapidTemplateTransformer.java:131) at cn.bran.japid.compiler.TranslateTemplateTask.execute(TranslateTemplateTask.java:143) at cn.bran.play.JapidCommands.reloadChanged(JapidCommands.java:140) at cn.bran.play.JapidCommands.gen(JapidCommands.java:85) at cn.bran.play.JapidCommands.main(JapidCommands.java:40)