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..ea53fbf8f5 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("FR-Designer_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/actions/help/AboutPane.java b/designer_base/src/com/fr/design/actions/help/AboutPane.java index 4249b26346..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,8 +80,8 @@ public class AboutPane extends JPanel { contentPane.add(boxCenterAlignmentPane); } - BoxCenterAligmentPane actionLabel = getURLActionLabel(ProductConstants.WEBSITE_URL); - BoxCenterAligmentPane emailLabel = getEmailActionLabel(ProductConstants.SUPPORT_EMAIL); + BoxCenterAligmentPane actionLabel = getURLActionLabel(SiteCenter.getInstance().acquireUrlByKind("website", ProductConstants.WEBSITE_URL)); + BoxCenterAligmentPane emailLabel = getEmailActionLabel(SiteCenter.getInstance().acquireUrlByKind("register.email", ProductConstants.SUPPORT_EMAIL)); contentPane.add(actionLabel); contentPane.add(emailLabel); 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);