Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
hu71e opened this issue Oct 18, 2019 · 11 comments
Closed

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

hu71e opened this issue Oct 18, 2019 · 11 comments
Labels
enhancement New feature or request Translation Has to do with Translation
Milestone

Comments

@hu71e
Copy link

hu71e commented Oct 18, 2019

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!

@tilkinsc
Copy link
Owner

tilkinsc commented Oct 20, 2019

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.

@tilkinsc tilkinsc added the enhancement New feature or request label Oct 20, 2019
@tilkinsc tilkinsc added this to the v2.2.4 milestone Oct 20, 2019
@tilkinsc tilkinsc added the Translation Has to do with Translation label Oct 20, 2019
@hu71e
Copy link
Author

hu71e commented Oct 21, 2019

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.

@tilkinsc
Copy link
Owner

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.

@tilkinsc
Copy link
Owner

tilkinsc commented Oct 22, 2019

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?

@hu71e
Copy link
Author

hu71e commented Oct 22, 2019

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.

@tilkinsc
Copy link
Owner

tilkinsc commented Oct 22, 2019

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

@hu71e
Copy link
Author

hu71e commented Oct 22, 2019

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.

@tilkinsc
Copy link
Owner

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

@hu71e
Copy link
Author

hu71e commented Oct 23, 2019

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.

@tilkinsc
Copy link
Owner

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

@tilkinsc
Copy link
Owner

tilkinsc commented Oct 24, 2019

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Translation Has to do with Translation
Projects
None yet
Development

No branches or pull requests

2 participants