Browse Source

REPORT-126873 FBP适配测试——国际化异常

mss/2.0
Destiny.Lin 5 months ago
parent
commit
cff812f4a6
  1. 7
      designer-base/src/main/java/com/fr/design/ConfigHelper.java
  2. 3
      designer-base/src/main/java/com/fr/design/DesignerEnvManager.java

7
designer-base/src/main/java/com/fr/design/ConfigHelper.java

@ -77,15 +77,16 @@ public class ConfigHelper {
private static Properties getProperties(String path, Properties defaultValue){
Properties properties = new Properties();
if (defaultValue != null) {
properties.putAll(defaultValue);
}
try {
File file = new File(path);
if (!file.exists()) {
createFile(file);
}
properties.load(new BufferedReader(new FileReader(path)));
// 底层的环境信息,比如国际化什么的,不应该跟环境有关,要覆盖过来
if (defaultValue != null) {
properties.putAll(defaultValue);
}
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e, e.getMessage());
}

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

@ -3,6 +3,7 @@
*/
package com.fr.design;
import com.fanruan.carina.Carina;
import com.fr.base.BaseXMLUtils;
import com.fr.base.OptimizeUtil;
import com.fr.base.Utils;
@ -51,6 +52,7 @@ import com.fr.general.xml.async.XmlException;
import com.fr.general.xml.async.XmlInitialFactory;
import com.fr.log.FineLoggerFactory;
import com.fr.log.LogHandler;
import com.fr.platform.scaffold.provider.config.LanguageConfigProvider;
import com.fr.stable.CommonUtils;
import com.fr.stable.Constants;
import com.fr.stable.CoreConstants;
@ -1714,6 +1716,7 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter, AsyncXmlReada
}
}
}
Carina.config(LanguageConfigProvider.class).setLocale(CommonUtils.localeToString(designerEnvManager.getLanguage()));
}

Loading…
Cancel
Save