Browse Source

Merge pull request #431 in DESIGN/design from ~HARRISON/design:release/10.0 to release/10.0

* commit '20d00c1d243e6b30bf6761e8ca9d6d69847e5475':
  REPORT-11000【10.0冒烟】插件安装的国际化问题
  REPORT-11000【10.0冒烟】插件的国际化问题
final/10.0
Harrison 6 years ago
parent
commit
6fbf1ad85f
  1. 4
      designer-base/src/main/java/com/fr/design/extra/PluginUtils.java
  2. 10
      designer-base/src/main/java/com/fr/design/i18n/Toolkit.java

4
designer-base/src/main/java/com/fr/design/extra/PluginUtils.java

@ -2,7 +2,6 @@ package com.fr.design.extra;
import com.fr.base.TemplateUtils; import com.fr.base.TemplateUtils;
import com.fr.general.CloudCenter; import com.fr.general.CloudCenter;
import com.fr.general.http.HttpClient; import com.fr.general.http.HttpClient;
import com.fr.json.JSONArray; import com.fr.json.JSONArray;
import com.fr.json.JSONObject; import com.fr.json.JSONObject;
@ -18,6 +17,7 @@ import com.fr.stable.EncodeConstants;
import com.fr.stable.ProductConstants; import com.fr.stable.ProductConstants;
import com.fr.stable.StableUtils; import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import java.io.File; import java.io.File;
import java.io.FileOutputStream; import java.io.FileOutputStream;
import java.io.IOException; import java.io.IOException;
@ -172,7 +172,7 @@ public class PluginUtils {
return ""; return "";
} }
return com.fr.design.i18n.Toolkit.i18nText(getInterKeyByErrorCode(errorCode)); return com.fr.design.i18n.Toolkit.i18nCompatibleServerText(getInterKeyByErrorCode(errorCode));
} }
private static String getInterKeyByErrorCode(PluginErrorCode errorCode) { private static String getInterKeyByErrorCode(PluginErrorCode errorCode) {

10
designer-base/src/main/java/com/fr/design/i18n/Toolkit.java

@ -37,4 +37,14 @@ public class Toolkit {
public static String i18nTextArray(String[] keys) { public static String i18nTextArray(String[] keys) {
return InterProviderFactory.getProvider().getLocText(keys); return InterProviderFactory.getProvider().getLocText(keys);
} }
/**
* 兼容设计器里插件管理的部分
* 下一个版本将会废弃
*
* @deprecated
*/
public static String i18nCompatibleServerText(String key) {
return InterProviderFactory.getProvider().getLocText(key);
}
} }

Loading…
Cancel
Save