Browse Source

REPORT-11000【10.0冒烟】插件安装的国际化问题

final/10.0
Harrison 6 years ago
parent
commit
20d00c1d24
  1. 5
      designer-base/src/main/java/com/fr/design/extra/PluginUtils.java
  2. 10
      designer-base/src/main/java/com/fr/design/i18n/Toolkit.java

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

@ -2,11 +2,9 @@ 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;
import com.fr.locale.InterProviderFactory;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.plugin.basic.version.Version; import com.fr.plugin.basic.version.Version;
import com.fr.plugin.basic.version.VersionIntervalFactory; import com.fr.plugin.basic.version.VersionIntervalFactory;
@ -19,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;
@ -173,7 +172,7 @@ public class PluginUtils {
return ""; return "";
} }
return InterProviderFactory.getProvider().getLocText(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