From 81aba4b52a187506abf63ae742b8aa116132503c Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 6 Feb 2017 13:50:49 +0800 Subject: [PATCH 1/4] =?UTF-8?q?REPORT-1415=20=E5=B0=86=E4=BA=A7=E5=93=81?= =?UTF-8?q?=E9=87=8C=E7=94=A8finereport=E5=90=8E=E7=BC=80=E7=9A=84?= =?UTF-8?q?=E6=94=B9=E6=88=90fanruan?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/actions/help/AboutPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/actions/help/AboutPane.java b/designer_base/src/com/fr/design/actions/help/AboutPane.java index 4249b26346..c703306b22 100644 --- a/designer_base/src/com/fr/design/actions/help/AboutPane.java +++ b/designer_base/src/com/fr/design/actions/help/AboutPane.java @@ -81,7 +81,7 @@ public class AboutPane extends JPanel { } BoxCenterAligmentPane actionLabel = getURLActionLabel(ProductConstants.WEBSITE_URL); - BoxCenterAligmentPane emailLabel = getEmailActionLabel(ProductConstants.SUPPORT_EMAIL); + BoxCenterAligmentPane emailLabel = getEmailActionLabel(SiteCenter.getInstance().acquireUrlByKind("register.email", ProductConstants.SUPPORT_EMAIL)); contentPane.add(actionLabel); contentPane.add(emailLabel); From 97d52818037e269e6977fb2c9cfe82e0a2ecebc5 Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 6 Feb 2017 14:04:59 +0800 Subject: [PATCH 2/4] =?UTF-8?q?REPORT-1415=20=E5=B0=86=E4=BA=A7=E5=93=81?= =?UTF-8?q?=E9=87=8C=E7=94=A8finereport=E5=90=8E=E7=BC=80=E7=9A=84?= =?UTF-8?q?=E6=94=B9=E6=88=90fanruan?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- designer_base/src/com/fr/design/actions/help/AboutPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/actions/help/AboutPane.java b/designer_base/src/com/fr/design/actions/help/AboutPane.java index c703306b22..7f00b5d7cc 100644 --- a/designer_base/src/com/fr/design/actions/help/AboutPane.java +++ b/designer_base/src/com/fr/design/actions/help/AboutPane.java @@ -80,7 +80,7 @@ public class AboutPane extends JPanel { contentPane.add(boxCenterAlignmentPane); } - BoxCenterAligmentPane actionLabel = getURLActionLabel(ProductConstants.WEBSITE_URL); + BoxCenterAligmentPane actionLabel = getURLActionLabel(SiteCenter.getInstance().acquireUrlByKind("website", ProductConstants.WEBSITE_URL)); BoxCenterAligmentPane emailLabel = getEmailActionLabel(SiteCenter.getInstance().acquireUrlByKind("register.email", ProductConstants.SUPPORT_EMAIL)); contentPane.add(actionLabel); From 446435a6ae3ff7e62c91d0282b4d7bb47c0e9fb2 Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 6 Feb 2017 14:56:27 +0800 Subject: [PATCH 3/4] =?UTF-8?q?REPORT-1379=20=E8=8B=B1=E6=96=87=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8=EF=BC=8C=E6=97=A5=E6=96=87=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=99=A8=E5=8E=BB=E6=8E=89community?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/actions/community/VideoAction.java | 38 +++++++++++-------- .../mainframe/toolbar/ToolBarMenuDock.java | 6 ++- 2 files changed, 26 insertions(+), 18 deletions(-) diff --git a/designer_base/src/com/fr/design/actions/community/VideoAction.java b/designer_base/src/com/fr/design/actions/community/VideoAction.java index 86b411ace4..9672519ca3 100644 --- a/designer_base/src/com/fr/design/actions/community/VideoAction.java +++ b/designer_base/src/com/fr/design/actions/community/VideoAction.java @@ -5,6 +5,7 @@ import java.awt.event.ActionEvent; import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; +import java.util.Locale; import javax.swing.JOptionPane; import javax.swing.KeyStroke; @@ -32,22 +33,27 @@ public class VideoAction extends UpdateAction @Override public void actionPerformed(ActionEvent arg0) { - String url = SiteCenter.getInstance().acquireUrlByKind("bbs.video"); - if (StringUtils.isEmpty(url)) { - FRContext.getLogger().info("The URL is empty!"); - return; - } - try { - Desktop.getDesktop().browse(new URI(url)); - } catch (IOException exp) { - JOptionPane.showMessageDialog(null, Inter.getLocText("Set_default_browser")); - FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp); - } catch (URISyntaxException exp) { - FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp); - } catch (Exception exp) { - FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp); - FRContext.getLogger().error("Can not open the browser for URL: " + url); - } + String url; + if (FRContext.getLocale().equals(Locale.US)) { + url = SiteCenter.getInstance().acquireUrlByKind("bbs.video.en"); + } else { + url = SiteCenter.getInstance().acquireUrlByKind("bbs.video"); + } + if (StringUtils.isEmpty(url)) { + FRContext.getLogger().info("The URL is empty!"); + return; + } + try { + Desktop.getDesktop().browse(new URI(url)); + } catch (IOException exp) { + JOptionPane.showMessageDialog(null, Inter.getLocText("Set_default_browser")); + FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp); + } catch (URISyntaxException exp) { + FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp); + } catch (Exception exp) { + FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp); + FRContext.getLogger().error("Can not open the browser for URL: " + url); + } } public static final MenuKeySet VIDEO = new MenuKeySet() { diff --git a/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java b/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java index a5a3b94994..4113370661 100644 --- a/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java +++ b/designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java @@ -160,9 +160,7 @@ public abstract class ToolBarMenuDock { public Locale[] supportCommunityLocales() { return new Locale[]{ Locale.CHINA, - Locale.JAPAN, Locale.TAIWAN, - Locale.US, }; } @@ -314,6 +312,10 @@ public abstract class ToolBarMenuDock { public ShortCut[] createHelpShortCuts() { java.util.List shortCuts = new ArrayList(); shortCuts.add(new WebDemoAction()); + // 英文,把 video 的链接放到 Help 下面 + if (FRContext.getLocale().equals(Locale.US)) { + shortCuts.add(new VideoAction()); + } shortCuts.add(SeparatorDef.DEFAULT); //shortCuts.add(new TutorialAction()); shortCuts.add(SeparatorDef.DEFAULT); From e67c89a2ba70ffe7551f4fcb8bdae078228b452e Mon Sep 17 00:00:00 2001 From: plough Date: Mon, 6 Feb 2017 15:18:50 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/actions/community/VideoAction.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/actions/community/VideoAction.java b/designer_base/src/com/fr/design/actions/community/VideoAction.java index 9672519ca3..ea53fbf8f5 100644 --- a/designer_base/src/com/fr/design/actions/community/VideoAction.java +++ b/designer_base/src/com/fr/design/actions/community/VideoAction.java @@ -46,7 +46,7 @@ public class VideoAction extends UpdateAction try { Desktop.getDesktop().browse(new URI(url)); } catch (IOException exp) { - JOptionPane.showMessageDialog(null, Inter.getLocText("Set_default_browser")); + JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Designer_Set_default_browser")); FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp); } catch (URISyntaxException exp) { FRContext.getLogger().errorWithServerLevel(exp.getMessage(), exp);