diff --git a/lua/app/ui/main_city/cell/side_bar_beginner_gift_cell.lua b/lua/app/ui/main_city/cell/side_bar_beginner_gift_cell.lua index c1dd3bd1..26ab3ff1 100644 --- a/lua/app/ui/main_city/cell/side_bar_beginner_gift_cell.lua +++ b/lua/app/ui/main_city/cell/side_bar_beginner_gift_cell.lua @@ -6,7 +6,7 @@ function SideBarBeginnerGiftCell:getIsOpen() end function SideBarBeginnerGiftCell:getIconRes() - return "main_btn_gift_1" -- TODOJ + return "main_btn_gift_1" end function SideBarBeginnerGiftCell:onClick() diff --git a/lua/app/ui/main_city/cell/side_bar_first_recharge_cell.lua b/lua/app/ui/main_city/cell/side_bar_first_recharge_cell.lua index 6c4c70e2..30233d01 100644 --- a/lua/app/ui/main_city/cell/side_bar_first_recharge_cell.lua +++ b/lua/app/ui/main_city/cell/side_bar_first_recharge_cell.lua @@ -6,7 +6,7 @@ function SideBarFirstRechargeCell:getIsOpen() end function SideBarFirstRechargeCell:getIconRes() - return "main_btn_gift_3" -- TODOJ + return "main_btn_gift_3" end function SideBarFirstRechargeCell:onClick() diff --git a/lua/app/ui/main_city/cell/side_bar_grow_up_gift_1_cell.lua b/lua/app/ui/main_city/cell/side_bar_grow_up_gift_1_cell.lua index 4e33bd44..f0e1a329 100644 --- a/lua/app/ui/main_city/cell/side_bar_grow_up_gift_1_cell.lua +++ b/lua/app/ui/main_city/cell/side_bar_grow_up_gift_1_cell.lua @@ -6,7 +6,7 @@ function SideBarGrowUpGift1Cell:getIsOpen() end function SideBarGrowUpGift1Cell:getIconRes() - return "main_btn_gift_2" -- TODOJ + return "main_btn_gift_2" end function SideBarGrowUpGift1Cell:onClick() diff --git a/lua/app/ui/main_city/cell/side_bar_grow_up_gift_2_cell.lua b/lua/app/ui/main_city/cell/side_bar_grow_up_gift_2_cell.lua index 5e4dcd1a..e0edbbcb 100644 --- a/lua/app/ui/main_city/cell/side_bar_grow_up_gift_2_cell.lua +++ b/lua/app/ui/main_city/cell/side_bar_grow_up_gift_2_cell.lua @@ -6,7 +6,7 @@ function SideBarGrowUpGift2Cell:getIsOpen() end function SideBarGrowUpGift2Cell:getIconRes() - return "main_btn_gift_2" -- TODOJ + return "main_btn_gift_2" end function SideBarGrowUpGift2Cell:onClick() diff --git a/lua/app/ui/shop/box_hero_ui.lua b/lua/app/ui/shop/box_hero_ui.lua index 5e12fde3..b001c724 100644 --- a/lua/app/ui/shop/box_hero_ui.lua +++ b/lua/app/ui/shop/box_hero_ui.lua @@ -1,12 +1,12 @@ local BoxHeroUI = class("BoxHeroUI", BaseUI) local TITLE_TEXT = { - [GConst.SummonConst.SUMMON_TYPE.LV_1] = "普通宝箱TD", -- TODOJ - [GConst.SummonConst.SUMMON_TYPE.LV_2] = "精致宝箱TD", - [GConst.SummonConst.SUMMON_TYPE.LV_3] = "珍贵宝箱TD" + [GConst.SummonConst.SUMMON_TYPE.LV_1] = I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_1), -- 普通宝箱 + [GConst.SummonConst.SUMMON_TYPE.LV_2] = I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_2), -- 精致宝箱 + [GConst.SummonConst.SUMMON_TYPE.LV_3] = I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_3), -- 珍贵宝箱 } local ICON_NAME = { - [GConst.SummonConst.SUMMON_TYPE.LV_1] = "shop_chest_1", -- TODOJ + [GConst.SummonConst.SUMMON_TYPE.LV_1] = "shop_chest_1", [GConst.SummonConst.SUMMON_TYPE.LV_2] = "shop_chest_2", [GConst.SummonConst.SUMMON_TYPE.LV_3] = "shop_chest_3" } diff --git a/lua/app/ui/shop/box_level_ui.lua b/lua/app/ui/shop/box_level_ui.lua index 5d202806..0112b1d7 100644 --- a/lua/app/ui/shop/box_level_ui.lua +++ b/lua/app/ui/shop/box_level_ui.lua @@ -36,7 +36,7 @@ function BoxLevelUI:onLoadRootComplete() self.box1Add2ItemCell = CellManager:addCellComp(self.uiMap["box_level_ui.bg.box_1.add_node_2.item_cell"], GConst.TYPEOF_LUA_CLASS.ITEM_CELL) self.box1Add2Text = self.uiMap["box_level_ui.bg.box_1.add_node_2.text"] self.box1Desc = self.uiMap["box_level_ui.bg.box_1.none_text"] - self.box1Desc:setText("无额外奖励加成TD") -- TODOJ + self.box1Desc:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_4)) -- 无额外奖励加成 self.box2Node = self.uiMap["box_level_ui.bg.box_2"] self.box2Add1Node = self.uiMap["box_level_ui.bg.box_2.add_node_1"] @@ -46,7 +46,7 @@ function BoxLevelUI:onLoadRootComplete() self.box2Add2ItemCell = CellManager:addCellComp(self.uiMap["box_level_ui.bg.box_2.add_node_2.item_cell"], GConst.TYPEOF_LUA_CLASS.ITEM_CELL) self.box2Add2Text = self.uiMap["box_level_ui.bg.box_2.add_node_2.text"] self.box2Desc = self.uiMap["box_level_ui.bg.box_2.none_text"] - self.box2Desc:setText("无额外奖励加成TD") -- TODOJ + self.box2Desc:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_4)) -- 无额外奖励加成 self.box3Node = self.uiMap["box_level_ui.bg.box_3"] self.box3Add1Node = self.uiMap["box_level_ui.bg.box_3.add_node_1"] @@ -56,10 +56,10 @@ function BoxLevelUI:onLoadRootComplete() self.box3Add2ItemCell = CellManager:addCellComp(self.uiMap["box_level_ui.bg.box_3.add_node_2.item_cell"], GConst.TYPEOF_LUA_CLASS.ITEM_CELL) self.box3Add2Text = self.uiMap["box_level_ui.bg.box_3.add_node_2.text"] self.box3Desc = self.uiMap["box_level_ui.bg.box_3.none_text"] - self.box3Desc:setText("无额外奖励加成TD") -- TODOJ + self.box3Desc:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_4)) -- 无额外奖励加成 self.bottomDesc = self.uiMap["box_level_ui.bg.title"] - self.bottomDesc:setText("开宝箱提升等级,增加宝箱奖励TD") -- TODOJ + self.bottomDesc:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_5)) -- 开宝箱提升等级,增加宝箱奖励 self.leftArrow:addClickListener(function() self.level = self.level - 1 diff --git a/lua/app/ui/shop/box_level_up_ui.lua b/lua/app/ui/shop/box_level_up_ui.lua index 033a0420..25fae603 100644 --- a/lua/app/ui/shop/box_level_up_ui.lua +++ b/lua/app/ui/shop/box_level_up_ui.lua @@ -30,7 +30,7 @@ function BoxLevelUpUI:onLoadRootComplete() self.box1Add2ItemCell = CellManager:addCellComp(self.uiMap["box_level_up_ui.box_1.add_node_2.item_cell"], GConst.TYPEOF_LUA_CLASS.ITEM_CELL) self.box1Add2Text = self.uiMap["box_level_up_ui.box_1.add_node_2.text"] self.box1Desc = self.uiMap["box_level_up_ui.box_1.none_text"] - self.box1Desc:setText("无额外奖励加成TD") -- TODOJ + self.box1Desc:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_4)) -- 无额外奖励加成 self.box2Node = self.uiMap["box_level_up_ui.box_2"] self.box2Add1Node = self.uiMap["box_level_up_ui.box_2.add_node_1"] @@ -40,7 +40,7 @@ function BoxLevelUpUI:onLoadRootComplete() self.box2Add2ItemCell = CellManager:addCellComp(self.uiMap["box_level_up_ui.box_2.add_node_2.item_cell"], GConst.TYPEOF_LUA_CLASS.ITEM_CELL) self.box2Add2Text = self.uiMap["box_level_up_ui.box_2.add_node_2.text"] self.box2Desc = self.uiMap["box_level_up_ui.box_2.none_text"] - self.box2Desc:setText("无额外奖励加成TD") -- TODOJ + self.box2Desc:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_4)) -- 无额外奖励加成 self.box3Node = self.uiMap["box_level_up_ui.box_3"] self.box3Add1Node = self.uiMap["box_level_up_ui.box_3.add_node_1"] @@ -50,7 +50,7 @@ function BoxLevelUpUI:onLoadRootComplete() self.box3Add2ItemCell = CellManager:addCellComp(self.uiMap["box_level_up_ui.box_3.add_node_2.item_cell"], GConst.TYPEOF_LUA_CLASS.ITEM_CELL) self.box3Add2Text = self.uiMap["box_level_up_ui.box_3.add_node_2.text"] self.box3Desc = self.uiMap["box_level_up_ui.box_3.none_text"] - self.box3Desc:setText("无额外奖励加成TD") -- TODOJ + self.box3Desc:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_4)) -- 无额外奖励加成 self.closeTx = self.uiMap["box_level_up_ui.close_tx"] @@ -58,9 +58,9 @@ function BoxLevelUpUI:onLoadRootComplete() end function BoxLevelUpUI:refresh() - self.titleTx:setText("宝箱等级提升!TD") -- TODOJ + self.titleTx:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_6)) -- 宝箱等级提升! self.lvTx:setText("Lv." .. tostring(self.level)) - self.closeTx:setText("点击继续TD") -- TODOJ + self.closeTx:setText(I18N:getGlobalText(I18N.GlobalConst.CLICK_TO_CONTINUE)) -- 点击继续 self.box1Add1Node:setVisible(false) self.box1Add2Node:setVisible(false) diff --git a/lua/app/ui/shop/box_open_ui.lua b/lua/app/ui/shop/box_open_ui.lua index c091b969..e6cf95ef 100644 --- a/lua/app/ui/shop/box_open_ui.lua +++ b/lua/app/ui/shop/box_open_ui.lua @@ -1,7 +1,7 @@ local BoxOpenUI = class("BoxOpenUI", BaseUI) local ICON_NAME = { - [GConst.SummonConst.SUMMON_TYPE.LV_1] = "shop_chest_1", -- TODOJ + [GConst.SummonConst.SUMMON_TYPE.LV_1] = "shop_chest_1", [GConst.SummonConst.SUMMON_TYPE.LV_2] = "shop_chest_2", [GConst.SummonConst.SUMMON_TYPE.LV_3] = "shop_chest_3" } @@ -28,7 +28,7 @@ function BoxOpenUI:onLoadRootComplete() self.btnText = self.uiMap["box_open_ui.open_btn.text"] self.boxImg:setSprite(GConst.ATLAS_PATH.SHOP, ICON_NAME[self.summonType]) - self.btnText:setText("立即打开") -- TODOJ + self.btnText:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_7)) -- 立即打开 self.openBtn:addClickListener(function() ModuleManager.ShopManager:showBoxRewardUI(self.params) diff --git a/lua/app/ui/shop/box_reward_ui.lua b/lua/app/ui/shop/box_reward_ui.lua index df9fa8be..222e0523 100644 --- a/lua/app/ui/shop/box_reward_ui.lua +++ b/lua/app/ui/shop/box_reward_ui.lua @@ -35,7 +35,7 @@ function BoxRewardUI:onLoadRootComplete() self.uiMap = self.root:genAllChildren() self.titleTx = self.uiMap["box_reward_ui.title.text"] - self.titleTx:setText("恭喜获得TD") -- TODOJ + self.titleTx:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_8)) -- 恭喜获得 self.scrollRectObj = self.uiMap["box_reward_ui.scroll_rect"] self.scrollRect = self.scrollRectObj:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) @@ -60,7 +60,7 @@ function BoxRewardUI:onLoadRootComplete() end self.closeTx = self.uiMap["box_reward_ui.close_tx"] - self.closeTx:setText("点击关闭TD") -- TODOJ + self.closeTx:setText(I18N:getGlobalText(I18N.GlobalConst.CLICK_CLOSE_DESC)) self.mask = self.uiMap["box_reward_ui.mask"] self.mask:addClickListener(function() diff --git a/lua/app/ui/shop/cell/beginner_sell_cell.lua b/lua/app/ui/shop/cell/beginner_sell_cell.lua index d0674590..10c20019 100644 --- a/lua/app/ui/shop/cell/beginner_sell_cell.lua +++ b/lua/app/ui/shop/cell/beginner_sell_cell.lua @@ -51,9 +51,9 @@ function BeginnerSellCell:refresh() self.offImg:setVisible(false) end -- 限购 - self.limitText:setText("限购1次TD") -- 章节礼包默认限购1次 TODOJ + self.limitText:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_18, 1)) -- 限购1次 -- 标题 - self.titleText:setText("新手礼包TD") -- TODOJ + self.titleText:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_11)) -- 新手礼包 -- 奖励 local rewardList = cfgInfo.reward local count = rewardList and #rewardList or 0 diff --git a/lua/app/ui/shop/cell/box_sell_cell.lua b/lua/app/ui/shop/cell/box_sell_cell.lua index 46c1de02..2b1a4aaf 100644 --- a/lua/app/ui/shop/cell/box_sell_cell.lua +++ b/lua/app/ui/shop/cell/box_sell_cell.lua @@ -8,24 +8,24 @@ function BoxSellCell:init() local uiMap = self.baseObject:genAllChildren() self.bg = uiMap["box_sell_cell.bg"] local boxNameTx1 = uiMap["box_sell_cell.bg.box_1.name_tx"] - boxNameTx1:setText("临时文本:普通宝箱") + boxNameTx1:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_1)) -- 普通宝箱 local boxDescTx1 = uiMap["box_sell_cell.bg.box_1.desc_tx"] - boxDescTx1:setText("临时文本:必出普通英雄") + boxDescTx1:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_24)) -- 必出普通英雄 self.boxBuyBtn1 = uiMap["box_sell_cell.bg.box_1.buy_btn"] self.boxBuyBtnCoin1 = uiMap["box_sell_cell.bg.box_1.buy_btn.coin"] self.boxBuyBtnTx1 = uiMap["box_sell_cell.bg.box_1.buy_btn.buy_tx"] local boxNameTx2 = uiMap["box_sell_cell.bg.box_2.name_tx"] - boxNameTx2:setText("临时文本:精致宝箱") + boxNameTx2:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_2)) -- 精致宝箱 local boxDescTx2 = uiMap["box_sell_cell.bg.box_2.desc_tx"] - boxDescTx2:setText("临时文本:必出稀有英雄") + boxDescTx2:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_25)) -- 必出稀有英雄 self.boxBuyBtn2 = uiMap["box_sell_cell.bg.box_2.buy_btn"] self.boxBuyBtnCoin2 = uiMap["box_sell_cell.bg.box_2.buy_btn.coin"] self.boxBuyBtnTx2 = uiMap["box_sell_cell.bg.box_2.buy_btn.buy_tx"] self.box3 = uiMap["box_sell_cell.bg.box_3"] local boxNameTx3 = uiMap["box_sell_cell.bg.box_3.name_tx"] - boxNameTx3:setText("临时文本:珍贵") + boxNameTx3:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_3)) -- 珍贵宝箱 local boxDescTx3 = uiMap["box_sell_cell.bg.box_3.desc_tx"] - boxDescTx3:setText("临时文本:必出史诗英雄") + boxDescTx3:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_26)) -- 必出史诗英雄 self.boxBuyBtn3 = uiMap["box_sell_cell.bg.box_3.buy_btn"] self.boxBuyBtnCoin3 = uiMap["box_sell_cell.bg.box_3.buy_btn.coin"] self.boxBuyBtnTx3 = uiMap["box_sell_cell.bg.box_3.buy_btn.buy_tx"] @@ -34,7 +34,7 @@ function BoxSellCell:init() self.progressTx = uiMap["box_sell_cell.bg.progress_tx"] self.helpBtn = uiMap["box_sell_cell.bg.help_btn"] local titleTx = uiMap["box_sell_cell.title_bg.text"] - titleTx:setText("临时文本:宝箱") + titleTx:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_27)) -- 宝箱 self.boxBuyBtn1:addClickListener(function() self:onClickBox(GConst.SummonConst.SUMMON_TYPE.LV_1) @@ -72,12 +72,12 @@ function BoxSellCell:refreshLv() local lv = DataManager.SummonData:getSummonLevel() local exp = DataManager.SummonData:getSummonExp() local maxExp = DataManager.SummonData:getSummonMaxExp() - self.progressLv:setText("Lv." .. tostring(lv)) -- TODOJ + self.progressLv:setText("Lv." .. tostring(lv)) if maxExp and maxExp > 0 then - self.progressTx:setText(tostring(exp) .. "/" .. tostring(maxExp)) -- TODOJ + self.progressTx:setText(tostring(exp) .. "/" .. tostring(maxExp)) self.progressSlider.value = exp / maxExp else - self.progressTx:setText("MAX") -- TODOJ + self.progressTx:setText(I18N:getGlobalText(I18N.GlobalConst.STR_MAX)) self.progressSlider.value = 1 end end diff --git a/lua/app/ui/shop/cell/chapter_cell.lua b/lua/app/ui/shop/cell/chapter_cell.lua index ceb58a85..3d7f187e 100644 --- a/lua/app/ui/shop/cell/chapter_cell.lua +++ b/lua/app/ui/shop/cell/chapter_cell.lua @@ -67,9 +67,9 @@ function ChapterCell:refresh(idx, cfgInfo, totalCount, arrowCallback) -- 超值 self.offText:setText(tostring(cfgInfo.value * 100) .. "%") -- 限购 - self.limitText:setText("限购1次TD") -- 章节礼包默认限购1次 TODOJ + self.limitText:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_18, 1)) -- 限购1次 -- 标题 - self.titleText:setText("第" .. tostring(cfgInfo.chapter) .. "章礼包TD") -- TODOJ + self.titleText:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_19, tostring(cfgInfo.chapter))) -- 第{0}章礼包 -- 奖励 local rewardList = cfgInfo.reward local count = rewardList and #rewardList or 0 diff --git a/lua/app/ui/shop/cell/coin_sell_cell.lua b/lua/app/ui/shop/cell/coin_sell_cell.lua index 914eb2be..5989b888 100644 --- a/lua/app/ui/shop/cell/coin_sell_cell.lua +++ b/lua/app/ui/shop/cell/coin_sell_cell.lua @@ -47,9 +47,9 @@ function CoinSellCell:refresh() -- 超值 self.offText:setText(tostring(cfgInfo.value) .. "%") -- 限购 - self.limitText:setText("限购" .. tostring(cfgInfo.limit) .. "次TD") -- TODOJ + self.limitText:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_18, tostring(cfgInfo.limit))) -- 限购{0}次 -- 标题 - self.titleText:setText("金币礼包TD") -- TODOJ + self.titleText:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_14)) -- 奖励 local rewardList = cfgInfo.reward local count = rewardList and #rewardList or 0 diff --git a/lua/app/ui/shop/cell/gem_cell.lua b/lua/app/ui/shop/cell/gem_cell.lua index 721e4cd2..bd43350f 100644 --- a/lua/app/ui/shop/cell/gem_cell.lua +++ b/lua/app/ui/shop/cell/gem_cell.lua @@ -17,7 +17,7 @@ function GemCell:init() self.adText = uiMap["gem_cell.ad.desc"] self.sellOutText = uiMap["gem_cell.sell_out"] - self.sellOutText:setText("已购买TD") -- TODOJ + self.sellOutText:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_20)) end function GemCell:refresh(id, cfgInfo) @@ -39,7 +39,7 @@ function GemCell:refresh(id, cfgInfo) GFunc.setAdsSprite(self.adImg) local adLeftCount = adMaxTimes - bought if adLeftCount > 0 then - self.adText:setText("免费(" .. tostring(adLeftCount) .. ")TD") -- TODOJ + self.adText:setText(I18N:getGlobalText(I18N.GlobalConst.STR_FREE) .. "(" .. tostring(adLeftCount) .. ")") -- 免费(x) GFunc.centerImgAndTx(self.adImg, self.adText, 5) self.sellOutText:setVisible(false) @@ -56,7 +56,7 @@ function GemCell:refresh(id, cfgInfo) if hasDoubleTimes then -- 有双倍效果 self.doubleNode:setVisible(true) - self.doubleDesc:setText("剩余次数:" .. tostring(leftDoubleTimes) .. "TD") -- TODOJ + self.doubleDesc:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_21, tostring(leftDoubleTimes))) -- 剩余次数:{0} self.doubleText:setText("+" .. tostring(reward.num * 2)) GFunc.centerImgAndTx(self.doubleImg, self.doubleText, 5) self.doubleOriginText:setText(reward.num) diff --git a/lua/app/ui/shop/cell/gem_sell_cell.lua b/lua/app/ui/shop/cell/gem_sell_cell.lua index 204a79ff..37b2c5f4 100644 --- a/lua/app/ui/shop/cell/gem_sell_cell.lua +++ b/lua/app/ui/shop/cell/gem_sell_cell.lua @@ -3,7 +3,7 @@ local GemSellCell = class("GemSellCell", BaseCell) function GemSellCell:init() local uiMap = self.baseObject:genAllChildren() local titleTx = uiMap["gem_sell_cell.title_bg.text"] - titleTx:setText("临时文本:钻石") + titleTx:setText(ModuleManager.ItemManager:getItemName(GConst.ItemConst.ITEM_ID_GEM)) self.cells = {} self.cellHeight = 0 @@ -49,8 +49,4 @@ function GemSellCell:setVisible(visible) self.baseObject:setVisible(visible) end -function GemSellCell:onClickGift(id) - Logger.logHighlight("Click id:%s", id) -- TODOJ -end - return GemSellCell \ No newline at end of file diff --git a/lua/app/ui/shop/cell/gold_cell.lua b/lua/app/ui/shop/cell/gold_cell.lua index 995d99af..7825e5fe 100644 --- a/lua/app/ui/shop/cell/gold_cell.lua +++ b/lua/app/ui/shop/cell/gold_cell.lua @@ -14,7 +14,7 @@ function GoldCell:init() self.descText = uiMap["gold_cell.desc"] self.sellOutText = uiMap["gold_cell.sell_out"] - self.sellOutText:setText("已购买TD") -- TODOJ + self.sellOutText:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_20)) -- 已购买 end function GoldCell:refresh(id, cfgInfo) @@ -33,7 +33,7 @@ function GoldCell:refresh(id, cfgInfo) local bought = DataManager.ShopData:getCommonDailyCoinAdBuyCount() -- 金币礼包购买次数 local adLeftCount = adMaxTimes - bought if adLeftCount > 0 then - self.adText:setText("免费(" .. tostring(adLeftCount) .. ")TD") -- TODOJ + self.adText:setText(I18N:getGlobalText(I18N.GlobalConst.STR_FREE) .. "(" .. tostring(adLeftCount) .. ")") -- 免费(x) GFunc.centerImgAndTx(self.adImg, self.adText, 5) self.sellOutText:setVisible(false) @@ -54,7 +54,7 @@ function GoldCell:refresh(id, cfgInfo) end self.nameText:setText(GFunc.num2Str(goldNum)) - self.descText:setText("金币礼包:" .. tostring(id) .. "TD") -- TODOJ + self.descText:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_14)) -- 金币礼包 self:addClickListener(function() self:onClickGift(id, isFree) diff --git a/lua/app/ui/shop/cell/gold_sell_cell.lua b/lua/app/ui/shop/cell/gold_sell_cell.lua index d3a3904c..7cd52e9c 100644 --- a/lua/app/ui/shop/cell/gold_sell_cell.lua +++ b/lua/app/ui/shop/cell/gold_sell_cell.lua @@ -3,7 +3,7 @@ local GoldSellCell = class("GoldSellCell", BaseCell) function GoldSellCell:init() local uiMap = self.baseObject:genAllChildren() local titleTx = uiMap["gold_sell_cell.title_bg.text"] - titleTx:setText("临时文本:金币") + titleTx:setText(ModuleManager.ItemManager:getItemName(GConst.ItemConst.ITEM_ID_GOLD)) self.cells = {} self.cellHeight = 0 diff --git a/lua/app/ui/shop/cell/grow_cell.lua b/lua/app/ui/shop/cell/grow_cell.lua index 6abd2af5..63a8adbe 100644 --- a/lua/app/ui/shop/cell/grow_cell.lua +++ b/lua/app/ui/shop/cell/grow_cell.lua @@ -46,9 +46,9 @@ function GrowCell:refresh(idx, gift) -- 超值 self.offText:setText(tostring(cfgInfo.value) .. "%") -- 限购 - self.limitText:setText("限购" .. tostring(cfgInfo.limit) .. "次TD") -- TODOJ + self.limitText:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_18, tostring(cfgInfo.limit))) -- 限购{0}次 -- 标题 - self.titleText:setText("成长礼包TD") -- TODOJ + self.titleText:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_13)) -- 成长礼包 -- 奖励 local rewardList = cfgInfo.reward local count = rewardList and #rewardList or 0 diff --git a/lua/app/ui/shop/cell/hot_cell.lua b/lua/app/ui/shop/cell/hot_cell.lua index 35ddc775..9859c8aa 100644 --- a/lua/app/ui/shop/cell/hot_cell.lua +++ b/lua/app/ui/shop/cell/hot_cell.lua @@ -21,7 +21,7 @@ function HotCell:init() self.heroNumText = uiMap["hot_cell.hero.num_tx"] self.sellOutText = uiMap["hot_cell.sell_out"] - self.sellOutText:setText("已购买TD") -- TODOJ + self.sellOutText:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_20)) -- 已购买 end function HotCell:refresh(data) @@ -57,7 +57,7 @@ function HotCell:refresh(data) GFunc.setAdsSprite(self.adImg) local adLeftCount = DataManager.ShopData:getMallDailyFirstItemAdMaxCount() - bought if adLeftCount > 0 then - self.adText:setText("免费(" .. tostring(adLeftCount) .. ")TD") -- TODOJ + self.adText:setText(I18N:getGlobalText(I18N.GlobalConst.STR_FREE) .. "(" .. tostring(adLeftCount) .. ")") -- 免费(x) GFunc.centerImgAndTx(self.adImg, self.adText, 5) self.sellOutText:setVisible(false) diff --git a/lua/app/ui/shop/cell/hot_sell_cell.lua b/lua/app/ui/shop/cell/hot_sell_cell.lua index f255de99..8b2ed387 100644 --- a/lua/app/ui/shop/cell/hot_sell_cell.lua +++ b/lua/app/ui/shop/cell/hot_sell_cell.lua @@ -6,9 +6,9 @@ function HotSellCell:init() local uiMap = self.baseObject:genAllChildren() self.cellHeight = self.baseObject:fastGetSizeDeltaY() + 20 - uiMap["hot_sell_cell.title_bg.text"]:setText("临时文本:每日特惠") + uiMap["hot_sell_cell.title_bg.text"]:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_28)) -- 每日特惠 uiMap["hot_sell_cell.help_btn"]:addClickListener(function() - + -- TODOJ end) self.timeTx = uiMap["hot_sell_cell.time_tx"] self.cells = {} @@ -39,7 +39,7 @@ function HotSellCell:refresh() self.refreshAdImg:setVisible(true) GFunc.setAdsSprite(self.refreshAdImg) self.refreshGemImg:setVisible(false) - self.refreshText:setText("刷新TD") -- TODOJ + self.refreshText:setText(I18N:getGlobalText(I18N.GlobalConst.STR_REFRESH)) self.refreshBtn:addRedPoint(70, 30, 0.6) elseif gemRefreshCount > 0 then self.refreshBtn:setVisible(true) @@ -68,7 +68,7 @@ function HotSellCell:refreshTime() if remainTime < 0 then remainTime = 0 end - self.timeTx:setText("刷新时间TD:" .. GFunc.getTimeStrWithHMS(remainTime)) -- TODOJ + self.timeTx:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_22, GFunc.getTimeStrWithHMS(remainTime)))-- 刷新时间:{0} end function HotSellCell:getCellHeight() diff --git a/lua/app/ui/shop/cell/level_cell.lua b/lua/app/ui/shop/cell/level_cell.lua index 95f716e0..99325557 100644 --- a/lua/app/ui/shop/cell/level_cell.lua +++ b/lua/app/ui/shop/cell/level_cell.lua @@ -43,9 +43,9 @@ function LevelCell:refresh(idx, cfgInfo, clickCallback) -- 超值 self.offText:setText(tostring(cfgInfo.value) .. "%") -- 限购 - self.limitText:setText("限购1次TD") -- 默认限购1次 TODOJ + self.limitText:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_18, 1)) -- 限购1次 -- 标题 - self.titleText:setText(tostring(cfgInfo.parameter) .. "级助力礼包TD") -- TODOJ + self.titleText:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_23, tostring(cfgInfo.parameter))) -- {0}级助力礼包 -- 奖励 local rewardList = cfgInfo.reward local count = rewardList and #rewardList or 0 diff --git a/lua/app/ui/shop/gift_pop_ui.lua b/lua/app/ui/shop/gift_pop_ui.lua index e1bc814b..381fdc14 100644 --- a/lua/app/ui/shop/gift_pop_ui.lua +++ b/lua/app/ui/shop/gift_pop_ui.lua @@ -2,23 +2,23 @@ local GiftPopUI = class("GiftPopUI", BaseUI) local GIFT_BG_NAME = { [PayManager.PURCHARSE_TYPE.ACT_GIFT] = { - [PayManager.PURCHARSE_ACT_TYPE.BEGINNER_GIFT] = "assets/arts/textures/background/shop/shop_gift_banner_2_1.png", -- TODOJ - [PayManager.PURCHARSE_ACT_TYPE.COIN_GIFT] = "assets/arts/textures/background/shop/shop_gift_banner_5_1.png", -- TODOJ - [PayManager.PURCHARSE_ACT_TYPE.LEVEL_UP_GIFT] = "assets/arts/textures/background/shop/shop_gift_banner_3_1.png", -- TODOJ - [PayManager.PURCHARSE_ACT_TYPE.FIRST_RECHARGE] = "assets/arts/textures/background/shop/shop_gift_banner_1_1.png", -- TODOJ + [PayManager.PURCHARSE_ACT_TYPE.FIRST_RECHARGE] = "assets/arts/textures/background/shop/shop_gift_banner_1_1.png", + [PayManager.PURCHARSE_ACT_TYPE.BEGINNER_GIFT] = "assets/arts/textures/background/shop/shop_gift_banner_3_1.png", + [PayManager.PURCHARSE_ACT_TYPE.LEVEL_UP_GIFT] = "assets/arts/textures/background/shop/shop_gift_banner_4_1.png", + [PayManager.PURCHARSE_ACT_TYPE.COIN_GIFT] = "assets/arts/textures/background/shop/shop_gift_banner_6_1.png", }, - [PayManager.PURCHARSE_TYPE.CHAPTER_GIFT] = "assets/arts/textures/background/shop/shop_gift_banner_1_1.png", -- TODOJ - [PayManager.PURCHARSE_TYPE.GROW_UP_GIFT] = "assets/arts/textures/background/shop/shop_gift_banner_4_1.png", -- TODOJ + [PayManager.PURCHARSE_TYPE.CHAPTER_GIFT] = "assets/arts/textures/background/shop/shop_gift_banner_2_1.png", + [PayManager.PURCHARSE_TYPE.GROW_UP_GIFT] = "assets/arts/textures/background/shop/shop_gift_banner_5_1.png", } local GIFT_TITLE_TEXT = { [PayManager.PURCHARSE_TYPE.ACT_GIFT] = { - [PayManager.PURCHARSE_ACT_TYPE.BEGINNER_GIFT] = "新手礼包TD", -- TODOJ - [PayManager.PURCHARSE_ACT_TYPE.COIN_GIFT] = "金币礼包TD", -- TODOJ - [PayManager.PURCHARSE_ACT_TYPE.LEVEL_UP_GIFT] = "助力礼包TD", -- TODOJ - [PayManager.PURCHARSE_ACT_TYPE.FIRST_RECHARGE] = "首充礼包TD", -- TODOJ + [PayManager.PURCHARSE_ACT_TYPE.FIRST_RECHARGE] = I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_9), + [PayManager.PURCHARSE_ACT_TYPE.BEGINNER_GIFT] = I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_11), + [PayManager.PURCHARSE_ACT_TYPE.LEVEL_UP_GIFT] = I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_12), + [PayManager.PURCHARSE_ACT_TYPE.COIN_GIFT] = I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_14), }, - [PayManager.PURCHARSE_TYPE.CHAPTER_GIFT] = "章节礼包TD", -- TODOJ - [PayManager.PURCHARSE_TYPE.GROW_UP_GIFT] = "成长礼包TD", -- TODOJ + [PayManager.PURCHARSE_TYPE.CHAPTER_GIFT] = I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_10), + [PayManager.PURCHARSE_TYPE.GROW_UP_GIFT] = I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_13), } local MAX_ITEM_NUM = 4 @@ -154,13 +154,13 @@ function GiftPopUI:refresh(needCheck) if self.actType == PayManager.PURCHARSE_TYPE.ACT_GIFT and self.actId == GConst.ShopConst.FIRST_RECHARGE_ID then local canGet = DataManager.ShopData:getHasFirstRechargeReward() if canGet then - self.buyBtnTx:setText("领取TD") -- TODOJ + self.buyBtnTx:setText(I18N:getGlobalText(I18N.GlobalConst.BTN_CLAIM)) else local hasGet = DataManager.ShopData:getHasGotFirstRechargeReward() if hasGet then self:closeUI() else - self.buyBtnTx:setText("前往商店TD") -- TODOJ + self.buyBtnTx:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_15)) -- 前往商店 end end end diff --git a/lua/app/ui/shop/shop_comp.lua b/lua/app/ui/shop/shop_comp.lua index 14eabb26..e031b27d 100644 --- a/lua/app/ui/shop/shop_comp.lua +++ b/lua/app/ui/shop/shop_comp.lua @@ -38,10 +38,10 @@ function ShopComp:initTitlePage() self.subTitleIcon2 = self.uiMap["shop_comp.title_node.btn_cell_2.icon"] self.subTitleBtn2 = self.uiMap["shop_comp.title_node.btn_cell_2"] - self.subTitleText1:setText("特惠商品TD") -- TODOJ 特惠商品 - self.subTitleSelectText1:setText("特惠商品TD") -- TODOJ 特惠商品 - self.subTitleText2:setText("主要商品TD") -- TODOJ 主要商品 - self.subTitleSelectText2:setText("主要商品TD") -- TODOJ 主要商品 + self.subTitleText1:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_16)) -- 特惠商品 + self.subTitleSelectText1:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_16)) -- 特惠商品 + self.subTitleText2:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_17)) -- 主要商品 + self.subTitleSelectText2:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_17)) -- 主要商品 self.subTitleBtn1:addClickListener(function() self:switchPage(PAGE_DISCOUNT) diff --git a/lua/app/userdata/shop/shop_data.lua b/lua/app/userdata/shop/shop_data.lua index 892e3313..61cdbcfc 100644 --- a/lua/app/userdata/shop/shop_data.lua +++ b/lua/app/userdata/shop/shop_data.lua @@ -257,7 +257,7 @@ function ShopData:addMallDailyAdResetCount() end function ShopData:getMallDailyAdLeftCount() - return 1 - self.mallDailyAdResetCount -- TODOJ 目前无配置表 + return 1 - self.mallDailyAdResetCount -- 目前无配置表 end function ShopData:getMallDailyDiamondResetCount() @@ -269,7 +269,7 @@ function ShopData:addMallDailyDiamondResetCount() end function ShopData:getMallDailyDiamondLeftCount() - return 1 - self.mallDailyDiamondResetCount -- TODOJ 目前无配置表 + return 1 - self.mallDailyDiamondResetCount -- 目前无配置表 end function ShopData:getMallDailyGoods() @@ -277,17 +277,17 @@ function ShopData:getMallDailyGoods() end function ShopData:getMallDailyDiamondResetCost() - return 30 -- TODOJ 目前无配置表 + return 30 -- 目前无配置表 end -- 每日特惠 广告商品最大购买次数 function ShopData:getMallDailyFirstItemAdMaxCount() - return 1 -- TODOJ 目前无配置表 + return 1 -- 目前无配置表 end -- 每日特惠 常规商品最大购买次数 function ShopData:getMallDailyGoodsLimitCount() - return 1 -- TODOJ 目前无配置表 + return 1 -- 目前无配置表 end -- 每日特惠 是否开启 @@ -416,8 +416,9 @@ function ShopData:getBeginnerGiftHasBuy() end end +-- 新手礼包侧边栏展示时间 function ShopData:getBeginnerGiftSideBarDurationTime() - return 3 * 24 * 3600 -- 暂无配置表 TODOJ + return 3 * 24 * 3600 -- 目前无配置表 end -- 未购买且在开服的3天内