Explorar el Código

多语言修改

ybx_Gdn hace 1 año
padre
commit
5e0b676ea7

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 810 - 1
Assets/Content/Config/LanguagePackage_cn.csv


+ 84 - 83
Assets/Editor/CsvToLua/CfgLanguageCfg.csv

@@ -1,83 +1,84 @@
- ID,CfgName,Field,CfgID,CfgType
- int,string,string,string,int
-1,ConditionCfg,ConditionDescribe,ConditionCfg_ConditionDescribe_,1
-2,MapCfg,Name,MapCfg_Name_,0
-3,ActivitiesDiscountsCfg,Name,ADCfg_Name_,1
-4,ActivitiesTaskCfg,Title,ATCfg_Title_,1
-5,ArenaLevelCfg,ArenaLevelName,ALCfg_ArenaLevelName_,1
-6,ArtifactCfg,Name,ArtifactCfg_Name_,1
-7,BattleFailedTipsCfg,Content,BFTCfg_Content_,1
-8,BoliShopCfg,GoodsName,BSCfg_GoodsName_,1
-9,BoliShopCfg,GoodsDesc,BSCfg_GoodsDesc_,1
-10,CardCfg,CardName,CardCfg_CardName_,1
-11,CardIdentification,CardName,CI_CardName_,1
-12,CardIdentification,CardDescribe,CI_CardDescribe_,1
-13,CardSuitNewCfg,Name,CSNCfg_Name_,1
-14,DesignationCfg,Name,DCCfg_Name_,1
-15,DesignationCfg,TaskConditionDesc,DCCfg_TaskConditionDesc_,1
-16,DesignationCfg,TimeDesc,DCCfg_TimeDesc_,1
-17,EquipCfg,Name,ECfg_Name_,1
-18,EquipSuitNewCfg,Name,ESNCfg_Name_,1
-19,ExpeditionBuffCfg,Desc,EBCfg_Desc_,1
-20,ExpeditionBuffCfg,Name,EBCfg_Name_,1
-21,FashionCfg,FashionName,FCfg_FashionName_,1
-22,FashionCfg,FashionDepict,FCfg_FashionDepict_,1
-23,FashionPaperCfg,PaperName,FPCfg_PaperName_,1
-24,FashionSuitCfg,SuitName,FSCfg_SuitName_,1
-25,FightCfg,Desc,FCfg_Desc_,1
-26,GuildWarBuffCfg,Desc,GWBCfg_Desc_,1
-27,GuildWarBuffCfg,Name,GWBCfg_Name_,1
-28,GuildWarDojoCfg,Name,GWDCfg_Name_,1
-29,ItemCfg1,Describe,ICfg_Describe_,1
-30,ItemCfg1,Name,ICfg_Name_,1
-31,ItemCfg2,Describe,ICfg_Describe_,1
-32,ItemCfg2,Name,ICfg_Name_,1
-33,KeepSakeCfg,Name,KSCfg_Name_,1
-34,KeepSakeCfg,Describe,KSCfg_Describe_,1
-35,LineMissionCfg,TargetTaskDescribe,LMCfg_TargetTaskDescribe_,1
-36,MapCfg,Name,MapCfg_Name_,1
-37,MissionCfg,TargetTaskDescribe,MCfg_TargetTaskDescribe_,1
-38,NatureCfg,Name,NCfg_Name_,1
-39,NpcCfg1,Name,NpcCfg_Name_,1
-40,NpcCfg1,Desc,NpcCfg_Desc_,1
-41,NpcCfg2,Name,NpcCfg_Name_,1
-42,NpcCfg2,Desc,NpcCfg_Desc_,1
-43,NpcCfg3,Name,NpcCfg_Name_,1
-44,NpcCfg3,Desc,NpcCfg_Desc_,1
-45,ParterSkillTreeCfg,Name,PSTCfg_Name_,1
-46,PassiveSkillCfg,Name,PSCfg_Name_,1
-47,PassiveSkillCfg,Desc,PSCfg_Desc_,1
-48,PetCfg,Name,PetCfg_Name_,1
-49,PetCfg,Desc,PetCfg_Desc_,1
-50,PetEquipCfg,Name,PetEquipCfg_Name_,1
-51,PetEquipSuitCfg,Name,PetEquipSuitCfg_Name_,1
-52,PetpartnerCfg,Name,PetpartnerCfg_Name_,1
-53,RuneShopGiftsCfg,Name,RSGCfg_Name_,1
-54,RuneShopGuildBattleCfg,Name,RSGBCfg_Name_,1
-55,RuneShopGuildBattleCfg,ExtraNum,RSGBCfg_ExtraNum_,1
-56,RuneShopLimitCfg,Name,RSLCfg_Name_,1
-57,RuneShopRankAidouluCfg,Name,RSRACfg_Name_,1
-58,RuneShopRankAidouluCfg,ExtraNum,RSRACfg_ExtraNum_,1
-59,RuneShopRankArenaCfg,Name,RSRArCfg_Name_,1
-60,RuneShopRankArenaCfg,ExtraNum,RSRArCfg_ExtraNum_,1
-61,RuneShopRankMapCfg,Name,RSRMCfg_Name_,1
-62,RuneShopRankMapCfg,ExtraNum,RSRMCfg_ExtraNum_,1
-63,RuneShopRankPetCfg,Name,RSRKCfg_Name_,1
-64,RuneShopRankPetCfg,ExtraNum,RSRKCfg_ExtraNum_,1
-65,RuneShopRankSkillCfg,Name,RSRSCfg_Name_,1
-66,RuneShopRankSkillCfg,ExtraNum,RSRSCfg_ExtraNum_,1
-67,RuneShopRankTowerCfg,Name,RSRTCfg_Name_,1
-68,RuneShopRankTowerCfg,ExtraNum,RSRTCfg_ExtraNum_,1
-69,RushListTargetCfg,Label,RLTCfg_Label_,1
-70,RushListTargetCfg,Des,RLTCfg_Des_,1
-71,ShopCfg,GoodsName,ShopCfg_GoodsName_,1
-72,ShopCfg,GoodsDesc,ShopCfg_GoodsDesc_,1
-73,ShopTypeCfg,Name,ShopTypeCfg_Name_,1
-74,SkillShowCfg,Name,SkillShowCfg_Name_,1
-75,SkillSuitNewCfg,Name,SkillSuitNewCfg_Name_,1
-76,SkillUpEffectCfg1,Name,SUECfg_Name_,1
-77,SkillUpEffectCfg1,Desc,SUECfg_Desc_,1
-78,SkillUpEffectCfg2,Name,SUECfg_Name_,1
-79,SkillUpEffectCfg2,Desc,SUECfg_Desc_,1
-80,StoryChapterCfg,Name,SCCfg_Name_,1
-81,StoryChapterCfg,Content,SCCfg_Content_,1
+ ID,CfgName,Field,CfgID,CfgType,Enable
+ int,string,string,string,int,int
+1,ConditionCfg,ConditionDescribe,ConditionCfg_ConditionDescribe_,1,0
+2,MapCfg,Name,MapCfg_Name_,0,0
+3,ActivitiesDiscountsCfg,Name,ADCfg_Name_,1,0
+4,ActivitiesTaskCfg,Title,ATCfg_Title_,1,0
+5,ArenaLevelCfg,ArenaLevelName,ALCfg_ArenaLevelName_,1,0
+6,ArtifactCfg,Name,ArtifactCfg_Name_,1,0
+7,BattleFailedTipsCfg,Content,BFTCfg_Content_,1,0
+8,BoliShopCfg,GoodsName,BSCfg_GoodsName_,1,0
+9,BoliShopCfg,GoodsDesc,BSCfg_GoodsDesc_,1,0
+10,CardCfg,CardName,CardCfg_CardName_,1,0
+11,CardIdentification,CardName,CI_CardName_,1,0
+12,CardIdentification,CardDescribe,CI_CardDescribe_,1,0
+13,CardSuitNewCfg,Name,CSNCfg_Name_,1,0
+14,DesignationCfg,Name,DCCfg_Name_,1,0
+15,DesignationCfg,TaskConditionDesc,DCCfg_TaskConditionDesc_,1,0
+16,DesignationCfg,TimeDesc,DCCfg_TimeDesc_,1,0
+17,EquipCfg,Name,ECfg_Name_,1,0
+18,EquipSuitNewCfg,Name,ESNCfg_Name_,1,0
+19,ExpeditionBuffCfg,Desc,EBCfg_Desc_,1,0
+20,ExpeditionBuffCfg,Name,EBCfg_Name_,1,0
+21,FashionCfg,FashionName,FCfg_FashionName_,1,0
+22,FashionCfg,FashionDepict,FCfg_FashionDepict_,1,0
+23,FashionPaperCfg,PaperName,FPCfg_PaperName_,1,0
+24,FashionSuitCfg,SuitName,FSCfg_SuitName_,1,0
+25,FightCfg,Desc,FCfg_Desc_,1,0
+26,GuildWarBuffCfg,Desc,GWBCfg_Desc_,1,0
+27,GuildWarBuffCfg,Name,GWBCfg_Name_,1,0
+28,GuildWarDojoCfg,Name,GWDCfg_Name_,1,0
+29,ItemCfg1,Describe,ICfg_Describe_,1,0
+30,ItemCfg1,Name,ICfg_Name_,1,0
+31,ItemCfg2,Describe,ICfg_Describe_,1,0
+32,ItemCfg2,Name,ICfg_Name_,1,0
+33,KeepSakeCfg,Name,KSCfg_Name_,1,0
+34,KeepSakeCfg,Describe,KSCfg_Describe_,1,0
+35,LineMissionCfg,TargetTaskDescribe,LMCfg_TargetTaskDescribe_,1,0
+36,MapCfg,Name,MapCfg_Name_,1,0
+37,MissionCfg,TargetTaskDescribe,MCfg_TargetTaskDescribe_,1,0
+38,NatureCfg,Name,NCfg_Name_,1,0
+39,NpcCfg1,Name,NpcCfg_Name_,1,0
+40,NpcCfg1,Desc,NpcCfg_Desc_,1,0
+41,NpcCfg2,Name,NpcCfg_Name_,1,0
+42,NpcCfg2,Desc,NpcCfg_Desc_,1,0
+43,NpcCfg3,Name,NpcCfg_Name_,1,0
+44,NpcCfg3,Desc,NpcCfg_Desc_,1,0
+45,ParterSkillTreeCfg,Name,PSTCfg_Name_,1,0
+46,PassiveSkillCfg,Name,PSCfg_Name_,1,0
+47,PassiveSkillCfg,Desc,PSCfg_Desc_,1,0
+48,PetCfg,Name,PetCfg_Name_,1,0
+49,PetCfg,Desc,PetCfg_Desc_,1,0
+50,PetEquipCfg,Name,PetEquipCfg_Name_,1,0
+51,PetEquipSuitCfg,Name,PetEquipSuitCfg_Name_,1,0
+52,PetpartnerCfg,Name,PetpartnerCfg_Name_,1,0
+53,RuneShopGiftsCfg,Name,RSGCfg_Name_,1,0
+54,RuneShopGuildBattleCfg,Name,RSGBCfg_Name_,1,0
+55,RuneShopGuildBattleCfg,ExtraNum,RSGBCfg_ExtraNum_,1,0
+56,RuneShopLimitCfg,Name,RSLCfg_Name_,1,0
+57,RuneShopRankAidouluCfg,Name,RSRACfg_Name_,1,0
+58,RuneShopRankAidouluCfg,ExtraNum,RSRACfg_ExtraNum_,1,0
+59,RuneShopRankArenaCfg,Name,RSRArCfg_Name_,1,0
+60,RuneShopRankArenaCfg,ExtraNum,RSRArCfg_ExtraNum_,1,0
+61,RuneShopRankMapCfg,Name,RSRMCfg_Name_,1,0
+62,RuneShopRankMapCfg,ExtraNum,RSRMCfg_ExtraNum_,1,0
+63,RuneShopRankPetCfg,Name,RSRKCfg_Name_,1,0
+64,RuneShopRankPetCfg,ExtraNum,RSRKCfg_ExtraNum_,1,0
+65,RuneShopRankSkillCfg,Name,RSRSCfg_Name_,1,0
+66,RuneShopRankSkillCfg,ExtraNum,RSRSCfg_ExtraNum_,1,0
+67,RuneShopRankTowerCfg,Name,RSRTCfg_Name_,1,0
+68,RuneShopRankTowerCfg,ExtraNum,RSRTCfg_ExtraNum_,1,0
+69,RushListTargetCfg,Label,RLTCfg_Label_,1,0
+70,RushListTargetCfg,Des,RLTCfg_Des_,1,0
+71,ShopCfg,GoodsName,ShopCfg_GoodsName_,1,0
+72,ShopCfg,GoodsDesc,ShopCfg_GoodsDesc_,1,0
+73,ShopTypeCfg,Name,ShopTypeCfg_Name_,1,0
+74,SkillShowCfg,Name,SkillShowCfg_Name_,1,0
+75,SkillSuitNewCfg,Name,SkillSuitNewCfg_Name_,1,0
+76,SkillUpEffectCfg1,Name,SUECfg_Name_,1,0
+77,SkillUpEffectCfg1,Desc,SUECfg_Desc_,1,0
+78,SkillUpEffectCfg2,Name,SUECfg_Name_,1,0
+79,SkillUpEffectCfg2,Desc,SUECfg_Desc_,1,0
+80,StoryChapterCfg,Name,SCCfg_Name_,1,0
+81,StoryChapterCfg,Content,SCCfg_Content_,1,0
+82,PurseShopCfg,Name,PSCfg_Name_,1,1

+ 10 - 2
Assets/Editor/CsvToLua/CsvToLua.cs

@@ -19,13 +19,14 @@ public class CfgLanguageCfg : GameData<CfgLanguageCfg>
 
     public string CfgID;
     public int CfgType;
-
+    public int Enable;
     public CfgLanguageCfg()
     {
         CfgName = "";
         Field = "";
         CfgID = "";
         CfgType = 0;
+        Enable = 0;
     }
     public static void OnCsvLoad(CsvReader csvReader)
     {
@@ -441,7 +442,7 @@ return aaa";
         {
             ckcount+=1;
             List<CfgLanguageCfg> value = item.Value;
-
+           
             EditorUtility.DisplayProgressBar("检测配置中", $"检测:{item.Key}...", ckcount/cfgs.Count);
             string cfgPath = "";
             if (value[0].CfgType == 1)
@@ -473,6 +474,8 @@ return aaa";
 
                 for (int i = 0; i < cfg.Count; i++)
                 {
+                    if (cfg[i].Enable == 0)
+                        continue;
                     string value = luatable.RawGet<string, string>(cfg[i].Field);
                     if (string.IsNullOrEmpty(value))
                     {
@@ -575,6 +578,8 @@ return aaa";
 
                 for (int i = 0; i < cfg.Count; i++)
                 {
+                    if (cfg[i].Enable == 0)
+                        continue;
                     string value = luatable.RawGet<string, string>(cfg[i].Field);
                     if (string.IsNullOrEmpty(value))
                     {
@@ -622,10 +627,13 @@ return aaa";
         string[][] datas = csvReader.RowDatas;
         for (int i = csvReader.StartLine; i < datas.Length; i++)
         {
+          
             string[] curLine = datas[i];
 
             for (int j = 0; j < cfg.Count; j++)
             {
+                if (cfg[j].Enable == 0)
+                    continue;
                 string value = csvReader.GetDataByFieldName(cfg[j].Field,i);
 
                 if (string.IsNullOrEmpty(value))

+ 2 - 2
Assets/Lua/UI/Common/TitleListItemCtr.lua

@@ -8,7 +8,7 @@ function TitleListItemCtr:SetData(wnd, item, logicData)
         LogError("titleCfgData is not exist by TitleListItemCtr")
        return
     end
-    item.taskDsc.text.text = titleCfgData.TaskConditionDesc
+    item.taskDsc.text.text = I18N.T(titleCfgData.TaskConditionDesc)
     item.target:SetActive(state == 1 and titleCfgData.IfShowTaskNum == 1)
     item.target.text.text = logicData.currCount.."/"..logicData.totalCount
     if state > 2 and titleCfgData.Time > 0 then --称号卸下状态(即已激活)并为时限称号  则显示剩余时间
@@ -23,7 +23,7 @@ function TitleListItemCtr:SetData(wnd, item, logicData)
             item.timeLimit.text.text = I18N.SetLanguageValue("DesignationTime",d,h)
         end
     else
-        item.timeLimit.text.text = titleCfgData.TimeDesc
+        item.timeLimit.text.text = I18N.T(titleCfgData.TimeDesc)
     end
     item.btnEquip:SetActive(state == 4)
     item.btnActive:SetActive(state == 2)

+ 3 - 3
Assets/Lua/UI/UIBattle/UIBattleBossTipsView.lua

@@ -44,12 +44,12 @@ function UIBattleBossTipsView:SetBossData()
 	end
 
 	self.bossLevel.text.text = tostring(bossActor.ShowLevel)
-	self.bossName.text.text = bossCfg.Name
-	self.bossDesc.text.text = bossCfg.Desc
+	self.bossName.text.text = I18N.T(bossCfg.Name)
+	self.bossDesc.text.text = I18N.T(bossCfg.Desc)
 
 	local natureCfg = ManagerContainer.CfgMgr:GetNatureDataById(bossCfg.NatureId)
 	if natureCfg ~= nil then
-		self.natureName.text.text = natureCfg.Name
+		self.natureName.text.text =I18N.T(natureCfg.Name)
 		CommonUtil.LoadIcon(self, natureCfg.Icon, function (sprite)
 			self.natureImg.image.sprite = sprite
 		end)

+ 1 - 1
Assets/Lua/UI/UIClimbingTower/UIClimbingTowerBattleFailedView.lua

@@ -69,7 +69,7 @@ function UIClimbingTowerBattleFailedView:SetTipData(node,tip)
 		end)
 	end	
 	
-	node.tipsContent.text.text = tip.Content
+	node.tipsContent.text.text = I18N.T(tip.Content)
 	if tip.GotoPageIds ~= nil and #tip.GotoPageIds > 0 then
 		node.btnGo:SetActive(true)
 		self.uiBase:AddButtonUniqueEventListener(node.btnGo.button, self, self.OnClickJump, tip.GotoPageIds,tip.params,tip.LoadPageCondition)

+ 1 - 1
Assets/Lua/UI/UIExpedition/UIExpeditionDungeonInfoView.lua

@@ -189,7 +189,7 @@ function UIExpeditionDungeonInfoView:SetLevelData()
 end
 
 function UIExpeditionDungeonInfoView:SetBossData(bossItemLua,bossCfg,hpPercent,bossSlotIdx,BossId)
-	bossItemLua.bossName.text.text = bossCfg.Name
+	bossItemLua.bossName.text.text = I18N.T(bossCfg.Name)
 	bossItemLua.hpProgress.slider.value = hpPercent
 	--boss 积分
 	local CurBossScore = ManagerContainer.DataMgr.ExpeditionDataMgr:GetCurBossScore(BossId)

+ 1 - 1
Assets/Lua/UI/UIRuneShop/UIBoliShopView.lua

@@ -237,7 +237,7 @@ function UIBoliShopView:GetGoodsItemByRowColumn(gridView, itemIndex, row, column
 		itemLua.originalPrice.icon.image.sprite = sprite
     end, itemLua, 'CurrenyIcon')
 
-	itemLua.itemName.text.text = goodsCfgData.GoodsName
+	itemLua.itemName.text.text = I18N.T( goodsCfgData.GoodsName)
 	itemLua.presentPrice.number.text.text = goodsData.curPrice	--现价
     if goodsData:IsDiscount() then --折扣
 		itemLua.discount:SetActive(true)

+ 2 - 2
Assets/Lua/UI/UIShop/UIBoliShopBuyTipsView.lua

@@ -45,8 +45,8 @@ function UIBoliShopBuyTipsView:Init()
 
 	local havenum = CommonUtil.GetOwnResCountByItemId(goodsCfgData.GoodsItem)
 	self.itemnum.text.text = tostring(havenum)
-	self.itemName.text.text = goodsCfgData.GoodsName
-	self.desTxt.text.text = goodsCfgData.GoodsDesc
+	self.itemName.text.text = I18N.T(goodsCfgData.GoodsName)
+	self.desTxt.text.text = I18N.T(goodsCfgData.GoodsDesc)
 	self:RefreshCost()
 	local itemCfgData = ManagerContainer.CfgMgr:GetItemById(goodsCfgData.PayForType)
 	CommonUtil.LoadIcon(self, itemCfgData.MiniIcon, function (sprite)

+ 2 - 2
Assets/Lua/UI/UIShop/UIShopBuyTipsView.lua

@@ -45,8 +45,8 @@ function UIShopBuyTipsView:Init()
 
 	local havenum = CommonUtil.GetOwnResCountByItemId(goodsCfgData.GoodsItem)
 	self.itemnum.text.text = tostring(havenum)
-	self.itemName.text.text = goodsCfgData.GoodsName
-	self.desTxt.text.text = goodsCfgData.GoodsDesc
+	self.itemName.text.text = I18N.T(goodsCfgData.GoodsName)
+	self.desTxt.text.text = I18N.T(goodsCfgData.GoodsDesc)
 	self:RefreshCost()
 	local itemCfgData = ManagerContainer.CfgMgr:GetItemById(goodsCfgData.PayForType)
 	CommonUtil.LoadIcon(self, itemCfgData.MiniIcon, function (sprite)

+ 1 - 1
Assets/Lua/UI/UIShop/UIShopView.lua

@@ -554,7 +554,7 @@ function UIShopView:GetShopGoodsItemByRowColumn(gridView, itemIndex, row, column
 		itemLua.originalPrice.icon.image.sprite = sprite
     end, itemLua, 'CurrenyIcon')
 
-	itemLua.itemName.text.text = goodsCfgData.GoodsName
+	itemLua.itemName.text.text = I18N.T(goodsCfgData.GoodsName)
 	itemLua.presentPrice.number.text.text = goodsData.curPrice	--现价
     if goodsData:IsDiscount() then --折扣
 		itemLua.discount:SetActive(true)

+ 20 - 3
Assets/Src/Core/Config/ConfigMgr.cs

@@ -220,7 +220,7 @@ public class ConfigMgr : Singleton<ConfigMgr>
     private Dictionary<string, Dictionary<string, string>> getData(string name, string content)
     {
         string[] lineArray;
-        string[] charArray;
+        string[] charArray = null;
         // string text = content.Replace("\r", "@");
         // lineArray = text.Split("@"[0]);
         System.IO.StringReader reader = new System.IO.StringReader(content);
@@ -233,12 +233,29 @@ public class ConfigMgr : Singleton<ConfigMgr>
         }
         lineArray = tempList.ToArray();
         //DebugHelper.LogWarning("[TableName: {0}]lineArray {1}",name, lineArray[0]);
-        string[] indexname = lineArray[1].Split(splitword[0]);
+        string[] indexname = null;
+        if (name.Contains("Language"))
+        {
+            indexname = FileHelper.SpiltData(lineArray[1]);
+        }
+        else
+        {
+           indexname = lineArray[1].Split(splitword[0]);
+        }
+      
         Dictionary<string, Dictionary<string, string>> Table = new Dictionary<string, Dictionary<string, string>>(lineArray.Length);
         int linelength = 0;
         for (int i = linestart; i < lineArray.Length; ++i)
         {
-            charArray = lineArray[i].Split(splitword[0]);
+            if (name.Contains("Language"))
+            {
+                charArray = FileHelper.SpiltData(lineArray[i]);
+            }
+            else
+            {
+                charArray = lineArray[i].Split(splitword[0]);
+            }
+           
             linelength = charArray.Length;
             if (linelength > 0 && charArray[0] == string.Empty)
             {

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio