Skip to content

Commit

Permalink
Stop cutting item names when the language is from country China or co…
Browse files Browse the repository at this point in the history
…untry Taiwan or country Korea
  • Loading branch information
Tercioo committed Apr 8, 2024
1 parent 9e8a5a3 commit ea85917
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions boot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
local addonName, Details222 = ...
local version, build, date, tocversion = GetBuildInfo()

Details.build_counter = 12579
Details.alpha_build_counter = 12579 --if this is higher than the regular counter, use it instead
Details.build_counter = 12580
Details.alpha_build_counter = 12580 --if this is higher than the regular counter, use it instead
Details.dont_open_news = true
Details.game_version = version
Details.userversion = version .. " " .. Details.build_counter
Expand Down
10 changes: 8 additions & 2 deletions functions/spellcache.lua
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,14 @@ do

if (itemIcon and itemName) then
--limit the amount of characters of the item name
if (#itemName > 20) then
itemName = string.sub(itemName, 1, 20)
if (GetLocale() == "zhCN" or GetLocale() == "zhTW" or GetLocale() == "koKR") then
if (#itemName > 56) then
itemName = string.sub(itemName, 1, 56)
end
else
if (#itemName > 20) then
itemName = string.sub(itemName, 1, 20)
end
end
result = "" .. CreateTextureMarkup(itemIcon, iconSize, iconSize, iconSize, iconSize, unpack(coords)) .. " " .. itemName .. ""
end
Expand Down

0 comments on commit ea85917

Please sign in to comment.