From d671d7784b9bbef4f32ad1f6b9573ec939efd172 Mon Sep 17 00:00:00 2001 From: jackyq2015 Date: Mon, 21 Sep 2015 21:03:25 -0400 Subject: [PATCH] fix issue #995 --- extensions/jython/module/MOD-INF/controller.js | 2 +- extensions/jython/module/MOD-INF/module.properties | 2 +- main/src/com/google/refine/expr/MetaParser.java | 8 ++++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/extensions/jython/module/MOD-INF/controller.js b/extensions/jython/module/MOD-INF/controller.js index 2853bd115..5ffeb40d2 100644 --- a/extensions/jython/module/MOD-INF/controller.js +++ b/extensions/jython/module/MOD-INF/controller.js @@ -45,7 +45,7 @@ function init() { Packages.com.google.refine.expr.MetaParser.registerLanguageParser( "jython", - "Jython", + "Python", Packages.com.google.refine.jython.JythonEvaluable.createParser(), "return value" ); diff --git a/extensions/jython/module/MOD-INF/module.properties b/extensions/jython/module/MOD-INF/module.properties index 644da77c1..3dd680ade 100644 --- a/extensions/jython/module/MOD-INF/module.properties +++ b/extensions/jython/module/MOD-INF/module.properties @@ -1,4 +1,4 @@ name = jython -description = Google Refine Jython Extension +description = Google Refine Python Extension templating = false requires = core diff --git a/main/src/com/google/refine/expr/MetaParser.java b/main/src/com/google/refine/expr/MetaParser.java index 12b5cd8a3..a9d8d8ae5 100644 --- a/main/src/com/google/refine/expr/MetaParser.java +++ b/main/src/com/google/refine/expr/MetaParser.java @@ -120,6 +120,14 @@ abstract public class MetaParser { }, "value"); } + /** + * languagePrefix will be stored in the meta model as an identifier. + * so be careful when change it as it will break the backward compatibility for the old project + * @param languagePrefix + * @param name + * @param parser + * @param defaultExpression + */ static public void registerLanguageParser(String languagePrefix, String name, LanguageSpecificParser parser, String defaultExpression) { s_languages.put(languagePrefix, new LanguageInfo(name, parser, defaultExpression)); }