Browse Source

REPORT-94199 设计器超链国际化-数据脱敏帮助文档跳转未国际化

release/11.0
obo 2 years ago
parent
commit
263fa6df30
  1. 7
      designer-base/src/main/java/com/fr/design/data/datapane/preview/desensitization/view/common/DesensitizationOpenPane.java
  2. 30
      designer-base/src/main/java/com/fr/design/locale/impl/DataMaskMark.java
  3. 6
      designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java

7
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<String> 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());

30
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<String> {
/**
* 云中心数据脱敏帮助链接链接在配置文件中对应的配置文件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);
}
}

6
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<String> 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(),

Loading…
Cancel
Save