Changeset 327
- Timestamp:
- Feb 20, 2010, 10:34:38 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/export/files/3.3.0/CzWoW/Localization.lua
r325 r327 1 1 local i=CzWoW_interface; 2 2 local n=CzWoW_interface_entoname; 3 4 local old_TutorialFrame_Update = TutorialFrame_Update; 5 local old_UIErrorsFrame_OnEvent = UIErrorsFrame_OnEvent; 3 local CanTranslate = true; 4 local BadText = {}; 5 local BadPartText = {}; 6 local BadIndex = {}; 7 6 8 7 9 local Translate=function(index) … … 13 15 end 14 16 15 local test_Translate=function(index)16 return("test")17 end18 19 17 local TranslateByText=function(text) 20 18 if i[n[text]] then … … 24 22 end 25 23 end 26 24 25 26 27 BadText["0"] = " "; 28 BadText["1"] = " "; 29 BadText["2"] = " "; 30 BadText["3"] = " "; 31 BadText["-"] = " "; 32 BadText[" - "] = " "; 33 BadText["..."] = " "; 34 35 BadPartText["/"] = " "; 36 BadPartText["\\"] = " "; 37 BadPartText["$"] = " "; 38 BadPartText["|"] = " "; 39 BadPartText["\""] = " "; 40 BadPartText["SPELL_FAILED"] = " "; 41 BadPartText["ERR"] = " "; 42 BadPartText["http"] = " "; 43 BadPartText["%dx%s"] = " "; 44 BadPartText["LOOT"] = " "; 45 46 BadIndex["COPPER_AMOUNT_TEXTURE"] = " "; 47 BadIndex["SPELL_REAGENTS"] = " "; 48 BadIndex["SHOW_CASTABLE_DEBUFFS_TEXT"] = " "; 49 BadIndex["XP_TEXT"] = " "; 50 BadIndex["SPELL_REAGENTS"] = " "; 51 BadIndex["SPELL_RANGE"] = " "; 27 52 28 53 … … 34 59 35 60 --error message in the middle screen 61 local old_UIErrorsFrame_OnEvent = UIErrorsFrame_OnEvent; 36 62 local function onEvent(self, event, ...) 37 63 local arg1, arg2, arg3, arg4 = ... … … 44 70 UIErrorsFrame:SetScript('OnEvent', onEvent) 45 71 46 --tutotial TODO:Opravil 72 --tutotial 73 local old_TutorialFrame_Update = TutorialFrame_Update; 47 74 TutorialFrame_Update=function(currentTutorial) 48 75 old_TutorialFrame_Update(currentTutorial); … … 53 80 TutorialFrameText:SetText(TranslateByText(text)); 54 81 end 55 TutorialFrame:SetHeight(TutorialFrameText:GetHeight() + 62);56 82 end 57 83 … … 59 85 local oldTooltipSetText=GameTooltip["SetText"]; 60 86 GameTooltip["SetText"]=function(object, text, r, g, b, alphaValue, textWrap) 61 62 oldTooltipSetText(object, text, r, g, b, alphaValue, textWrap);87 text=TranslateByText(text); 88 oldTooltipSetText(object, text, r, g, b, alphaValue, textWrap); 63 89 end 64 --hooksecurefunc(GameTooltip, "SetText", print); 65 66 67 90 91 local oldTooltipAddLine=GameTooltip["AddLine"]; 92 GameTooltip["AddLine"]=function(object, text, r, g, b, alphaValue, textWrap) 93 text=TranslateByText(text); 94 oldTooltipAddLine(object, text, r, g, b, alphaValue, textWrap); 95 end 68 96 69 97 --Set global var with CZ texts 70 for index, value in pairs(i) do 71 if (i[index] == "") or (i[index] == getglobal(index)) or (string.find(index,"ERR") == 1) or (string.find(index,"SPELL_FAILED") == 1) or (string.find(i[index],"/") == 1) or (string.find(i[index],"\"") == 1) 72 then 73 else 74 if (i[index]) then 98 -- export: vyexportovávat pouze určenou verzi indexu 99 100 for index, value in pairs(i) do 101 CanTranslate = true; 102 en_text = GetText(index); 103 104 105 if (n[en_text]) then else CanTranslate = false; end 106 if (en_text == i[index]) then CanTranslate = false; end 107 if (BadText[i[index]]) then CanTranslate = false; end 108 if (BadIndex[index]) then CanTranslate = false; end 109 if (i[index] == getglobal(index)) then CanTranslate = false; end 110 if (i[index]) then else CanTranslate = false; end 111 112 for index_BadPartText in pairs(BadPartText) do 113 if (string.find(index,index_BadPartText) == 1) then CanTranslate = false; end 114 if (string.find(i[index],index_BadPartText) == 1) then CanTranslate = false; end 115 end 116 117 if (CanTranslate) then 75 118 setglobal(index,i[index]); 76 119 end 77 end120 78 121 end 122 79 123 80 124 --AlertFrames.xml … … 814 858 end 815 859 816 860 --------------------------------------------------------------------- 861 -------konec hlavní funkce prekladu rozhraní 862 --------------------------------------------------------------------- -
trunk/img_statistic.php
r309 r327 37 37 $Percent = substr($Percent, 0, 5); 38 38 39 $Database->SQLCommand('UPDATE '.$Config['Database']['Database'].'.group SET BuffPercent = '.$Percent.' WHERE Id = '.$GroupId); 40 41 39 42 $PercentBar = $Percent * 4; 40 43 $NotTran = $NumberAJ - $NumberTranslate; … … 46 49 imagefilledrectangle($Image, 0, 0, 400, 31, $Color1); 47 50 imagefilledrectangle($Image, 0, 0, $PercentBar, 59, $Color2); 51 imagefilledrectangle($Image, 0, 0, 400, 0, $Color3); 52 imagefilledrectangle($Image, 0, 31, 0, 0, $Color3); 53 imagefilledrectangle($Image, 0, 31, 400, 31, $Color3); 48 54 $FontSize = 10; 49 55 if(($NumberPerDay > 0) and ($team == '') and ($language == '') and ($NotTran > 0)) -
trunk/statistic.php
r291 r327 13 13 if($Language['Enabled'] == 1) echo(' <a href="?language='.$Language['Id'].'">'.$Language['Name'].'</a>'); 14 14 15 foreach($TranslationTree as $Group) 15 $SortList = $TranslationTree; 16 17 $last = 1; 18 19 for ($y = 0; $y < 1000; $y = $y + 1) { 20 foreach($TranslationTree as $Group) 21 { 22 $i = $Group['Id']; 23 if ($i != 1) 24 if ($SortList[$last]['BuffPercent'] > $SortList[$i]['BuffPercent']) { 25 echo($SortList[$last]['BuffPercent'].'-'.$SortList[$i]['BuffPercent'].' '); 26 $tmp = $SortList[$last]; 27 $SortList[$last] = $SortList[$i]; 28 $SortList[$i] = $tmp; 29 } 30 $last = $i; 31 } 32 $last = 1; 33 } 34 foreach($SortList as $Group) 16 35 if($Group['TablePrefix'] != '') 17 36 echo('<div class="state-image">
Note:
See TracChangeset
for help on using the changeset viewer.