Browse Source

Merge pull request #4489 in DESIGN/design from feature/10.0 to feature/x

* commit '3feeff4a3d9b03de834abcee9d213519bcb5a251':
  REPORT-53019 字体检查国际化显示不全
  REPORT-53019 字体检查国际化显示不全
research/11.0
superman 4 years ago
parent
commit
b2e6a78e0c
  1. 18
      designer-base/src/main/java/com/fr/design/mainframe/check/CheckButton.java
  2. 12
      designer-base/src/main/java/com/fr/design/mainframe/check/CheckFontInfoDialog.java
  3. 4
      designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties
  4. 4
      designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties
  5. 4
      designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties
  6. 4
      designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties
  7. 4
      designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties

18
designer-base/src/main/java/com/fr/design/mainframe/check/CheckButton.java

@ -4,12 +4,14 @@ import com.fr.base.BaseUtils;
import com.fr.design.dialog.FineJOptionPane; import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.DesignSizeI18nManager;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.JTemplate;
import com.fr.design.worker.save.CallbackSaveWorker; import com.fr.design.worker.save.CallbackSaveWorker;
import com.fr.file.FILE; import com.fr.file.FILE;
import com.fr.file.FileNodeFILE; import com.fr.file.FileNodeFILE;
import com.fr.general.IOUtils;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.rpc.ExceptionHandler; import com.fr.rpc.ExceptionHandler;
import com.fr.rpc.RPCInvokerExceptionInfo; import com.fr.rpc.RPCInvokerExceptionInfo;
@ -21,7 +23,6 @@ import javax.swing.JDialog;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.SwingUtilities; import javax.swing.SwingUtilities;
import javax.swing.SwingWorker; import javax.swing.SwingWorker;
import java.awt.Dimension;
import java.awt.FlowLayout; import java.awt.FlowLayout;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
@ -40,7 +41,7 @@ public class CheckButton extends UIButton {
private UILabel message; private UILabel message;
private UIButton okButton; private UIButton okButton;
private JDialog dialog; private JDialog dialog;
private UILabel uiLabel; private UILabel imageLabel;
public CheckButton() { public CheckButton() {
this.setIcon(BaseUtils.readIcon("/com/fr/design/images/buttonicon/check.png")); this.setIcon(BaseUtils.readIcon("/com/fr/design/images/buttonicon/check.png"));
@ -71,7 +72,7 @@ public class CheckButton extends UIButton {
} }
if (set.isEmpty()) { if (set.isEmpty()) {
okButton.setEnabled(true); okButton.setEnabled(true);
uiLabel.setIcon(BaseUtils.readIcon("com/fr/design/images/correct.png")); imageLabel.setIcon(BaseUtils.readIcon("com/fr/design/images/correct.png"));
message.setText("<html>" + Toolkit.i18nText("Fine_Designer_Check_Font_Success") + "</html>"); message.setText("<html>" + Toolkit.i18nText("Fine_Designer_Check_Font_Success") + "</html>");
} else { } else {
if (dialog != null) { if (dialog != null) {
@ -161,7 +162,6 @@ public class CheckButton extends UIButton {
}); });
checkThread.execute(); checkThread.execute();
dialog.setVisible(true); dialog.setVisible(true);
dialog.dispose();
} }
}; };
@ -171,7 +171,7 @@ public class CheckButton extends UIButton {
@Override @Override
public Void callHandler(RPCInvokerExceptionInfo rpcInvokerExceptionInfo) { public Void callHandler(RPCInvokerExceptionInfo rpcInvokerExceptionInfo) {
uiLabel.setIcon(BaseUtils.readIcon("com/fr/design/images/error.png")); imageLabel.setIcon(BaseUtils.readIcon("com/fr/design/images/error.png"));
message.setText("<html>" + Toolkit.i18nText("Fine_Designer_Check_Font_Upgrade") + "</html>"); message.setText("<html>" + Toolkit.i18nText("Fine_Designer_Check_Font_Upgrade") + "</html>");
okButton.setEnabled(true); okButton.setEnabled(true);
return null; return null;
@ -183,7 +183,7 @@ public class CheckButton extends UIButton {
private void initDialogPane() { private void initDialogPane() {
message = new UILabel(); message = new UILabel();
message.setText(Toolkit.i18nText("Fine-Designer_Check_Font_Checking") + "..."); message.setText(Toolkit.i18nText("Fine-Designer_Check_Font_Checking") + "...");
uiLabel = new UILabel(); imageLabel = new UILabel();
okButton = new UIButton(Toolkit.i18nText("Fine-Design_Report_OK")); okButton = new UIButton(Toolkit.i18nText("Fine-Design_Report_OK"));
okButton.setEnabled(false); okButton.setEnabled(false);
okButton.addActionListener(new ActionListener() { okButton.addActionListener(new ActionListener() {
@ -194,13 +194,13 @@ public class CheckButton extends UIButton {
dialog = new JDialog(); dialog = new JDialog();
dialog.setTitle(Toolkit.i18nText("Fine_Designer_Check_Font")); dialog.setTitle(Toolkit.i18nText("Fine_Designer_Check_Font"));
dialog.setModal(true); dialog.setModal(true);
dialog.setSize(new Dimension(268, 118)); dialog.setSize(DesignSizeI18nManager.getInstance().i18nDimension(this.getClass().getName()));
JPanel jp = new JPanel(); JPanel jp = new JPanel();
JPanel upPane = new JPanel(); JPanel upPane = new JPanel();
JPanel downPane = new JPanel(); JPanel downPane = new JPanel();
uiLabel = new UILabel(BaseUtils.readIcon("com/fr/design/images/waiting.png")); imageLabel = new UILabel(IOUtils.readIcon("com/fr/design/images/waiting.png"));
upPane.setLayout(new FlowLayout(FlowLayout.LEFT, 10, 10)); upPane.setLayout(new FlowLayout(FlowLayout.LEFT, 10, 10));
upPane.add(uiLabel); upPane.add(imageLabel);
upPane.add(message); upPane.add(message);
downPane.setLayout(new FlowLayout(FlowLayout.CENTER, 6, 0)); downPane.setLayout(new FlowLayout(FlowLayout.CENTER, 6, 0));
downPane.add(okButton); downPane.add(okButton);

12
designer-base/src/main/java/com/fr/design/mainframe/check/CheckFontInfoDialog.java

@ -3,11 +3,11 @@ package com.fr.design.mainframe.check;
import com.fr.design.dialog.link.MessageWithLink; import com.fr.design.dialog.link.MessageWithLink;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.DesignSizeI18nManager;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.CloudCenter; import com.fr.general.CloudCenter;
import com.fr.general.GeneralContext;
import com.fr.general.IOUtils; import com.fr.general.IOUtils;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
@ -17,13 +17,11 @@ import javax.swing.JScrollPane;
import javax.swing.JTextArea; import javax.swing.JTextArea;
import javax.swing.UIManager; import javax.swing.UIManager;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Frame; import java.awt.Frame;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter; import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.util.Locale;
/** /**
* 字体缺失检测的具体结果对话框 * 字体缺失检测的具体结果对话框
@ -52,7 +50,7 @@ public class CheckFontInfoDialog extends JDialog implements ActionListener {
MessageWithLink linkMessage = new MessageWithLink(Toolkit.i18nText("Fine_Designer_Check_Font_Message"), MessageWithLink linkMessage = new MessageWithLink(Toolkit.i18nText("Fine_Designer_Check_Font_Message"),
Toolkit.i18nText("Fine_Designer_Check_Font_Install_Font"), Toolkit.i18nText("Fine_Designer_Check_Font_Install_Font"),
CloudCenter.getInstance().acquireUrlByKind("help.install.font", "https://help.fanruan.com/finereport/doc-view-3999.html")); CloudCenter.getInstance().acquireUrlByKind("help.install.font", "https://help.fanruan.com/finereport/doc-view-3999.html"));
linkMessage.setPreferredSize(new Dimension(380, 31)); linkMessage.setPreferredSize(DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink"));
messagePanel.add(linkMessage); messagePanel.add(linkMessage);
// 查看详情按钮 // 查看详情按钮
@ -89,11 +87,11 @@ public class CheckFontInfoDialog extends JDialog implements ActionListener {
public void mouseClicked(MouseEvent e) { public void mouseClicked(MouseEvent e) {
if (hiddenPanel.isVisible()) { if (hiddenPanel.isVisible()) {
hiddenPanel.setVisible(false); hiddenPanel.setVisible(false);
CheckFontInfoDialog.this.setSize(new Dimension(380, 185)); CheckFontInfoDialog.this.setSize(DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.mainframe.check.CheckFontInfoDialog.collapse"));
detailLabel.setText(Toolkit.i18nText("Fine_Designer_Look_Detail")); detailLabel.setText(Toolkit.i18nText("Fine_Designer_Look_Detail"));
directUiLabel.setIcon(UIManager.getIcon("OptionPane.narrow.right")); directUiLabel.setIcon(UIManager.getIcon("OptionPane.narrow.right"));
} else { } else {
CheckFontInfoDialog.this.setSize(new Dimension(380, 280)); CheckFontInfoDialog.this.setSize(DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.mainframe.check.CheckFontInfoDialog.unfold"));
hiddenPanel.setVisible(true); hiddenPanel.setVisible(true);
detailLabel.setText(Toolkit.i18nText("Fine_Designer_Hide_Detail")); detailLabel.setText(Toolkit.i18nText("Fine_Designer_Hide_Detail"));
directUiLabel.setIcon(UIManager.getIcon("OptionPane.narrow.down")); directUiLabel.setIcon(UIManager.getIcon("OptionPane.narrow.down"));
@ -114,7 +112,7 @@ public class CheckFontInfoDialog extends JDialog implements ActionListener {
this.add(topPanel, BorderLayout.NORTH); this.add(topPanel, BorderLayout.NORTH);
this.add(hiddenPanel, BorderLayout.CENTER); this.add(hiddenPanel, BorderLayout.CENTER);
this.add(bottomPanel, BorderLayout.SOUTH); this.add(bottomPanel, BorderLayout.SOUTH);
this.setSize(new Dimension(GeneralContext.getLocale().equals(Locale.US)? 400:380, 185)); this.setSize(DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.mainframe.check.CheckFontInfoDialog.collapse"));
GUICoreUtils.centerWindow(this); GUICoreUtils.centerWindow(this);
} }

4
designer-base/src/main/resources/com/fr/design/i18n/dimension_en.properties

@ -1 +1,5 @@
com.fr.design.mainframe.check.CheckButton=305*118
com.fr.design.mainframe.check.CheckFontInfoDialog.collapse=630*185
com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink=630*31
com.fr.design.mainframe.check.CheckFontInfoDialog.unfold=630*280
com.fr.design.report.ReportColumnsPane=800*600 com.fr.design.report.ReportColumnsPane=800*600

4
designer-base/src/main/resources/com/fr/design/i18n/dimension_ja_JP.properties

@ -0,0 +1,4 @@
com.fr.design.mainframe.check.CheckButton=280*118
com.fr.design.mainframe.check.CheckFontInfoDialog.collapse=610*185
com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink=610*31
com.fr.design.mainframe.check.CheckFontInfoDialog.unfold=610*280

4
designer-base/src/main/resources/com/fr/design/i18n/dimension_ko_KR.properties

@ -0,0 +1,4 @@
com.fr.design.mainframe.check.CheckButton=230*118
com.fr.design.mainframe.check.CheckFontInfoDialog.collapse=490*185
com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink=490*31
com.fr.design.mainframe.check.CheckFontInfoDialog.unfold=490*280

4
designer-base/src/main/resources/com/fr/design/i18n/dimension_zh.properties

@ -1 +1,5 @@
# \u9ED8\u8BA4\u4E3A\u7C7B\u7684\u5168\u9650\u5B9A\u540D\uFF08\u53EF\u81EA\u5B9A\u4E49key\uFF09= width * height # \u9ED8\u8BA4\u4E3A\u7C7B\u7684\u5168\u9650\u5B9A\u540D\uFF08\u53EF\u81EA\u5B9A\u4E49key\uFF09= width * height
com.fr.design.mainframe.check.CheckButton=250*118
com.fr.design.mainframe.check.CheckFontInfoDialog.collapse=385*185
com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink=385*31
com.fr.design.mainframe.check.CheckFontInfoDialog.unfold=385*280

4
designer-base/src/main/resources/com/fr/design/i18n/dimension_zh_TW.properties

@ -0,0 +1,4 @@
com.fr.design.mainframe.check.CheckButton=250*118
com.fr.design.mainframe.check.CheckFontInfoDialog.collapse=385*185
com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink=385*31
com.fr.design.mainframe.check.CheckFontInfoDialog.unfold=385*280
Loading…
Cancel
Save