diff --git a/boot.lua b/boot.lua index bf2c20ec..235b564e 100644 --- a/boot.lua +++ b/boot.lua @@ -1,10 +1,10 @@ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --> global name declaration - + _ = nil _detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0") _detalhes.build_counter = 2059 --it's 2061 for release - _detalhes.userversion = "v4.0.6" + _detalhes.userversion = "v4.0.6a" _detalhes.realversion = 76 --core version _detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" Details = _detalhes @@ -28,7 +28,7 @@ do -- - Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v4.0.6 (|cFFFFCC00Nov 01, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an option for numeral system: Western/East Asian.\n\n|cFFFFFF00v4.0.5c (|cFFFFCC00Oct 24, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an option to disable the all-displays window (right click on title bar).\n\n|cFFFFFF00-|r Added an option to suppress segment changes after killing a boss encounter (experimental).\n\n|cFFFFFF00-|r Fixed pet battles auto hide.\n\n|cFFFFFF00-|r Fixed an issue with bar animations starting from the middle of the bar.\n\n|cFFFFFF00-|r Fixed buffs and spell cast start on weakauras creator tool.\n\n|cFFFFFF00v4.0.3a (|cFFFFCC00Set 29, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for an error on Damage Taken By Spell display.\n\n|cFFFFFF00v4.0.3 (|cFFFFCC00Set 27, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Some improvements on Plugin's icon at the title bar.\n\n|cFFFFFF00v4.0.2 (|cFFFFCC00Set 26, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added 'ShielTronic Shield' on HealthPotion & Stone display.\n\n|cFFFFFF00-|r Improvements done on Vanguard Plugin.\n\n|cFFFFFF00-|r Fixed an alignment issue which was happening with few tooltips.\n\n|cFFFFFF00-|r Fixed a problem where sometimes the addon crashes while doing a /reload during raid.\n\n|cFFFFFF00-|r Fixed the creation of auras for weakauras from the Forge (/details forge).\n\n|cFFFFFF00v4.0.1 (|cFFFFCC00Set 21, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an options to use a customized skin file.\n\n|cFFFFFF00-|r Added an options to use a customized bar texture file.\n\n|cFFFFFF00-|r A Package with photoshop files with examples and the skin file for Minimalistic skin are available at WoW Interface.\n\n|cFFFFFF00-|r Added 'API Custom Displays.txt' on Details! folder, this file explain how to create scripts for custom displays.\n\n|cFFFFFF00v4.0h (|cFFFFCC00Set 19, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Created new plugin 'Target Caller' for RBGs, it's available at Curse.com.\n\n|cFFFFFF00-|r Fixed death display color when not using colored by the player class.\n\n|cFFFFFF00-|r Fixed a rare bug where the window for Encounter Details Plugin won't open when clicking on its icon.\n\n|cFFFFFF00-|r Added officer channel to 'Announce Death' feature.\n\n|cFFFFFF00v4.0f (|cFFFFCC00Set 16, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for the title bar encounter timer.\n\n|cFFFFFF00v4.0e (|cFFFFCC00Set 14, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added a custom display for Crowd Control Received.\n\n|cFFFFFF00-|r Weak Aura Creator Tool, now has full support for BigWigs and Dbm time bars.\n\n|cFFFFFF00-|r Auras for interrupt and dispelling has been added on the Weak Aura Creator Tool.\n\n|cFFFFFF00-|r Details! Forge now has support for DBM and BigWigs time bars.\n\n|cFFFFFF00-|r Solo Plugins now has a close button on their panels.\n\n|cFFFFFF00-|r Fixed damage/healing score message after a boss kill.\n\n|cFFFFFF00-|r Now, an alert to open the history panel is shown after killing a boss.\n\n|cFFFFFF00-|r Added a 'all-displays' menu when right clicking title bar.\n\n|cFFFFFF00-|r Removed few texture from bookmarks panel, now it has a more clean appearance.\n\n|cFFFFFF00-|r Updated Details! Framework.\n\n|cFFFFFF00-|r Added option in order to change the bar orientation.\n\n|cFFFFFF00-|r Added an option to make the menus on title bar work with clicks instead of hovering over them.\n\n|cFFFFFF00-|r Healing for battleground enemies is now placed on healing done instead of enemy healing done.\n\n|cFFFFFF00-|r Improvements on our support for Arena battles.\n\n|cFFFFFF00-|r Fixed some issues on the Player Detail Window.\n\n|cFFFFFF00-|r Fixed encounter time on title bar text.\n\n|cFFFFFF00-|r Fixed death display tooltip, wasn't respecting the font and size set on options panel.\n\n|cFFFFFF00v3.18.5 (|cFFFFCC00Aug 19, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Improvements on Weakauras creation from Encounter Details plugin.\n\n|cFFFFFF00-|r Improvements on 'Auto Switch to Current' feature. Details! windows are now more responsible about auto changing a segment while the player, for instance, has the report window opened.\n\n|cFFFFFF00-|r Added slash command '/de wipe'. It ends the raid encounter segment and stop capturing data.\nIf you are the raid leader, all other users of Details! will also stop.\nWorks great for players not make damage padding after a wipe call.\n\n|cFFFFFF00-|r Added the overheal made by pets on tooltip and player details window.\n\n|cFFFFFF00-|r Added an option to disable stretch button and bar highlight.\n\n|cFFFFFF00-|r Disabling nicknames now also disable avatars.\n\n|cFFFFFF00-|r Added 'spinal healing injector' on custom display 'Health Potion & Stone' used.\n\n|cFFFFFF00-|r Fixed title text width when auto-hide menu buttons is enabled.\n\n|cFFFFFF00-|r Fixed item level of timewarped items.\n\n|cFFFFFF00-|r Fixed report for custom display Crowd Control.\n\n|cFFFFFF00-|r Fixed role icons on custom displays.\n\n|cFFFFFF00-|r Fixed an issue with dropdown boxes where wasn't showing all options.\n\n|cFFFFFF00-|r Fixed Ticket #53: background alpha after stretching which wasn't correctly coming back to original color.\n\n|cFFFFFF00-|r Fixed ticket #51: API Call 'GetCombat('overall')' wasn't returning the overall combat object.\n\n|cFFFFFF00-|r Fixed ticket #50: issue opening icon selection frame.\n\n|cFFFFFF00v3.17.12 (|cFFFFCC00Aug 05, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an option for lock micro displays. When locked they don't interact with mouse or stay on top of menus.\n\n|cFFFFFF00-|r Fixed ticket #49: death display not working correctly with sort direction bottom-to-top.\n\n|cFFFFFF00-|r Fixed an issue with death display where the text wasn't updating their width correctly.\n\n|cFFFFFF00-|r Fixed an issue with energy and miscellaneous displays type not working correctly with bar animations.\n\n|cFFFFFF00-|r Fixed an issue while loading old profiles wans't updating their values for newer versions of the addon.\n\n|cFFFFFF00-|r Fixed an issue with bookmarks panel not opening correctly.\n\n|cFFFFFF00v3.17.10 (|cFFFFCC00Aug 02, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed ticket #47: Title bar font resets with UI reload / relog.\n\n|cFFFFFF00-|r Fixed ticket #46: Icon select panel wasn't opening.\n\n|cFFFFFF00-|r Fixed ticket #45: Windwalker icon for Mistweaver monks.\n\n|cFFFFFF00-|r Fixed issue with vehicles exchanging ownership, e.g. Soulbound Constructor on HFC raid.\n\n|cFFFFFF00v3.17.6 (|cFFFFCC00Jul 16, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Major improvements on the aura tool creation for WeakAuras.\n\n|cFFFFFF00-|r Fixed some issues with spec icons where sometimes it shows four small icons.\n\n|cFFFFFF00-|r Added an option to show a stopwatch on the title text showing the elapsed time of an encounter.\n\n|cFFFFFF00-|r Window title text now shrinks correctly when isn't enough space for it.\n\n|cFFFFFF00-|r For some special cases, left click now open the report window and shift+click shows the tooltip content in the window.\n\n|cFFFFFF00-|r Damage Taken by Spells now are a part of Damage bracket (no more on custom).\n\n|cFFFFFF00-|r Fixed custom functions for the customized bar left text.\n\n|cFFFFFF00-|r Improvements on report text format and also reverse option now works as intended.\n\n|cFFFFFF00-|r Removed the option for report only what is shown in the window.\n\n|cFFFFFF00-|r Added skins for report panel, the skin follow the skin selected for Player Detail Window." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v4.0.6a (|cFFFFCC00Nov 03, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an option for numeral system: Western/East Asian.\n\n|cFFFFFF00v4.0.5c (|cFFFFCC00Oct 24, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an option to disable the all-displays window (right click on title bar).\n\n|cFFFFFF00-|r Added an option to suppress segment changes after killing a boss encounter (experimental).\n\n|cFFFFFF00-|r Fixed pet battles auto hide.\n\n|cFFFFFF00-|r Fixed an issue with bar animations starting from the middle of the bar.\n\n|cFFFFFF00-|r Fixed buffs and spell cast start on weakauras creator tool.\n\n|cFFFFFF00v4.0.3a (|cFFFFCC00Set 29, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for an error on Damage Taken By Spell display.\n\n|cFFFFFF00v4.0.3 (|cFFFFCC00Set 27, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Some improvements on Plugin's icon at the title bar.\n\n|cFFFFFF00v4.0.2 (|cFFFFCC00Set 26, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added 'ShielTronic Shield' on HealthPotion & Stone display.\n\n|cFFFFFF00-|r Improvements done on Vanguard Plugin.\n\n|cFFFFFF00-|r Fixed an alignment issue which was happening with few tooltips.\n\n|cFFFFFF00-|r Fixed a problem where sometimes the addon crashes while doing a /reload during raid.\n\n|cFFFFFF00-|r Fixed the creation of auras for weakauras from the Forge (/details forge).\n\n|cFFFFFF00v4.0.1 (|cFFFFCC00Set 21, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an options to use a customized skin file.\n\n|cFFFFFF00-|r Added an options to use a customized bar texture file.\n\n|cFFFFFF00-|r A Package with photoshop files with examples and the skin file for Minimalistic skin are available at WoW Interface.\n\n|cFFFFFF00-|r Added 'API Custom Displays.txt' on Details! folder, this file explain how to create scripts for custom displays.\n\n|cFFFFFF00v4.0h (|cFFFFCC00Set 19, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Created new plugin 'Target Caller' for RBGs, it's available at Curse.com.\n\n|cFFFFFF00-|r Fixed death display color when not using colored by the player class.\n\n|cFFFFFF00-|r Fixed a rare bug where the window for Encounter Details Plugin won't open when clicking on its icon.\n\n|cFFFFFF00-|r Added officer channel to 'Announce Death' feature.\n\n|cFFFFFF00v4.0f (|cFFFFCC00Set 16, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for the title bar encounter timer.\n\n|cFFFFFF00v4.0e (|cFFFFCC00Set 14, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added a custom display for Crowd Control Received.\n\n|cFFFFFF00-|r Weak Aura Creator Tool, now has full support for BigWigs and Dbm time bars.\n\n|cFFFFFF00-|r Auras for interrupt and dispelling has been added on the Weak Aura Creator Tool.\n\n|cFFFFFF00-|r Details! Forge now has support for DBM and BigWigs time bars.\n\n|cFFFFFF00-|r Solo Plugins now has a close button on their panels.\n\n|cFFFFFF00-|r Fixed damage/healing score message after a boss kill.\n\n|cFFFFFF00-|r Now, an alert to open the history panel is shown after killing a boss.\n\n|cFFFFFF00-|r Added a 'all-displays' menu when right clicking title bar.\n\n|cFFFFFF00-|r Removed few texture from bookmarks panel, now it has a more clean appearance.\n\n|cFFFFFF00-|r Updated Details! Framework.\n\n|cFFFFFF00-|r Added option in order to change the bar orientation.\n\n|cFFFFFF00-|r Added an option to make the menus on title bar work with clicks instead of hovering over them.\n\n|cFFFFFF00-|r Healing for battleground enemies is now placed on healing done instead of enemy healing done.\n\n|cFFFFFF00-|r Improvements on our support for Arena battles.\n\n|cFFFFFF00-|r Fixed some issues on the Player Detail Window.\n\n|cFFFFFF00-|r Fixed encounter time on title bar text.\n\n|cFFFFFF00-|r Fixed death display tooltip, wasn't respecting the font and size set on options panel.\n\n|cFFFFFF00v3.18.5 (|cFFFFCC00Aug 19, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Improvements on Weakauras creation from Encounter Details plugin.\n\n|cFFFFFF00-|r Improvements on 'Auto Switch to Current' feature. Details! windows are now more responsible about auto changing a segment while the player, for instance, has the report window opened.\n\n|cFFFFFF00-|r Added slash command '/de wipe'. It ends the raid encounter segment and stop capturing data.\nIf you are the raid leader, all other users of Details! will also stop.\nWorks great for players not make damage padding after a wipe call.\n\n|cFFFFFF00-|r Added the overheal made by pets on tooltip and player details window.\n\n|cFFFFFF00-|r Added an option to disable stretch button and bar highlight.\n\n|cFFFFFF00-|r Disabling nicknames now also disable avatars.\n\n|cFFFFFF00-|r Added 'spinal healing injector' on custom display 'Health Potion & Stone' used.\n\n|cFFFFFF00-|r Fixed title text width when auto-hide menu buttons is enabled.\n\n|cFFFFFF00-|r Fixed item level of timewarped items.\n\n|cFFFFFF00-|r Fixed report for custom display Crowd Control.\n\n|cFFFFFF00-|r Fixed role icons on custom displays.\n\n|cFFFFFF00-|r Fixed an issue with dropdown boxes where wasn't showing all options.\n\n|cFFFFFF00-|r Fixed Ticket #53: background alpha after stretching which wasn't correctly coming back to original color.\n\n|cFFFFFF00-|r Fixed ticket #51: API Call 'GetCombat('overall')' wasn't returning the overall combat object.\n\n|cFFFFFF00-|r Fixed ticket #50: issue opening icon selection frame.\n\n|cFFFFFF00v3.17.12 (|cFFFFCC00Aug 05, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an option for lock micro displays. When locked they don't interact with mouse or stay on top of menus.\n\n|cFFFFFF00-|r Fixed ticket #49: death display not working correctly with sort direction bottom-to-top.\n\n|cFFFFFF00-|r Fixed an issue with death display where the text wasn't updating their width correctly.\n\n|cFFFFFF00-|r Fixed an issue with energy and miscellaneous displays type not working correctly with bar animations.\n\n|cFFFFFF00-|r Fixed an issue while loading old profiles wans't updating their values for newer versions of the addon.\n\n|cFFFFFF00-|r Fixed an issue with bookmarks panel not opening correctly.\n\n|cFFFFFF00v3.17.10 (|cFFFFCC00Aug 02, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed ticket #47: Title bar font resets with UI reload / relog.\n\n|cFFFFFF00-|r Fixed ticket #46: Icon select panel wasn't opening.\n\n|cFFFFFF00-|r Fixed ticket #45: Windwalker icon for Mistweaver monks.\n\n|cFFFFFF00-|r Fixed issue with vehicles exchanging ownership, e.g. Soulbound Constructor on HFC raid.\n\n|cFFFFFF00v3.17.6 (|cFFFFCC00Jul 16, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Major improvements on the aura tool creation for WeakAuras.\n\n|cFFFFFF00-|r Fixed some issues with spec icons where sometimes it shows four small icons.\n\n|cFFFFFF00-|r Added an option to show a stopwatch on the title text showing the elapsed time of an encounter.\n\n|cFFFFFF00-|r Window title text now shrinks correctly when isn't enough space for it.\n\n|cFFFFFF00-|r For some special cases, left click now open the report window and shift+click shows the tooltip content in the window.\n\n|cFFFFFF00-|r Damage Taken by Spells now are a part of Damage bracket (no more on custom).\n\n|cFFFFFF00-|r Fixed custom functions for the customized bar left text.\n\n|cFFFFFF00-|r Improvements on report text format and also reverse option now works as intended.\n\n|cFFFFFF00-|r Removed the option for report only what is shown in the window.\n\n|cFFFFFF00-|r Added skins for report panel, the skin follow the skin selected for Player Detail Window." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails!:|r " diff --git a/core/util.lua b/core/util.lua index e611899c..62e83378 100644 --- a/core/util.lua +++ b/core/util.lua @@ -89,28 +89,65 @@ --krKR by @yuk6196 (http://wow.curseforge.com/profiles/yuk6196) function _detalhes:UseEastAsianNumericalSystem() + --> try to auto detect the language + local symbol_1K, symbol_10K, symbol_1B + if (LibStub("AceLocale-3.0"):NewLocale ("Details", "koKR")) then --Korea + symbol_1K, symbol_10K, symbol_1B = "천", "만", "억" + elseif (LibStub("AceLocale-3.0"):NewLocale ("Details", "zhCN")) then --China + symbol_1K, symbol_10K, symbol_1B = "천", "万", "亿" + elseif (LibStub("AceLocale-3.0"):NewLocale ("Details", "zhTW")) then --Taiwan + symbol_1K, symbol_10K, symbol_1B = "천", "萬", "億" + end + + --> override, force details! to use symbols for a specific language. + --> usage: _detalhes:SetNumericalSystemOverride (language) language can be: "kr", "cn", "tw" + + --> just in case the user mess up something + if (type (_detalhes.numerical_system_symbols) ~= "string") then + _detalhes.numerical_system_symbols = "auto" + end + + --> do the override + if (_detalhes.numerical_system_symbols ~= "auto") then + local locale = string.lower (_detalhes.numerical_system_symbols) + + if (locale == "kr") then + symbol_1K, symbol_10K, symbol_1B = "천", "만", "억" + elseif (locale == "cn") then + symbol_1K, symbol_10K, symbol_1B = "천", "万", "亿" + elseif (locale == "tw") then + symbol_1K, symbol_10K, symbol_1B = "천", "萬", "億" + end + end + + if (not symbol_1K) then + --> if a english client is trying to use east asian numeral system and there is no override, let's just use the chinese as default. + --> if the user is from kr or tw and want to use english client, an override must be used. + symbol_1K, symbol_10K, symbol_1B = "천", "万", "亿" + end + function _detalhes:ToK (numero) if (numero > 100000000) then - return _string_format ("%.2f", numero/100000000) .. "억" + return _string_format ("%.2f", numero/100000000) .. symbol_1B elseif (numero > 10000) then - return _string_format ("%.2f", numero/10000) .. "만" + return _string_format ("%.2f", numero/10000) .. symbol_10K elseif (numero > 1000) then - return _string_format ("%.1f", numero/1000) .. "천" + return _string_format ("%.1f", numero/1000) .. symbol_1K end return numero end function _detalhes:ToK2 (numero) if (numero > 99999999) then - return _string_format ("%.2f", numero/100000000) .. "억" + return _string_format ("%.2f", numero/100000000) .. symbol_1B elseif (numero > 999999) then - return _string_format ("%.2f", numero/10000) .. "만" + return _string_format ("%.2f", numero/10000) .. symbol_10K elseif (numero > 99999) then - return _math_floor (numero/10000) .. "만" + return _math_floor (numero/10000) .. symbol_10K elseif (numero > 9999) then - return _string_format ("%.1f", (numero/10000)) .. "만" + return _string_format ("%.1f", (numero/10000)) .. symbol_10K elseif (numero > 999) then - return _string_format ("%.1f", (numero/1000)) .. "천" + return _string_format ("%.1f", (numero/1000)) .. symbol_1K end return _string_format ("%.1f", numero) end @@ -118,37 +155,37 @@ --> short numbers no numbers after comma function _detalhes:ToK0 (numero) if (numero > 100000000) then - return _string_format ("%.0f", numero/100000000) .. "억" + return _string_format ("%.0f", numero/100000000) .. symbol_1B elseif (numero > 10000) then - return _string_format ("%.0f", numero/10000) .. "만" + return _string_format ("%.0f", numero/10000) .. symbol_10K elseif (numero > 1000) then - return _string_format ("%.0f", numero/1000) .. "천" + return _string_format ("%.0f", numero/1000) .. symbol_1K end return _string_format ("%.0f", numero) end function _detalhes:ToKMin (numero) if (numero > 100000000) then - return _string_format ("%.2f", numero/100000000) .. "억" + return _string_format ("%.2f", numero/100000000) .. symbol_1B elseif (numero > 10000) then - return _string_format ("%.2f", numero/10000) .. "만" + return _string_format ("%.2f", numero/10000) .. symbol_10K elseif (numero > 1000) then - return _string_format ("%.1f", numero/1000) .. "천" + return _string_format ("%.1f", numero/1000) .. symbol_1K end return numero end function _detalhes:ToK2Min (numero) if (numero > 99999999) then - return _string_format ("%.2f", numero/100000000) .. "억" + return _string_format ("%.2f", numero/100000000) .. symbol_1B elseif (numero > 999999) then - return _string_format ("%.2f", numero/10000) .. "만" + return _string_format ("%.2f", numero/10000) .. symbol_10K elseif (numero > 99999) then - return _math_floor (numero/10000) .. "만" + return _math_floor (numero/10000) .. symbol_10K elseif (numero > 9999) then - return _string_format ("%.1f", (numero/10000)) .. "만" + return _string_format ("%.1f", (numero/10000)) .. symbol_10K elseif (numero > 999) then - return _string_format ("%.1f", (numero/1000)) .. "천" + return _string_format ("%.1f", (numero/1000)) .. symbol_1K end return _string_format ("%.1f", numero) end @@ -156,11 +193,11 @@ --> short numbers no numbers after comma function _detalhes:ToK0Min (numero) if (numero > 100000000) then - return _string_format ("%.0f", numero/100000000) .. "억" + return _string_format ("%.0f", numero/100000000) .. symbol_1B elseif (numero > 10000) then - return _string_format ("%.0f", numero/10000) .. "만" + return _string_format ("%.0f", numero/10000) .. symbol_10K elseif (numero > 1000) then - return _string_format ("%.0f", numero/1000) .. "천" + return _string_format ("%.0f", numero/1000) .. symbol_1K end return _string_format ("%.0f", numero) end @@ -168,11 +205,11 @@ --> short numbers no numbers after comma function _detalhes:ToKReport (numero) if (numero > 100000000) then - return _string_format ("%.2f", numero/100000000) .. "억" + return _string_format ("%.2f", numero/100000000) .. symbol_1B elseif (numero > 10000) then - return _string_format ("%.1f", numero/10000) .. "만" + return _string_format ("%.1f", numero/10000) .. symbol_10K elseif (numero > 1000) then - return _string_format ("%.0f", numero/1000) .. "천" + return _string_format ("%.0f", numero/1000) .. symbol_1K end return numero end @@ -181,9 +218,9 @@ n = _math_floor (n) if (custom) then if (n > 99999999) then - return _string_format (custom, n/100000000) .. "억" + return _string_format (custom, n/100000000) .. symbol_1B elseif (n > 9999) then - return _string_format (custom, n/10000) .. "만" + return _string_format (custom, n/10000) .. symbol_10K elseif (n > 999) then return _string_format (custom, (n/1000)) else @@ -349,6 +386,16 @@ ------------------------------------------------------------------------------------------------------------ --> numerical system + function _detalhes:SetNumericalSystemOverride (language) + if (not language) then + language = "auto" + end + _detalhes.numerical_system_symbols = language + _detalhes:Msg ("NumSystem override is now:", language) + + _detalhes:SelectNumericalSystem() + end + function _detalhes:GetNumericalSystem() return _detalhes.numerical_system end diff --git a/functions/profiles.lua b/functions/profiles.lua index 0ab6054e..ce99ce1e 100644 --- a/functions/profiles.lua +++ b/functions/profiles.lua @@ -923,6 +923,7 @@ local default_profile = { ps_abbreviation = 3, total_abbreviation = 2, numerical_system = 1, + numerical_system_symbols = "auto", --> performance use_row_animations = false,