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. 4
      designer-base/src/main/java/com/fr/design/DesignerEnvManager.java

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

@ -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;
}

Loading…
Cancel
Save