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 c16f2047b9..5ee395f801 100644 --- a/designer_base/src/com/fr/design/actions/help/AboutPane.java +++ b/designer_base/src/com/fr/design/actions/help/AboutPane.java @@ -80,16 +80,8 @@ public class AboutPane extends JPanel { contentPane.add(boxCenterAlignmentPane); } - String locale; // SiteCenter 取值的 key 后缀 - if (FRContext.getLocale().equals(Locale.US)) { - locale = ".en"; - } else if (FRContext.getLocale().equals(Locale.JAPAN)) { - locale = ".jp"; - } else { - locale = ""; - } - BoxCenterAligmentPane actionLabel = getURLActionLabel(SiteCenter.getInstance().acquireUrlByKind("website" + locale, ProductConstants.WEBSITE_URL)); - BoxCenterAligmentPane emailLabel = getEmailActionLabel(SiteCenter.getInstance().acquireUrlByKind("register.email", ProductConstants.SUPPORT_EMAIL)); + BoxCenterAligmentPane actionLabel = getURLActionLabel(SiteCenter.getInstance().acquireUrlByKind("website." + FRContext.getLocale(), ProductConstants.WEBSITE_URL)); + BoxCenterAligmentPane emailLabel = getEmailActionLabel(SiteCenter.getInstance().acquireUrlByKind("support.email", ProductConstants.SUPPORT_EMAIL)); contentPane.add(actionLabel); contentPane.add(emailLabel); diff --git a/designer_base/src/com/fr/design/actions/help/TutorialAction.java b/designer_base/src/com/fr/design/actions/help/TutorialAction.java index c62ad00262..8ae2b2962e 100644 --- a/designer_base/src/com/fr/design/actions/help/TutorialAction.java +++ b/designer_base/src/com/fr/design/actions/help/TutorialAction.java @@ -59,20 +59,13 @@ public class TutorialAction extends UpdateAction { * @param evt 事件 */ public void actionPerformed(ActionEvent evt) { - Locale locale = FRContext.getLocale(); - String helpKey = ""; + String helpURL = SiteCenter.getInstance().acquireUrlByKind("help." + FRContext.getLocale()); - if (ComparatorUtils.equals(locale, Locale.CHINA) || ComparatorUtils.equals(locale, Locale.TAIWAN)) { - helpKey = "help"; - } else if (ComparatorUtils.equals(locale, Locale.US)) { - helpKey = "help.en"; - } - - if (!helpKey.isEmpty()) { - HttpClient client = new HttpClient(SiteCenter.getInstance().acquireUrlByKind(helpKey)); + if (helpURL != null) { + HttpClient client = new HttpClient(helpURL); if(client.getResponseCode() != -1) { try { - Desktop.getDesktop().browse(new URI(SiteCenter.getInstance().acquireUrlByKind(helpKey))); + Desktop.getDesktop().browse(new URI(helpURL)); return; } catch (Exception e) { //出了异常的话, 依然打开本地教程