【i18n】统一语种编码名称,loginUser增加当前用户的语种

pull/3/head
fengshuonan 2021-01-27 21:56:53 +08:00
parent 36b7ac11e2
commit a71a276c28
5 changed files with 11 additions and 4 deletions

View File

@ -94,6 +94,13 @@ public class LoginUser implements Serializable {
*/
private String wsUrl;
/**
* chineseenglish
* <p>
* languages
*/
private String tranLanguageCode;
public String getWsUrl() {
AtomicReference<String> returnUrl = new AtomicReference<>(StrUtil.EMPTY);
Optional.ofNullable(this.wsUrl).ifPresent(url -> {

View File

@ -26,7 +26,7 @@ public class TranslationDict implements Serializable {
/**
* languages
*/
private String translationLanguages;
private String tranLanguageCode;
/**
*

View File

@ -40,7 +40,7 @@ public class TranslationRequest extends BaseRequest {
/**
*
*/
@NotBlank(message = "language不能为空", groups = {add.class, edit.class})
@NotBlank(message = "tranLanguageCode不能为空", groups = {add.class, edit.class})
private String tranLanguageCode;
/**

View File

@ -22,7 +22,7 @@ public class TranslationDictFactory {
translationDict.setTranName(translation.getTranName());
translationDict.setTranCode(translation.getTranCode());
translationDict.setTranValue(translation.getTranValue());
translationDict.setTranslationLanguages(translationLanguages);
translationDict.setTranLanguageCode(translationLanguages);
return translationDict;
}

View File

@ -37,7 +37,7 @@ public class TranslationContainer implements TranslationApi {
@Override
public void addTranslationDict(TranslationDict translationDict) {
String translationLanguages = translationDict.getTranslationLanguages();
String translationLanguages = translationDict.getTranLanguageCode();
Map<String, String> languageDict = TRAN_DICT_CONTAINER.get(translationLanguages);
if (languageDict == null) {