fix(测试用例): 全局修改

This commit is contained in:
WangXu10 2024-08-17 20:07:42 +08:00 committed by 刘瑞斌
parent e52b3cc378
commit 42e54321af
7 changed files with 16 additions and 16 deletions

View File

@ -81,9 +81,9 @@ public class BugCommentNoticeService {
private static void setLanguage(String language) { private static void setLanguage(String language) {
Locale locale = Locale.SIMPLIFIED_CHINESE; Locale locale = Locale.SIMPLIFIED_CHINESE;
if (StringUtils.containsIgnoreCase("US",language)) { if (StringUtils.containsIgnoreCase(language, "US")) {
locale = Locale.US; locale = Locale.US;
} else if (StringUtils.containsIgnoreCase("TW",language)){ } else if (StringUtils.containsIgnoreCase(language, "TW")){
locale = Locale.TAIWAN; locale = Locale.TAIWAN;
} }
LocaleContextHolder.setLocale(locale); LocaleContextHolder.setLocale(locale);

View File

@ -89,9 +89,9 @@ public class BugSyncNoticeService {
private static void setLanguage(String language) { private static void setLanguage(String language) {
Locale locale = Locale.SIMPLIFIED_CHINESE; Locale locale = Locale.SIMPLIFIED_CHINESE;
if (StringUtils.containsIgnoreCase("US",language)) { if (StringUtils.containsIgnoreCase(language, "US")) {
locale = Locale.US; locale = Locale.US;
} else if (StringUtils.containsIgnoreCase("TW",language)){ } else if (StringUtils.containsIgnoreCase(language, "TW")){
locale = Locale.TAIWAN; locale = Locale.TAIWAN;
} }
LocaleContextHolder.setLocale(locale); LocaleContextHolder.setLocale(locale);

View File

@ -193,9 +193,9 @@ public class FunctionalCaseCommentService {
private static void setLanguage(String language) { private static void setLanguage(String language) {
Locale locale = Locale.SIMPLIFIED_CHINESE; Locale locale = Locale.SIMPLIFIED_CHINESE;
if (StringUtils.containsIgnoreCase("US",language)) { if (StringUtils.containsIgnoreCase(language, "US")) {
locale = Locale.US; locale = Locale.US;
} else if (StringUtils.containsIgnoreCase("TW",language)){ } else if (StringUtils.containsIgnoreCase(language, "TW")){
locale = Locale.TAIWAN; locale = Locale.TAIWAN;
} }
LocaleContextHolder.setLocale(locale); LocaleContextHolder.setLocale(locale);

View File

@ -89,9 +89,9 @@ public class ReviewSendNoticeService {
private static void setLanguage(String language) { private static void setLanguage(String language) {
Locale locale = Locale.SIMPLIFIED_CHINESE; Locale locale = Locale.SIMPLIFIED_CHINESE;
if (StringUtils.containsIgnoreCase("US",language)) { if (StringUtils.containsIgnoreCase(language, "US")) {
locale = Locale.US; locale = Locale.US;
} else if (StringUtils.containsIgnoreCase("TW",language)){ } else if (StringUtils.containsIgnoreCase(language, "TW")){
locale = Locale.TAIWAN; locale = Locale.TAIWAN;
} }
LocaleContextHolder.setLocale(locale); LocaleContextHolder.setLocale(locale);

View File

@ -116,9 +116,9 @@ public class CommonNoticeSendService {
private static void setLanguage(String language) { private static void setLanguage(String language) {
Locale locale = Locale.SIMPLIFIED_CHINESE; Locale locale = Locale.SIMPLIFIED_CHINESE;
if (StringUtils.containsIgnoreCase("US", language)) { if (StringUtils.containsIgnoreCase(language, "US")) {
locale = Locale.US; locale = Locale.US;
} else if (StringUtils.containsIgnoreCase("TW", language)) { } else if (StringUtils.containsIgnoreCase(language, "TW")) {
locale = Locale.TAIWAN; locale = Locale.TAIWAN;
} }
LocaleContextHolder.setLocale(locale); LocaleContextHolder.setLocale(locale);

View File

@ -92,9 +92,9 @@ public class NoticeSendService {
private static void setLanguage(NoticeModel noticeModel) { private static void setLanguage(NoticeModel noticeModel) {
String language = (String) noticeModel.getParamMap().get("Language"); String language = (String) noticeModel.getParamMap().get("Language");
Locale locale = Locale.SIMPLIFIED_CHINESE; Locale locale = Locale.SIMPLIFIED_CHINESE;
if (StringUtils.containsIgnoreCase("US",language)) { if (StringUtils.containsIgnoreCase(language,"US")) {
locale = Locale.US; locale = Locale.US;
} else if (StringUtils.containsIgnoreCase("TW",language)){ } else if (StringUtils.containsIgnoreCase(language,"TW")){
locale = Locale.TAIWAN; locale = Locale.TAIWAN;
} }
LocaleContextHolder.setLocale(locale); LocaleContextHolder.setLocale(locale);
@ -102,9 +102,9 @@ public class NoticeSendService {
public void setLanguage(String language) { public void setLanguage(String language) {
Locale locale = Locale.SIMPLIFIED_CHINESE; Locale locale = Locale.SIMPLIFIED_CHINESE;
if (StringUtils.containsIgnoreCase("US",language)) { if (StringUtils.containsIgnoreCase(language,"US")) {
locale = Locale.US; locale = Locale.US;
} else if (StringUtils.containsIgnoreCase("TW",language)){ } else if (StringUtils.containsIgnoreCase(language,"TW")){
locale = Locale.TAIWAN; locale = Locale.TAIWAN;
} }
LocaleContextHolder.setLocale(locale); LocaleContextHolder.setLocale(locale);

View File

@ -98,9 +98,9 @@ public class TestPlanSendNoticeService {
private static void setLanguage(String language) { private static void setLanguage(String language) {
Locale locale = Locale.SIMPLIFIED_CHINESE; Locale locale = Locale.SIMPLIFIED_CHINESE;
if (StringUtils.containsIgnoreCase("US", language)) { if (StringUtils.containsIgnoreCase(language, "US")) {
locale = Locale.US; locale = Locale.US;
} else if (StringUtils.containsIgnoreCase("TW", language)) { } else if (StringUtils.containsIgnoreCase(language, "TW")) {
locale = Locale.TAIWAN; locale = Locale.TAIWAN;
} }
LocaleContextHolder.setLocale(locale); LocaleContextHolder.setLocale(locale);