Commit b12b31c3 authored by yanzg's avatar yanzg

修复等待时间

parent ab031ccf
......@@ -36,7 +36,7 @@ public class YzgLanguage {
/**
* 默认场景
*/
public static final String SCENE_Global = "GLOBAL";
public static final String SCENE_GLOBAL = "GLOBAL";
/**
* 英语
......@@ -49,7 +49,7 @@ public class YzgLanguage {
/**
* 整个系统默认语言
*/
private String defaulLanguage = LANGUAGE_EN;
private String defaultLanguage = LANGUAGE_EN;
/**
* 当前线程默认语言
*/
......@@ -67,10 +67,10 @@ public class YzgLanguage {
/**
* 设置默认语言,默认为英语(en)
*
* @param defaulLanguage
* @param defaultLanguage
*/
public YzgLanguage setDefaulLanguage(String defaulLanguage) {
this.defaulLanguage = defaulLanguage;
public YzgLanguage setDefaultLanguage(String defaultLanguage) {
this.defaultLanguage = defaultLanguage;
return this;
}
......@@ -79,8 +79,8 @@ public class YzgLanguage {
*
* @return
*/
public String getDefaulLanguage() {
return defaulLanguage;
public String getDefaultLanguage() {
return defaultLanguage;
}
......@@ -111,7 +111,7 @@ public class YzgLanguage {
* @return
*/
public String getLanguage() {
return StringHelper.getFirst(this.threadLanguage.get(), defaulLanguage);
return StringHelper.getFirst(this.threadLanguage.get(), defaultLanguage);
}
/**
......@@ -141,7 +141,7 @@ public class YzgLanguage {
* @return
*/
public String getScene() {
return StringHelper.getFirst(this.threadScene.get(), SCENE_Global);
return StringHelper.getFirst(this.threadScene.get(), SCENE_GLOBAL);
}
......@@ -195,7 +195,7 @@ public class YzgLanguage {
// 获取语言对应关系
Map<String, String> defaultFrom = getDefaultFrom(sceneName, defaultLanguageValue);
// 设置默认语言
defaultFrom.put(defaulLanguage, defaultLanguageValue);
defaultFrom.put(defaultLanguage, defaultLanguageValue);
// 设置语言
defaultFrom.put(language, languageValue);
......@@ -231,7 +231,7 @@ public class YzgLanguage {
return ret;
}
// 获取语言对应关系
Map<String, String> globalFrom = getDefaultFrom(SCENE_Global, defaultLanguageValue);
Map<String, String> globalFrom = getDefaultFrom(SCENE_GLOBAL, defaultLanguageValue);
// 获取对应语言
ret = globalFrom.get(language);
if (!StringHelper.isEmpty(ret)) {
......
......@@ -26,10 +26,10 @@ public class CheckHelperTest {
@Test
public void testCh() {
// 设置默认语言为中文
language.setDefaulLanguage(YzgLanguage.LANGUAGE_CH);
language.setDefaultLanguage(YzgLanguage.LANGUAGE_CH);
testEn();
// 设置默认语言为英文
language.setDefaulLanguage(YzgLanguage.LANGUAGE_EN);
language.setDefaultLanguage(YzgLanguage.LANGUAGE_EN);
}
@Test
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment