Browse Source

增加空判断

feature/big-screen
Qinghui.Liu 4 years ago
parent
commit
38e53e5163
  1. 9
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorPane.java

9
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorPane.java

@ -13,6 +13,7 @@ import com.teamdev.jxbrowser.chromium.JSValue;
import com.teamdev.jxbrowser.chromium.events.ScriptContextAdapter; import com.teamdev.jxbrowser.chromium.events.ScriptContextAdapter;
import com.teamdev.jxbrowser.chromium.events.ScriptContextEvent; import com.teamdev.jxbrowser.chromium.events.ScriptContextEvent;
import java.util.Locale;
import java.util.Map; import java.util.Map;
import java.util.concurrent.ExecutorService; import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors; import java.util.concurrent.Executors;
@ -118,7 +119,13 @@ public class VanChartRichEditorPane {
} }
public static String generateTransformI18nJS() { public static String generateTransformI18nJS() {
String language = DesignerEnvManager.getEnvManager().getLanguage().toString(); String language = "zh_CN";
Locale locale = DesignerEnvManager.getEnvManager().getLanguage();
if (locale != null) {
language = locale.toString();
}
return "!(function () { window.transformI18n && window.transformI18n('" + language + "' || 'zh_CN'); }());"; return "!(function () { window.transformI18n && window.transformI18n('" + language + "' || 'zh_CN'); }());";
} }

Loading…
Cancel
Save