Browse Source

REPORT-39341 【回归】【jdk11】文件没有读写权限报告弹窗是英文

1. bug原因:在中文环境下,这边传过来的Locale是zh-Hans-CN,进入isSupport方法中时会发现不匹配,然后Locale被设置成en_US,然后在报错弹窗里面的内容就都是英文了
2. 修改方案:增加判断,将传过来的Locale的script抹去,只保留language和region,跟代码里面保存的Locale保持一致
feature/big-screen
Yvan 4 years ago
parent
commit
ce540ef97b
  1. 14
      designer-base/src/main/java/com/fr/design/DesignerEnvManager.java

14
designer-base/src/main/java/com/fr/design/DesignerEnvManager.java

@ -163,7 +163,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
* alphafine
*/
private AlphaFineConfigManager alphaFineConfigManager = AlphaFineConfigManager.getInstance();
/**
* 阅后即焚的配置项
*/
@ -1424,6 +1424,10 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
* @return
*/
private Locale checkLocale(Locale locale) {
// Yvan: REPORT-39341,有一些情况下,获取到的是zh-Hans-CN,转成zh_CN
if (locale != null) {
locale = new Locale(locale.getLanguage(), locale.getCountry());
}
return SupportLocale.getInstance().isSupport(locale) ? locale : Locale.US;
}
@ -1578,7 +1582,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
}
}
}
private void readSnapChatConfig(XMLableReader reader) {
reader.readXMLObject(this.snapChatConfig = SnapChatConfig.getInstance());
}
@ -1801,14 +1805,14 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
writeSnapChatConfig(writer);
writer.end();
}
private void writeSnapChatConfig(XMLPrintWriter writer) {
if (this.snapChatConfig != null) {
this.snapChatConfig.writeXML(writer);
}
}
private void writeAlphaFineAttr(XMLPrintWriter writer) {
if (this.alphaFineConfigManager != null) {
this.alphaFineConfigManager.writeXML(writer);

Loading…
Cancel
Save