From f97673fc99d2e83f950f918c2c9b6fdcdae51c1c Mon Sep 17 00:00:00 2001 From: insolor <2442833+insolor@users.noreply.github.com> Date: Wed, 9 Oct 2024 14:08:58 +0300 Subject: [PATCH] Sort sets in df_ignore_string_rules --- .../utils/df_ignore_string_rules.py | 436 +++++++++--------- 1 file changed, 218 insertions(+), 218 deletions(-) diff --git a/df_translation_toolkit/utils/df_ignore_string_rules.py b/df_translation_toolkit/utils/df_ignore_string_rules.py index 6dddbfe..a49b08f 100644 --- a/df_translation_toolkit/utils/df_ignore_string_rules.py +++ b/df_translation_toolkit/utils/df_ignore_string_rules.py @@ -113,71 +113,71 @@ def ignore_word_with_number(string: str) -> bool: forbidden_starts = { - "Crash", - "String:", + ": DEMAND_", + ": MANDATE_", + ": REQUIRED_", + "?_", "Adventure:", - "Hotkey:", - "Main:", - "Location:", + "Arena Creature:", + "Arena Tree:", + "Arena Weather:", + "Assign Trade:", + "Building Items:", + "Building List:", + "Building,", "Buildjob:", - "Movie:", + "Cage: ", + "Choose name:", + "Command Line:", + "Crash", "Custom:", - "Orders:", + "DOUBLE TAGGED ITEM:", + "Designate,", "Dwf Look:", - "Arena Creature:", - "Squad Schedule:", - "Building List:", "Hot Keys:", - "Load Game:", - "old save:", - "Stockpile Settings:", - "Assign Trade:", - "World:", - "World Param:", - "Command Line:", - "Noble List:", - "Arena Weather:", - "Building Items:", - "Arena Tree:", + "Hotkey:", "Image Creator:", + "Item creation failed:", + "Item submission failed:", "Legends:", - "World Gen:", - "Setup game:", - "World Generation:", - "Choose name:", - "View item:", - "Trainer:", - "Order:", - "Unitview,", - "Building,", - "Designate,", - "Stockpile,", - "Setup,", + "Load Game:", + "Location:", + "Main:", "Manager,", - "Work Order,", - "Unitjob,", - "Secondary Option", - "Unrecognized ", "Missing ", - "unknown", - "Option ", - "Numpad ", "Move view/cursor ", - "invalid ", - "incorrect ", + "Movie:", "NULL ", + "Noble List:", "Nuked ", - "Cage: ", - ": REQUIRED_", - ": MANDATE_", - ": DEMAND_", - "DOUBLE TAGGED ITEM:", + "Numpad ", + "Option ", + "Order:", + "Orders:", "Patched save:", - "vector", - "?_", + "Secondary Option", + "Setup game:", + "Setup,", + "Squad Schedule:", + "Stockpile Settings:", + "Stockpile,", + "String:", + "Trainer:", + "Unitjob,", + "Unitview,", + "Unrecognized ", + "View item:", + "Work Order,", + "World Gen:", + "World Generation:", + "World Param:", + "World:", "ill-sized", - "Item creation failed:", - "Item submission failed:", + "incorrect ", + "invalid ", + "old save:", + "unknown", + "vector", } @@ -187,174 +187,174 @@ def ignore_starts(string: str) -> bool: blacklist_full_string = { - "bad allocation", - "bad array new length", - "Out of memory - aborting", - "Fatal Error", - "nameless", - "string too long", - "invalid string position", "!ARG", - "current", + "2DASYNC", + "2DHW", + "2DSW", + "Alt+", + "Ampersand", + "Asterisk", + "At", + "B!+", + "B!~", + "Backquote", + "Backslash", + "Backspace", + "Bl+", + "Bl~", + "Capslock", + "Caret", + "Colon", + "Comma", + "Ctrl+", + "Delete", + "Dollar", + "Down", + "Empty biased index vector", + "End", + "End of macro", + "Enter", + "Equals", + "Euro", + "Exclaim", "Exh", + "Fatal Error", + "Fnt", + "Greater", + "Hash", + "Insert", + "Lalt", + "Lctrl", + "Left", + "Leftbracket", + "Leftparen", + "Less", + "Lmeta", + "Lshift", + "Lsuper", + "Menu", + "Minus", + "Mode", + "Nm+", + "Nm-", + "Nm~", + "Numlock", + "Out of memory - aborting", "Ovx", + "Page Down", + "Page Up", + "Pal", "Pb!", "Pb+", "Pb~", + "Period", + "Plus", "Pn!", "Pn+", "Pn~", + "Print", + "Pz+", + "Pz~", + "Question", + "Quote", + "Quotedbl", + "Ralt", + "Rctrl", + "Right", + "Rightbracket", + "Rightparen", + "Rmeta", + "Rshift", + "Rsuper", + "Scrollock", + "Semicolon", + "Shift+", + "Slash", + "Slg", + "Space", "Sw!", "Sw+", "Sw~", + "Sysreq", + "Tab", "Tir", - "Nm-", - "Bl+", - "B!~", - "B!+", - "Pz+", - "Fnt", - "Pal", - "Bl~", - "Nm~", - "Nm+", - "Slg", - "Pz~", - "scrollx", - "scrolly", - "buildreq", - "jobvalue", - "version", - "gview", + "Underscore", + "Undo", + "Unknown exception", + "Up", + "_DIV ", + "addingtask", "assignbuildingjobs", - "year", "assigndesjobs", - "weathertimer", - "season", + "bad allocation", + "bad array new length", + "bad cast", + "buildreq", + "current", + "cursor", + "data", + "dunginv", + "enabler", + "feature-", + "game", + "gamemode", + "gametype", + "gps", + "gview", + "handleannounce", + "init", + "insufficient memory", + "interactinvslot", + "interactitem", + "invalid string position", + "itemmade", + "jobvalue", "line", "linechar", - "scrollz", "linelim", - "gametype", - "point", - "gamemode", - "cursor", - "modejob", + "looklist", + "mainview", + "manucomp", + "menuposition", "modeitem", - "addingtask", - "modeseason", - "selectingtaskobject", - "paused", + "modejob", "modepage", + "modeseason", "modestation", - "squadcount", - "modeview", "modeunit", - "game", - "gps", - "plotinfo", - "world", - "itemmade", - "olookz", - "oscrollx", + "modeview", + "nameless", "olookx", "olooky", - "menuposition", - "looklist", - "unitprintstack", - "title", - "init", - "mainview", - "texture", - "interactitem", - "interactinvslot", - "throwitem", - "dunginv", - "page", + "olookz", + "oscrollx", "oscrolly", "oscrollz", - "updatelightstate", - "handleannounce", + "page", + "paused", + "plotinfo", + "point", "preserveannounce", - "manucomp", - "enabler", - "Empty biased index vector", - "Unknown exception", - "bad cast", - "data", - "region", - "text", "raw", + "region", + "scrollx", + "scrolly", + "scrollz", + "season", + "selectingtaskobject", "site-", - "feature-", - "Backspace", - "Enter", - "Up", - "Delete", - "Leftbracket", - "Backslash", - "Rightbracket", - "Caret", - "Underscore", - "Backquote", - "Rshift", - "Lshift", - "Rctrl", - "Lctrl", - "Ralt", - "Lalt", - "Rmeta", - "Lmeta", - "Numlock", - "Capslock", - "Scrollock", - "Down", - "Right", - "Insert", - "End", - "Page Up", - "Page Down", - "Euro", - "Undo", - "Lsuper", - "Rsuper", - "Print", - "Sysreq", - "Menu", - "Space", - "Tab", - "Shift+", - "Ctrl+", - "Alt+", - "Question", - "Quotedbl", - "Hash", - "Ampersand", - "Quote", - "Leftparen", - "Rightparen", - "Left", - "Colon", - "Semicolon", - "Less", - "Equals", - "Greater", - "At", - "Asterisk", - "Plus", - "Comma", - "Minus", - "Period", - "Slash", - "Exclaim", - "Dollar", - "Mode", - "_DIV ", - "End of macro", - "2DASYNC", - "2DHW", - "2DSW", - "insufficient memory", + "squadcount", + "string too long", + "text", + "texture", + "throwitem", + "title", + "unitprintstack", + "updatelightstate", + "version", + "weathertimer", + "world", + "year", } @@ -383,45 +383,45 @@ def ignore_by_blacklisted_words(string: str) -> bool: allowed_short_words = { + "'s", + "/E", + "/N", + "/S", + "/W", "A", + "At", + "He", + "I", + "It", + "No", + "On", + "Up", + "We", "an", - "er", - "us", # sarcofag-us "as", + "at", + "b.", + "by", + "d.", + "er", + "es", + "he", "in", - "st", "is", - "'s", - "s", - "es", - "nd", - "rd", - "th", + "it", "me", "my", + "nd", "no", - "to", - "b.", - "d.", - "At", - "Up", - "On", "of", - "at", - "by", "on", - "I", - "He", - "he", - "We", - "it", - "It", - "No", + "rd", + "s", "s]", - "/N", - "/S", - "/E", - "/W", + "st", + "th", + "to", + "us", }