diff --git a/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java b/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java index 88d2625d02..68bb917114 100644 --- a/designer-base/src/main/java/com/fr/design/DesignerEnvManager.java +++ b/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,7 +1424,9 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { * @return */ private Locale checkLocale(Locale locale) { - return SupportLocale.getInstance().isSupport(locale) ? locale : Locale.US; + // Yvan: REPORT-39341,有一些情况下,获取到的是zh-Hans-CN这种,需要找到项目中最匹配的Locale + return SupportLocale.getInstance().isSupport(locale) ? + locale : SupportLocale.getInstance().getSuitableLocale(locale); } private void readReportLengthUnit(XMLableReader reader) { @@ -1578,7 +1580,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter { } } } - + private void readSnapChatConfig(XMLableReader reader) { reader.readXMLObject(this.snapChatConfig = SnapChatConfig.getInstance()); } @@ -1801,14 +1803,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);