From e07374c7059a3fc2a89c7100f419b9170c030af0 Mon Sep 17 00:00:00 2001 From: FaceDeer Date: Thu, 20 Feb 2020 23:29:47 -0700 Subject: [PATCH] There may be light on the horizon for sorting localized strings --- formspecs.lua | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/formspecs.lua b/formspecs.lua index af501ac..61f70e6 100644 --- a/formspecs.lua +++ b/formspecs.lua @@ -208,19 +208,11 @@ end -- Market formspec -------------------------------------------------------------------------------------------------------- --- I hate that I need this function -local ESCAPE_CHAR = string.char(0x1b) -local strip_localization_markup = function(localized) - -end - local compare_market_item = function(mkt1, mkt2) return mkt1.item < mkt2.item end local compare_market_desc = function(mkt1, mkt2) - -- Strip localization escape characters for sorting. - -- This means it will only sort correctly in English, but what else can I do? - -- Otherwise sorting is broken in *all* languages. + -- TODO: see https://github.com/minetest/minetest/issues/8398 for sorting localized strings return get_item_description(mkt1.item) < get_item_description(mkt2.item) end local compare_buy_volume = function(mkt1, mkt2)