Browse Source
* commit '8d5fbefe2c1d1d94e069268f97f28663e9b43965': 配置放在设计器模块 配置放在设计器模块 REPORT-135046 feat:设计器语言切换支持扩展新语种 REPORT-130762 feat:JNDI数据连接提供禁用配置 REPORT-130762 feat:JNDI数据连接提供禁用配置 REPORT-131817 高德国产图层替换Mapbox图层 REPORT-134777 超链名称支持公式计算-全局查找匹配不到控件里的公式 REPORT-126773 fix: 修复自定义主题修改配色预览不生效问题release/11.0
superman
3 months ago
13 changed files with 228 additions and 35 deletions
@ -0,0 +1,56 @@ |
|||||||
|
package com.fr.design.i18n; |
||||||
|
|
||||||
|
import com.fr.config.ConfigContext; |
||||||
|
import com.fr.config.DefaultConfiguration; |
||||||
|
import com.fr.config.Identifier; |
||||||
|
import com.fr.config.holder.factory.Holders; |
||||||
|
import com.fr.config.holder.impl.MapConf; |
||||||
|
|
||||||
|
import java.util.Collections; |
||||||
|
import java.util.HashMap; |
||||||
|
import java.util.Map; |
||||||
|
|
||||||
|
/** |
||||||
|
* 设计器语言扩展配置 |
||||||
|
* |
||||||
|
* @author obo |
||||||
|
* @since 11.0 |
||||||
|
* Created on 2024/09/26 |
||||||
|
*/ |
||||||
|
public class DesignExtendLanguageConfig extends DefaultConfiguration { |
||||||
|
|
||||||
|
private static volatile DesignExtendLanguageConfig designExtendLanguageConfig = null; |
||||||
|
|
||||||
|
/** |
||||||
|
* 获取实例 |
||||||
|
*/ |
||||||
|
public static DesignExtendLanguageConfig getInstance() { |
||||||
|
if (designExtendLanguageConfig == null) { |
||||||
|
designExtendLanguageConfig = ConfigContext.getConfigInstance(DesignExtendLanguageConfig.class); |
||||||
|
} |
||||||
|
return designExtendLanguageConfig; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 设计器扩展的语言 |
||||||
|
* key为localeString,例如en_US或en;value为改语言对应的国际化翻译key |
||||||
|
*/ |
||||||
|
@Identifier("extendDesignLocales") |
||||||
|
private MapConf<Map<String, String>> extendDesignLocales = Holders.map(new HashMap<>(), String.class, String.class); |
||||||
|
|
||||||
|
public Map<String, String> getExtendedDesignLocales() { |
||||||
|
return Collections.unmodifiableMap(extendDesignLocales.get()); |
||||||
|
} |
||||||
|
|
||||||
|
public void setExtendedDesignLocales(Map<String, String> map) { |
||||||
|
extendDesignLocales.set(map); |
||||||
|
} |
||||||
|
|
||||||
|
@Override |
||||||
|
public Object clone() throws CloneNotSupportedException { |
||||||
|
DesignExtendLanguageConfig cloned = (DesignExtendLanguageConfig) super.clone(); |
||||||
|
cloned.extendDesignLocales = ( MapConf<Map<String, String>>) extendDesignLocales.clone(); |
||||||
|
return cloned; |
||||||
|
} |
||||||
|
|
||||||
|
} |
Loading…
Reference in new issue