NeatPlates

NeatPlates

7M Downloads

Chinese Number Shortening

zwlwwhhjy opened this issue · 2 comments

commented

If "Use Chinese Number Shortening" is not enabled in Chinese, when HP is "K", Chinese "千" will be displayed.

if LocalVars.AltShortening and number > 100000000 then
	return (ceil((number/10000000))/10).." "..L["SHORT_ONE_HUNDRED_MILLION"] --"亿"
elseif not LocalVars.AltShortening and number > 1000000 then
	return (ceil((number/100000))/10).." "..L["SHORT_MILLION"]
elseif LocalVars.AltShortening and number > 10000 then
	return (ceil((number/1000))/10).." "..L["SHORT_TEN_THOUSAND"]	--"万"
elseif LocalVars.AltShortening and number > 1000 then
    return number
elseif number > 1000 then
	return (ceil((number/100))/10).." "..L["SHORT_THOUSAND"]
else
	return number
end

This allows correct switching,Direct display of Chinese below 10000,I also modified the zhCN.lua.
“SHORT_MILLION” “SHORT_THOUSAND”You can do without localization,Direct display of "M" and "K"

if LocalVars.AltShortening and number > 100000000 then
	return (ceil((number/10000000))/10).." "..L["SHORT_ONE_HUNDRED_MILLION"] --"亿"
elseif not LocalVars.AltShortening and number > 1000000 then
	return (ceil((number/100000))/10).." M"
elseif LocalVars.AltShortening and number > 10000 then
	return (ceil((number/1000))/10).." "..L["SHORT_TEN_THOUSAND"]	--"万"
elseif LocalVars.AltShortening and number > 1000 then
    return number
elseif number > 1000 then
	return (ceil((number/100))/10).." K"
else
	return number
end
commented

Just so I understand this correctly. Both thousand(K) and million(M) shouldn't be used to round down when using the Chinese method?
And also they shouldn't be part of the translation?

commented

Yes, you can think so