From d3a00e325ce4480cde17c56e2daebb846f3b3d08 Mon Sep 17 00:00:00 2001 From: chenxi Date: Wed, 14 Jun 2023 15:39:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=91=E6=8D=A2=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/ui/game_setting/cdkey_ui.lua | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lua/app/ui/game_setting/cdkey_ui.lua b/lua/app/ui/game_setting/cdkey_ui.lua index 85b3a3c6..07dbaaf6 100644 --- a/lua/app/ui/game_setting/cdkey_ui.lua +++ b/lua/app/ui/game_setting/cdkey_ui.lua @@ -10,7 +10,7 @@ end function CdkeyUI:onLoadRootComplete() local uiMap = self.root:genAllChildren() - uiMap["cdkey_ui.title_bg_img.title_text"]:setText("临时文本:兑换码") + uiMap["cdkey_ui.title_bg_img.title_text"]:setText(I18N:getGlobalText(I18N.GlobalConst.CDKEY_NAME)) uiMap["cdkey_ui.title_bg_img.close_btn"]:addClickListener(function() self:closeUI() @@ -24,18 +24,18 @@ function CdkeyUI:onLoadRootComplete() uiMap["cdkey_ui.title_bg_img.confirm_btn"]:addClickListener(function() local text = self.inputField:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TMP_INPUT_FIELD).text if not text or text == "" then - GFunc.showToast("临时文本:请输入兑换码") + GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.CDKEY_DESC_1)) return end ModuleManager.GameSettingManager:exchangeCdkey(text) end) - uiMap["cdkey_ui.title_bg_img.desc_1"]:setText("临时文本:每个兑换码仅能使用一次") + uiMap["cdkey_ui.title_bg_img.desc_1"]:setText(I18N:getGlobalText(I18N.GlobalConst.CDKEY_DESC_2)) self.desc2 = uiMap["cdkey_ui.title_bg_img.desc_2"] self.desc2:setText(GConst.EMPTY_STRING) local placeholder = uiMap["cdkey_ui.title_bg_img.input_field.text_area.placeholder"] - placeholder:setText("临时文本:请输入兑换码") + placeholder:setText(I18N:getGlobalText(I18N.GlobalConst.CDKEY_DESC_1)) self.inputField = uiMap["cdkey_ui.title_bg_img.input_field"] self.inputField:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TMP_INPUT_FIELD).text = "" @@ -51,13 +51,13 @@ end function CdkeyUI:updateErrorCode(errorCode) local str = GConst.EMPTY_STRING if errorCode == 1700 then - str = "临时文本:兑换码不存在" + str = I18N:getGlobalText(I18N.GlobalConst.CDKEY_ERROR_MSG_1) elseif errorCode == 1701 then - str = "临时文本:兑换码已使用" + str = I18N:getGlobalText(I18N.GlobalConst.CDKEY_ERROR_MSG_2) elseif errorCode == 1702 then - str = "临时文本:兑换码已过期" + str = I18N:getGlobalText(I18N.GlobalConst.CDKEY_ERROR_MSG_3) elseif errorCode == 1703 then - str = "临时文本:兑换码已达到使用次数上限" + str = I18N:getGlobalText(I18N.GlobalConst.CDKEY_ERROR_MSG_4) end self.desc2:setText(str) end