yubin 1 долоо хоног өмнө
parent
commit
e8934eb57a
17 өөрчлөгдсөн 403 нэмэгдсэн , 46 устгасан
  1. 4 3
      backstage-service/src/main/java/com/txz/backstage/configurer/MyWebMvcConfigurer.java
  2. 2 1
      backstage-service/src/main/java/com/txz/backstage/core/RedisUtil.java
  3. 57 38
      backstage-service/src/main/java/com/txz/backstage/core/ResultCode.java
  4. 3 1
      backstage-service/src/main/java/com/txz/backstage/core/cache/CacheKey.java
  5. 3 0
      backstage-service/src/main/java/com/txz/backstage/filter/AccessGlobalFilter.java
  6. 44 0
      backstage-service/src/main/java/com/txz/backstage/filter/LanguageWebFilter.java
  7. 4 3
      backstage-service/src/main/java/com/txz/backstage/service/impl/RolePermissionServiceImpl.java
  8. 75 0
      backstage-service/src/main/java/com/txz/backstage/util/I18nUtil.java
  9. 22 0
      backstage-service/src/main/java/com/txz/backstage/util/LanguageContextHolder.java
  10. 49 0
      backstage-service/src/main/java/com/txz/backstage/web/mng/i18nTestController.java
  11. 6 0
      backstage-service/src/main/resources/bootstrap.properties
  12. 16 0
      backstage-service/src/main/resources/i18n/error.properties
  13. 16 0
      backstage-service/src/main/resources/i18n/error_in_ID.properties
  14. 0 0
      backstage-service/src/main/resources/i18n/messages.properties
  15. 0 0
      backstage-service/src/main/resources/i18n/messages_bn_BD.properties
  16. 50 0
      backstage-service/src/main/resources/i18n/messages_en_US.properties
  17. 52 0
      backstage-service/src/main/resources/i18n/messages_zh_CN.properties

+ 4 - 3
backstage-service/src/main/java/com/txz/backstage/configurer/MyWebMvcConfigurer.java

@@ -11,6 +11,7 @@ import com.txz.backstage.core.cache.CacheKey;
 import com.txz.backstage.core.cache.CacheType;
 import com.txz.backstage.core.interceptor.NoToken;
 import com.txz.backstage.core.ProjectConstant;
+import com.txz.backstage.util.I18nUtil;
 import com.txz.core.Result;
 
 import com.txz.core.ServiceException;
@@ -94,16 +95,16 @@ public class MyWebMvcConfigurer implements WebMvcConfigurer {
                     logger.info(e.getMessage());
                 } else if (e instanceof NoHandlerFoundException) {
                     result.setCode(ResultCode.NOT_FOUND.getCode()).setMessage(
-                            "接口 [" + request.getRequestURI() + "] 不存在");
+                            I18nUtil.get("interface")+" [" + request.getRequestURI() + "] "+ I18nUtil.get("does.not.exist"));
                 } else if (e instanceof ServletException) {
                     result.setCode(ResultCode.FAIL.getCode()).setMessage(e.getMessage());
                 } else {
                     result.setCode(ResultCode.INTERNAL_SERVER_ERROR.getCode()).setMessage(
-                            "接口 [" + request.getRequestURI() + "] 内部错误,请联系管理员");
+                            I18nUtil.get("interface")+" [" + request.getRequestURI() + "] "+I18nUtil.get("internal.error.please.contact.the.administrator"));
                     String message;
                     if (handler instanceof HandlerMethod) {
                         HandlerMethod handlerMethod = (HandlerMethod) handler;
-                        message = String.format("接口 [%s] 出现异常,方法:%s.%s,异常摘要:%s",
+                        message = String.format(I18nUtil.get("interface")+" [%s] "+I18nUtil.get("exception.occurred")+","+I18nUtil.get("method")+":%s.%s,"+I18nUtil.get("exception.summary")+":%s",
                                 request.getRequestURI(), handlerMethod.getBean().getClass().getName(),
                                 handlerMethod.getMethod().getName(), e.getMessage());
                     } else {

+ 2 - 1
backstage-service/src/main/java/com/txz/backstage/core/RedisUtil.java

@@ -8,6 +8,7 @@ import java.util.concurrent.TimeUnit;
 
 import javax.annotation.Resource;
 
+import com.txz.backstage.util.I18nUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.stereotype.Component;
@@ -183,7 +184,7 @@ public class RedisUtil {
 	 */
 	public long incr(String key, long delta){
 		if(delta<0){
-			throw new RuntimeException("递增因子必须大于0");
+			throw new RuntimeException(I18nUtil.get("increment.factor.must.be.greater.than.0"));
 		}
 		return redisTemplate.opsForValue().increment(key, delta);
 	}

+ 57 - 38
backstage-service/src/main/java/com/txz/backstage/core/ResultCode.java

@@ -1,5 +1,8 @@
 package com.txz.backstage.core;
 
+import cn.hutool.core.util.StrUtil;
+import com.txz.backstage.util.I18nUtil;
+
 /**
  * 响应码枚举,参考HTTP状态码的语义
  */
@@ -7,57 +10,59 @@ public enum ResultCode {
     /**
      * 系统错误
      */
-    SUCCESS("200","成功"),//成功
-    FAIL("400","失败"),//失败
-    UNAUTHORIZED("401","未认证(签名错误)"),//未认证(签名错误)
-    NOT_FOUND("404","接口不存在"),//接口不存在
-    INTERNAL_SERVER_ERROR("500","服务器内部错误"),
-    PERMISSION_NOT_HAS("409","没有操作权限"),
-    BACKSTAGE_IS_ERROR("501","网关异常"),
-    
+    SUCCESS("200", "成功"),//成功
+    FAIL("400", "失败"),//失败
+    UNAUTHORIZED("401", "未认证(签名错误)"),//未认证(签名错误)
+    NOT_FOUND("404", "接口不存在"),//接口不存在
+    INTERNAL_SERVER_ERROR("500", "服务器内部错误"),
+    PERMISSION_NOT_HAS("409", "没有操作权限"),
+    BACKSTAGE_IS_ERROR("501", "网关异常"),
+
     /**
      * 业务错误
      */
-    OBJECT_IS_NULL("6000","对象不能为空"),
-    ID_IS_NULL("6001","对象ID不能为空"),
-    CODE_IS_NULL("6002","编号不能为空"),
-    NAME_IS_NULL("6003","名称不能为空"),
-    SEQ_IS_NULL("6004","排序不能为空"),
-    LEVEL_IS_NULL("6005","级别不能为空"),
-    USERID_IS_NULL("6006","用户id不能为空"),
-    RESULT_IS_NULL("6007","查询结果为空"),
-    TYPE_IS_NULL("6008","查询结果为空"),
-    SQL_ERROR("6009","数据库异常"),
-    IDENTITY_IS_NULL("6010","身份证不能为空"),
-    CUSTOMERID_IS_NULL("6011","客户号不能为空"),
-    CUSTOMERID_IS_ERROR("6012","未查询到用户信息"),
-    SELECT_IS_ERROR("6013","数据异常查询失败,请联系检查用户信息"),
-    IDENTITYUPKEY_IS_ERROR("6014","身份证正面照片key不能为空"),
-    CODE_IS_INVALID("6015","验证码无效"),
-    TOKEN_IS_NULL("6016","TOKEN不能为空"),
+    OBJECT_IS_NULL("6000", "对象不能为空"),
+    ID_IS_NULL("6001", "对象ID不能为空"),
+    CODE_IS_NULL("6002", "编号不能为空"),
+    NAME_IS_NULL("6003", "名称不能为空"),
+    SEQ_IS_NULL("6004", "排序不能为空"),
+    LEVEL_IS_NULL("6005", "级别不能为空"),
+    USERID_IS_NULL("6006", "用户id不能为空"),
+    RESULT_IS_NULL("6007", "查询结果为空"),
+    TYPE_IS_NULL("6008", "查询结果为空"),
+    SQL_ERROR("6009", "数据库异常"),
+    IDENTITY_IS_NULL("6010", "身份证不能为空"),
+    CUSTOMERID_IS_NULL("6011", "客户号不能为空"),
+    CUSTOMERID_IS_ERROR("6012", "未查询到用户信息"),
+    SELECT_IS_ERROR("6013", "数据异常查询失败,请联系检查用户信息"),
+    IDENTITYUPKEY_IS_ERROR("6014", "身份证正面照片key不能为空"),
+    CODE_IS_INVALID("6015", "验证码无效"),
+    TOKEN_IS_NULL("6016", "TOKEN不能为空"),
 
     /**
      * 权限
      */
-    PERMISSION_ENAME_IS_NULL("6040","英文名不能为空"),
-    PERMISSION_ISACTION_IS_NULL("6041","是否有动作不能为空"),
-    PERMISSION_COMPOSINGKEY_IS_NULL("6042","排版不能为空"),
-    PERMISSIONID_IS_NULL("6043","权限id不能为空"),
+    PERMISSION_ENAME_IS_NULL("6040", "英文名不能为空"),
+    PERMISSION_ISACTION_IS_NULL("6041", "是否有动作不能为空"),
+    PERMISSION_COMPOSINGKEY_IS_NULL("6042", "排版不能为空"),
+    PERMISSIONID_IS_NULL("6043", "权限id不能为空"),
 
     /**
      * 登录
      */
-    LOGIN_ACCOUNT_IS_NULL("6030","登录账号不能为空"),
-    LOGIN_ACCOUNT_IS_ERROR("6035","登录账号不存在"),
-    LOGIN_PASSWORD_IS_NULL("6031","登录密码不能为空"),
-    LOGIN_PASSWORD_IS_ERROR("6033","登录密码错误"),
-    LOGIN_USER_STATUS_IS_ERROR("6034","用户状态有误"),
+    LOGIN_ACCOUNT_IS_NULL("6030", "登录账号不能为空"),
+    LOGIN_ACCOUNT_IS_ERROR("6035", "登录账号不存在"),
+    LOGIN_PASSWORD_IS_NULL("6031", "登录密码不能为空"),
+    LOGIN_PASSWORD_IS_ERROR("6033", "登录密码错误"),
+    LOGIN_USER_STATUS_IS_ERROR("6034", "用户状态有误"),
 
 
-    ACCOUNT_IS_NULL("7001","账号不能为空" ),
-    USER_IS_NULL("7002","用户未找到" ),
-    USER_IS_ERROR("7003", "用户异常"), UNLOGIN_PWD_ERROR("7004", "登录密码错误")
-    , ROLEID_IS_NULL("7005", "角色id不能为空" ), ADMIN_ROLE_UNDELETE("7006", "超级管理员不能被删除");//服务器内部错误
+    ACCOUNT_IS_NULL("7001", "账号不能为空"),
+    USER_IS_NULL("7002", "用户未找到"),
+    USER_IS_ERROR("7003", "用户异常"),
+    UNLOGIN_PWD_ERROR("7004", "登录密码错误"),
+    ROLEID_IS_NULL("7005", "角色id不能为空"),
+    ADMIN_ROLE_UNDELETE("7006", "超级管理员不能被删除");//服务器内部错误
 
     private final String code;   //状态码
     private final String message;
@@ -72,19 +77,33 @@ public enum ResultCode {
     }
 
     public String message() {
+        String msg = I18nUtil.get(this.name());
+        if (StrUtil.isNotBlank(msg)) {
+            return msg;
+        }
+
+
         return message;
     }
 
+
     public String getCode() {
         return code;
     }
 
     public String getMessage() {
+
+        String msg = I18nUtil.get(this.name());
+        if (StrUtil.isNotBlank(msg)) {
+            return msg;
+        }
+
         return message;
     }
 
     /**
      * 通过状态码获取ENUM的名字
+     *
      * @param code
      * @return
      */

+ 3 - 1
backstage-service/src/main/java/com/txz/backstage/core/cache/CacheKey.java

@@ -1,5 +1,7 @@
 package com.txz.backstage.core.cache;
 
+import com.txz.backstage.util.I18nUtil;
+
 import java.io.Serializable;
 
 
@@ -14,7 +16,7 @@ public class CacheKey implements Serializable {
 
 	public static CacheKey generateKey(CacheType cacheType, String subKey) {
 		if (cacheType == null) {
-			throw new NullPointerException("CacheKey不允许存在空参数");
+			throw new NullPointerException(I18nUtil.get("cachekey.does.not.allow.empty.parameters"));
 		}
 		CacheKey key = new CacheKey();
 		key.cacheType = cacheType;

+ 3 - 0
backstage-service/src/main/java/com/txz/backstage/filter/AccessGlobalFilter.java

@@ -6,6 +6,7 @@ import com.txz.backstage.configurer.Parameters;
 import com.txz.backstage.model.Permission;
 import com.txz.backstage.model.User;
 import com.txz.backstage.service.PermissionService;
+import com.txz.backstage.util.I18nUtil;
 import com.txz.backstage.util.UserUtil;
 import org.apache.commons.lang3.StringUtils;
 import org.slf4j.Logger;
@@ -71,6 +72,8 @@ public class AccessGlobalFilter implements GlobalFilter, Ordered {
         }
         
         String accessToken = request.getHeaders().getFirst("accessToken");
+        String acceptLanguage = request.getHeaders().getFirst("accept-language");
+        I18nUtil.acceptLanguage =acceptLanguage;
         if (accessToken == null) {
             log.warn("access token is empty");
             return this.setUnauthorizedResponse(exchange, "{\"code\":\"595\",\"message\":\"backstage Access Filter - token is empty\"}");

+ 44 - 0
backstage-service/src/main/java/com/txz/backstage/filter/LanguageWebFilter.java

@@ -0,0 +1,44 @@
+package com.txz.backstage.filter;
+
+import com.txz.backstage.util.LanguageContextHolder;
+import org.springframework.core.Ordered;
+import org.springframework.stereotype.Component;
+import org.springframework.web.server.ServerWebExchange;
+import org.springframework.web.server.WebFilterChain;
+import reactor.core.publisher.Mono;
+import reactor.util.context.Context;
+
+import org.springframework.web.server.WebFilter;
+
+@Component
+
+public class LanguageWebFilter implements WebFilter,Ordered{
+
+
+    @Override
+    public Mono<Void> filter(ServerWebExchange exchange, WebFilterChain chain) {
+        // 1. 从请求头获取Accept-Language,默认en
+        String acceptLanguage = exchange.getRequest().getHeaders().getFirst("Accept-Language");
+        if (acceptLanguage == null || acceptLanguage.trim().isEmpty()) {
+            acceptLanguage = "en";
+        }
+
+        //        // 1. 设置到ThreadLocal
+        LanguageContextHolder.setLanguage(acceptLanguage);
+
+        // 2. 将语言参数写入Reactor上下文(关键:上下文随异步流传递)
+        return chain.filter(exchange)
+                .contextWrite(Context.of("ACCEPT_LANGUAGE", acceptLanguage))
+                .doFinally(signalType -> {
+                    // 请求结束后清除ThreadLocal
+                    LanguageContextHolder.clear();
+                });
+    }
+
+    @Override
+    public int getOrder() {
+        return Ordered.HIGHEST_PRECEDENCE;
+    }
+}
+
+

+ 4 - 3
backstage-service/src/main/java/com/txz/backstage/service/impl/RolePermissionServiceImpl.java

@@ -6,6 +6,7 @@ import com.txz.backstage.service.RolePermissionService;
 import com.txz.backstage.core.AbstractService;
 import com.txz.backstage.dao.RoleMapper;
 import com.txz.backstage.dao.RolePermissionMapper;
+import com.txz.backstage.util.I18nUtil;
 import com.txz.core.ServiceException;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -43,15 +44,15 @@ public class RolePermissionServiceImpl extends AbstractService<RolePermission>
     @Override
     public int bangRolePermission(List<RolePermission> temp, Role role) {
         if (role==null) {
-            throw new ServiceException("角色不能为空");
+            throw new ServiceException(I18nUtil.get("role.cannot.be.empty"));
         }
         if (role.getId() == null) {
-            throw new ServiceException("角色id不能为空");
+            throw new ServiceException(I18nUtil.get("role.id.cannot.be.empty"));
         } else {
             if(bRoleMapper.updateByPrimaryKeySelective(role) > 0){
                 return save(temp);
             } else {
-                throw new ServiceException("更新关联关系操作失败");
+                throw new ServiceException(I18nUtil.get("failed.to.update.association.relationship"));
             }
         }
 

+ 75 - 0
backstage-service/src/main/java/com/txz/backstage/util/I18nUtil.java

@@ -0,0 +1,75 @@
+package com.txz.backstage.util;
+
+import org.springframework.context.MessageSource;
+import org.springframework.context.i18n.LocaleContextHolder;
+import org.springframework.stereotype.Component;
+import org.springframework.util.ObjectUtils;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+import reactor.core.publisher.Mono;
+
+import javax.annotation.PostConstruct;
+import javax.annotation.Resource;
+import java.util.Locale;
+
+/**
+ * 描述: 3、国际化工具类
+ * 版权: Copyright (c) 2020
+ * 公司: XXXX
+ * 作者: yanghj
+ * 版本: 4.0
+ * 创建日期: 2020/9/18 10:31
+ */
+
+@Component
+public class I18nUtil
+{
+
+    @Resource
+    private MessageSource messageSource;
+
+    private static MessageSource staticMessageSource;
+
+    public static String acceptLanguage;
+
+    // 用 @PostConstruct 替代 InitializingBean 接口
+    @PostConstruct
+    public void init() {
+        if (staticMessageSource == null) {
+            I18nUtil.staticMessageSource = this.messageSource;
+        }
+    }
+
+    // 静态 get 方法(同上)
+    public static String get(String msgKey) {
+        try {
+//            ServletRequestAttributes sra = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
+//            String header = sra.getRequest().getHeader("accept-language");
+
+            String header = LanguageContextHolder.getLanguage();
+
+            //String header = language;
+            LocaleContextHolder.setLocale(Locale.US);
+            if(!ObjectUtils.isEmpty(header)) {
+                if ("en".equals(header)) {
+                    LocaleContextHolder.setLocale(Locale.US);
+                } else if ("zh".equals(header)) {
+                    LocaleContextHolder.setLocale(Locale.SIMPLIFIED_CHINESE);
+                } else if ("bd".equals(header)) {
+                    Locale bengaliLocale = new Locale("bn", "BD"); //孟加拉文
+                    LocaleContextHolder.setLocale(bengaliLocale);
+                }
+            }
+
+            return staticMessageSource.getMessage(msgKey, null, LocaleContextHolder.getLocale());
+        } catch (Exception e) {
+            return msgKey;
+        }
+    }
+
+
+
+
+
+
+}

+ 22 - 0
backstage-service/src/main/java/com/txz/backstage/util/LanguageContextHolder.java

@@ -0,0 +1,22 @@
+package com.txz.backstage.util;
+import reactor.util.context.Context;
+public class LanguageContextHolder {
+    // ThreadLocal存储当前请求的语言
+    // 存储当前线程的语言参数
+    private static final ThreadLocal<String> LANGUAGE_HOLDER = new ThreadLocal<>();
+
+    // 设置语言(从Reactor上下文同步时调用)
+    public static void setLanguage(String language) {
+        LANGUAGE_HOLDER.set(language);
+    }
+
+    // 获取当前线程的语言
+    public static String getLanguage() {
+        return LANGUAGE_HOLDER.get();
+    }
+
+    // 清除ThreadLocal(必须调用)
+    public static void clear() {
+        LANGUAGE_HOLDER.remove();
+    }
+}

+ 49 - 0
backstage-service/src/main/java/com/txz/backstage/web/mng/i18nTestController.java

@@ -0,0 +1,49 @@
+package com.txz.backstage.web.mng;
+
+
+import com.txz.backstage.util.I18nUtil;
+import io.swagger.annotations.ApiOperation;
+import lombok.RequiredArgsConstructor;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@RequiredArgsConstructor
+@RequestMapping("/test")
+public class i18nTestController {
+
+
+
+
+    @ApiOperation(value = "demo")
+    @GetMapping(value = "/demo")
+    public String getMore() {
+
+
+        System.out.println("demo:"+I18nUtil.get("cachekey.does.not.allow.empty.parameters"));
+        try {
+            Thread.sleep(5000);
+        } catch (InterruptedException e) {
+            throw new RuntimeException(e);
+        }
+
+        System.out.println("demo:"+I18nUtil.get("cachekey.does.not.allow.empty.parameters"));
+//        if(true) {
+//            throw new ServiceException(I18nUtil.get("product.export.template"));
+//        }
+        return I18nUtil.get("cachekey.does.not.allow.empty.parameters")+"3";
+    }
+
+    @ApiOperation(value = "demo2")
+    @GetMapping(value = "/demo2")
+    public String getMore2() {
+
+        System.out.println("demo2:"+I18nUtil.get("cachekey.does.not.allow.empty.parameters"));
+
+        System.out.println("demo2:"+I18nUtil.get("cachekey.does.not.allow.empty.parameters"));
+
+        return I18nUtil.get("cachekey.does.not.allow.empty.parameters")+"3";
+    }
+
+}

+ 6 - 0
backstage-service/src/main/resources/bootstrap.properties

@@ -101,3 +101,9 @@ spring.main.allow-circular-references=true
 
 # Swagger ??
 swagger.resource=cif,operating,report,mall
+
+
+
+spring.messages.basename=i18n/messages,i18n/messages_zh_CN
+spring.messages.encoding=UTF-8
+spring.messages.cache-duration=0

+ 16 - 0
backstage-service/src/main/resources/i18n/error.properties

@@ -0,0 +1,16 @@
+BUSINESS_ERROR_001=\u8BF7\u68C0\u67E5\u624B\u673A\u53F7\u662F\u5426\u6B63\u786E
+BUSINESS_ERROR_002=\u624B\u673A\u53F7\u548C\u5BC6\u7801\u4E0D\u5339\u914D
+BUSINESS_ERROR_003=APP\u767B\u5F55\u6388\u6743\u5931\u8D25
+BUSINESS_ERROR_004=AccountKit \u767B\u5F55\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u9A8C\u8BC1
+BUSINESS_ERROR_005=\u624B\u673A\u53F7\u5DF2\u6CE8\u518C
+BUSINESS_ERROR_006=\u9A8C\u8BC1\u5DF2\u8FC7\u671F
+BUSINESS_ERROR_007=\u9A8C\u8BC1\u7801\u9519\u8BEF
+BUSINESS_ERROR_008=\u8BBE\u7F6E\u5BC6\u7801\u5931\u8D25
+BUSINESS_ERROR_009=\u8BF7\u91CD\u65B0\u9A8C\u8BC1code
+BUSINESS_ERROR_010=Facebook \u767B\u5F55\u5931\u8D25
+BUSINESS_ERROR_011=\u6B64 Facebook \u5DF2\u88AB\u5176\u4ED6\u8D26\u53F7\u4F7F\u7528
+BUSINESS_ERROR_012=\u8BF7\u60A8\u5148\u767B\u9646
+BUSINESS_ERROR_013=\u7CFB\u7EDF\u5185\u90E8\u5F02\u5E38\uFF0Csource \u8BF7\u6C42\u53C2\u6570\u4E0D\u5408\u6CD5
+BUSINESS_ERROR_014=\u624B\u673A\u53F7\u5DF2\u5173\u8054\u8FC7\u5176\u4ED6 Facebook \u8D26\u53F7\uFF0C\u8BF7\u6362\u4E00\u4E2A\u53F7\u7801\u8BD5\u8BD5
+
+PARAMETER_ERROR_001=\u65E0\u6548\u7684\u53C2\u6570

+ 16 - 0
backstage-service/src/main/resources/i18n/error_in_ID.properties

@@ -0,0 +1,16 @@
+BUSINESS_ERROR_001=Silakan periksa apakah nomor telepon sudah benar
+BUSINESS_ERROR_002=Nomor telepon dan kata sandi tidak cocok
+BUSINESS_ERROR_003=Otorisasi login APP gagal
+BUSINESS_ERROR_004=Login Akun gagal, harap verifikasi ulang
+BUSINESS_ERROR_005=Nomor anda telah diregistrasi
+BUSINESS_ERROR_006=Verifikasi telah kedaluwarsa
+BUSINESS_ERROR_007=Kode verifikasi salah
+BUSINESS_ERROR_008=Gagal mengatur kata sandi
+BUSINESS_ERROR_009=Harap verifikasi ulang kodenya
+BUSINESS_ERROR_010=Verifikasi Facebook gagal
+BUSINESS_ERROR_011=Akun Facebook ini telah digunakan oleh akun lain
+BUSINESS_ERROR_012=Silahkan login
+BUSINESS_ERROR_013=Kesalahan internal sistem
+BUSINESS_ERROR_014=Nomor telepon ini telah terhubung dengan akun Facebook, silahkan ganti nomor untuk mencoba
+
+PARAMETER_ERROR_001=Parameter tidak valid

+ 0 - 0
backstage-service/src/main/resources/i18n/messages.properties


+ 0 - 0
backstage-service/src/main/resources/i18n/messages_bn_BD.properties


+ 50 - 0
backstage-service/src/main/resources/i18n/messages_en_US.properties

@@ -0,0 +1,50 @@
+cachekey.does.not.allow.empty.parameters=cachekey does not allow empty parameters
+increment.factor.must.be.greater.than.0=increment factor must be greater than 0
+role.id.cannot.be.empty=role id cannot be empty
+role.cannot.be.empty=role cannot be empty
+failed.to.update.association.relationship=failed to update association relationship
+success=success
+failure=failure
+unauthenticated.signature.error=unauthenticated signature error
+api.does.not.exist=api does not exist
+internal.server.error=internal server error
+no.operation.permission=no operation permission
+gateway.exception=gateway exception
+object.cannot.be.empty=object cannot be empty
+object.id.cannot.be.empty=object id cannot be empty
+code.cannot.be.empty=code cannot be empty
+name.cannot.be.empty=name cannot be empty
+sort.order.cannot.be.empty=sort order cannot be empty
+level.cannot.be.empty=level cannot be empty
+user.id.cannot.be.empty=user id cannot be empty
+query.result.is.empty=query result is empty
+database.exception=database exception
+id.card.cannot.be.empty=id card cannot be empty
+customer.number.cannot.be.empty=customer number cannot be empty
+no.user.information.found=no user information found
+query.failed.due.to.data.exception,.please.contact.to.check.user.information=query failed due to data exception, please contact to check user information
+id.card.front.photo.key.cannot.be.empty=id card front photo key cannot be empty
+verification.code.is.invalid=verification code is invalid
+token.cannot.be.empty=token cannot be empty
+english.name.cannot.be.empty=english name cannot be empty
+action.status.whether.there.is.an.action.cannot.be.empty=action status whether there is an action cannot be empty
+typesetting.cannot.be.empty=typesetting cannot be empty
+permission.id.cannot.be.empty=permission id cannot be empty
+login.account.cannot.be.empty=login account cannot be empty
+login.account.does.not.exist=login account does not exist
+login.password.cannot.be.empty=login password cannot be empty
+incorrect.login.password=incorrect login password
+user.status.is.invalid=user status is invalid
+account.cannot.be.empty=account cannot be empty
+user.not.found=user not found
+user.exception=user exception
+incorrect.login.password=incorrect login password
+role.id.cannot.be.empty=role id cannot be empty
+super.administrator.cannot.be.deleted=super administrator cannot be deleted
+
+interface=interface
+does.not.exist=does not exist
+internal.error.please.contact.the.administrator=internal error please contact the administrator
+exception.occurred=exception occurred
+method=method
+exception.summary=exception summary:

+ 52 - 0
backstage-service/src/main/resources/i18n/messages_zh_CN.properties

@@ -0,0 +1,52 @@
+cachekey.does.not.allow.empty.parameters=CacheKey\u4E0D\u5141\u8BB8\u5B58\u5728\u7A7A\u53C2\u6570
+increment.factor.must.be.greater.than.0=\u9012\u589E\u56E0\u5B50\u5FC5\u987B\u5927\u4E8E0
+role.id.cannot.be.empty=\u89D2\u8272id\u4E0D\u80FD\u4E3A\u7A7A
+role.cannot.be.empty=\u89D2\u8272\u4E0D\u80FD\u4E3A\u7A7A
+failed.to.update.association.relationship=\u66F4\u65B0\u5173\u8054\u5173\u7CFB\u64CD\u4F5C\u5931\u8D25
+success=\u6210\u529F
+failure=\u5931\u8D25
+unauthenticated.signature.error=\u672A\u8BA4\u8BC1\uFF08\u7B7E\u540D\u9519\u8BEF\uFF09
+api.does.not.exist=\u63A5\u53E3\u4E0D\u5B58\u5728
+internal.server.error=\u670D\u52A1\u5668\u5185\u90E8\u9519\u8BEF
+no.operation.permission=\u6CA1\u6709\u64CD\u4F5C\u6743\u9650
+gateway.exception=\u7F51\u5173\u5F02\u5E38
+object.cannot.be.empty=\u5BF9\u8C61\u4E0D\u80FD\u4E3A\u7A7A
+object.id.cannot.be.empty=\u5BF9\u8C61ID\u4E0D\u80FD\u4E3A\u7A7A
+code.cannot.be.empty=\u7F16\u53F7\u4E0D\u80FD\u4E3A\u7A7A
+name.cannot.be.empty=\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A
+sort.order.cannot.be.empty=\u6392\u5E8F\u4E0D\u80FD\u4E3A\u7A7A
+level.cannot.be.empty=\u7EA7\u522B\u4E0D\u80FD\u4E3A\u7A7A
+user.id.cannot.be.empty=\u7528\u6237id\u4E0D\u80FD\u4E3A\u7A7A
+query.result.is.empty=\u67E5\u8BE2\u7ED3\u679C\u4E3A\u7A7A
+database.exception=\u6570\u636E\u5E93\u5F02\u5E38
+id.card.cannot.be.empty=\u8EAB\u4EFD\u8BC1\u4E0D\u80FD\u4E3A\u7A7A
+customer.number.cannot.be.empty=\u5BA2\u6237\u53F7\u4E0D\u80FD\u4E3A\u7A7A
+no.user.information.found=\u672A\u67E5\u8BE2\u5230\u7528\u6237\u4FE1\u606F
+query.failed.due.to.data.exception,.please.contact.to.check.user.information=\u6570\u636E\u5F02\u5E38\u67E5\u8BE2\u5931\u8D25\uFF0C\u8BF7\u8054\u7CFB\u68C0\u67E5\u7528\u6237\u4FE1\u606F
+id.card.front.photo.key.cannot.be.empty=\u8EAB\u4EFD\u8BC1\u6B63\u9762\u7167\u7247key\u4E0D\u80FD\u4E3A\u7A7A
+verification.code.is.invalid=\u9A8C\u8BC1\u7801\u65E0\u6548
+token.cannot.be.empty=TOKEN\u4E0D\u80FD\u4E3A\u7A7A
+english.name.cannot.be.empty=\u82F1\u6587\u540D\u4E0D\u80FD\u4E3A\u7A7A
+action.status.whether.there.is.an.action.cannot.be.empty=\u662F\u5426\u6709\u52A8\u4F5C\u4E0D\u80FD\u4E3A\u7A7A
+typesetting.cannot.be.empty=\u6392\u7248\u4E0D\u80FD\u4E3A\u7A7A
+permission.id.cannot.be.empty=\u6743\u9650id\u4E0D\u80FD\u4E3A\u7A7A
+login.account.cannot.be.empty=\u767B\u5F55\u8D26\u53F7\u4E0D\u80FD\u4E3A\u7A7A
+login.account.does.not.exist=\u767B\u5F55\u8D26\u53F7\u4E0D\u5B58\u5728
+login.password.cannot.be.empty=\u767B\u5F55\u5BC6\u7801\u4E0D\u80FD\u4E3A\u7A7A
+incorrect.login.password=\u767B\u5F55\u5BC6\u7801\u9519\u8BEF
+user.status.is.invalid=\u7528\u6237\u72B6\u6001\u6709\u8BEF
+account.cannot.be.empty=\u8D26\u53F7\u4E0D\u80FD\u4E3A\u7A7A
+user.not.found=\u7528\u6237\u672A\u627E\u5230
+user.exception=\u7528\u6237\u5F02\u5E38
+incorrect.login.password=\u767B\u5F55\u5BC6\u7801\u9519\u8BEF
+role.id.cannot.be.empty=\u89D2\u8272id\u4E0D\u80FD\u4E3A\u7A7A
+super.administrator.cannot.be.deleted=\u8D85\u7EA7\u7BA1\u7406\u5458\u4E0D\u80FD\u88AB\u5220\u9664
+
+interface=\u63A5\u53E3
+does.not.exist=\u4E0D\u5B58\u5728
+internal.error.please.contact.the.administrator=\u5185\u90E8\u5F02\u5E38\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458
+exception.occurred=\u53D1\u751F\u5F02\u5E38
+method=\u65B9\u6CD5
+exception.summary=\u5F02\u5E38\u6982\u8981:
+
+