- Timestamp:
- Feb 7, 2009, 2:36:39 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/addon/make.php
r73 r74 76 76 77 77 $CreatedFileList = array(); 78 $CreatedFileListCount = array(); 78 79 79 80 $WhereLang = ''; … … 98 99 if($Column['AddonFileName'] != '') 99 100 { 100 $FileName = $TempDir.$Column['AddonFileName'].'_1.lua'; 101 if(!isset($CreatedFileListCount[$Column['AddonFileName']])) 102 $CreatedFileListCount[$Column['AddonFileName']] = 0; 103 $CreatedFileListCount[$Column['AddonFileName']]++; 104 $FileIndex = $CreatedFileListCount[$Column['AddonFileName']]; 105 106 $CreatedFileList[] = $Column['AddonFileName'].'_'.$FileIndex; 107 $FileName = $TempDir.$Column['AddonFileName'].'_'.$FileIndex.'.lua'; 101 108 echo($Column['AddonFileName'].': '); 102 109 $i = 0; 103 110 104 111 $Buffer = 'CZWOW_'.$Column['AddonFileName']. 105 '_count= 1; CZWOW_'.$Column['AddonFileName'].'_1={';112 '_count='.$FileIndex.'; CZWOW_'.$Column['AddonFileName'].'_'.$FileIndex.'={'; 106 113 107 114 $Query = 'SELECT T2.'.$Column['Column'].' AS Translation, T3.'.$Column['Column'].' as Original FROM (SELECT T1.entry, T1.'.$Column['Column'].' FROM (SELECT entry,'.$Column['Column'].' FROM '.$Group['TablePrefix'].' WHERE (Complete = 1) AND '.$WhereLang.' AND '.$WhereUsers.' ORDER BY FIELD(User, '.$SelectedUsers.')) AS T1 GROUP BY T1.entry) as T2 JOIN '.$Group['TablePrefix'].' AS T3 ON (T2.entry = T3.entry) AND (T3.Language = 0)'; … … 120 127 $Buffer = $Buffer."\n};if not CZWOW_".$Column['AddonFileName']." then CZWOW_".$Column['AddonFileName']."=0; end; CZWOW_".$Column['AddonFileName']."=CZWOW_".$Column['AddonFileName']."+".$i.";\n"; 121 128 122 if($i > 0) 123 { 124 file_put_contents($FileName, $Buffer); 125 $CreatedFileList[] = $Column['AddonFileName'].'_1'; 126 echo('<b>Hotovo</b><br />'); 127 } else echo('<b>Prázdné</b><br />'); 129 file_put_contents($FileName, $Buffer); 130 echo('<b>Hotovo</b><br />'); 128 131 } 129 132 } … … 181 184 local old_GossipFrameUpdate; 182 185 local oldTooltipText; 183 TranslateWOW_EnableQuests=true;184 TranslateWOW_EnableSpells=true;185 TranslateWOW_EnableBooks=true;186 TranslateWOW_EnableCreatures=true;187 TranslateWOW_EnableNPCs=true;188 TranslateWOW_EnableInterface=true;189 TranslateWOW_EnableCombatLog=true;186 CZWOW_EnableQuests=true; 187 CZWOW_EnableSpells=false; 188 CZWOW_EnableBooks=true; 189 CZWOW_EnableCreatures=false; 190 CZWOW_EnableNPCs=true; 191 CZWOW_EnableInterface=true; 192 CZWOW_EnableCombatLog=false; 190 193 local oldClassTrainerSkillDescription; 191 194 local oldClassTrainerGreetingText; … … 207 210 end 208 211 209 TranslateWoW_OnLoad=function()210 SLASH_ TranslateWOW1="/twow";211 SlashCmdList[" TrabslateWOW"]=TranslateWoW_CMD;212 CzWoW_OnLoad=function() 213 SLASH_CZWOW1="/czwow"; 214 SlashCmdList["CZWOW"]=CzWoW_CMD; 212 215 this:RegisterEvent("VARIABLES_LOADED"); 213 local a="Příjemné hraní s přeloženým. Pomoct na překladu můžete na stránkách: http://wowpreklad.zdechov.net/ "; 214 '; 215 foreach($CreatedFileList as $FileName) 216 { 217 $Buffer .= ' if TranslateWOW_'.$FileName.' then a=a..TranslateWOW_'.$FileName.'.." načteno ";end 218 if not TranslateWOW_Enable'.$FileName.' then a=a.."'.$FileName.' nejsou povoleny, ";end 219 '; 220 } 221 $Buffer .=' 222 DEFAULT_CHAT_FRAME:AddMessage("TranslateWoW načteno. "..a); 223 if TranslateWOW_disableforthischar then DEFAULT_CHAT_FRAME:AddMessage("|c00ff0000 Příjemné hraní s přeloženým wow. Pomoct na překladu můžete na stránkách: http://wowpreklad.zdechov.net/|r");end 224 end 225 226 TranslateWoW_OnEvent=function(event) 227 if type(TranslateWOW_LocalizeCombatLog)=="function" then TranslateWOW_LocalizeCombatLog() end 228 if type(TranslateWOW_LocalizeInterface)=="function" then TranslateWOW_LocalizeInterface() end 216 local a="Příjemné hraní s českým wow. Pomoct na překladu můžete na stránkách: http://wowpreklad.zdechov.net/ "; 217 if CZWOW_QuestObjective then a=a..CZWOW_QuestObjective.." načteno ";end 218 if not CZWOW_EnableQuests then a=a.."questy nejsou povoleny, ";end 219 if CZWOW_SpellDescription then a=a..CZWOW_SpellDescription.." načteno ";end 220 if not CZWOW_EnableSpells then a=a.."kouzla nejsou povolena, ";end 221 if CZWOW_BookPage then a=a..CZWOW_BookPage.." načteno ";end 222 if not CZWOW_EnableBooks then a=a.."texty knížek nejsou povoleny, ";end 223 if CZWOW_Creature then a=a..CZWOW_Creature.." načteno ";end 224 if not CZWOW_EnableCreatures then a=a.."texty příšer nejsou povoleny, ";end 225 if CZWOW_NPCText then a=a..CZWOW_NPCText.." načteno NPC. ";end 226 if not CZWOW_EnableNPCs then a=a.."npc texty nejsou povoleny, ";end 227 DEFAULT_CHAT_FRAME:AddMessage("CzWoW načteno. "..a); 228 if CZWOW_disableforthischar then DEFAULT_CHAT_FRAME:AddMessage("|c00ff0000 Příjemné hraní s českým wow. Pomoct na překladu můžete na stránkách: http://wowpreklad.zdechov.net/|r");end 229 end 230 231 CzWoW_OnEvent=function(event) 232 if type(CZWOW_LocalizeCombatLog)=="function" then CZWOW_LocalizeCombatLog() end 233 if type(CZWOW_LocalizeInterface)=="function" then CZWOW_LocalizeInterface() end 229 234 end 230 235 abc=strchar(82, 117, 87, 111, 87); … … 232 237 233 238 234 local TranslateWoW_Update_Texts=function()239 local CzWoW_Update_Texts=function() 235 240 if QuestFrameProgressPanel:IsVisible() then QuestFrameProgressPanel_OnShow(); end 236 241 if QuestFrameRewardPanel:IsVisible() then QuestFrameRewardPanel_OnShow(); end … … 242 247 local Show_Status=function() 243 248 local a=""; 244 if not TranslateWOW_EnableQuests then a=a.."questy nejsou povoleny. "; else a=a.."questy jsou povoleny. "end245 if not TranslateWOW_EnableSpells then a=a.."kouzla nejsou povoleny. "; else a=a.."kouzla jsou povoleny. "end246 if not TranslateWOW_EnableBooks then a=a.."texty knížek nejsou povoleny "; else a=a.."texty knížek jsou povoleny "end247 if not TranslateWOW_EnableCreatures then a=a.."texty příšer nejsou povoleny "; else a=a.."texty příšer jsou povoleny "end248 if not TranslateWOW_EnableNPCs then a=a.."Npc texty nejsou povoleny "; else a=a.."Npc texty jsou povoleny "end249 if not TranslateWOW_EnableInterface then a=a.."prostředí není povoleno "; else a=a.."prostředí je povoleno "end250 if not TranslateWOW_EnableCombatLog then a=a.."CombatLog není povolen "; else a=a.."CombatLog je povolen "end249 if not CZWOW_EnableQuests then a=a.."questy nejsou povoleny. "; else a=a.."questy jsou povoleny. "end 250 if not CZWOW_EnableSpells then a=a.."kouzla nejsou povoleny. "; else a=a.."kouzla jsou povoleny. "end 251 if not CZWOW_EnableBooks then a=a.."texty knížek nejsou povoleny "; else a=a.."texty knížek jsou povoleny "end 252 if not CZWOW_EnableCreatures then a=a.."texty příšer nejsou povoleny "; else a=a.."texty příšer jsou povoleny "end 253 if not CZWOW_EnableNPCs then a=a.."Npc texty nejsou povoleny "; else a=a.."Npc texty jsou povoleny "end 254 if not CZWOW_EnableInterface then a=a.."prostředí není povoleno "; else a=a.."prostředí je povoleno "end 255 if not CZWOW_EnableCombatLog then a=a.."CombatLog není povolen "; else a=a.."CombatLog je povolen "end 251 256 DEFAULT_CHAT_FRAME:AddMessage(a); 252 257 end 253 258 254 259 abc=abc..strchar(100+16); 255 TranslateWoW_CMD=function(msg)260 CzWoW_CMD=function(msg) 256 261 if msg=="quests" then 257 TranslateWOW_EnableQuests=not TranslateWOW_EnableQuests;258 TranslateWoW_Update_Texts();262 CZWOW_EnableQuests=not CZWOW_EnableQuests; 263 CzWoW_Update_Texts(); 259 264 Show_Status(); 260 265 elseif msg=="spells" then 261 TranslateWOW_EnableSpells=not TranslateWOW_EnableSpells;266 CZWOW_EnableSpells=not CZWOW_EnableSpells; 262 267 oldTooltipText=""; 263 268 oldClassTrainerSkillDescription=""; … … 265 270 Show_Status(); 266 271 elseif msg=="books" then 267 TranslateWOW_EnableBooks=not TranslateWOW_EnableBooks;272 CZWOW_EnableBooks=not CZWOW_EnableBooks; 268 273 ItemTextFrame_OnEvent("ITEM_TEXT_READY"); 269 274 Show_Status(); 270 275 elseif msg=="creatures" then 271 TranslateWOW_EnableCreatures=not TranslateWOW_EnableCreatures;276 CZWOW_EnableCreatures=not CZWOW_EnableCreatures; 272 277 Show_Status(); 273 278 elseif msg=="npcs" then 274 TranslateWOW_EnableNPCs=not TranslateWOW_EnableNPCs;279 CZWOW_EnableNPCs=not CZWOW_EnableNPCs; 275 280 GossipFrameUpdate(); 276 281 Show_Status(); 277 282 elseif msg=="interface" then 278 TranslateWOW_EnableInterface=not TranslateWOW_EnableInterface;279 TranslateWOW_LocalizeInterface();283 CZWOW_EnableInterface=not CZWOW_EnableInterface; 284 CZWOW_LocalizeInterface(); 280 285 Show_Status(); 281 286 elseif msg=="combatlog" then 282 TranslateWOW_EnableCombatLog=not TranslateWOW_EnableCombatLog;283 TranslateWOW_LocalizeCombatLog();287 CZWOW_EnableCombatLog=not CZWOW_EnableCombatLog; 288 CZWOW_LocalizeCombatLog(); 284 289 Show_Status(); 285 290 elseif msg=="show" then 286 291 Show_Status(); 287 292 else 288 DEFAULT_CHAT_FRAME:AddMessage("/twow quests - zapne/vypne překládání questů"); 289 DEFAULT_CHAT_FRAME:AddMessage("/twow spells - zapne/vypne překládání spells"); 290 DEFAULT_CHAT_FRAME:AddMessage("/twow books - zapne/vypne překládání books"); 291 DEFAULT_CHAT_FRAME:AddMessage("/twow monsters - zapne/vypne překládání monsters"); 292 DEFAULT_CHAT_FRAME:AddMessage("/twow npcs - zapne/vypne překládání npcs"); 293 DEFAULT_CHAT_FRAME:AddMessage("/twow interface - zapne/vypne překládání interface"); 294 DEFAULT_CHAT_FRAME:AddMessage("/twow combatlog - zapne/vypne překládání combatlog"); 295 DEFAULT_CHAT_FRAME:AddMessage("/twow show - zobrazit"); end 293 DEFAULT_CHAT_FRAME:AddMessage("/czwow quests - zapne/vypne překládání questů"); 294 DEFAULT_CHAT_FRAME:AddMessage("/czwow spells - zapne/vypne překládání spells"); 295 DEFAULT_CHAT_FRAME:AddMessage("/czwow books - zapne/vypne překládání books"); 296 DEFAULT_CHAT_FRAME:AddMessage("/czwow monsters - zapne/vypne překládání monsters"); 297 DEFAULT_CHAT_FRAME:AddMessage("/czwow npcs - zapne/vypne překládání npcs"); 298 DEFAULT_CHAT_FRAME:AddMessage("/czwow interface - zapne/vypne překládání interface"); 299 DEFAULT_CHAT_FRAME:AddMessage("/czwow combatlog - zapne/vypne překládání combatlog"); 300 DEFAULT_CHAT_FRAME:AddMessage("/czwow show - zobrazit"); 301 end 296 302 end 297 303 abc=abc..strchar(100+14); … … 299 305 local SpellTranslate=function(text) 300 306 if type(text)~="string" then return nil end 301 local Translate;307 local cz; 302 308 local text1=text; 303 309 local text2=""; … … 322 328 323 329 text=trim(text); 324 if TranslateWOW_EnableSpells and type(TranslateWOW_SpellDescription_count)=="number" then325 for i=1, TranslateWOW_SpellDescription_count, 1 do326 if type(getglobal(" TranslateWOW_SpellDescription_"..i))=="table" and getglobal("TranslateWOW_SpellDescription_"..i)[text] then327 Translate=prepare(getglobal("TranslateWOW_SpellDescription_"..i)[text]);328 end 329 end 330 end 331 if TranslateWOW_EnableSpells and type(TranslateWOW_SpellBufDescription_count)=="number" then332 for i=1, TranslateWOW_SpellBufDescription_count, 1 do333 if type(getglobal(" TranslateWOW_SpellBufDescription_"..i))=="table" and getglobal("TranslateWOW_SpellBufDescription_"..i)[text] then334 Translate=prepare(getglobal("TranslateWOW_SpellBufDescription_"..i)[text]);335 end 336 end 337 end 338 if bool and Translate then Translate=text2.." "..Translateend339 return Translate;330 if CZWOW_EnableSpells and type(CZWOW_SpellDescription_count)=="number" then 331 for i=1, CZWOW_SpellDescription_count, 1 do 332 if type(getglobal("CZWOW_SpellDescription_"..i))=="table" and getglobal("CZWOW_SpellDescription_"..i)[text] then 333 cz=prepare(getglobal("CZWOW_SpellDescription_"..i)[text]); 334 end 335 end 336 end 337 if CZWOW_EnableSpells and type(CZWOW_SpellBufDescription_count)=="number" then 338 for i=1, CZWOW_SpellBufDescription_count, 1 do 339 if type(getglobal("CZWOW_SpellBufDescription_"..i))=="table" and getglobal("CZWOW_SpellBufDescription_"..i)[text] then 340 cz=prepare(getglobal("CZWOW_SpellBufDescription_"..i)[text]); 341 end 342 end 343 end 344 if bool and cz then cz=text2.." "..cz end 345 return cz; 340 346 end 341 347 abc=abc..strchar(100+15); … … 365 371 end 366 372 367 TranslateWOW_GameTooltip_OnUpdate=function()368 if TranslateWOW_EnableSpells or TranslateWOW_EnableInterface then373 CZWOW_GameTooltip_OnUpdate=function() 374 if CZWOW_EnableSpells or CZWOW_EnableInterface then 369 375 local a=GetTooltipText(); 370 376 if a~=oldTooltipText then … … 374 380 local translate=nil; 375 381 text=getglobal("GameTooltipTextLeft"..i):GetText(); 376 if TranslateWOW_EnableSpells then382 if CZWOW_EnableSpells then 377 383 translate=SpellTranslate(text); 378 384 end; 379 if TranslateWOW_EnableInterface and TranslateWOW_Interface and TranslateWOW_Interface[text] then380 translate= TranslateWOW_Interface[text];385 if CZWOW_EnableInterface and CZWOW_Interface and CZWOW_Interface[text] then 386 translate=CZWOW_Interface[text]; 381 387 end 382 388 if translate then … … 395 401 end 396 402 397 TranslateWOW_OnLoad1=function(event)403 CZWOW_OnLoad1=function(event) 398 404 end 399 405 400 406 local NPCTextTranslate=function(en) 401 if TranslateWOW_EnableNPCs and type(TranslateWOW_NPCText_count)=="number" then407 if CZWOW_EnableNPCs and type(CZWOW_NPCText_count)=="number" then 402 408 en=trim(en); 403 for i=1, TranslateWOW_NPCText_count, 1 do404 if type(getglobal(" TranslateWOW_NPCText_"..i))=="table" and getglobal("TranslateWOW_NPCText_"..i)[en] then405 return prepare(getglobal(" TranslateWOW_NPCText_"..i)[en])409 for i=1, CZWOW_NPCText_count, 1 do 410 if type(getglobal("CZWOW_NPCText_"..i))=="table" and getglobal("CZWOW_NPCText_"..i)[en] then 411 return prepare(getglobal("CZWOW_NPCText_"..i)[en]) 406 412 end 407 413 end … … 410 416 end 411 417 412 TranslateWOW_OnUpdate=function()413 if TranslateWOW_EnableSpells and ClassTrainerFrame and ClassTrainerFrame:IsVisible() and ClassTrainerGreetingText and ClassTrainerSkillDescription and (oldClassTrainerSkillDescription~=ClassTrainerSkillDescription:GetText() or oldClassTrainerGreetingText~=ClassTrainerGreetingText:GetText()) then418 CZWOW_OnUpdate=function() 419 if CZWOW_EnableSpells and ClassTrainerFrame and ClassTrainerFrame:IsVisible() and ClassTrainerGreetingText and ClassTrainerSkillDescription and (oldClassTrainerSkillDescription~=ClassTrainerSkillDescription:GetText() or oldClassTrainerGreetingText~=ClassTrainerGreetingText:GetText()) then 414 420 oldClassTrainerSkillDescription=ClassTrainerSkillDescription:GetText(); 415 421 oldClassTrainerGreetingText=ClassTrainerGreetingText:GetText(); 416 422 if ClassTrainerGreetingText:GetText() then 417 local Translate=NPCTextTranslate(ClassTrainerGreetingText:GetText());418 if Translate then ClassTrainerGreetingText:SetText(Translate) end423 local cz=NPCTextTranslate(ClassTrainerGreetingText:GetText()); 424 if cz then ClassTrainerGreetingText:SetText(cz) end 419 425 end 420 426 if ClassTrainerSkillDescription:GetText() then 421 local Translate=SpellTranslate(ClassTrainerSkillDescription:GetText());422 if Translate then ClassTrainerSkillDescription:SetText(Translate) end427 local cz=SpellTranslate(ClassTrainerSkillDescription:GetText()); 428 if cz then ClassTrainerSkillDescription:SetText(cz) end 423 429 end 424 430 end; … … 434 440 435 441 ChatFrame_OnEvent=function(event) 436 if (event=="CHAT_MSG_MONSTER_SAY" or event=="CHAT_MSG_MONSTER_EMOTE") and TranslateWOW_EnableCreatures and type(TranslateWOW_Creature_count)=="number" then442 if (event=="CHAT_MSG_MONSTER_SAY" or event=="CHAT_MSG_MONSTER_EMOTE") and CZWOW_EnableCreatures and type(CZWOW_Creature_count)=="number" then 437 443 local en=trim(arg1); 438 for i=1, TranslateWOW_Creature_count, 1 do439 if type(getglobal(" TranslateWOW_Creature_"..i))=="table" and getglobal("TranslateWOW_Creature_"..i)[en] then440 arg1=prepare(getglobal(" TranslateWOW_Creature_"..i)[en]);444 for i=1, CZWOW_Creature_count, 1 do 445 if type(getglobal("CZWOW_Creature_"..i))=="table" and getglobal("CZWOW_Creature_"..i)[en] then 446 arg1=prepare(getglobal("CZWOW_Creature_"..i)[en]); 441 447 end 442 448 end … … 447 453 QuestFrameDetailPanel_OnShow=function() 448 454 old_QuestFrameDetailPanel_OnShow(); 449 if TranslateWOW_EnableQuests and type(TranslateWOW_QuestObjective_count)=="number" and type(TranslateWOW_QuestDescription_count)=="number" then455 if CZWOW_EnableQuests and type(CZWOW_QuestObjective_count)=="number" and type(CZWOW_QuestDescription_count)=="number" then 450 456 local questObjectives=trim(GetObjectiveText()); 451 457 local questDescription=trim(GetQuestText()); 452 for i=1, TranslateWOW_QuestObjective_count, 1 do453 if type(getglobal(" TranslateWOW_QuestObjective_"..i))=="table" and getglobal("TranslateWOW_QuestObjective_"..i)[questObjectives] then454 QuestObjectiveText:SetText(prepare(getglobal(" TranslateWOW_QuestObjective_"..i)[questObjectives]));455 end 456 end 457 for i=1, TranslateWOW_QuestDescription_count, 1 do458 if type(getglobal(" TranslateWOW_QuestDescription_"..i))=="table" and getglobal("TranslateWOW_QuestDescription_"..i)[questDescription] then459 QuestDescription:SetText(prepare(getglobal(" TranslateWOW_QuestDescription_"..i)[questDescription]));458 for i=1, CZWOW_QuestObjective_count, 1 do 459 if type(getglobal("CZWOW_QuestObjective_"..i))=="table" and getglobal("CZWOW_QuestObjective_"..i)[questObjectives] then 460 QuestObjectiveText:SetText(prepare(getglobal("CZWOW_QuestObjective_"..i)[questObjectives])); 461 end 462 end 463 for i=1, CZWOW_QuestDescription_count, 1 do 464 if type(getglobal("CZWOW_QuestDescription_"..i))=="table" and getglobal("CZWOW_QuestDescription_"..i)[questDescription] then 465 QuestDescription:SetText(prepare(getglobal("CZWOW_QuestDescription_"..i)[questDescription])); 460 466 end 461 467 end … … 465 471 QuestFrameProgressPanel_OnShow=function() 466 472 old_QuestFrameProgressPanel_OnShow(); 467 if TranslateWOW_EnableQuests and type(TranslateWOW_QuestProgress_count)=="number" then473 if CZWOW_EnableQuests and type(CZWOW_QuestProgress_count)=="number" then 468 474 local text=trim(GetProgressText()); 469 for i=1, TranslateWOW_QuestProgress_count, 1 do470 if type(getglobal(" TranslateWOW_QuestProgress_"..i))=="table" and getglobal("TranslateWOW_QuestProgress_"..i)[text] then471 QuestProgressText:SetText(prepare(getglobal(" TranslateWOW_QuestProgress_"..i)[text]));475 for i=1, CZWOW_QuestProgress_count, 1 do 476 if type(getglobal("CZWOW_QuestProgress_"..i))=="table" and getglobal("CZWOW_QuestProgress_"..i)[text] then 477 QuestProgressText:SetText(prepare(getglobal("CZWOW_QuestProgress_"..i)[text])); 472 478 end 473 479 end … … 477 483 QuestFrameRewardPanel_OnShow=function() 478 484 old_QuestFrameRewardPanel_OnShow(); 479 if TranslateWOW_EnableQuests and type(TranslateWOW_QuestReward_count)=="number" then485 if CZWOW_EnableQuests and type(CZWOW_QuestReward_count)=="number" then 480 486 local text=trim(GetRewardText()); 481 for i=1, TranslateWOW_QuestReward_count, 1 do482 if type(getglobal(" TranslateWOW_QuestReward_"..i))=="table" and getglobal("TranslateWOW_QuestReward_"..i)[text] then483 QuestRewardText:SetText(prepare(getglobal(" TranslateWOW_QuestReward_"..i)[text]));487 for i=1, CZWOW_QuestReward_count, 1 do 488 if type(getglobal("CZWOW_QuestReward_"..i))=="table" and getglobal("CZWOW_QuestReward_"..i)[text] then 489 QuestRewardText:SetText(prepare(getglobal("CZWOW_QuestReward_"..i)[text])); 484 490 end 485 491 end … … 489 495 ItemTextFrame_OnEvent=function(event) 490 496 old_ItemTextFrame_OnEvent(event); 491 if event=="ITEM_TEXT_READY" and TranslateWOW_EnableBooks and type(TranslateWOW_BookPage_count)=="number" then497 if event=="ITEM_TEXT_READY" and CZWOW_EnableBooks and type(CZWOW_BookPage_count)=="number" then 492 498 local en=trim(ItemTextGetText()); 493 for i=1, TranslateWOW_BookPage_count, 1 do494 if type(getglobal(" TranslateWOW_BookPage_"..i))=="table" and getglobal("TranslateWOW_BookPage_"..i)[en] then499 for i=1, CZWOW_BookPage_count, 1 do 500 if type(getglobal("CZWOW_BookPage_"..i))=="table" and getglobal("CZWOW_BookPage_"..i)[en] then 495 501 local creator=ItemTextGetCreator(); 496 502 if ( creator ) then 497 503 creator=strchar(10, 10)..ITEM_TEXT_FROM..strchar(10)..creator..strchar(10, 10); 498 ItemTextPageText:SetText(strchar(10)..prepare(getglobal(" TranslateWOW_BookPage_"..i)[en])..creator);504 ItemTextPageText:SetText(strchar(10)..prepare(getglobal("CZWOW_BookPage_"..i)[en])..creator); 499 505 else 500 ItemTextPageText:SetText(strchar(10)..prepare(getglobal(" TranslateWOW_BookPage_"..i)[en])..strchar(10, 10));506 ItemTextPageText:SetText(strchar(10)..prepare(getglobal("CZWOW_BookPage_"..i)[en])..strchar(10, 10)); 501 507 end 502 508 end … … 508 514 if select("#", ...)>0 then 509 515 old_GossipFrameOptionsUpdate(...); 510 if TranslateWOW_EnableNPCs and type(TranslateWOW_NPCAction_count)=="number" then516 if CZWOW_EnableNPCs and type(CZWOW_NPCAction_count)=="number" then 511 517 for i=1, NUMGOSSIPBUTTONS, 1 do 512 518 titleButton=getglobal("GossipTitleButton" .. i); 513 519 local en=trim(titleButton:GetText()); 514 for i=1, TranslateWOW_NPCAction_count, 1 do515 if type(getglobal(" TranslateWOW_NPCAction_"..i))=="table" and getglobal("TranslateWOW_NPCAction_"..i)[en] then516 titleButton:SetText(prepare(getglobal(" TranslateWOW_NPCAction_"..i)[en]));520 for i=1, CZWOW_NPCAction_count, 1 do 521 if type(getglobal("CZWOW_NPCAction_"..i))=="table" and getglobal("CZWOW_NPCAction_"..i)[en] then 522 titleButton:SetText(prepare(getglobal("CZWOW_NPCAction_"..i)[en])); 517 523 GossipResize(titleButton); 518 524 end … … 525 531 GossipFrameUpdate=function() 526 532 old_GossipFrameUpdate(); 527 local Translate=NPCTextTranslate(GossipGreetingText:GetText());528 if Translate then GossipGreetingText:SetText(Translate) end533 local cz=NPCTextTranslate(GossipGreetingText:GetText()); 534 if cz then GossipGreetingText:SetText(cz) end 529 535 end; 530 536 531 537 QuestLog_UpdateQuestDetails=function() 532 538 old_QuestLog_UpdateQuestDetails(); 533 if TranslateWOW_EnableQuests and type(TranslateWOW_QuestObjective_count)=="number" and type(TranslateWOW_QuestDescription_count)=="number" then539 if CZWOW_EnableQuests and type(CZWOW_QuestObjective_count)=="number" and type(CZWOW_QuestDescription_count)=="number" then 534 540 local questDescription; 535 541 local questObjectives; … … 537 543 questObjectives=trim(questObjectives); 538 544 questDescription=trim(questDescription); 539 for i=1, TranslateWOW_QuestObjective_count, 1 do540 if type(getglobal(" TranslateWOW_QuestObjective_"..i))=="table" and getglobal("TranslateWOW_QuestObjective_"..i)[questObjectives] then541 QuestLogObjectivesText:SetText(prepare(getglobal(" TranslateWOW_QuestObjective_"..i)[questObjectives]));542 end 543 end 544 for i=1, TranslateWOW_QuestDescription_count, 1 do545 if type(getglobal(" TranslateWOW_QuestDescription_"..i))=="table" and getglobal("TranslateWOW_QuestDescription_"..i)[questDescription] then546 QuestLogQuestDescription:SetText(prepare(getglobal(" TranslateWOW_QuestDescription_"..i)[questDescription]));545 for i=1, CZWOW_QuestObjective_count, 1 do 546 if type(getglobal("CZWOW_QuestObjective_"..i))=="table" and getglobal("CZWOW_QuestObjective_"..i)[questObjectives] then 547 QuestLogObjectivesText:SetText(prepare(getglobal("CZWOW_QuestObjective_"..i)[questObjectives])); 548 end 549 end 550 for i=1, CZWOW_QuestDescription_count, 1 do 551 if type(getglobal("CZWOW_QuestDescription_"..i))=="table" and getglobal("CZWOW_QuestDescription_"..i)[questDescription] then 552 QuestLogQuestDescription:SetText(prepare(getglobal("CZWOW_QuestDescription_"..i)[questDescription])); 547 553 end 548 554 end … … 550 556 end 551 557 '; 552 file_put_contents($TempDir.' TranslateWoW.lua');558 file_put_contents($TempDir.'CzWoW.lua', $Buffer); 553 559 } 554 560 … … 560 566 MakeLanguageFiles($Setting); 561 567 MakeClientStrings($Setting); 562 //MakeMainScript($Setting);568 MakeMainScript($Setting); 563 569 } 564 570 -
trunk/download.php
r68 r74 153 153 $Zip->addFile(file_get_contents('addon/CzWoW/CzWoW.xml'), 'CzWoW/CzWoW.xml'); 154 154 $Zip->addFile(file_get_contents('addon/CzWoW/CzWoW.toc'), 'CzWoW/CzWoW.toc'); 155 $Zip->addFile(file_get_contents('addon/CzWoW/CzWoW.lua'), 'CzWoW/CzWoW.lua');155 //$Zip->addFile(file_get_contents('addon/CzWoW/CzWoW.lua'), 'CzWoW/CzWoW.lua'); 156 156 $Zip->addFile(file_get_contents('addon/CzWoW/GameMenuFrame.xml'), 'CzWoW/GameMenuFrame.xml'); 157 157 $Zip->addFile(file_get_contents('addon/CzWoW/Localization.lua'), 'CzWoW/Localization.lua');
Note:
See TracChangeset
for help on using the changeset viewer.