diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/common/DesensitizationOpenPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/common/DesensitizationOpenPane.java index 949069aaa8..e04c3fed0e 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/common/DesensitizationOpenPane.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/common/DesensitizationOpenPane.java @@ -8,10 +8,12 @@ import com.fr.design.gui.ilable.UILabel; import com.fr.design.i18n.Toolkit; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.VerticalFlowLayout; +import com.fr.design.locale.impl.DataMaskMark; +import com.fr.general.locale.LocaleCenter; +import com.fr.general.locale.LocaleMark; import com.fr.log.FineLoggerFactory; import javax.swing.JPanel; -import java.awt.BorderLayout; import java.awt.Desktop; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; @@ -58,7 +60,8 @@ public class DesensitizationOpenPane extends JPanel { @Override public void mouseClicked(MouseEvent event) { try { - URL url = new URL(Toolkit.i18nText("Fine-Design_Report_Desensitization_Help_Document_Url")); + LocaleMark dataMaskMark = LocaleCenter.getMark(DataMaskMark.class); + URL url = new URL(dataMaskMark.getValue()); Desktop.getDesktop().browse(url.toURI()); } catch (Exception e) { FineLoggerFactory.getLogger().error(e, "open browse of table data desensitization help document failed for {}", e.getMessage()); diff --git a/designer-base/src/main/java/com/fr/design/locale/impl/DataMaskMark.java b/designer-base/src/main/java/com/fr/design/locale/impl/DataMaskMark.java new file mode 100644 index 0000000000..11312657b9 --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/locale/impl/DataMaskMark.java @@ -0,0 +1,30 @@ +package com.fr.design.locale.impl; + +import com.fr.design.i18n.LocaleLinkProvider; +import com.fr.general.locale.LocaleMark; + + +/** + * 根据图片信息生成获取国际化服务器图标工具 + * + * @author obo + * @since 11.0 + * Created on 2023/4/19 + */ +public class DataMaskMark implements LocaleMark { + + /** + * 云中心数据脱敏帮助链接链接在配置文件中对应的配置文件key + */ + private static final String PROPS_LINK_KEY = "Fine-Design-CloudCenter_Data_Mask"; + + /** + * 云中心数据脱敏默认帮助链接在配置文件中对应的配置文件key + */ + private static final String PROPS_LINK_KEY_DEFAULT = "Fine-Design_Report_Desensitization_Help_Document_Url"; + + @Override + public String getValue() { + return LocaleLinkProvider.getInstance().getLink(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT); + } +} diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java b/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java index 9879ac53a4..5ac64d401a 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java @@ -20,6 +20,7 @@ import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.VerticalFlowLayout; +import com.fr.design.locale.impl.DataMaskMark; import com.fr.design.mainframe.EastRegionContainerPane; import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.cell.settingpane.desensitization.CellDesensitizationGroupsPane; @@ -28,6 +29,8 @@ import com.fr.design.utils.gui.UIComponentUtils; import com.fr.design.widget.FRWidgetFactory; import com.fr.general.ComparatorUtils; import com.fr.general.FRFont; +import com.fr.general.locale.LocaleCenter; +import com.fr.general.locale.LocaleMark; import com.fr.report.cell.TemplateCellElement; import com.fr.report.cell.cellattr.CellDesensitizationAttr; import com.fr.report.cell.cellattr.CellGUIAttr; @@ -156,10 +159,11 @@ public class CellOtherSetPane extends AbstractCellAttrPane { // 带超链的提示信息 UILabel label = new UILabel(); + LocaleMark dataMaskMark = LocaleCenter.getMark(DataMaskMark.class); MessageWithLink hyperlink = new MessageWithLink( Toolkit.i18nText("Fine-Design_Report_Desensitization_Tip"), Toolkit.i18nText("Fine-Design_Report_Desensitization_Hyperlink"), - Toolkit.i18nText("Fine-Design_Report_Desensitization_Help_Document_Url"), + dataMaskMark.getValue(), StringUtils.EMPTY, label.getBackground(), label.getFont(),