Revert #11993: new number format system does not and cannot work for CJK languages

There are too many intricacies that I am unaware of that are popping up after
asking whether things are right or not.
I do not want to keep playing whack-a-mole, so just revert the whole thing.

This reverts:
15be383b93
360fe8b0b6
1aa9a5c0ab
59f56941e5
7e2eefb91f
b741b2ba6f
609d0071d5
9f8fd80112
a253205b93
819c6c756e
This commit is contained in:
Rubidium
2024-02-22 18:08:33 +01:00
committed by rubidium42
parent 8015d96a50
commit 4c117dd2d8
81 changed files with 313 additions and 425 deletions

View File

@@ -16,7 +16,6 @@ static void InvalidateCompanyLiveryWindow(int32_t new_value);
static void InvalidateNewGRFChangeWindows(int32_t new_value);
static void ZoomMinMaxChanged(int32_t new_value);
static void SpriteZoomMinChanged(int32_t new_value);
void InitializeNumberFormats();
static constexpr std::initializer_list<const char*> _osk_activation{"disabled", "double", "single", "immediately"};
static constexpr std::initializer_list<const char*> _savegame_date{"long", "short", "iso"};
@@ -29,7 +28,6 @@ static const SettingVariant _gui_settings_table[] = {
SDTC_BOOL = SDTC_BOOL( $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
SDTC_OMANY = SDTC_OMANY( $var, $type, $flags, $def, $max, $full, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
SDTC_VAR = SDTC_VAR( $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $str_cb, $help_cb, $val_cb, $from, $to, $cat, $extra, $startup),
SDTC_SSTR = SDTC_SSTR( $var, $type, $flags, $def, 0, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup),
[validation]
SDTC_OMANY = static_assert($max <= MAX_$type, "Maximum value for $var exceeds storage size");
@@ -905,27 +903,3 @@ post_cb = [](auto) { SetupWidgetDimensions(); ReInitAllWindows(true); }
cat = SC_BASIC
startup = true
[SDTC_SSTR]
var = gui.number_format
flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
type = SLE_STRQ
def = nullptr
pre_cb = [](auto format) { NumberFormatSeparators separators; return !ParseNumberFormatSeparators(separators, format).has_value(); }
post_cb = [](auto) { InitializeNumberFormats(); MarkWholeScreenDirty(); }
startup = true
[SDTC_SSTR]
var = gui.number_abbreviations
flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
type = SLE_STRQ
def = nullptr
pre_cb = [](auto format) { NumberAbbreviations abbreviations; return !ParseNumberAbbreviations(abbreviations, format).has_value(); }
post_cb = [](auto) { InitializeNumberFormats(); MarkWholeScreenDirty(); }
startup = true
[SDTC_SSTR]
var = gui.digit_decimal_separator
flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
type = SLE_STRQ
def = nullptr
post_cb = [](auto) { MarkWholeScreenDirty(); }