AutoCategory_FCOIS = {
    RuleFunc = {},
}

-- language strings
-- The default language set of strings must contain ALL of the string definitions for the plugin.
-- For other language sets here, if a string is not defined then the english version is used
-- For any language that is not supported (i.e. not here), "en" is used.
local localization_strings = {
    de = {
        SI_AC_DEFAULT_CATEGORY_FCOIS_DECONSTRUCTION_MARK = "Verwerten",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DECONSTRUCTION_MARK_DESC = "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_1 = "Dynamisch 1",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_1_DESC = "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_2 = "Dynamisch 2",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_2_DESC = "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_3 = "Dynamisch 3",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_3_DESC = "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_4 = "Dynamisch 4",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_4_DESC = "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_5 = "Dynamisch 5",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_5_DESC = "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_6 = "Dynamisch 6",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_6_DESC = "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_7 = "Dynamisch 7",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_7_DESC = "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_8 = "Dynamisch 8",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_8_DESC = "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_9 = "Dynamisch 9",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_9_DESC = "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_10 = "Dynamisch 10",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_10_DESC = "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_1 = "Gear 1",
        SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_1_DESC = "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_2 = "Gear 2",
        SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_2_DESC = "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_3 = "Gear 3",
        SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_3_DESC = "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_4 = "Gear 4",
        SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_4_DESC = "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_5 = "Gear 5",
        SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_5_DESC = "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_IMPROVEMENT_MARK = "Aufwerten",
        SI_AC_DEFAULT_CATEGORY_FCOIS_IMPROVEMENT_MARK_DESC = "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_INTRICATE_MARK = "Wertvoll",
        SI_AC_DEFAULT_CATEGORY_FCOIS_INTRICATE_MARK_DESC = "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_LOCK_MARK = "Schloß",
        SI_AC_DEFAULT_CATEGORY_FCOIS_LOCK_MARK_DESC = "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_RESEARCH_MARK = "Analyse",
        SI_AC_DEFAULT_CATEGORY_FCOIS_RESEARCH_MARK_DESC = "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_SELL_AT_GUILDSTORE_MARK = "Verkauf im Gildenladen",
        SI_AC_DEFAULT_CATEGORY_FCOIS_SELL_AT_GUILDSTORE_MARK_DESC = "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_SELL_MARK = "Verkauf",
        SI_AC_DEFAULT_CATEGORY_FCOIS_SELL_MARK_DESC = "",

        SI_AC_DEFAULT_CATEGORY_FCOIS_ALL_MARK = "Alle Markierungen",
        SI_AC_DEFAULT_CATEGORY_FCOIS_ALL_MARK_DESC = "",
    },
    
    en = {
        SI_AC_DEFAULT_CATEGORY_FCOIS_DECONSTRUCTION_MARK= "Deconstruction Mark",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DECONSTRUCTION_MARK_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_1= "Dynamic 1",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_1_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_2= "Dynamic 2",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_2_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_3= "Dynamic 3",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_3_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_4= "Dynamic 4",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_4_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_5= "Dynamic 5",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_5_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_6= "Dynamic 6",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_6_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_7= "Dynamic 7",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_7_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_8= "Dynamic 8",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_8_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_9= "Dynamic 9",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_9_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_10= "Dynamic 10",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_10_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_11= "Dynamic 11",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_11_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_12= "Dynamic 12",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_12_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_13= "Dynamic 13",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_13_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_14= "Dynamic 14",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_14_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_15= "Dynamic 15",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_15_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_16= "Dynamic 16",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_16_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_17= "Dynamic 17",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_17_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_18= "Dynamic 18",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_18_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_19= "Dynamic 19",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_19_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_20= "Dynamic 20",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_20_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_21= "Dynamic 21",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_21_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_22= "Dynamic 22",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_22_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_23= "Dynamic 23",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_23_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_24= "Dynamic 24",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_24_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_25= "Dynamic 25",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_25_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_26= "Dynamic 26",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_26_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_27= "Dynamic 27",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_27_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_28= "Dynamic 28",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_28_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_29= "Dynamic 29",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_29_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_30= "Dynamic 30",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_30_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_1= "Gear 1",
        SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_1_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_2= "Gear 2",
        SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_2_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_3= "Gear 3",
        SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_3_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_4= "Gear 4",
        SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_4_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_5= "Gear 5",
        SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_5_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_IMPROVEMENT_MARK= "Improvement Mark",
        SI_AC_DEFAULT_CATEGORY_FCOIS_IMPROVEMENT_MARK_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_INTRICATE_MARK= "Intricate Mark",
        SI_AC_DEFAULT_CATEGORY_FCOIS_INTRICATE_MARK_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_LOCK_MARK= "Lock Mark",
        SI_AC_DEFAULT_CATEGORY_FCOIS_LOCK_MARK_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_RESEARCH_MARK= "Research Mark",
        SI_AC_DEFAULT_CATEGORY_FCOIS_RESEARCH_MARK_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_SELL_AT_GUILDSTORE_MARK= "Sell At GuildStore Mark",
        SI_AC_DEFAULT_CATEGORY_FCOIS_SELL_AT_GUILDSTORE_MARK_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_SELL_MARK= "Sell Mark",
        SI_AC_DEFAULT_CATEGORY_FCOIS_SELL_MARK_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_ALL_MARK= "All Marks",
        SI_AC_DEFAULT_CATEGORY_FCOIS_ALL_MARK_DESC= "",
    },
    
    fr = {
        SI_AC_DEFAULT_CATEGORY_FCOIS_DECONSTRUCTION_MARK= "Marqueur de démontage",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DECONSTRUCTION_MARK_DESC= "Démontage",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_1= "Dynamique 1",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_1_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_2= "Dynamique 2",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_2_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_3= "Dynamique 3",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_3_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_4= "Dynamique 4",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_4_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_5= "Dynamique 5",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_5_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_6= "Dynamique 6",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_6_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_7= "Dynamique 7",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_7_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_8= "Dynamique 8",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_8_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_9= "Dynamique 9",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_9_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_10= "Dynamique 10",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_10_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_11= "Dynamique 11",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_11_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_12= "Dynamique 12",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_12_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_13= "Dynamique 13",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_13_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_14= "Dynamique 14",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_14_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_15= "Dynamique 15",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_15_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_16= "Dynamique 16",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_16_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_17= "Dynamique 17",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_17_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_18= "Dynamique 18",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_18_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_19= "Dynamique 19",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_19_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_20= "Dynamique 20",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_20_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_21= "Dynamique 21",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_21_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_22= "Dynamique 22",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_22_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_23= "Dynamique 23",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_23_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_24= "Dynamique 24",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_24_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_25= "Dynamique 25",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_25_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_26= "Dynamique 26",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_26_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_27= "Dynamique 27",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_27_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_28= "Dynamique 28",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_28_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_29= "Dynamique 29",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_29_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_30= "Dynamique 30",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_30_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_1= "Équipement 1",
        SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_1_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_2= "Équipement 2",
        SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_2_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_3= "Équipement 3",
        SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_3_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_4= "Équipement 4",
        SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_4_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_5= "Équipement 5",
        SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_5_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_IMPROVEMENT_MARK= "Marqueur d'amélioration",
        SI_AC_DEFAULT_CATEGORY_FCOIS_IMPROVEMENT_MARK_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_INTRICATE_MARK= "Marqueur complexe",
        SI_AC_DEFAULT_CATEGORY_FCOIS_INTRICATE_MARK_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_LOCK_MARK= "Marqueur de verrouillage",
        SI_AC_DEFAULT_CATEGORY_FCOIS_LOCK_MARK_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_RESEARCH_MARK= "Marqueur de recherche",
        SI_AC_DEFAULT_CATEGORY_FCOIS_RESEARCH_MARK_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_SELL_AT_GUILDSTORE_MARK= "Marqueur de vente à la boutique de guilde",
        SI_AC_DEFAULT_CATEGORY_FCOIS_SELL_AT_GUILDSTORE_MARK_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_SELL_MARK= "Marqueur de vente",
        SI_AC_DEFAULT_CATEGORY_FCOIS_SELL_MARK_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_ALL_MARK= "Tous les marqueurs",
        SI_AC_DEFAULT_CATEGORY_FCOIS_ALL_MARK_DESC= "",
    },
    
    zh = {
        SI_AC_DEFAULT_CATEGORY_FCOIS_DECONSTRUCTION_MARK= "分解标记",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DECONSTRUCTION_MARK_DESC= "用于分解",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_1= "动态 1",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_1_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_2= "动态 2",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_2_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_3= "动态 3",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_3_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_4= "动态 4",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_4_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_5= "动态 5",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_5_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_6= "动态 6",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_6_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_7= "动态 7",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_7_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_8= "动态 8",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_8_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_9= "动态 9",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_9_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_10= "动态 10",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_10_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_11= "动态 11",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_11_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_12= "动态 12",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_12_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_13= "动态 13",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_13_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_14= "动态 14",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_14_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_15= "动态 15",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_15_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_16= "动态 16",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_16_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_17= "动态 17",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_17_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_18= "动态 18",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_18_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_19= "动态 19",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_19_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_20= "动态 20",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_20_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_21= "动态 21",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_21_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_22= "动态 22",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_22_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_23= "动态 23",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_23_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_24= "动态 24",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_24_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_25= "动态 25",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_25_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_26= "动态 26",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_26_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_27= "动态 27",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_27_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_28= "动态 28",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_28_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_29= "动态 29",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_29_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_30= "动态 30",
        SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_30_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_1= "装备 1",
        SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_1_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_2= "装备 2",
        SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_2_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_3= "装备 3",
        SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_3_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_4= "装备 4",
        SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_4_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_5= "装备 5",
        SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_5_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_IMPROVEMENT_MARK= "提升品质标记",
        SI_AC_DEFAULT_CATEGORY_FCOIS_IMPROVEMENT_MARK_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_INTRICATE_MARK= "可分解标记",
        SI_AC_DEFAULT_CATEGORY_FCOIS_INTRICATE_MARK_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_LOCK_MARK= "锁定标记",
        SI_AC_DEFAULT_CATEGORY_FCOIS_LOCK_MARK_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_RESEARCH_MARK= "可研究标记",
        SI_AC_DEFAULT_CATEGORY_FCOIS_RESEARCH_MARK_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_SELL_AT_GUILDSTORE_MARK= "在公会商店出售标记",
        SI_AC_DEFAULT_CATEGORY_FCOIS_SELL_AT_GUILDSTORE_MARK_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_SELL_MARK= "出售标记",
        SI_AC_DEFAULT_CATEGORY_FCOIS_SELL_MARK_DESC= "",
        SI_AC_DEFAULT_CATEGORY_FCOIS_ALL_MARK= "所有标记",
        SI_AC_DEFAULT_CATEGORY_FCOIS_ALL_MARK_DESC= "",
    },
}
-- must load strings before we define the rules that use them
AutoCategory.LoadLanguage(localization_strings,"en")

local L = GetString

AutoCategory_FCOIS.predefinedRules = {
    {
        ["tag"] = "FCOIS",
        ["rule"] = "ismarked(\"deconstruction\")",
        ["description"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DECONSTRUCTION_MARK_DESC),
        ["name"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DECONSTRUCTION_MARK),
    },
    {
        ["tag"] = "FCOIS",
        ["rule"] = "fco_ismarked(\"dynamic_1\")",
        ["name"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_1),
        ["description"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_1_DESC),
    },
    {
        ["tag"] = "FCOIS",
        ["name"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_2),
        ["description"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_2_DESC),
        ["rule"] = "fco_ismarked(\"dynamic_2\")",
    },
    {
        ["tag"] = "FCOIS",
        ["name"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_3),
        ["description"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_3_DESC),
        ["rule"] = "fco_ismarked(\"dynamic_3\")",
    },
    {
        ["tag"] = "FCOIS",
        ["name"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_4),
        ["description"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_4_DESC),
        ["rule"] = "fco_ismarked(\"dynamic_4\")",
    },
    {
        ["tag"] = "FCOIS",
        ["name"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_5),
        ["description"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_5_DESC),
        ["rule"] = "fco_ismarked(\"dynamic_5\")",
    },
    {
        ["tag"] = "FCOIS",
        ["name"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_6),
        ["description"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_6_DESC),
        ["rule"] = "fco_ismarked(\"dynamic_6\")",
    },
    {
        ["tag"] = "FCOIS",
        ["name"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_7),
        ["description"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_7_DESC),
        ["rule"] = "fco_ismarked(\"dynamic_7\")",
    },
    {
        ["tag"] = "FCOIS",
        ["name"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_8),
        ["description"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_8_DESC),
        ["rule"] = "fco_ismarked(\"dynamic_8\")",
    },
    {
        ["tag"] = "FCOIS",
        ["name"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_9),
        ["description"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_9_DESC),
        ["rule"] = "fco_ismarked(\"dynamic_9\")",
    },
    {
        ["tag"] = "FCOIS",
        ["name"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_10),
        ["description"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_10_DESC),
        ["rule"] = "fco_ismarked(\"dynamic_10\")",
    },
    {
        ["tag"] = "FCOIS",
        ["rule"] = "fco_ismarked(\"gear_1\")",
        ["name"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_1),
        ["description"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_1_DESC),
    },
    {
        ["tag"] = "FCOIS",
        ["rule"] = "fco_ismarked(\"gear_2\")", 
        ["name"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_2),
        ["description"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_2_DESC),
    },
    {
        ["tag"] = "FCOIS",
        ["rule"] = "fco_ismarked(\"gear_3\")", 
        ["name"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_3),
        ["description"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_3_DESC),
    },
    {
        ["tag"] = "FCOIS",
        ["rule"] = "fco_ismarked(\"gear_4\")", 
        ["name"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_4),
        ["description"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_4_DESC),
    },
    {
        ["tag"] = "FCOIS",
        ["rule"] = "fco_ismarked(\"gear_5\")", 
        ["name"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_5),
        ["description"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_5_DESC),
    },
    {
        ["tag"] = "FCOIS",
        ["rule"] = "fco_ismarked(\"improvement\")",
        ["description"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_IMPROVEMENT_MARK_DESC),
        ["name"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_IMPROVEMENT_MARK),
    },
    {
        ["tag"] = "FCOIS",
        ["rule"] = "fco_ismarked(\"intricate\")",
        ["description"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_INTRICATE_MARK_DESC),
        ["name"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_INTRICATE_MARK),
    },
    {
        ["tag"] = "FCOIS",
        ["rule"] = "fco_ismarked(\"research\")",
        ["description"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_RESEARCH_MARK_DESC),
        ["name"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_RESEARCH_MARK),
    },
    {
        ["tag"] = "FCOIS",
        ["rule"] = "fco_ismarked(\"sell_at_guildstore\")",
        ["description"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_SELL_AT_GUILDSTORE_MARK_DESC),
        ["name"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_SELL_AT_GUILDSTORE_MARK),
    },
    {
        ["tag"] = "FCOIS",
        ["rule"] = "fco_ismarked(\"sell\")",
        ["description"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_SELL_MARK_DESC),
        ["name"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_SELL_MARK),
    },
    {
        ["tag"] = "FCOIS",
        ["rule"] = "fco_ismarked(\"lock\")",
        ["description"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_LOCK_MARK_DESC),
        ["name"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_LOCK_MARK),
    },
    {
        ["tag"] = "FCOIS",
        ["rule"] = "fco_ismarked()",
        ["description"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_ALL_MARK_DESC),
        ["name"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_ALL_MARK),
    },
    {
        ["tag"] = "FCOIS",
        ["name"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_11),
        ["description"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_11_DESC),
        ["rule"] = "fco_ismarked(\"dynamic_11\")",
    },
    {
        ["tag"] = "FCOIS",
        ["name"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_12),
        ["description"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_12_DESC),
        ["rule"] = "fco_ismarked(\"dynamic_12\")",
    },
    {
        ["tag"] = "FCOIS",
        ["name"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_13),
        ["description"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_13_DESC),
        ["rule"] = "fco_ismarked(\"dynamic_13\")",
    },
    {
        ["tag"] = "FCOIS",
        ["name"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_14),
        ["description"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_14_DESC),
        ["rule"] = "fco_ismarked(\"dynamic_14\")",
    },
    {
        ["tag"] = "FCOIS",
        ["name"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_15),
        ["description"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_15_DESC),
        ["rule"] = "fco_ismarked(\"dynamic_15\")",
    },
    {
        ["tag"] = "FCOIS",
        ["name"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_16),
        ["description"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_16_DESC),
        ["rule"] = "fco_ismarked(\"dynamic_16\")",
    },
    {
        ["tag"] = "FCOIS",
        ["name"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_17),
        ["description"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_17_DESC),
        ["rule"] = "fco_ismarked(\"dynamic_17\")",
    },
    {
        ["tag"] = "FCOIS",
        ["name"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_18),
        ["description"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_18_DESC),
        ["rule"] = "fco_ismarked(\"dynamic_18\")",
    },
    {
        ["tag"] = "FCOIS",
        ["name"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_19),
        ["description"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_19_DESC),
        ["rule"] = "fco_ismarked(\"dynamic_19\")",
    },
    {
        ["tag"] = "FCOIS",
        ["name"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_20),
        ["description"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_20_DESC),
        ["rule"] = "fco_ismarked(\"dynamic_20\")",
    },
    {
        ["tag"] = "FCOIS",
        ["name"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_21),
        ["description"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_21_DESC),
        ["rule"] = "fco_ismarked(\"dynamic_21\")",
    },
    {
        ["tag"] = "FCOIS",
        ["name"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_22),
        ["description"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_22_DESC),
        ["rule"] = "fco_ismarked(\"dynamic_22\")",
    },
    {
        ["tag"] = "FCOIS",
        ["name"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_23),
        ["description"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_23_DESC),
        ["rule"] = "fco_ismarked(\"dynamic_23\")",
    },
    {
        ["tag"] = "FCOIS",
        ["name"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_24),
        ["description"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_24_DESC),
        ["rule"] = "fco_ismarked(\"dynamic_24\")",
    },
    {
        ["tag"] = "FCOIS",
        ["name"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_25),
        ["description"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_25_DESC),
        ["rule"] = "fco_ismarked(\"dynamic_25\")",
    },
    {
        ["tag"] = "FCOIS",
        ["name"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_26),
        ["description"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_26_DESC),
        ["rule"] = "fco_ismarked(\"dynamic_26\")",
    },
    {
        ["tag"] = "FCOIS",
        ["name"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_27),
        ["description"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_27_DESC),
        ["rule"] = "fco_ismarked(\"dynamic_27\")",
    },
    {
        ["tag"] = "FCOIS",
        ["name"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_28),
        ["description"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_28_DESC),
        ["rule"] = "fco_ismarked(\"dynamic_28\")",
    },
    {
        ["tag"] = "FCOIS",
        ["name"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_29),
        ["description"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_29_DESC),
        ["rule"] = "fco_ismarked(\"dynamic_29\")",
    },
    {
        ["tag"] = "FCOIS",
        ["name"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_30),
        ["description"] = L(SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_30_DESC),
        ["rule"] = "fco_ismarked(\"dynamic_30\")",
    },
}

-- separated out to allow for offline testing since localization_strings is local
function AutoCategory_FCOIS.LoadLanguage(defaultlang)
    if defaultlang == nil then defaultlang = "en" end
    
    -- initialize strings
    AutoCategory.LoadLanguage(localization_strings,defaultlang)
end

--Initialize plugin for Auto Category - FCOIS
function AutoCategory_FCOIS.Initialize()
    if FCOIS then
        AutoCat_Logger():Info("Initializing FCOIS plugin integration")
        
        -- initialize strings
        AutoCategory_FCOIS.LoadLanguage("en")

        -- load supporting rule functions
        AutoCategory.AddRuleFunc("ismarked", AutoCategory_FCOIS.RuleFunc.IsMarked)
        AutoCategory.AddRuleFunc("fco_ismarked", AutoCategory_FCOIS.RuleFunc.IsMarked)
        AutoCategory.AddRuleFunc("fco_isprotected", 
            AutoCategory_FCOIS.RuleFunc.IsFCOISProtected)
        AutoCategory.AddRuleFunc("isfcoisprotected",
            AutoCategory_FCOIS.RuleFunc.IsFCOISProtected)
        AutoCategory.AddRuleFunc("fco_isgear", AutoCategory_FCOIS.RuleFunc.IsFCOISGear)
        AutoCategory.AddRuleFunc("isfcoisgear", AutoCategory_FCOIS.RuleFunc.IsFCOISGear)
        return
    end

    -- assign dummy rule functions
    AutoCategory.AddRuleFunc("fco_ismarked", AutoCategory.dummyRuleFunc)
    AutoCategory.AddRuleFunc("fco_isprotected", AutoCategory.dummyRuleFunc)
    AutoCategory.AddRuleFunc("fco_isgear", AutoCategory.dummyRuleFunc)
    AutoCategory.AddRuleFunc("ismarked", AutoCategory.dummyRuleFunc)
    AutoCategory.AddRuleFunc("isfcoisprotected", AutoCategory.dummyRuleFunc)
    AutoCategory.AddRuleFunc("isfcoisgear", AutoCategory.dummyRuleFunc)
    return

end

local markedTypeMap = {
	["lock"] = FCOIS_CON_ICON_LOCK,
	["gear_1"] = FCOIS_CON_ICON_GEAR_1,
	["research"] = FCOIS_CON_ICON_RESEARCH,
	["gear_2"] = FCOIS_CON_ICON_GEAR_2,
	["sell"] = FCOIS_CON_ICON_SELL,
	["gear_3"] = FCOIS_CON_ICON_GEAR_3,
	["gear_4"] = FCOIS_CON_ICON_GEAR_4,
	["gear_5"] = FCOIS_CON_ICON_GEAR_5,
	["deconstruction"] = FCOIS_CON_ICON_DECONSTRUCTION,
	["improvement"] = FCOIS_CON_ICON_IMPROVEMENT,
	["sell_at_guildstore"] = FCOIS_CON_ICON_SELL_AT_GUILDSTORE,
	["intricate"] = FCOIS_CON_ICON_INTRICATE,
	["dynamic_1"] = FCOIS_CON_ICON_DYNAMIC_1,
	["dynamic_2"] = FCOIS_CON_ICON_DYNAMIC_2,
	["dynamic_3"] = FCOIS_CON_ICON_DYNAMIC_3,
	["dynamic_4"] = FCOIS_CON_ICON_DYNAMIC_4,
	["dynamic_5"] = FCOIS_CON_ICON_DYNAMIC_5,
	["dynamic_6"] = FCOIS_CON_ICON_DYNAMIC_6,
	["dynamic_7"] = FCOIS_CON_ICON_DYNAMIC_7,
	["dynamic_8"] = FCOIS_CON_ICON_DYNAMIC_8,
	["dynamic_9"] = FCOIS_CON_ICON_DYNAMIC_9,
	["dynamic_10"] = FCOIS_CON_ICON_DYNAMIC_10,
	["dynamic_11"] = FCOIS_CON_ICON_DYNAMIC_11,
	["dynamic_12"] = FCOIS_CON_ICON_DYNAMIC_12,
	["dynamic_13"] = FCOIS_CON_ICON_DYNAMIC_13,
	["dynamic_14"] = FCOIS_CON_ICON_DYNAMIC_14,
	["dynamic_15"] = FCOIS_CON_ICON_DYNAMIC_15,
	["dynamic_16"] = FCOIS_CON_ICON_DYNAMIC_16,
	["dynamic_17"] = FCOIS_CON_ICON_DYNAMIC_17,
	["dynamic_18"] = FCOIS_CON_ICON_DYNAMIC_18,
	["dynamic_19"] = FCOIS_CON_ICON_DYNAMIC_19,
	["dynamic_20"] = FCOIS_CON_ICON_DYNAMIC_20,
	["dynamic_21"] = FCOIS_CON_ICON_DYNAMIC_21,
	["dynamic_22"] = FCOIS_CON_ICON_DYNAMIC_22,
	["dynamic_23"] = FCOIS_CON_ICON_DYNAMIC_23,
	["dynamic_24"] = FCOIS_CON_ICON_DYNAMIC_24,
	["dynamic_25"] = FCOIS_CON_ICON_DYNAMIC_25,
	["dynamic_26"] = FCOIS_CON_ICON_DYNAMIC_26,
	["dynamic_27"] = FCOIS_CON_ICON_DYNAMIC_27,
	["dynamic_28"] = FCOIS_CON_ICON_DYNAMIC_28,
	["dynamic_29"] = FCOIS_CON_ICON_DYNAMIC_29,
	["dynamic_30"] = FCOIS_CON_ICON_DYNAMIC_30,
}

local defaultIdTextId
local function GetFCOISIconText( iconId )
	if not defaultIdTextId then
		defaultIdTextId = { 
			[FCOIS_CON_ICON_LOCK] = SI_AC_DEFAULT_CATEGORY_FCOIS_LOCK_MARK,
			[FCOIS_CON_ICON_GEAR_1] = SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_1,
			[FCOIS_CON_ICON_RESEARCH] = SI_AC_DEFAULT_CATEGORY_FCOIS_RESEARCH_MARK,
			[FCOIS_CON_ICON_GEAR_2] = SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_2,
			[FCOIS_CON_ICON_SELL] = SI_AC_DEFAULT_CATEGORY_FCOIS_SELL_MARK,
			[FCOIS_CON_ICON_GEAR_3] = SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_3,
			[FCOIS_CON_ICON_GEAR_4] = SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_4,
			[FCOIS_CON_ICON_GEAR_5] = SI_AC_DEFAULT_CATEGORY_FCOIS_GEAR_5,
			[FCOIS_CON_ICON_DECONSTRUCTION] = SI_AC_DEFAULT_CATEGORY_FCOIS_DECONSTRUCTION_MARK,
			[FCOIS_CON_ICON_IMPROVEMENT] = SI_AC_DEFAULT_CATEGORY_FCOIS_IMPROVEMENT_MARK,
			[FCOIS_CON_ICON_SELL_AT_GUILDSTORE] = SI_AC_DEFAULT_CATEGORY_FCOIS_SELL_AT_GUILDSTORE_MARK,
			[FCOIS_CON_ICON_INTRICATE] = SI_AC_DEFAULT_CATEGORY_FCOIS_INTRICATE_MARK,
			[FCOIS_CON_ICON_DYNAMIC_1] = SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_1,
			[FCOIS_CON_ICON_DYNAMIC_2] = SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_2,
			[FCOIS_CON_ICON_DYNAMIC_3] = SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_3,
			[FCOIS_CON_ICON_DYNAMIC_4] = SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_4,
			[FCOIS_CON_ICON_DYNAMIC_5] = SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_5,
			[FCOIS_CON_ICON_DYNAMIC_6] = SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_6,
			[FCOIS_CON_ICON_DYNAMIC_7] = SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_7,
			[FCOIS_CON_ICON_DYNAMIC_8] = SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_8,
			[FCOIS_CON_ICON_DYNAMIC_9] = SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_9,
			[FCOIS_CON_ICON_DYNAMIC_10] = SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_10,
			[FCOIS_CON_ICON_DYNAMIC_11] = SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_11,
			[FCOIS_CON_ICON_DYNAMIC_12] = SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_12,
			[FCOIS_CON_ICON_DYNAMIC_13] = SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_13,
			[FCOIS_CON_ICON_DYNAMIC_14] = SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_14,
			[FCOIS_CON_ICON_DYNAMIC_15] = SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_15,
			[FCOIS_CON_ICON_DYNAMIC_16] = SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_16,
			[FCOIS_CON_ICON_DYNAMIC_17] = SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_17,
			[FCOIS_CON_ICON_DYNAMIC_18] = SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_18,
			[FCOIS_CON_ICON_DYNAMIC_19] = SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_19,
			[FCOIS_CON_ICON_DYNAMIC_20] = SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_20,
			[FCOIS_CON_ICON_DYNAMIC_21] = SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_21,
			[FCOIS_CON_ICON_DYNAMIC_22] = SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_22,
			[FCOIS_CON_ICON_DYNAMIC_23] = SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_23,
			[FCOIS_CON_ICON_DYNAMIC_24] = SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_24,
			[FCOIS_CON_ICON_DYNAMIC_25] = SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_25,
			[FCOIS_CON_ICON_DYNAMIC_26] = SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_26,
			[FCOIS_CON_ICON_DYNAMIC_27] = SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_27,
			[FCOIS_CON_ICON_DYNAMIC_28] = SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_28,
			[FCOIS_CON_ICON_DYNAMIC_29] = SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_29,
			[FCOIS_CON_ICON_DYNAMIC_30] = SI_AC_DEFAULT_CATEGORY_FCOIS_DYNAMIC_30,
		}
	end
	local stringId = defaultIdTextId[iconId]
	if stringId ~= nil then
		local iconText = FCOIS.GetIconText( iconId )
		if iconText ~= nil then
			return iconText 
		end
	end
	return ""
end

-- Implement fco_ismarked() check function for FCOIS
function AutoCategory_FCOIS.RuleFunc.IsMarked( ... )
	local fn = "fco_ismarked"
	if FCOIS == nil then
		return false
	end
	local ac = select( '#', ... ) 
	local checkIconIds = {}
	local additionalName = ""
	for ax = 1, ac do

		local arg = select( ax, ... )

		if arg then
            local t_arg = type(arg)
            if t_arg == "number" then
                table.insert(checkIconIds, arg)

            elseif t_arg == "string" then
                local v = markedTypeMap[string.lower( arg )]
                if v then
                    table.insert(checkIconIds, v)
                end
            else
                error( string.format("error: %s(): argument is error." , fn ) )
            end
		end

	end
	
	if #checkIconIds ~= 0 then  

		for i = 1, #checkIconIds do
			local v = checkIconIds[i]
			local iconText = GetFCOISIconText(v)
            if iconText and iconText ~= "" then
				additionalName = additionalName .. iconText
				if i ~= #checkIconIds then
					additionalName = additionalName .. ", "
				end
			end
		end
    end
    

	if additionalName ~= "" then
		AutoCategory.AdditionCategoryName = additionalName
	end

	if #checkIconIds > 0 then
		return FCOIS.IsMarked(AutoCategory.checkingItemBagId, AutoCategory.checkingItemSlotIndex, checkIconIds)

	else
		return FCOIS.IsMarked(AutoCategory.checkingItemBagId, AutoCategory.checkingItemSlotIndex, -1)
	end
end

-- Implement fco_isprotected() check function for FCOIS
function AutoCategory_FCOIS.RuleFunc.IsFCOISProtected( ... )
	local fn = "fco_isprotected"
	if FCOIS == nil then
		return false
	end
	
	return FCOIS.IsLocked(AutoCategory.checkingItemBagId, AutoCategory.checkingItemSlotIndex)
end

-- Implement fco_isgear() check function for FCOIS
function AutoCategory_FCOIS.RuleFunc.IsFCOISGear( ... )
	local fn = "fco_isgear"
	if FCOIS == nil or FCOIS.IsGear == nil then
		return false
	end
	
	return FCOIS.IsGear(AutoCategory.checkingItemBagId, AutoCategory.checkingItemSlotIndex)
end

AutoCategory.RegisterPlugin("FCOIS", AutoCategory_FCOIS.Initialize, AutoCategory_FCOIS.predefinedRules)

