From 0df07258293450079dae49962cab6c65b0390a0e Mon Sep 17 00:00:00 2001 From: vurtne14 Date: Thu, 19 Sep 2024 13:24:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=9A=E8=AF=AD=E8=A8=80lua=E8=84=9A?= =?UTF-8?q?=E6=9C=AC=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UI/RewardBox/RewardBoxPanel.prefab | 2 +- .../DynamicActivity/ActivityMainPanel.lua | 2 +- .../~Lua/Modules/Main/MainPanel.lua | 2 +- .../Popup/RewardItemSingleShowPopup.lua | 8 +++---- .../View/GeneralBigPopup_GiveLikeHotHero.lua | 14 ++++++------ .../~Lua/Modules/Recruit/RecruitMainPanel.lua | 2 +- .../ManagedResources/~Lua/View/ShopView.lua | 22 ++++++++++--------- 7 files changed, 27 insertions(+), 25 deletions(-) diff --git a/Assets/ManagedResources/Prefabs/UI/RewardBox/RewardBoxPanel.prefab b/Assets/ManagedResources/Prefabs/UI/RewardBox/RewardBoxPanel.prefab index b2a4e830cf..a6a9c143f3 100644 --- a/Assets/ManagedResources/Prefabs/UI/RewardBox/RewardBoxPanel.prefab +++ b/Assets/ManagedResources/Prefabs/UI/RewardBox/RewardBoxPanel.prefab @@ -1564,7 +1564,7 @@ MonoBehaviour: m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 - m_Text: "\u786E \u5B9A" + m_Text: "\u786E\u5B9A" LanguageIndex: 0 --- !u!1 &3149411855646198429 GameObject: diff --git a/Assets/ManagedResources/~Lua/Modules/DynamicActivity/ActivityMainPanel.lua b/Assets/ManagedResources/~Lua/Modules/DynamicActivity/ActivityMainPanel.lua index 0983f43213..fe7b979133 100644 --- a/Assets/ManagedResources/~Lua/Modules/DynamicActivity/ActivityMainPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/DynamicActivity/ActivityMainPanel.lua @@ -232,7 +232,7 @@ function this.PageTabAdapter(tab, index, status) end if not sprite then sprite = (status == "select" and tabs[index].Icon[2] or tabs[index].Icon[1]) - nameText.text = tabs[index].Sesc + nameText.text = GetLanguageStrById(tabs[index].Sesc) end img.sprite = this.spLoader:LoadSprite(sprite) img:SetNativeSize() diff --git a/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua b/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua index d3a3531dcd..5a93befc50 100644 --- a/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua @@ -1077,7 +1077,7 @@ function this.CreatActivity() end if tempConfig then activityTabs[k].img.sprite = this.spLoader:LoadSprite(tempConfig.Icon[1]) - activityTabs[k].nameText.text = tempConfig.Sesc + activityTabs[k].nameText.text =GetLanguageStrById(tempConfig.Sesc) else activityTabs[k].img.sprite = this.spLoader:LoadSprite(v.Icon[1]) end diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/RewardItemSingleShowPopup.lua b/Assets/ManagedResources/~Lua/Modules/Popup/RewardItemSingleShowPopup.lua index cfbc2c0fba..86ce2731ce 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/RewardItemSingleShowPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/RewardItemSingleShowPopup.lua @@ -503,8 +503,8 @@ function RewardItemSingleShowPopup:OnShow() this.armorDesc.gameObject:SetActive(true) --this.armorTitle.text = string.format("%s",itemConfigData.Name) --this.armorDesc.text = string.format("%s",heroConfig.HeroLocationDesc1) - this.armorTitle.text = itemConfigData.Name - this.armorDesc.text = heroConfig.HeroLocationDesc1 + this.armorTitle.text = GetLanguageStrById(itemConfigData.Name) + this.armorDesc.text = GetLanguageStrById(heroConfig.HeroLocationDesc1) this.armorType.gameObject:SetActive(false) this.armorLanTuNum.gameObject:SetActive(false) @@ -568,8 +568,8 @@ function RewardItemSingleShowPopup:OnShow() else this.btnClose:SetActive(false) this.equipQuaText.gameObject:SetActive(true) - this.equipQuaText.text = GetStringByEquipQua(itemConfigData.Quantity, - GetQuaStringByEquipQua(itemConfigData.Quantity)) + this.equipQuaText.text = GetLanguageStrById(GetStringByEquipQua(itemConfigData.Quantity, + GetQuaStringByEquipQua(itemConfigData.Quantity))) this.pos.gameObject:SetActive(false) this.armorInfo.gameObject:SetActive(true) this.armorTitle.gameObject:SetActive(false) diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralBigPopup_GiveLikeHotHero.lua b/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralBigPopup_GiveLikeHotHero.lua index cd0af293d7..eabfa621d4 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralBigPopup_GiveLikeHotHero.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralBigPopup_GiveLikeHotHero.lua @@ -109,7 +109,7 @@ end function this.TabAdapter(tab, index, status) local tabLab = Util.GetGameObject(tab, "Text") Util.GetGameObject(tab, "Image"):GetComponent("Image").sprite = this.spLoader:LoadSprite(_TabData[index][status]) - tabLab:GetComponent("Text").text = _TabData[index].name + tabLab:GetComponent("Text").text = GetLanguageStrById(_TabData[index].name) tabLab:GetComponent("Text").color = _TabFontColor[status] end @@ -202,10 +202,10 @@ function this:OnShow(_parent, _args) if newHeroId ~= 0 then this.newObj:SetActive(true) local newHeroConfig = heroConfig[newHeroId] - this.des1.text = newHeroConfig.HeroLocation - this.des2.text = newHeroConfig.HeroLocationDesc1 + this.des1.text = GetLanguageStrById(newHeroConfig.HeroLocation) + this.des2.text = GetLanguageStrById(newHeroConfig.HeroLocationDesc1) this.newPro.sprite = this.spLoader:LoadSprite(GetProStrImageByProNum(newHeroConfig.PropertyName)) - this.newName.text = newHeroConfig.ReadingName + this.newName.text = GetLanguageStrById(newHeroConfig.ReadingName) this.newIcon.sprite = this.spLoader:LoadSprite(artResourcesConfig[newHeroConfig.Icon].Name) this.hint.text = Language[12274] Util.AddOnceClick(this.newIcon.gameObject, function() @@ -239,16 +239,16 @@ function this.SingleHeroDataShow(go, _heroData, _index) local rank = Util.GetGameObject(_go.transform, "rank"):GetComponent("Text") local proIcon = Util.GetGameObject(_go.transform, "pro"):GetComponent("Image") local desc = Util.GetGameObject(_go.transform, "Desc"):GetComponent("Text") - desc.text = config.HeroLocation + desc.text = GetLanguageStrById(config.HeroLocation) local desc2 = Util.GetGameObject(_go.transform, "Desc2"):GetComponent("Text") local hot = Util.GetGameObject(_go.transform, "hot") hot:SetActive(false) local btn_zan = Util.GetGameObject(_go.transform, "btn_zan") local numTxt = Util.GetGameObject(_go.transform, "numTxt"):GetComponent("Text") numTxt.text = PrintWanNum(heroData.power) - desc2.text = config.HeroLocationDesc1 + desc2.text = GetLanguageStrById(config.HeroLocationDesc1) proIcon.sprite = this.spLoader:LoadSprite(GetProStrImageByProNum(config.PropertyName)) - name.text = config.ReadingName + name.text = GetLanguageStrById(config.ReadingName) icon.sprite = this.spLoader:LoadSprite(artResourcesConfig[config.Icon].Name) if _index < 4 then rankImg.sprite = this.spLoader:LoadSprite("r_Dungeon_00" .. _index) diff --git a/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitMainPanel.lua b/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitMainPanel.lua index b65792990e..3cf0225ea0 100644 --- a/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitMainPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitMainPanel.lua @@ -410,7 +410,7 @@ function this:RefreshTabData() this.itemList[i].tipObj:SetActive(false) this.itemList[i].img.sprite = this.spLoader:LoadSprite(self.dicData[i].Icon[1]) LogError("self.dicData[i].Sesc===========================" .. self.dicData[i].Sesc) - this.itemList[i].nameTxt.text = self.dicData[i].Sesc + this.itemList[i].nameTxt.text = GetLanguageStrById(self.dicData[i].Sesc) local isOpen = true local tip = "" if self.dicData[i].ActId == 2 then diff --git a/Assets/ManagedResources/~Lua/View/ShopView.lua b/Assets/ManagedResources/~Lua/View/ShopView.lua index b8f722aad0..22fb52b603 100644 --- a/Assets/ManagedResources/~Lua/View/ShopView.lua +++ b/Assets/ManagedResources/~Lua/View/ShopView.lua @@ -413,8 +413,9 @@ function this:RefreshBase() -- 商店标题 if self.ShopConfig.Name and self.ShopConfig.Name ~= "" then - self.titleImg:GetComponent("Text").text = self.ShopConfig.Name .. - Language[10074] --self.spLoader:LoadSprite(self.ShopConfig.Title) + self.titleImg:GetComponent("Text").text = GetLanguageStrById(self.ShopConfig.Name) .. + Language + [10074] --self.spLoader:LoadSprite(self.ShopConfig.Title) end -- 对话显示 @@ -526,16 +527,17 @@ function this:ShopItemAdapter(shopItem, itemData) if con.ItemType == ItemType.LingShouChip then local haveCount = BagManager.GetTotalItemNum(con.Id) itemName.text = itemName.text .. - "\n" .. - string.format("%s(%s/%s)", UIColorStr.BLACK, "25", Language[11974], haveCount, - con.UsePerCount) + "\n" .. + string.format("%s(%s/%s)", UIColorStr.BLACK, "25", Language[11974], + haveCount, + con.UsePerCount) end if con.ItemType == ItemType.Talisman then itemDes.gameObject:SetActive(true) if con.ItemDescribe then local str = string.split(con.ItemDescribe, ',') if str[1] then - itemDes.text = str[1] + itemDes.text = GetLanguageStrById(str[1]) end else itemDes.gameObject:SetActive(false) @@ -553,7 +555,7 @@ function this:ShopItemAdapter(shopItem, itemData) discountbg:SetActive(isDiscount) if isDiscount then discountbg:GetComponent("Image").sprite = self.spLoader:LoadSprite("s_shop_zhekou_0" .. - itemInfo.DiscountDegree .. "_zh") + itemInfo.DiscountDegree .. "_zh") end end -- 消耗物品的信息 @@ -693,16 +695,16 @@ function this:RechargeShopItemAdapter(shopItem, itemData) firstImg.sprite = self.spLoader:LoadSprite("s_shangcheng_shouchong_zh") end icon.sprite = self.spLoader:LoadSprite(GetResourcePath(itemInfo.Resources)) - num.text = itemInfo.BaseReward[1][2] + num.text = GetLanguageStrById(itemInfo.BaseReward[1][2]) price.text = MoneyUtil.GetMoneyUnitNameWithMoney(itemInfo.Price) --.. MoneyUtil.GetMoney(itemInfo.Price) -- 判断首充赠送 local curBuyCount = itemData.buyTimes first:SetActive(curBuyCount < 1) - firstNum.text = itemInfo.FirstMultiple[1][2] + firstNum.text = GetLanguageStrById(itemInfo.FirstMultiple[1][2]) if itemInfo.ContinuedMultiple and tonumber(itemInfo.ContinuedMultiple[1]) ~= nil then xuChong:SetActive(curBuyCount >= 1) - xuNum.text = itemInfo.ContinuedMultiple[2] + xuNum.text = GetLanguageStrById(itemInfo.ContinuedMultiple[2]) else xuChong:SetActive(false) end