Kiwi Item Info

Kiwi Item Info

41.5k Downloads

I found iLvl not shown in tooltip when I used the NDui addons

hu71e opened this issue · 11 comments

commented

I found iLvl not shown in tooltip when I used the NDui addons, Or there is a problem in the Simplified Chinese client.
Hope you can fix this bug.

AND, I translated the Locale file into Simplified Chinese. How do I get the document to you? I'm not very good with github.

Finally, please forgive my poor English and hope you can understand me. thank you!

commented

I can understand you perfectly. The Simplified Chinese client has not been translated. That being said, there is NO support for it yet, so things WILL break.

Please attach the file here on github by either pasting it in or dragging it into the window here.

commented

I uploaded the Simplified Chinese translation file in the package containing a ZHCN directory.
zhCN.zip

To use this zhCN localization file properly, you need to modify some of the code in Tooltip. lua, which I'll post below for your reference.

--zhCN
local tt_armor = text:match("%d+[" .. L("TOOLTIP_PRY_ARMOR") .. "]+", 1)
local tt_block = text:match("%d+[" .. L("TOOLTIP_PRY_BLOCK") .. "]+", 1)
local tt_dps = text:match("[" .. L("TOOLTIP_PRY_DPS") .. "]+%d+%.%d+", 1)
local tt_damage = text:match("%d+%s%-%s%d+[" .. L("TOOLTIP_PRY_DAMAGE") .. "]+", 1)

  	if(tt_dps and tt_dps:find(L"TOOLTIP_PRY_DPS")) then
  		local l = string.split(" ", text)
  		--zhCN
  		local l, n = string.gsub(tt_dps, L"TOOLTIP_PRY_DPS", "(")
  		--
  		l = l:sub(2)
  		dps = tt_dps and tt_dps:find(L"TOOLTIP_PRY_DPS") and (dps + tonumber(l)) or dps
  	end
  	
  	if(tt_damage and tt_damage:find(L"TOOLTIP_PRY_DAMAGE")) then
  		local l, _, _, r = string.split("- ", text)
  		--zhCN
  		r = string.gsub(r, L"TOOLTIP_PRY_DAMAGE", "")
  		--
  		min_dmg = tonumber(l)
  		max_dmg = tonumber(r)
  	end

Finally, I have a suggestion. can you turn on aci by default? without a GUI setup interface, many players are not good at using the command line to change feature Settings. Or, consider making a simple GUI setup interface? Thank you.

commented

Your request should belong on issue #5

I assume the reason for this alteration is due to where the numbers are located? I will look at some chinese tooltips of items to affirm this.

commented

https://cn.classic.wowhead.com/item=9458/%E7%91%9F%E7%8E%9B%E6%99%AE%E6%8B%89%E6%A0%BC%E7%9A%84%E4%B8%AD%E5%A4%AE%E6%A8%A1%E7%BB%84

https://cn.classic.wowhead.com/item=2870/%E9%93%B6%E9%B3%9E%E8%83%B8%E7%94%B2

These examples aren't zhCN are they? None of the strings you put in for TOOLTIP__ match anything I could find.

In game, could you run /dump GetLocale() to affirm this is zhCN?

commented

Your request should belong on issue #5

I assume the reason for this alteration is due to where the numbers are located? I will look at some chinese tooltips of items to affirm this.

Yes. Numbers and characters are located differently in the Simplified Chinese client than in the English client. I will provide some pictures of tooltip for your reference later.

https://cn.classic.wowhead.com/item=9458/%E7%91%9F%E7%8E%9B%E6%99%AE%E6%8B%89%E6%A0%BC%E7%9A%84%E4%B8%AD%E5%A4%AE%E6%A8%A1%E7%BB%84

https://cn.classic.wowhead.com/item=2870/%E9%93%B6%E9%B3%9E%E8%83%B8%E7%94%B2

These examples aren't zhCN are they? None of the strings you put in for TOOLTIP____ match anything I could find.

In game, could you run /dump GetLocale() to affirm this is zhCN?

Yes, I can confirm it is zhCN.
Sorry, I cannot open wowhead.com for the moment. In the web databases, the display format of the item attribute is different from the Chinese client, such as space and location.

commented

Ok great. Once I can verify what I am looking at I can develop a more intuitive way for Tooltip.lua to handle numbers on the left etc. Rather than making it specific cases via if statements or such, as the CODE isn't worried about the localization. For example, a variable in the locale file determining such a thing.

This is the last thing on my list for the release version of v2.2.4

commented

kiwiii

As shown in the picture:
left:
1308点护甲(->Armor)
25格挡(->Block)
+13 耐力(->Stamina)
+7 精神(->Spirit)
right:
94 - 142伤害(->Damage)
(每秒伤害34.7)(->DPS) with Brackets in full-width format

iLvl should have been displayed in the upper right corner, but it wasn't.

commented

I will take a look and compare it and conjure something. Portgues also has similar issue. I am not sure why ilvl isn't shown, as this has nothing to do with locale. Perhaps you have it disabled? Check /kiwiii vars

commented

kiwiii-vars

It's enabled, by default setting.

https://www.wowinterface.com/downloads/info25188-NDuiClassic.html
It's my UI AddOns just you have seen. maybe it caused? but i didn't get any error messages.

I'll try using ADD_NEWLINE() when i have time to see the result.

commented

If its just a skin it won't matter. I edit GameTooltipTextRight1 line to set it.

commented

zhCN.txt

Can you affirm that the formats are correct? I removed some of the %s's that would cause incompat.

Should I make something happen to prevent the number 250?