Browse Source

Pull request #6295: 无jira feature 10-合并到 feature x 的冲突解决

Merge in DESIGN/design from ~XIQIU/design:feature/x to feature/x

* commit 'ca98a0927b7e8b61fd48f8fd9ae583541567871f':
  REPORT-60661 国际化url适配
  REPORT-60661 国际化url适配
  REPORT-60661 国际化url适配
  BI-95654   拷贝数据连接时复制了identity
feature/x
Xiqiu 3 years ago
parent
commit
4dad5653b7
  1. 3
      designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java
  2. 4
      designer-base/src/main/java/com/fr/design/actions/help/TutorialAction.java
  3. 18
      designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java
  4. 4
      designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java
  5. 3
      designer-base/src/main/java/com/fr/design/gui/style/TranslucentBorderSpecialPane.java
  6. 5
      designer-base/src/main/java/com/fr/design/mainframe/check/CheckFontInfoDialog.java
  7. 7
      designer-base/src/main/java/com/fr/env/HelpLink.java

3
designer-base/src/main/java/com/fr/design/actions/help/AboutPane.java

@ -14,6 +14,7 @@ import com.fr.general.CloudCenter;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.GeneralContext; import com.fr.general.GeneralContext;
import com.fr.general.GeneralUtils; import com.fr.general.GeneralUtils;
import com.fr.i18n.UrlI18nManager;
import com.fr.locale.InterProviderFactory; import com.fr.locale.InterProviderFactory;
import com.fr.stable.ProductConstants; import com.fr.stable.ProductConstants;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
@ -82,7 +83,7 @@ public class AboutPane extends JPanel {
addPhoneAndQQPane(contentPane); addPhoneAndQQPane(contentPane);
// 官网 // 官网
JPanel urlActionPane = getURLActionPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Official_Website"), CloudCenter.getInstance().acquireConf("website." + GeneralContext.getLocale(), ProductConstants.WEBSITE_URL)); JPanel urlActionPane = getURLActionPane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Official_Website"), UrlI18nManager.getInstance().getI18nUrl("website"));
// 支持邮箱 // 支持邮箱
String defaultEmail = CloudCenter.getInstance().acquireConf("support.email", ProductConstants.SUPPORT_EMAIL); String defaultEmail = CloudCenter.getInstance().acquireConf("support.email", ProductConstants.SUPPORT_EMAIL);

4
designer-base/src/main/java/com/fr/design/actions/help/TutorialAction.java

@ -3,9 +3,9 @@ package com.fr.design.actions.help;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.login.AbstractDesignerSSO; import com.fr.design.login.AbstractDesignerSSO;
import com.fr.design.menu.MenuKeySet; import com.fr.design.menu.MenuKeySet;
import com.fr.general.CloudCenter;
import com.fr.general.GeneralContext; import com.fr.general.GeneralContext;
import com.fr.general.http.HttpToolbox; import com.fr.general.http.HttpToolbox;
import com.fr.i18n.UrlI18nManager;
import com.fr.stable.CommonUtils; import com.fr.stable.CommonUtils;
import com.fr.stable.ProductConstants; import com.fr.stable.ProductConstants;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
@ -28,7 +28,7 @@ public class TutorialAction extends AbstractDesignerSSO {
@Override @Override
public String getJumpUrl() { public String getJumpUrl() {
return CloudCenter.getInstance().acquireUrlByKind(createDocKey(), "http://help.finereport.com"); return UrlI18nManager.getInstance().getI18nUrl("help");
} }
// 生成帮助文档 sitecenter key, help.zh_CN.10 // 生成帮助文档 sitecenter key, help.zh_CN.10

18
designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java

@ -12,6 +12,7 @@ import com.fr.design.fun.ConnectionProvider;
import com.fr.design.gui.controlpane.JListControlPane; import com.fr.design.gui.controlpane.JListControlPane;
import com.fr.design.gui.controlpane.NameObjectCreator; import com.fr.design.gui.controlpane.NameObjectCreator;
import com.fr.design.gui.controlpane.NameableCreator; import com.fr.design.gui.controlpane.NameableCreator;
import com.fr.design.gui.ilist.ListModelElement;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.event.EventDispatcher; import com.fr.event.EventDispatcher;
import com.fr.file.ConnectionConfig; import com.fr.file.ConnectionConfig;
@ -27,13 +28,14 @@ import com.fr.third.org.apache.commons.collections4.MapUtils;
import com.fr.workspace.WorkContext; import com.fr.workspace.WorkContext;
import com.fr.file.ConnectionOperator; import com.fr.file.ConnectionOperator;
import java.awt.Window; import java.awt.Window;
import javax.swing.*; import javax.swing.SwingUtilities;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
import java.util.UUID;
/** /**
* Connection List Pane. * Connection List Pane.
@ -202,4 +204,18 @@ public class ConnectionListPane extends JListControlPane implements ConnectionSh
connectionListDialog.addDialogActionListener(new ConnectionListDialogActionAdapter(connectionManagerPane, connectionListDialog, connectionConfig)); connectionListDialog.addDialogActionListener(new ConnectionListDialogActionAdapter(connectionManagerPane, connectionListDialog, connectionConfig));
connectionListDialog.setVisible(true); connectionListDialog.setVisible(true);
} }
@Override
public void onCopyItem() {
super.onCopyItem();
ListModelElement selectedValue = getSelectedValue();
// identity 需要重置
if (selectedValue != null && selectedValue.wrapper != null) {
Object temp = ((NameObject) selectedValue.wrapper).getObject();
if (temp instanceof JDBCDatabaseConnection) {
JDBCDatabaseConnection object = (JDBCDatabaseConnection) temp;
object.setIdentity(UUID.randomUUID().toString());
}
}
}
} }

4
designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java

@ -16,8 +16,8 @@ import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.utils.BrowseUtils; import com.fr.design.utils.BrowseUtils;
import com.fr.file.filter.ChooseFileFilter; import com.fr.file.filter.ChooseFileFilter;
import com.fr.general.CloudCenter;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.i18n.UrlI18nManager;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.EncodeConstants; import com.fr.stable.EncodeConstants;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
@ -159,7 +159,7 @@ public class JDBCDefPane extends JPanel {
odbcTipsLink.setPreferredSize(new Dimension(GraphHelper.getWidth(Toolkit.i18nText("Fine-Design_Basic_Odbc_Tips")), odbcTipsLink.getPreferredSize().height)); odbcTipsLink.setPreferredSize(new Dimension(GraphHelper.getWidth(Toolkit.i18nText("Fine-Design_Basic_Odbc_Tips")), odbcTipsLink.getPreferredSize().height));
odbcTipsLink.addActionListener(new ActionListener() { odbcTipsLink.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) { public void actionPerformed(ActionEvent evt) {
String url = CloudCenter.getInstance().acquireUrlByKind("odbc.help"); String url = UrlI18nManager.getInstance().getI18nUrl("odbc.help");
BrowseUtils.browser(url); BrowseUtils.browser(url);
} }
}); });

3
designer-base/src/main/java/com/fr/design/gui/style/TranslucentBorderSpecialPane.java

@ -26,6 +26,7 @@ import com.fr.design.style.color.NewColorSelectBox;
import com.fr.env.utils.DesignerInteractionHistory; import com.fr.env.utils.DesignerInteractionHistory;
import com.fr.general.Background; import com.fr.general.Background;
import com.fr.general.IOUtils; import com.fr.general.IOUtils;
import com.fr.i18n.UrlI18nManager;
import com.fr.general.act.BorderPacker; import com.fr.general.act.BorderPacker;
import com.fr.stable.Constants; import com.fr.stable.Constants;
import com.fr.stable.GraphDrawHelper; import com.fr.stable.GraphDrawHelper;
@ -117,7 +118,7 @@ public class TranslucentBorderSpecialPane extends AbstractBorderPackerPane imple
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
Desktop desktop = Desktop.getDesktop(); Desktop desktop = Desktop.getDesktop();
try { try {
desktop.browse(new URI(TWEAK_NINE_POINT_HELP_URL)); desktop.browse(new URI(UrlI18nManager.getInstance().getI18nUrl("nine.point.help")));
} catch (IOException | URISyntaxException ioException) { } catch (IOException | URISyntaxException ioException) {
ioException.printStackTrace(); ioException.printStackTrace();
} }

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

@ -7,8 +7,8 @@ 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.IOUtils; import com.fr.general.IOUtils;
import com.fr.i18n.UrlI18nManager;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.JDialog; import javax.swing.JDialog;
@ -49,7 +49,8 @@ public class CheckFontInfoDialog extends JDialog implements ActionListener {
JPanel messagePanel = FRGUIPaneFactory.createVerticalFlowLayout_S_Pane(true); JPanel messagePanel = FRGUIPaneFactory.createVerticalFlowLayout_S_Pane(true);
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")); UrlI18nManager.getInstance().getI18nUrl("help.install.font")
);
linkMessage.setPreferredSize(DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink")); linkMessage.setPreferredSize(DesignSizeI18nManager.getInstance().i18nDimension("com.fr.design.mainframe.check.CheckFontInfoDialog.messageWithLink"));
messagePanel.add(linkMessage); messagePanel.add(linkMessage);

7
designer-base/src/main/java/com/fr/env/HelpLink.java vendored

@ -1,7 +1,7 @@
package com.fr.env; package com.fr.env;
import com.fr.general.locale.LocaleCenter;
import com.fr.general.locale.LocaleMark; import com.fr.i18n.UrlI18nManager;
import com.fr.locale.InterProviderFactory; import com.fr.locale.InterProviderFactory;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import java.util.HashMap; import java.util.HashMap;
@ -18,8 +18,7 @@ public class HelpLink {
public static String getLink(String solution) { public static String getLink(String solution) {
Map<String, String> map = new HashMap<>(); Map<String, String> map = new HashMap<>();
LocaleMark<String> linkMark = LocaleCenter.getMark(RemoteDesignLocaleMark.class); String link = UrlI18nManager.getInstance().getI18nUrl("help.remote.design");
String link = linkMark.getValue();
map.put(InterProviderFactory.getProvider().getLocText("Fine-Core_Remote_Design_Change_PassWord"), StringUtils.EMPTY); map.put(InterProviderFactory.getProvider().getLocText("Fine-Core_Remote_Design_Change_PassWord"), StringUtils.EMPTY);
map.put(InterProviderFactory.getProvider().getLocText("Fine-Core_Remote_Design_Cert_Error_Solution"), link); map.put(InterProviderFactory.getProvider().getLocText("Fine-Core_Remote_Design_Cert_Error_Solution"), link);
map.put(InterProviderFactory.getProvider().getLocText("Fine-Core_Remote_Design_Connection_Unknown_Error_Solution"), link); map.put(InterProviderFactory.getProvider().getLocText("Fine-Core_Remote_Design_Connection_Unknown_Error_Solution"), link);

Loading…
Cancel
Save