From fd0ad36a58190922faefb4f74a229ca5a70149fd Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Tue, 15 Aug 2023 14:07:33 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85=E8=8B=B1=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/yunbao/common/utils/NobleUtil.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/common/src/main/java/com/yunbao/common/utils/NobleUtil.java b/common/src/main/java/com/yunbao/common/utils/NobleUtil.java index 8f05a4a9e..afe0208c3 100644 --- a/common/src/main/java/com/yunbao/common/utils/NobleUtil.java +++ b/common/src/main/java/com/yunbao/common/utils/NobleUtil.java @@ -23,6 +23,9 @@ public class NobleUtil { return -1; } public static String nobleIdToStringName(int id){ + if(!WordUtil.isNewZh()){ + return nobleIdToStringNameForEn(id); + } switch (id){ case 1:return "男爵"; case 2:return "子爵"; @@ -34,6 +37,18 @@ public class NobleUtil { } return "未开通"; } + public static String nobleIdToStringNameForEn(int id){ + switch (id){ + case 1:return "baron"; + case 2:return "viscount"; + case 3:return "marquis"; + case 4:return "duke"; + case 5:return "king"; + case 6:return "emperor"; + case 7:return "SuperEmperor"; + } + return "Not Opened"; + } public static int getNobleBackgroundId(int id){ switch (id){ case 1:return R.mipmap.img_aristocrat_nanjue;