Changeset 756 for trunk/Modules/Export
- Timestamp:
- Jan 16, 2014, 7:07:32 PM (11 years ago)
- Location:
- trunk/Modules/Export/files
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Export/files/2.4.3/CzWoW/CzWoW.lua
r755 r756 51 51 DEFAULT_CHAT_FRAME:AddMessage("CzWoW načteno. "..a); 52 52 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 53 end 53 54 GameTooltip:HookScript("OnUpdate",GameObjectChange); 55 if(GameTooltip:GetScript("OnTooltipSetItem")) then 56 GameTooltip:HookScript("OnTooltipSetItem",ItemChangeName); 57 else 58 GameTooltip:SetScript("OnTooltipSetItem",ItemChangeName); 59 end 60 for nn, tooltip in ipairs(TooltipList) do 61 if tooltip then 62 for _, methodName in ipairs(MethodList) do 63 hooksecurefunc(tooltip, methodName, ItemChangeName); 64 end 65 end 66 end 67 68 end 69 70 --------Translate item------------------ 71 TooltipList = { 72 ItemRefTooltip, 73 GameTooltip, 74 ShoppingTooltip1, 75 ShoppingTooltip2, 76 ComparisonTooltip1, 77 ComparisonTooltip2, 78 } 79 80 MethodList = { 81 "SetLootItem", 82 "SetHyperlink", 83 "SetBagItem", 84 "SetInventoryItem", 85 "SetAuctionItem", 86 "SetAuctionSellItem", 87 "SetLootRollItem", 88 "SetTradeSkillItem", 89 "SetTrainerService", 90 "SetInboxItem", 91 "SetSendMailItem", 92 "SetQuestItem", 93 "SetQuestLogItem", 94 "SetTradePlayerItem", 95 "SetTradeTargetItem", 96 "SetMerchantItem", 97 "SetHyperlinkCompareItem", 98 "SetBuybackItem", 99 } 100 101 function TranslateTooltip(this) 102 if this then 103 local text = this:GetText(); 104 for i=1, CZWOW_ItemName_count, 1 do 105 if getglobal("CZWOW_ItemName_"..i)[trim(text)] then 106 text = getglobal("CZWOW_ItemName_"..i)[trim(text)]; 107 end 108 end 109 -- text = "bleble"; 110 -- DEFAULT_CHAT_FRAME:AddMessage(text); 111 this:SetText(text); 112 end 113 end 114 115 function ItemChangeName(this) 116 local name = "test ěščřžýáíéůú fsd fa"; 117 if CZWOW_ItemName_count > 0 then 118 TranslateTooltip(GameTooltipTextLeft1); 119 TranslateTooltip(ItemRefTooltipTextLeft1); 120 TranslateTooltip(ShoppingTooltip1TextLeft2); 121 TranslateTooltip(ShoppingTooltip2TextLeft2); 122 TranslateTooltip(ComparisonTooltip1TextLeft4); 123 TranslateTooltip(ComparisonTooltip2TextLeft6); 124 --/run 125 end 126 if CZWOW_ItemDescription_count > 0 then 127 for i=1,GameTooltip:NumLines()do 128 local mytext=_G["GameTooltipTextLeft"..i]; 129 if "\"" == strsub(mytext:GetText(), 0,1) then 130 local text = strsub(mytext:GetText(), 2,strlen(mytext:GetText())-2); 131 text = text.."."; 132 for i=1, CZWOW_ItemDescription_count, 1 do 133 if getglobal("CZWOW_ItemDescription_"..i)[trim(text)] then 134 text = getglobal("CZWOW_ItemDescription_"..i)[trim(text)]; 135 end 136 end 137 mytext:SetText("\""..text.."\""); 138 end 139 end 140 end 141 142 this:Show(); 143 end 144 ---------item at vendor------ 145 local old_MerchantFrame_UpdateMerchantInfo = MerchantFrame_UpdateMerchantInfo; 146 function MerchantFrame_UpdateMerchantInfo() 147 old_MerchantFrame_UpdateMerchantInfo(); 148 local numMerchantItems = GetMerchantNumItems(); 149 for i=1, MERCHANT_ITEMS_PER_PAGE, 1 do 150 local index = (((MerchantFrame.page - 1) * MERCHANT_ITEMS_PER_PAGE) + i); 151 if ( index <= numMerchantItems ) then 152 name, texture, price, quantity, numAvailable, isUsable, extendedCost = GetMerchantItemInfo(index); 153 local text = name; 154 for i=1, CZWOW_ItemName_count, 1 do 155 if getglobal("CZWOW_ItemName_"..i)[trim(text)] then 156 text = getglobal("CZWOW_ItemName_"..i)[trim(text)]; 157 end 158 end 159 getglobal("MerchantItem"..i.."Name"):SetText(text); 160 end 161 end 162 end 163 164 -------item at loot-------------------- 165 local old_LootFrame_Update = LootFrame_Update; 166 function LootFrame_Update() 167 old_LootFrame_Update(); 168 local numLootItems = LootFrame.numLootItems; 169 --Logic to determine how many items to show per page 170 local numLootToShow = LOOTFRAME_NUMBUTTONS; 171 if ( numLootItems > LOOTFRAME_NUMBUTTONS ) then 172 numLootToShow = numLootToShow - 1; 173 end 174 local texture, item, quantity, quality; 175 local button, countString, color; 176 for index = 1, LOOTFRAME_NUMBUTTONS do 177 local slot = (numLootToShow * (LootFrame.page - 1)) + index; 178 texture, item, quantity, quality = GetLootSlotInfo(slot); 179 180 local text = item; 181 for i=1, CZWOW_ItemName_count, 1 do 182 if getglobal("CZWOW_ItemName_"..i)[trim(text)] then 183 text = getglobal("CZWOW_ItemName_"..i)[trim(text)]; 184 end 185 end 186 187 getglobal("LootButton"..index.."Text"):SetText(text); 188 end 189 end 190 191 ---------translate gameobject---------- 192 function GameObjectChange(this) 193 if 1 == GameTooltip:NumLines() then 194 if CZWOW_ObjectName_count > 0 then 195 if GameTooltipTextLeft1 then 196 for i=1, CZWOW_ObjectName_count, 1 do 197 local text = GameTooltipTextLeft1:GetText(); 198 if getglobal("CZWOW_ObjectName_"..i)[trim(text)] then 199 GameTooltipTextLeft1:SetText(getglobal("CZWOW_ObjectName_"..i)[trim(text)]); 200 end 201 end 202 GameTooltip:Show(); 203 end; 204 end 205 end 206 end 207 54 208 55 209 CzWoW_OnEvent=function(event) -
trunk/Modules/Export/files/3.3.5a/CzWoW/CzWoW.lua
r662 r756 5 5 6 6 Debug = false; --turn this when you want to compare trim english text with text database 7 7 8 8 ------------------- 9 9 --global function-- … … 64 64 end 65 65 end 66 return en; 66 for i=1, CZWOW_ItemName_count, 1 do 67 if getglobal("CZWOW_ItemName_"..i)[text] then 68 return getglobal("CZWOW_ItemName_"..i)[text]; 69 end 70 end 71 for i=1, CZWOW_ItemDescription_count, 1 do 72 if getglobal("CZWOW_ItemDescription_"..i)[text] then 73 return getglobal("CZWOW_ItemDescription_"..i)[text]; 74 end 75 end 76 for i=1, CZWOW_ObjectName_count, 1 do 77 if getglobal("CZWOW_ObjectName_"..i)[text] then 78 return getglobal("CZWOW_ObjectName_"..i)[text]; 79 end 80 end 81 82 return en; 67 83 68 84 end … … 108 124 self:RegisterEvent("QUEST_LOG_UPDATE"); 109 125 110 if(GameTooltip:GetScript("OnTooltipSetItem")) then 126 127 GameTooltip:HookScript("OnUpdate",GameObjectChange); 128 if(GameTooltip:GetScript("OnTooltipSetItem")) then 111 129 GameTooltip:HookScript("OnTooltipSetItem",ItemChangeName); 112 130 else 113 131 GameTooltip:SetScript("OnTooltipSetItem",ItemChangeName); 114 132 end 115 133 for nn, tooltip in ipairs(TooltipList) do 134 if tooltip then 135 for _, methodName in ipairs(MethodList) do 136 hooksecurefunc(tooltip, methodName, ItemChangeName); 137 end 138 end 139 end 140 141 end 142 143 --------Translate item------------------ 144 TooltipList = { 145 ItemRefTooltip, 146 GameTooltip, 147 ShoppingTooltip1, 148 ShoppingTooltip2, 149 ComparisonTooltip1, 150 ComparisonTooltip2, 151 } 152 153 MethodList = { 154 "SetLootItem", 155 "SetHyperlink", 156 "SetBagItem", 157 "SetInventoryItem", 158 "SetAuctionItem", 159 "SetAuctionSellItem", 160 "SetLootRollItem", 161 "SetTradeSkillItem", 162 "SetTrainerService", 163 "SetInboxItem", 164 "SetSendMailItem", 165 "SetQuestItem", 166 "SetQuestLogItem", 167 "SetTradePlayerItem", 168 "SetTradeTargetItem", 169 "SetMerchantItem", 170 "SetHyperlinkCompareItem", 171 "SetBuybackItem", 172 } 173 174 function TranslateTooltip(this) 175 if this then 176 local text = this:GetText(); 177 for i=1, CZWOW_ItemName_count, 1 do 178 if getglobal("CZWOW_ItemName_"..i)[trim(text)] then 179 text = getglobal("CZWOW_ItemName_"..i)[trim(text)]; 180 end 181 end 182 -- text = "bleble"; 183 -- DEFAULT_CHAT_FRAME:AddMessage(text); 184 this:SetText(text); 185 end 116 186 end 117 187 118 188 function ItemChangeName(this) 119 local name,link = this:GetItem(); 120 -- this:SetText("Fs"); 121 -- this:UpdateTooltip(this); 122 -- this:SetText("Fa"); 123 124 -- this:AddLine("Item name: "..name); 125 -- this:Show(); 126 end 189 local name = "test ěščřžýáíéůú fsd fa"; 190 if CZWOW_ItemName_count > 0 then 191 TranslateTooltip(GameTooltipTextLeft1); 192 TranslateTooltip(ItemRefTooltipTextLeft1); 193 TranslateTooltip(ShoppingTooltip1TextLeft2); 194 TranslateTooltip(ShoppingTooltip2TextLeft2); 195 TranslateTooltip(ComparisonTooltip1TextLeft4); 196 TranslateTooltip(ComparisonTooltip2TextLeft6); 197 --/run 198 end 199 if CZWOW_ItemDescription_count > 0 then 200 for i=1,GameTooltip:NumLines()do 201 local mytext=_G["GameTooltipTextLeft"..i]; 202 if "\"" == strsub(mytext:GetText(), 0,1) then 203 local text = strsub(mytext:GetText(), 2,strlen(mytext:GetText())-2); 204 text = text.."."; 205 for i=1, CZWOW_ItemDescription_count, 1 do 206 if getglobal("CZWOW_ItemDescription_"..i)[trim(text)] then 207 text = getglobal("CZWOW_ItemDescription_"..i)[trim(text)]; 208 end 209 end 210 mytext:SetText("\""..text.."\""); 211 end 212 end 213 end 214 215 this:Show(); 216 end 217 ---------item at vendor------ 218 local old_MerchantFrame_UpdateMerchantInfo = MerchantFrame_UpdateMerchantInfo; 219 function MerchantFrame_UpdateMerchantInfo() 220 old_MerchantFrame_UpdateMerchantInfo(); 221 local numMerchantItems = GetMerchantNumItems(); 222 for i=1, MERCHANT_ITEMS_PER_PAGE, 1 do 223 local index = (((MerchantFrame.page - 1) * MERCHANT_ITEMS_PER_PAGE) + i); 224 if ( index <= numMerchantItems ) then 225 name, texture, price, quantity, numAvailable, isUsable, extendedCost = GetMerchantItemInfo(index); 226 local text = name; 227 for i=1, CZWOW_ItemName_count, 1 do 228 if getglobal("CZWOW_ItemName_"..i)[trim(text)] then 229 text = getglobal("CZWOW_ItemName_"..i)[trim(text)]; 230 end 231 end 232 getglobal("MerchantItem"..i.."Name"):SetText(text); 233 end 234 end 235 end 236 237 -------item at loot-------------------- 238 local old_LootFrame_Update = LootFrame_Update; 239 function LootFrame_Update() 240 old_LootFrame_Update(); 241 local numLootItems = LootFrame.numLootItems; 242 --Logic to determine how many items to show per page 243 local numLootToShow = LOOTFRAME_NUMBUTTONS; 244 if ( numLootItems > LOOTFRAME_NUMBUTTONS ) then 245 numLootToShow = numLootToShow - 1; 246 end 247 local texture, item, quantity, quality; 248 local button, countString, color; 249 for index = 1, LOOTFRAME_NUMBUTTONS do 250 local slot = (numLootToShow * (LootFrame.page - 1)) + index; 251 texture, item, quantity, quality = GetLootSlotInfo(slot); 252 253 local text = item; 254 for i=1, CZWOW_ItemName_count, 1 do 255 if getglobal("CZWOW_ItemName_"..i)[trim(text)] then 256 text = getglobal("CZWOW_ItemName_"..i)[trim(text)]; 257 end 258 end 259 260 getglobal("LootButton"..index.."Text"):SetText(text); 261 end 262 end 263 264 ---------translate gameobject---------- 265 function GameObjectChange(this) 266 if 1 == GameTooltip:NumLines() then 267 if CZWOW_ObjectName_count > 0 then 268 if GameTooltipTextLeft1 then 269 for i=1, CZWOW_ObjectName_count, 1 do 270 local text = GameTooltipTextLeft1:GetText(); 271 if getglobal("CZWOW_ObjectName_"..i)[trim(text)] then 272 GameTooltipTextLeft1:SetText(getglobal("CZWOW_ObjectName_"..i)[trim(text)]); 273 end 274 end 275 GameTooltip:Show(); 276 end; 277 end 278 end 279 end 127 280 128 281 … … 245 398 questLogTitle:SetID(questIndex); 246 399 title, _, _, _, _, _, _, _ = GetQuestLogTitle(questIndex); 247 if questLogTitle then questLogTitle:SetText(Translate(title)); end 400 if questLogTitle then questLogTitle:SetText(Translate(title)); end 248 401 end 249 402 end -
trunk/Modules/Export/files/4.3.4/CzWoW/CzWoW.lua
r683 r756 5 5 6 6 Debug = false; --turn this when you want to compare trim english text with text database 7 7 8 8 ------------------- 9 9 --global function-- … … 64 64 end 65 65 end 66 return en; 66 for i=1, CZWOW_ItemName_count, 1 do 67 if getglobal("CZWOW_ItemName_"..i)[text] then 68 return getglobal("CZWOW_ItemName_"..i)[text]; 69 end 70 end 71 for i=1, CZWOW_ItemDescription_count, 1 do 72 if getglobal("CZWOW_ItemDescription_"..i)[text] then 73 return getglobal("CZWOW_ItemDescription_"..i)[text]; 74 end 75 end 76 for i=1, CZWOW_ObjectName_count, 1 do 77 if getglobal("CZWOW_ObjectName_"..i)[text] then 78 return getglobal("CZWOW_ObjectName_"..i)[text]; 79 end 80 end 81 82 return en; 67 83 68 84 end … … 108 124 self:RegisterEvent("QUEST_LOG_UPDATE"); 109 125 110 if(GameTooltip:GetScript("OnTooltipSetItem")) then 126 127 GameTooltip:HookScript("OnUpdate",GameObjectChange); 128 if(GameTooltip:GetScript("OnTooltipSetItem")) then 111 129 GameTooltip:HookScript("OnTooltipSetItem",ItemChangeName); 112 130 else 113 131 GameTooltip:SetScript("OnTooltipSetItem",ItemChangeName); 114 132 end 115 133 for nn, tooltip in ipairs(TooltipList) do 134 if tooltip then 135 for _, methodName in ipairs(MethodList) do 136 hooksecurefunc(tooltip, methodName, ItemChangeName); 137 end 138 end 139 end 140 141 end 142 143 --------Translate item------------------ 144 TooltipList = { 145 ItemRefTooltip, 146 GameTooltip, 147 ShoppingTooltip1, 148 ShoppingTooltip2, 149 ComparisonTooltip1, 150 ComparisonTooltip2, 151 } 152 153 MethodList = { 154 "SetLootItem", 155 "SetHyperlink", 156 "SetBagItem", 157 "SetInventoryItem", 158 "SetAuctionItem", 159 "SetAuctionSellItem", 160 "SetLootRollItem", 161 "SetTradeSkillItem", 162 "SetTrainerService", 163 "SetInboxItem", 164 "SetSendMailItem", 165 "SetQuestItem", 166 "SetQuestLogItem", 167 "SetTradePlayerItem", 168 "SetTradeTargetItem", 169 "SetMerchantItem", 170 "SetHyperlinkCompareItem", 171 "SetBuybackItem", 172 } 173 174 function TranslateTooltip(this) 175 if this then 176 local text = this:GetText(); 177 for i=1, CZWOW_ItemName_count, 1 do 178 if getglobal("CZWOW_ItemName_"..i)[trim(text)] then 179 text = getglobal("CZWOW_ItemName_"..i)[trim(text)]; 180 end 181 end 182 -- text = "bleble"; 183 -- DEFAULT_CHAT_FRAME:AddMessage(text); 184 this:SetText(text); 185 end 116 186 end 117 187 118 188 function ItemChangeName(this) 119 local name,link = this:GetItem(); 120 -- this:SetText("Fs"); 121 -- this:UpdateTooltip(this); 122 -- this:SetText("Fa"); 123 124 -- this:AddLine("Item name: "..name); 125 -- this:Show(); 126 end 189 local name = "test ěščřžýáíéůú fsd fa"; 190 if CZWOW_ItemName_count > 0 then 191 TranslateTooltip(GameTooltipTextLeft1); 192 TranslateTooltip(ItemRefTooltipTextLeft1); 193 TranslateTooltip(ShoppingTooltip1TextLeft2); 194 TranslateTooltip(ShoppingTooltip2TextLeft2); 195 TranslateTooltip(ComparisonTooltip1TextLeft4); 196 TranslateTooltip(ComparisonTooltip2TextLeft6); 197 --/run 198 end 199 if CZWOW_ItemDescription_count > 0 then 200 for i=1,GameTooltip:NumLines()do 201 local mytext=_G["GameTooltipTextLeft"..i]; 202 if "\"" == strsub(mytext:GetText(), 0,1) then 203 local text = strsub(mytext:GetText(), 2,strlen(mytext:GetText())-2); 204 text = text.."."; 205 for i=1, CZWOW_ItemDescription_count, 1 do 206 if getglobal("CZWOW_ItemDescription_"..i)[trim(text)] then 207 text = getglobal("CZWOW_ItemDescription_"..i)[trim(text)]; 208 end 209 end 210 mytext:SetText("\""..text.."\""); 211 end 212 end 213 end 214 215 this:Show(); 216 end 217 ---------item at vendor------ 218 local old_MerchantFrame_UpdateMerchantInfo = MerchantFrame_UpdateMerchantInfo; 219 function MerchantFrame_UpdateMerchantInfo() 220 old_MerchantFrame_UpdateMerchantInfo(); 221 local numMerchantItems = GetMerchantNumItems(); 222 for i=1, MERCHANT_ITEMS_PER_PAGE, 1 do 223 local index = (((MerchantFrame.page - 1) * MERCHANT_ITEMS_PER_PAGE) + i); 224 if ( index <= numMerchantItems ) then 225 name, texture, price, quantity, numAvailable, isUsable, extendedCost = GetMerchantItemInfo(index); 226 local text = name; 227 for i=1, CZWOW_ItemName_count, 1 do 228 if getglobal("CZWOW_ItemName_"..i)[trim(text)] then 229 text = getglobal("CZWOW_ItemName_"..i)[trim(text)]; 230 end 231 end 232 getglobal("MerchantItem"..i.."Name"):SetText(text); 233 end 234 end 235 end 236 237 -------item at loot-------------------- 238 local old_LootFrame_Update = LootFrame_Update; 239 function LootFrame_Update() 240 old_LootFrame_Update(); 241 local numLootItems = LootFrame.numLootItems; 242 --Logic to determine how many items to show per page 243 local numLootToShow = LOOTFRAME_NUMBUTTONS; 244 if ( numLootItems > LOOTFRAME_NUMBUTTONS ) then 245 numLootToShow = numLootToShow - 1; 246 end 247 local texture, item, quantity, quality; 248 local button, countString, color; 249 for index = 1, LOOTFRAME_NUMBUTTONS do 250 local slot = (numLootToShow * (LootFrame.page - 1)) + index; 251 texture, item, quantity, quality = GetLootSlotInfo(slot); 252 253 local text = item; 254 for i=1, CZWOW_ItemName_count, 1 do 255 if getglobal("CZWOW_ItemName_"..i)[trim(text)] then 256 text = getglobal("CZWOW_ItemName_"..i)[trim(text)]; 257 end 258 end 259 260 getglobal("LootButton"..index.."Text"):SetText(text); 261 end 262 end 263 264 ---------translate gameobject---------- 265 function GameObjectChange(this) 266 if 1 == GameTooltip:NumLines() then 267 if CZWOW_ObjectName_count > 0 then 268 if GameTooltipTextLeft1 then 269 for i=1, CZWOW_ObjectName_count, 1 do 270 local text = GameTooltipTextLeft1:GetText(); 271 if getglobal("CZWOW_ObjectName_"..i)[trim(text)] then 272 GameTooltipTextLeft1:SetText(getglobal("CZWOW_ObjectName_"..i)[trim(text)]); 273 end 274 end 275 GameTooltip:Show(); 276 end; 277 end 278 end 279 end 127 280 128 281 … … 245 398 questLogTitle:SetID(questIndex); 246 399 title, _, _, _, _, _, _, _ = GetQuestLogTitle(questIndex); 247 if questLogTitle then questLogTitle:SetText(Translate(title)); end 400 if questLogTitle then questLogTitle:SetText(Translate(title)); end 248 401 end 249 402 end -
trunk/Modules/Export/files/5.4.0/CzWoW/CzWoW.lua
r694 r756 5 5 6 6 Debug = false; --turn this when you want to compare trim english text with text database 7 7 8 8 ------------------- 9 9 --global function-- … … 62 62 if getglobal("CZWOW_NPCText_"..i)[text] then 63 63 return getglobal("CZWOW_NPCText_"..i)[text]; 64 end 65 end 66 for i=1, CZWOW_ItemName_count, 1 do 67 if getglobal("CZWOW_ItemName_"..i)[text] then 68 return getglobal("CZWOW_ItemName_"..i)[text]; 69 end 70 end 71 for i=1, CZWOW_ItemDescription_count, 1 do 72 if getglobal("CZWOW_ItemDescription_"..i)[text] then 73 return getglobal("CZWOW_ItemDescription_"..i)[text]; 64 74 end 65 75 end … … 108 118 self:RegisterEvent("QUEST_LOG_UPDATE"); 109 119 110 if(GameTooltip:GetScript("OnTooltipSetItem")) then 120 121 GameTooltip:HookScript("OnUpdate",GameObjectChange); 122 if(GameTooltip:GetScript("OnTooltipSetItem")) then 111 123 GameTooltip:HookScript("OnTooltipSetItem",ItemChangeName); 112 124 else 113 125 GameTooltip:SetScript("OnTooltipSetItem",ItemChangeName); 114 126 end 115 127 for nn, tooltip in ipairs(TooltipList) do 128 if tooltip then 129 for _, methodName in ipairs(MethodList) do 130 hooksecurefunc(tooltip, methodName, ItemChangeName); 131 end 132 end 133 end 134 135 end 136 137 --------Translate item------------------ 138 TooltipList = { 139 ItemRefTooltip, 140 GameTooltip, 141 ShoppingTooltip1, 142 ShoppingTooltip2, 143 ComparisonTooltip1, 144 ComparisonTooltip2, 145 } 146 147 MethodList = { 148 "SetLootItem", 149 "SetHyperlink", 150 "SetBagItem", 151 "SetInventoryItem", 152 "SetAuctionItem", 153 "SetAuctionSellItem", 154 "SetLootRollItem", 155 "SetTradeSkillItem", 156 "SetTrainerService", 157 "SetInboxItem", 158 "SetSendMailItem", 159 "SetQuestItem", 160 "SetQuestLogItem", 161 "SetTradePlayerItem", 162 "SetTradeTargetItem", 163 "SetMerchantItem", 164 "SetHyperlinkCompareItem", 165 "SetBuybackItem", 166 } 167 168 function TranslateTooltip(this) 169 if this then 170 local text = this:GetText(); 171 text = Translate(text); 172 -- text = "bleble"; 173 this:SetText(text); 174 end 116 175 end 117 176 118 177 function ItemChangeName(this) 119 local name,link = this:GetItem(); 120 -- this:SetText("Fs"); 121 -- this:UpdateTooltip(this); 122 -- this:SetText("Fa"); 123 124 -- this:AddLine("Item name: "..name); 125 -- this:Show(); 126 end 178 local name = "test ěščřžýáíéůú fsd fa"; 179 if CZWOW_ItemName_count > 0 then 180 TranslateTooltip(GameTooltipTextLeft1); 181 TranslateTooltip(ItemRefTooltipTextLeft1); 182 TranslateTooltip(ShoppingTooltip1TextLeft2); 183 TranslateTooltip(ShoppingTooltip2TextLeft2); 184 TranslateTooltip(ComparisonTooltip1TextLeft4); 185 TranslateTooltip(ComparisonTooltip2TextLeft6); 186 --/run 187 end 188 if CZWOW_ItemDescription_count > 0 then 189 for i=1,GameTooltip:NumLines()do 190 local mytext=_G["GameTooltipTextLeft"..i]; 191 if "\"" == strsub(mytext:GetText(), 0,1) then 192 local text = strsub(mytext:GetText(), 2,strlen(mytext:GetText())-2); 193 text = Translate(text.."."); 194 mytext:SetText("\""..text.."\""); 195 end 196 end 197 end 198 199 this:Show(); 200 end 201 202 ---------translate gameobject---------- 203 function GameObjectChange(this) 204 if 1 == GameTooltip:NumLines() then 205 if CZWOW_ObjectName_count > 0 then 206 if GameTooltipTextLeft1 then 207 for i=1, CZWOW_ObjectName_count, 1 do 208 local text = trim(GameTooltipTextLeft1:GetText()); 209 if getglobal("CZWOW_ObjectName_"..i)[text] then 210 GameTooltipTextLeft1:SetText(getglobal("CZWOW_ObjectName_"..i)[text]); 211 end 212 end 213 GameTooltip:Show(); 214 end; 215 end 216 end 217 end 218 127 219 128 220 … … 245 337 questLogTitle:SetID(questIndex); 246 338 title, _, _, _, _, _, _, _ = GetQuestLogTitle(questIndex); 247 if questLogTitle then questLogTitle:SetText(Translate(title)); end 339 if questLogTitle then questLogTitle:SetText(Translate(title)); end 248 340 end 249 341 end
Note:
See TracChangeset
for help on using the changeset viewer.