From 6231077cdf4e01369848dce4968e1a5282a32e23 Mon Sep 17 00:00:00 2001 From: Harrison Date: Fri, 31 Aug 2018 15:32:33 +0800 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-11000=E3=80=9010.0=E5=86=92=E7=83=9F?= =?UTF-8?q?=E3=80=91=E6=8F=92=E4=BB=B6=E7=9A=84=E5=9B=BD=E9=99=85=E5=8C=96?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/extra/PluginUtils.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/extra/PluginUtils.java b/designer-base/src/main/java/com/fr/design/extra/PluginUtils.java index ba8fdc4083..d6f0638ff3 100644 --- a/designer-base/src/main/java/com/fr/design/extra/PluginUtils.java +++ b/designer-base/src/main/java/com/fr/design/extra/PluginUtils.java @@ -6,6 +6,7 @@ import com.fr.general.CloudCenter; import com.fr.general.http.HttpClient; import com.fr.json.JSONArray; import com.fr.json.JSONObject; +import com.fr.locale.InterProviderFactory; import com.fr.log.FineLoggerFactory; import com.fr.plugin.basic.version.Version; import com.fr.plugin.basic.version.VersionIntervalFactory; @@ -172,7 +173,7 @@ public class PluginUtils { return ""; } - return com.fr.design.i18n.Toolkit.i18nText(getInterKeyByErrorCode(errorCode)); + return InterProviderFactory.getProvider().getLocText(getInterKeyByErrorCode(errorCode)); } private static String getInterKeyByErrorCode(PluginErrorCode errorCode) { From 20d00c1d243e6b30bf6761e8ca9d6d69847e5475 Mon Sep 17 00:00:00 2001 From: Harrison Date: Fri, 31 Aug 2018 20:46:34 +0800 Subject: [PATCH 2/2] =?UTF-8?q?REPORT-11000=E3=80=9010.0=E5=86=92=E7=83=9F?= =?UTF-8?q?=E3=80=91=E6=8F=92=E4=BB=B6=E5=AE=89=E8=A3=85=E7=9A=84=E5=9B=BD?= =?UTF-8?q?=E9=99=85=E5=8C=96=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/extra/PluginUtils.java | 5 ++--- .../src/main/java/com/fr/design/i18n/Toolkit.java | 10 ++++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/extra/PluginUtils.java b/designer-base/src/main/java/com/fr/design/extra/PluginUtils.java index d6f0638ff3..e2e41a941c 100644 --- a/designer-base/src/main/java/com/fr/design/extra/PluginUtils.java +++ b/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.general.CloudCenter; - import com.fr.general.http.HttpClient; import com.fr.json.JSONArray; import com.fr.json.JSONObject; -import com.fr.locale.InterProviderFactory; import com.fr.log.FineLoggerFactory; import com.fr.plugin.basic.version.Version; 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.StableUtils; import com.fr.stable.StringUtils; + import java.io.File; import java.io.FileOutputStream; import java.io.IOException; @@ -173,7 +172,7 @@ public class PluginUtils { return ""; } - return InterProviderFactory.getProvider().getLocText(getInterKeyByErrorCode(errorCode)); + return com.fr.design.i18n.Toolkit.i18nCompatibleServerText(getInterKeyByErrorCode(errorCode)); } private static String getInterKeyByErrorCode(PluginErrorCode errorCode) { diff --git a/designer-base/src/main/java/com/fr/design/i18n/Toolkit.java b/designer-base/src/main/java/com/fr/design/i18n/Toolkit.java index d912c7b2d9..18a7074342 100644 --- a/designer-base/src/main/java/com/fr/design/i18n/Toolkit.java +++ b/designer-base/src/main/java/com/fr/design/i18n/Toolkit.java @@ -37,4 +37,14 @@ public class Toolkit { public static String i18nTextArray(String[] keys) { return InterProviderFactory.getProvider().getLocText(keys); } + + /** + * 兼容设计器里,插件管理的部分。 + * 下一个版本将会废弃。 + * + * @deprecated + */ + public static String i18nCompatibleServerText(String key) { + return InterProviderFactory.getProvider().getLocText(key); + } }