From 396368458a641c06256f69b8a36681e8dc3f9589 Mon Sep 17 00:00:00 2001 From: plough Date: Tue, 7 Mar 2017 16:49:07 +0800 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-2093=20=E8=8B=B1=E6=96=87=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8=E5=90=AF=E5=8A=A8=E6=97=B6=EF=BC=8C=E5=8F=B3?= =?UTF-8?q?=E4=B8=8B=E8=A7=92=E7=9A=84=E9=B8=A3=E8=B0=A2=E9=83=A8=E5=88=86?= =?UTF-8?q?=E8=AF=B7=E5=8E=BB=E6=8E=89=EF=BC=9B=E5=85=B3=E4=BA=8E=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8=E9=83=A8=E5=88=86=E7=9A=84=E9=B8=A3=E8=B0=A2?= =?UTF-8?q?=E4=B9=9F=E5=8E=BB=E6=8E=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/start/ReportSplashPane.java | 22 +++++++++++++--- .../com/fr/design/actions/help/AboutPane.java | 25 ++++++++++++++----- 2 files changed, 38 insertions(+), 9 deletions(-) diff --git a/designer/src/com/fr/start/ReportSplashPane.java b/designer/src/com/fr/start/ReportSplashPane.java index ab45bc453..7ae0bc63c 100644 --- a/designer/src/com/fr/start/ReportSplashPane.java +++ b/designer/src/com/fr/start/ReportSplashPane.java @@ -4,6 +4,7 @@ package com.fr.start; import com.fr.base.BaseUtils; +import com.fr.base.FRContext; import com.fr.base.GraphHelper; import com.fr.design.mainframe.bbs.BBSConstants; import com.fr.general.GeneralContext; @@ -18,6 +19,8 @@ import java.awt.*; import java.awt.font.FontRenderContext; import java.awt.font.LineMetrics; import java.awt.image.BufferedImage; +import java.util.ArrayList; +import java.util.Locale; import java.util.Random; import java.util.TimerTask; @@ -117,9 +120,22 @@ public class ReportSplashPane extends SplashPane{ GraphHelper.drawString(splashG2d, showText, MODULE_INFO_X, y); //每次随机感谢一位论坛用户 - splashG2d.setPaint(THANK_COLOR); - String content = Inter.getLocText("FR-Designer_Thanks-To") + GUEST; - GraphHelper.drawString(splashG2d, content, THANK_INFO_X, y); + if (shouldShowThanks()) { + splashG2d.setPaint(THANK_COLOR); + String content = Inter.getLocText("FR-Designer_Thanks-To") + GUEST; + GraphHelper.drawString(splashG2d, content, THANK_INFO_X, y); + } + } + + // 是否显示鸣谢文字 + private boolean shouldShowThanks() { + Locale[] hideLocales = {Locale.US, Locale.KOREA, Locale.JAPAN}; + for (Locale loc : hideLocales) { + if (FRContext.getLocale().equals(loc)) { + return false; + } + } + return true; } private static String getRandomUser(){ 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 5ee395f80..9c8953597 100644 --- a/designer_base/src/com/fr/design/actions/help/AboutPane.java +++ b/designer_base/src/com/fr/design/actions/help/AboutPane.java @@ -68,10 +68,7 @@ public class AboutPane extends JPanel { Inter.getLocText("FR-Designer-Basic_Activation_Key_Copy_OK") })); - // 英文去掉服务电话和 QQ - if (FRContext.getLocale().equals(Locale.US)){ - // do nothing - } else { + if (shouldShowPhoneAndQQ()){ if(ComparatorUtils.equals(ProductConstants.APP_NAME,FINEREPORT)){ boxCenterAlignmentPane = new BoxCenterAligmentPane(Inter.getLocText("FR-Designer_Service_Phone") + ProductConstants.COMPARE_TELEPHONE); contentPane.add(boxCenterAlignmentPane); @@ -85,8 +82,24 @@ public class AboutPane extends JPanel { contentPane.add(actionLabel); contentPane.add(emailLabel); - - addThankPane(contentPane); + if (shouldShowThanks()) { + addThankPane(contentPane); + } + } + + // 是否显示服务电话和 qq + private boolean shouldShowPhoneAndQQ() { + return !FRContext.getLocale().equals(Locale.US); + } + // 是否显示鸣谢面板 + private boolean shouldShowThanks() { + Locale[] hideLocales = {Locale.US, Locale.KOREA, Locale.JAPAN}; + for (Locale loc : hideLocales) { + if (FRContext.getLocale().equals(loc)) { + return false; + } + } + return true; } //添加鸣谢面板 From baf564760bb4d7eefec8a6db88aa30747f854261 Mon Sep 17 00:00:00 2001 From: plough Date: Tue, 7 Mar 2017 16:50:55 +0800 Subject: [PATCH 2/2] =?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 --- designer/src/com/fr/start/ReportSplashPane.java | 1 - 1 file changed, 1 deletion(-) diff --git a/designer/src/com/fr/start/ReportSplashPane.java b/designer/src/com/fr/start/ReportSplashPane.java index 7ae0bc63c..5f2f3acd2 100644 --- a/designer/src/com/fr/start/ReportSplashPane.java +++ b/designer/src/com/fr/start/ReportSplashPane.java @@ -19,7 +19,6 @@ import java.awt.*; import java.awt.font.FontRenderContext; import java.awt.font.LineMetrics; import java.awt.image.BufferedImage; -import java.util.ArrayList; import java.util.Locale; import java.util.Random; import java.util.TimerTask;