Browse Source

Pull request #1779: REPORT-29573 【国际化】插件管理类别、场景部分仍显示中文

Merge in DESIGN/design from ~LANLAN/design:release/10.0 to release/10.0

* commit '3a3c6adf8a165058e4efb29862016b0ad7f465ea':
  REPORT-29573 【国际化】插件管理类别、场景部分仍显示中文
feature/big-screen
Lanlan 4 years ago
parent
commit
530d11d4ee
  1. 20
      designer-base/src/main/java/com/fr/design/extra/exe/GetPluginCategoriesExecutor.java

20
designer-base/src/main/java/com/fr/design/extra/exe/GetPluginCategoriesExecutor.java

@ -1,10 +1,13 @@
package com.fr.design.extra.exe; package com.fr.design.extra.exe;
import com.fr.design.DesignerEnvManager;
import com.fr.design.extra.PluginConstants; import com.fr.design.extra.PluginConstants;
import com.fr.design.extra.Process; import com.fr.design.extra.Process;
import com.fr.general.CloudCenter; import com.fr.general.CloudCenter;
import com.fr.general.http.HttpClient; import com.fr.general.http.HttpToolbox;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import java.util.Locale;
/** /**
* Created by vito on 16/5/16. * Created by vito on 16/5/16.
@ -28,14 +31,17 @@ public class GetPluginCategoriesExecutor implements Executor {
@Override @Override
public void run(Process<String> process) { public void run(Process<String> process) {
String url = CloudCenter.getInstance().acquireUrlByKind("shop.plugin.category"); Locale locale = DesignerEnvManager.getEnvManager().getLanguage();
String url = CloudCenter.getInstance().acquireUrlByKind("shop.plugin.category") + "&locale=" + locale.toString();
if (StringUtils.isNotEmpty(url)) { if (StringUtils.isNotEmpty(url)) {
HttpClient httpClient = new HttpClient(url); try {
result = httpClient.getResponseText(); result = HttpToolbox.get(url);
} else { return;
result = PluginConstants.CONNECTION_404; } catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
} }
}
result = PluginConstants.CONNECTION_404;
} }
} }
}; };

Loading…
Cancel
Save