Browse Source

Merge pull request #378 in DESIGN/design from ~KERRY/design_10.0:release/10.0 to release/10.0

* commit 'f198e57634b24c52f4701028c4dd78d131718dff':
  DEC-3945 插件管理页面脚本的国际化独立到scripts里面去
final/10.0
kerry 6 years ago
parent
commit
dca7961ccb
  1. 8
      designer-base/src/main/java/com/fr/design/extra/PluginWebBridge.java
  2. 3
      designer-base/src/main/java/com/fr/design/extra/PluginWebPane.java

8
designer-base/src/main/java/com/fr/design/extra/PluginWebBridge.java

@ -53,7 +53,6 @@ public class PluginWebBridge {
private static final String PLUGIN_INFO = "pluginInfo";
private static final int COREPOOLSIZE = 3;
private static final int MAXPOOLSIZE = 5;
private static final String I18N_PREFIX = "FR-";
private static PluginWebBridge helper;
@ -571,13 +570,6 @@ public class PluginWebBridge {
//todo 初始化设计器其他部分
}
/**
* 国际化
*/
public String parseI18(final String key) {
return com.fr.design.i18n.Toolkit.i18nText(I18N_PREFIX + key);
}
/**
* 是否是在设计器中操作
*/

3
designer-base/src/main/java/com/fr/design/extra/PluginWebPane.java

@ -1,6 +1,7 @@
package com.fr.design.extra;
import com.fr.base.TemplateUtils;
import com.fr.general.GeneralContext;
import com.fr.general.IOUtils;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StableUtils;
@ -30,6 +31,7 @@ import java.util.Map;
*/
public class PluginWebPane extends JFXPanel {
private static final String RESOURCE_URL = "resourceURL";
private static final String LANGUAGE = "language";
private WebEngine webEngine;
public PluginWebPane(final String installHome, final String mainJs) {
@ -75,6 +77,7 @@ public class PluginWebPane extends JFXPanel {
Map<String, Object> map4Tpl = new HashMap<String, Object>();
map4Tpl.put(RESOURCE_URL, "file:///" + URLEncoder.encode(installHome, "UTF-8"));
map4Tpl.put(LANGUAGE, GeneralContext.getLocale().toString());
while ((line = read.readLine()) != null) {
if (sb.length() > 0) {
sb.append('\n');

Loading…
Cancel
Save