local FrostSeekLight = _G.FrostSeekLight

local STRINGS = {
    ["addon_name"] = "FrostSeekLight",
    ["version"] = "Version",
    ["enabled"] = "Enabled",
    ["disabled"] = "Disabled",
    ["select"] = "Select",
    ["deselect"] = "Deselect",
    ["settings"] = "Settings",
    ["close"] = "Close",
    ["save"] = "Save",
    ["cancel"] = "Cancel",
    ["reset"] = "Reset",
    ["clear"] = "Clear",
    ["search"] = "Search",
    ["search_mode_label"] = "Mode:",
    ["refresh"] = "Refresh",
    ["loading"] = "Loading...",
    ["none"] = "None",
    ["yes"] = "Yes",
    ["no"] = "No",
    ["on"] = "On",
    ["off"] = "Off",
    ["lfg_title"] = "LFG System",
    ["lfg_disable_popups"] = "Disable Popups",
    ["lfg_silent_notifications"] = "Silent Notifications",
    ["lfg_no_alerts_group"] = "No Alerts in Group",
    ["lfg_no_alerts_combat"] = "No Alerts in Combat",
    ["lfg_popup_duration"] = "Popup Duration",
    ["lfg_popup_duration_desc"] = "How long popups stay visible (seconds)",
    ["lfg_popup_cooldown"] = "Popup Cooldown",
    ["lfg_popup_cooldown_desc"] = "Time between identical popups (seconds)",
    ["lfg_max_popups"] = "Max Popups",
    ["lfg_max_popups_desc"] = "Maximum number of popups shown at once",
    ["lfg_role"] = "Role",
    ["lfg_no_role"] = "No Role",
    ["lfg_my_role"] = "My Role",
    ["lfg_filter_words"] = "Filter Words",
    ["lfg_custom_filter"] = "Custom Filter Words",

    ["popup_whisper"] = "Whisper",
    ["popup_mute"] = "Mute",
    ["popup_muted"] = "Muted %s for 30 minutes",
    ["popup_whisper_sent"] = "Whisper sent to %s",
    ["popup_invite"] = "Invite",

    ["cat_dungeon"] = "Dungeon",
    ["cat_raid"] = "Raid",
    ["cat_world_boss"] = "World Boss",
    ["cat_pvp"] = "PvP",
    ["cat_manastorm"] = "Manastorm",
    ["cat_keystone"] = "Keystone",
    ["cat_misc"] = "Misc",
    ["cat_quest"] = "Quest",
    ["cat_all"] = "All",

    ["diff_normal"] = "N",
    ["diff_heroic"] = "HC",
    ["diff_mythic"] = "M",
    ["diff_ascended"] = "Asc",
    ["diff_trial"] = "Trial",
    ["diff_ranked"] = "Ranked",

    ["lfm_title"] = "LFM System",
    ["lfm_publish"] = "Publish to FrostNet",
    ["lfm_auto_spam"] = "Auto Spam",
    ["lfm_spam_interval"] = "Spam Interval",
    ["lfm_custom_message"] = "Custom Message",

    ["listings_title"] = "Listings",
    ["listings_browse"] = "Browse",
    ["listings_my_listing"] = "My Listing",
    ["listings_applicants"] = "Applicants",
    ["listings_apply"] = "Apply",
    ["listings_withdraw"] = "Withdraw",
    ["listings_accept"] = "Accept",
    ["listings_decline"] = "Decline",
    ["listings_new_applied"] = "New %s applied",
    ["listings_accepted"] = "%s has been accepted",
    ["listings_declined"] = "%s has been declined",
    ["listings_applied_for"] = "%s applied for %s",
    ["listings_disable_app_popups"] = "Disable Applicant Popups",
    ["app_new_applied"] = "New applicant",
    ["app_level"] = "Lv",
    ["app_note"] = "Note",

    ["frostnet_title"] = "FrostNet",
    ["frostnet_connected"] = "Connected to channel %s",
    ["frostnet_disconnected"] = "Disconnected from channel %s",
    ["frostnet_cannot_reach"] = "Cannot reach channel %s",
    ["frostnet_published"] = "Group published to channel %s",
    ["frostnet_no_echo"] = "No loopback echo received",
    ["frostnet_not_connected"] = "Channel not connected yet",
    ["frostnet_publish_deferred"] = "Group publish deferred",
    ["frostnet_new_version"] = "A newer version (v%s) is available! Update at curseforge.com",

    ["profile_title"] = "Profile",
    ["profile_role"] = "Role",
    ["profile_spec"] = "Spec",
    ["profile_spec_secondary"] = "Spec / Secondary Role",
    ["profile_discord"] = "Discord",
    ["profile_discord_ready"] = "Discord Ready",
    ["profile_discord_ready_yes"] = "Yes",
    ["profile_discord_ready_no"] = "No",
    ["profile_note"] = "Note",
    ["profile_application_notes"] = "Application Notes",
    ["profile_auto_fill"] = "Auto Fill Stats",
    ["profile_your_profile"] = "Your Profile",
    ["profile_preview"] = "Profile Preview",
    ["profile_voice_url_inline"] = "Voice URL  (Discord/TS — auto-attached to your listings)",
    ["options_title"] = "Options",
    ["options_general"] = "General",
    ["options_lfg"] = "LFG System",
    ["options_frostnet"] = "FrostNet",
    ["options_profile"] = "Profile",
    ["options_popup_categories"] = "Popup Categories",
    ["options_popup_mode_filter"] = "Popup Mode Filter",
    ["options_popup_mode_filter_desc"] = "Show popups only for messages of this mode (All / LFG / LFM)",
    ["options_popup_show_lfg"] = "Show LFG Popups",
    ["options_popup_show_lfg_desc"] = "Display popup alerts for LFG messages from players looking for a group to join",
    ["options_popup_show_lfm"] = "Show LFM Popups",
    ["options_popup_show_lfm_desc"] = "Display popup alerts for LFM messages from players forming a raid or group and looking for members",
    ["popup_mute_boss"] = "Mute Boss",
    ["popup_mute_boss_desc"] = "Disable popups for this specific world boss until you re-enable it in the Activity Filter tab. Useful for bosses with weekly lockouts that you have already completed.",
    ["popup_boss_muted"] = "Popups for world boss '%s' have been disabled. Re-enable it in Options > Activity Filter.",
    ["popup_anchor_unlocked"] = "Popup anchor unlocked. Drag the highlighted box to position popups, then /fslpopup lock to save.",
    ["popup_anchor_locked"] = "Popup anchor locked and saved.",
    ["popup_anchor_reset"] = "Popup anchor reset to default (top-center).",
    ["popup_anchor_drag_hint"] = "Hold Shift and drag any popup to move it instantly.",
    ["options_popup_anchor"] = "Popup Anchor Position",
    ["options_popup_anchor_desc"] = "Set where LFG and FrostNet popup alerts appear on screen. Click 'Unlock Popup Anchor' to open a visual editor with draggable demo boxes for both LFG and FrostNet popups, then click Save. You can also hold Shift and drag any live popup to move it instantly.",
    ["options_popup_anchor_unlock"] = "Unlock Popup Anchor",
    ["options_popup_anchor_reset"] = "Reset to Default",
    ["options_popup_show_ranked"] = "Show PvP Ranked Tag",
    ["options_sound"] = "Sound",

    ["presence_online"] = "%d users online",
    ["presence_offline"] = "No users online",
    ["presence_user_tooltip"] = "FrostNet User",
    ["presence_sort"] = "Sort",
    ["presence_sort_name"] = "Name",
    ["presence_sort_guild"] = "Guild",
    ["presence_sort_zone"] = "Zone",
    ["presence_sort_seen"] = "Seen",
    ["presence_guild_only"] = "Guild Only",
    ["presence_add_friend"] = "Add Friend",
    ["presence_add_favorite"] = "Add to Favorites",
    ["presence_remove_favorite"] = "Remove from Favorites",
    ["presence_favorite_online_title"] = "Favorite Online",
    ["presence_join_voice"] = "Join Voice",

    ["tooltip_left_click"] = "Left-click to open",
    ["tooltip_right_click"] = "Right-click for options",

    ["dashboard_title"] = "FrostSeekLight Dashboard",
    ["dashboard_lfg_tab"] = "LFG",
    ["dashboard_lfm_tab"] = "LFM",
    ["dashboard_listings_tab"] = "Listings",
    ["dashboard_settings_tab"] = "Settings",
    ["sound_popup"] = "Popup Sound",
    ["sound_listing"] = "Listing Sound",
    ["sound_applicant"] = "Applicant Sound",

    ["clear_all_data"] = "Clear All Data",
    ["clear_all_confirm"] = "This will reset all FrostSeekLight settings. Are you sure?",
    ["clear_all_done"] = "All FrostSeekLight data has been cleared. Please /reload.",

    ["minimap_show"] = "Show Minimap Button",
    ["minimap_hide"] = "Hide Minimap Button",

    ["item_level"] = "iLvl",
    ["level"] = "Level",
    ["class"] = "Class",
    ["enchant"] = "Enchant",

    ["role_tank"] = "Tank",
    ["role_healer"] = "Healer",
    ["role_dps"] = "DPS",
    ["role_support"] = "Support",
    ["unknown"] = "Unknown",
    ["col_player"] = "Player",
    ["col_time"] = "Time",
    ["col_type"] = "Type",
    ["col_role"] = "Role",
    ["col_dungeon"] = "Dungeon",
    ["col_message"] = "Message",
    ["col_action"] = "Action",
    ["col_activity"] = "Activity",
    ["col_leader"] = "Leader",
    ["col_status"] = "Status",
    ["label_leader"] = "Leader",
    ["label_members"] = "Members",
    ["label_voice"] = "Voice",
    ["label_loot"] = "Loot",
    ["label_note"] = "Note",
    ["label_ilvl"] = "iLvl",
    ["label_guild"] = "Guild",
    ["label_zone"] = "Zone",
    ["label_difficulty"] = "Difficulty",
    ["label_key_level"] = "Key Level",
    ["label_voice_chat"] = "Voice Chat",
    ["label_loot_method"] = "Loot Method",
    ["label_min_ilvl"] = "Min iLvl",
    ["label_max_members"] = "Max Members",
    ["label_roles_needed"] = "Roles Needed",
    ["label_type"] = "Type",
    ["label_expansion"] = "Expansion",
    ["label_activity"] = "Activity",
    ["app_pending"] = "Pending",
    ["app_accepted"] = "Accepted",
    ["app_declined"] = "Declined",
    ["app_withdrawn"] = "Withdrawn",
    ["app_expired"] = "Expired",
    ["lfg_active_recruiters"] = "Active Recruiters: %d",
    ["lfg_no_recruiters"] = "No active recruiters found",
    ["lfg_all_cleared"] = "All searches cleared",
    ["lfg_toggle"] = "LFG Toggle",
    ["lfg_enabled"] = "LFG |cff33cc33enabled|r",
    ["lfg_disabled"] = "LFG |cffff4444disabled|r",
    ["lfg_currently_enabled"] = "Currently: |cff33cc33Enabled|r",
    ["lfg_currently_disabled"] = "Currently: |cffff4444Disabled|r",
    ["lfg_click_enable"] = "Click to enable LFG radar",
    ["lfg_click_disable"] = "Click to disable LFG radar",
    ["tooltip_full_message"] = "Full Message",
    ["tooltip_time"] = "Time",
    ["tooltip_dungeon"] = "Dungeon",
    ["tooltip_category"] = "Category",
    ["tooltip_activity_filter"] = "Activity Filter",
    ["tooltip_activity_filter_desc"] = "Click to configure which dungeons\\nand raids appear in LFG",
    ["clear_all"] = "Clear All",
    ["select_all"] = "Select All",
    ["deselect_all"] = "Deselect All",
    ["toggle_all"] = "Toggle All",
    ["lfm_desc"] = "Create, edit and auto-spam LFM messages",
    ["lfm_need"] = "Need",
    ["lfm_difficulty"] = "Diff",
    ["lfm_message"] = "Message",
    ["lfm_spam"] = "Spam",
    ["lfm_every"] = "Every",
    ["lfm_channel"] = "Channel",
    ["lfm_start_spam"] = "Start Spam",
    ["lfm_stop_spam"] = "Stop Spam",
    ["lfm_send_all"] = "Send All",
    ["lfm_auto_invite"] = "Auto-Invite",
    ["lfm_auto_invite_desc"] = "(invites on whisper if iLvl/lvl >= threshold)",
    ["lfm_no_keystone"] = "No Keystone found!",
    ["lfm_no_message"] = "No message set!",
    ["lfm_no_channels"] = "No channels selected!",
    ["lfm_sent_channels"] = "Sent to %d channel(s)",
    ["lfm_send_all_tooltip"] = "Send to All Spam Channels",
    ["lfm_spam_started"] = "Auto-spam started (every %ds)",
    ["lfm_spam_stopped"] = "Auto-spam stopped",
    ["lfm_min_ilvl"] = "Min iLvl",
    ["lfm_min_level"] = "Min Lvl",
    ["lfm_auto_invite_enabled"] = "Auto-Invite enabled",
    ["lfm_auto_invite_disabled"] = "Auto-Invite disabled",
    ["listings_my_applications"] = "My Applications",
    ["listings_select_group"] = "Select a group to see details",
    ["listings_no_active_group"] = "No active group.",
    ["listings_active_groups"] = "Active groups: %d",
    ["listings_confirm_remove"] = "Are you sure you want to remove your listing for %s?",
    ["listings_clear_history"] = "Clear History",
    ["listings_clear_history_confirm"] = "Clear all non-pending application history?",
    ["listings_remove_listing"] = "Remove Listing",
    ["listings_publish_group"] = "Publish Group",
    ["listings_application_sent"] = "Application sent for %s",
    ["listings_accepted_invited"] = "Accepted and invited %s",
    ["listings_select_activity"] = "Select an activity!",
    ["listings_select_before_apply"] = "Select a group before applying",
    ["listings_cannot_apply_own"] = "You cannot apply to your own group!",
    ["listings_group_created"] = "Group created: %s",
    ["any"] = "Any",
    ["status_free"] = "Free",
    ["status_busy"] = "Busy",
    ["status_afk"] = "AFK",
    ["status_bored"] = "Bored",
    ["presence_refresh_ping"] = "Refresh Ping",
    ["presence_who_list"] = "Who List",
    ["presence_ping_sent"] = "Ping sent!",
    ["dashboard_item_level"] = "ITEM LEVEL",
    ["dashboard_gold"] = "GOLD",
    ["dashboard_online"] = "ONLINE",
    ["dashboard_lfg_activity"] = "LFG ACTIVITY",
    ["dashboard_active_recruiters"] = "ACTIVE RECRUITERS",
    ["dashboard_session"] = "Session",
    ["dashboard_today"] = "Today",
    ["options_system_settings"] = "System Settings",
    ["options_open_settings"] = "Open Settings Window",
    ["options_current_status"] = "Current Status",
    ["options_basic_config"] = "Basic addon configuration",
    ["options_enable_frostnet_desc"] = "Enable the FrostNet network (join FSK channel and communicate)",
    ["options_auto_open_desc"] = "Automatically open FrostSeekLight window when you log in",
    ["options_minimap_button_desc"] = "Show the FrostSeekLight minimap button",
    ["options_save_position_desc"] = "Remember window positions between sessions",
    ["options_debug_mode_desc"] = "Enable debug messages in chat",
    ["options_ui_scale_desc"] = "Adjust the scale of the FrostSeekLight interface (0.5 - 1.5)",
    ["options_quick_disable"] = "Quick Disable LFG + Popups",
    ["options_quick_disable_desc"] = "Same as Ctrl+Click on the minimap button: turn off BOTH the LFG radar and popup alerts at once. FrostNet and LFM stay active.",
    ["options_disable_lfg"] = "Disable LFG System",
    ["options_disable_lfg_desc"] = "Completely disable the LFG radar",
    ["options_disable_popups_desc"] = "Disable LFM alert popups",
    ["options_silent_notifications_desc"] = "Master sound switch. When enabled, ALL FrostSeekLight sounds are muted (popups, listings, applicants, network events). When disabled, each event plays its own custom sound.",
    ["options_no_alerts_group_desc"] = "Don't show alerts when in a group",
    ["options_no_alerts_combat_desc"] = "Don't show alerts when in combat",
    ["options_popup_duration_desc"] = "How long popups stay visible (seconds)",
    ["options_popup_cooldown_desc"] = "Time between identical popups (seconds)",
    ["options_max_popups_desc"] = "Maximum number of popups shown at once",
    ["options_activity_filter"] = "Activity Filter",
    ["options_activity_filter_desc"] = "Choose which dungeons, raids and activities appear in LFG messages and popups. Uncheck items you are NOT interested in.",
    ["options_custom_tags"] = "Custom Tags",
    ["options_lfm_header_desc"] = "Configure the Looking For Members system",
    ["options_auto_update_interval"] = "Auto-update Interval",
    ["options_auto_update_interval_desc"] = "Seconds between keystone list updates (0 = disable)",
    ["options_auto_spam_header_desc"] = "Auto-Spam: automatically send LFM messages on a timer",
    ["options_spam_timer"] = "Spam Timer (seconds)",
    ["options_spam_timer_desc"] = "How often to auto-send the LFM message (min 5s)",
    ["options_auto_invite_header_desc"] = "Auto-Invite: automatically invite players who whisper their iLvl",
    ["options_enable_auto_invite"] = "Enable Auto-Invite on Whisper",
    ["options_enable_auto_invite_desc"] = "When someone whispers you and their iLvl meets the minimum, auto-invite them",
    ["options_lfm_auto_stop"] = "Auto-Stop Spam Threshold",
    ["options_lfm_auto_stop_desc"] = "Auto-stop LFM spam when group reaches this many members (0 = disabled)",
    ["options_lfm"] = "LFM System",
    ["options_advanced"] = "Advanced",
    ["options_theme"] = "Theme",
    ["options_select_theme"] = "Select Theme",
    ["options_enable_sounds"] = "Enable Sounds",
    ["options_reset_position"] = "Reset Window Position",
    ["options_auto_open"] = "Auto-Open on Login",
    ["options_debug_mode"] = "Debug Mode",
    ["options_ui_scale"] = "UI Scale",
    ["options_enable_frostnet"] = "Enable FrostNet",
    ["options_whisper_on_apply"] = "Whisper Leader on Apply",
    ["options_save_position"] = "Save Window Position",
    ["options_auto_invite"] = "Auto-Invite on Whisper",
    ["options_auto_invite_min_ilvl"] = "Min iLvl for Auto-Invite",
    ["options_reset_spam_channels"] = "Reset Spam Channels",
    ["options_how_popups_work"] = "How Popup Categories Work",
    ["frostnet_connected_status"] = "Connected",
    ["frostnet_connecting"] = "Connecting...",
    ["frostnet_offline"] = "Offline",

    ["tab_browse"] = "Browse",
    ["tab_create_group"] = "Create Group",
    ["tab_my_group"] = "My Group",
    ["tab_applications"] = "Applications",
    ["tab_profile"] = "Profile",

    ["lfg_loading_info"] = "Loading player info...",
    ["lfg_label"] = "LFG:",
    ["lfg_role_label"] = "Role:",

    ["create_dungeon"] = "Dungeon",
    ["create_raid"] = "Raid",
    ["create_classic"] = "Classic",
    ["create_normal"] = "Normal",
    ["create_heroic"] = "Heroic",
    ["create_mythic"] = "Mythic",
    ["create_mythic_plus"] = "Mythic+",
    ["create_open_world"] = "Open World",
    ["create_loot_group"] = "Group Loot",
    ["create_loot_master"] = "Master Loot",
    ["create_loot_freeforall"] = "Free for All",

    ["listings_total_pending"] = "Total: %d  |  Pending: %d",
    ["lfm_send_all_channels"] = "Send to All Spam Channels",
    ["options_desc"] = "Configure all FrostSeekLight settings",
    ["options_select_theme_label"] = "Select Theme:",
    ["options_theme_reload_desc"] = "Changing theme requires a UI reload. You will be prompted to confirm.",
    ["options_lfg_status_active"] = "LFG: |cFF00FF00Active|r",
    ["options_custom_whisper"] = "Custom Whisp",
    ["options_custom_whisper_desc"] = "Customize the message sent when you click Accept in LFG",
    ["options_msg_template"] = "Message Template:",
    ["options_insert_variable"] = "Insert Variable:",
    ["options_include_in_msg"] = "Include in message:",
    ["options_preview"] = "Preview:",
    ["options_custom_keywords"] = "Custom Keywords",
    ["options_keywords_desc"] = "Add custom keywords for each category. Separate with commas.\nMessages containing these keywords will be classified into the matching category.",
    ["options_custom_disabled"] = "Custom messages disabled - Enable the checkbox above",
    ["options_icon_credit"] = "Icon by|cFF88CCFF Ernestodx|r",

    ["setup_title"] = "FrostSeekLight Setup",
    ["setup_page_1_title"] = "Welcome to FrostSeekLight",
    ["setup_page_1_desc"] = "Let's get you set up. First, choose your preferred language.",
    ["setup_page_2_title"] = "How FrostSeekLight Works",
    ["setup_page_2_body"] = "FrostSeekLight is an advanced LFG/LFM manager with FrostNet (a built-in real-time presence network).\n\n• LFG Tab: Browse and apply to groups. Popups alert you when someone is looking for your role.\n• LFM Tab: Post your own group, auto-spam channels, manage applicants.\n• FrostNet: See who's online across realms (separate from the LFG channel).\n• Options: Fine-tune everything — popups, sounds, themes, custom keywords.\n\nTip: Ctrl+Click the minimap button to quickly disable LFG + popups without opening the main window.",
    ["setup_page_3_title"] = "Your Profile",
    ["setup_page_3_desc"] = "Configure popups and sounds. Role and theme are configured in their own windows.",
    ["setup_page_4_title"] = "All Set!",
    ["setup_page_4_body"] = "Thanks for installing FrostSeekLight!\n\nIf you find bugs or have suggestions, join our Discord or open an issue on GitHub (links in the Options tab).\n\n— Ayro",
    ["setup_next"] = "Next",
    ["setup_back"] = "Back",
    ["setup_finish"] = "Finish",
    ["setup_skip"] = "Skip Setup",
    ["setup_select_role"] = "Select your role:",
    ["setup_enable_popups"] = "Enable LFG popups",
    ["setup_enable_sounds"] = "Enable sounds",
    ["setup_enable_chat_filter"] = "Enable LFG/LFM chat filter",
    ["setup_select_theme"] = "Select theme:",
    ["setup_frostnet_discord"] = "FrostNet Discord link (optional):",

    ["server_profile_auto"] = "Auto-detect (recommended)",
    ["server_profile_classic"] = "Classic WoW",
    ["server_profile_tbc"] = "The Burning Crusade",
    ["server_profile_wotlk"] = "Wrath of the Lich King",
    ["server_profile_cata"] = "Cataclysm",
    ["server_profile_mop"] = "Mists of Pandaria",
    ["server_profile_ascension"] = "Ascension (Project Ascension / CoA)",
    ["server_profile_epoch"] = "Epoch (custom 3.3.5 server)",
    ["server_profile_desc"] = "Filter LFM and FrostNet content to match your server's expansion. Ascension servers also show custom Ascension content.",
    ["options_server_profile"] = "Server Profile",
    ["options_server_profile_desc"] = "Filter LFM and FrostNet content to match your server's expansion. Ascension servers also show custom Ascension content.",

    ["options_toggle_hint"] = "Click to toggle",

    ["dashboard_frostnet_label"] = "FROSTNET",
    ["filter_all"] = "All",

    ["event_board_title"] = "Community Event Board",
    ["event_board_subtab"] = "Event Board",
    ["event_board_discovered"] = "Discovered community events",
    ["event_board_empty"] = "No events posted yet",
    ["event_board_create"] = "Create Event",
    ["event_board_post"] = "Post Event",
    ["event_board_dismiss"] = "Dismiss",
    ["event_board_filter"] = "Filter",
    ["event_board_my_events"] = "My Events",
    ["event_board_type"] = "Type",
    ["event_board_name"] = "Name",
    ["event_board_time"] = "Time",
    ["event_board_host"] = "Host",
    ["event_board_description"] = "Description",
    ["event_board_expires"] = "Expires",
    ["event_board_posted"] = "Event posted",
    ["event_board_dismissed"] = "Event dismissed",
    ["event_board_cleared"] = "All local events cleared",
    ["event_board_invalid"] = "Event requires a name",
    ["event_board_section_events"] = "Events",
    ["event_board_recent"] = "Recent",

    ["community_title"] = "Community",
    ["community_subtab_browser"] = "Guild Browser",
    ["community_subtab_recruitment"] = "Recruitment Creator",
    ["community_subtab_events"] = "Event Board",
    ["community_guilds_discovered"] = "Discovered guilds from chat messages",
    ["community_recruitment_create"] = "Create your guild recruitment message",
    ["community_clear_all"] = "Clear All",
    ["community_refresh"] = "Refresh",
    ["community_dismiss"] = "Dismiss",
    ["community_save_template"] = "Save Template",
    ["community_load_template"] = "Load Template",
    ["community_delete_template"] = "Delete Template",
    ["community_send_once"] = "Send Once",
    ["community_start_spam"] = "Start Spam",
    ["community_stop_spam"] = "Stop Spam",
    ["community_clear_events_title"] = "Clear Events",
    ["community_clear_events_msg"] = "Remove all local community events?",
    ["community_clear_guilds_title"] = "Clear Guild Database",
    ["community_clear_guilds_msg"] = "Remove all discovered guilds?",

    ["net_connected"] = "Connected to channel %s (slot %s)",
    ["net_disconnected"] = "Disconnected from channel %s, will retry...",
    ["net_no_loopback"] = "No loopback echo from server within 2s — the server may be dropping your messages. Run /fslnet to verify.",
    ["net_publish_ok"] = "Group published to channel FSK (%s)",
    ["net_publish_queued"] = "Channel not connected yet — your group is queued and will be published automatically when FSK reconnects.",
    ["net_publish_ratelimited"] = "Group publish deferred (rate-limit), will retry in ~2s.",
    ["net_listing_new"] = "New group from %s — %s%s",
    ["net_listing_full"] = "Group full, listing removed for %s",
    ["net_listing_removed"] = "Listing removed for %s",
    ["net_listing_only_one"] = "Previous listing removed (only one group allowed at a time)",
    ["net_listing_created"] = "Group created: %s",
    ["net_select_activity"] = "Select an activity!",
    ["net_select_group"] = "Select a group before applying",
    ["net_cant_apply_own"] = "You cannot apply to your own group!",
    ["net_applicant_received"] = "%s applied for %s",
    ["net_app_accepted"] = "Application accepted for %s!",
    ["net_app_declined"] = "Application declined for %s",
    ["net_app_sent"] = "Application sent for %s",
    ["net_app_withdrawn"] = "Application withdrawn for %s",
    ["net_app_accepted_invited"] = "Accepted and invited %s",
    ["net_app_declined_sent"] = "Application declined",

    ["migration_failed"] = "schema migration to v%s failed: %s",
    ["reset_warning"] = "This will WIPE all settings, listings, history, voice links.",
    ["reset_confirm_hint"] = "Type /fslreset confirm to proceed (your LFM favorite templates will be preserved).",
    ["reset_done"] = "Settings reset complete. Reload UI (/reload) for full effect.",
    ["log_empty"] = "Logger not initialised.",
    ["log_header"] = "FSLIGHT LOG (last %s entries)",
    ["log_footer"] = "==================================================",

    ["voice_join"] = "Join Voice",
    ["voice_link_set"] = "Voice link saved for %s",
    ["voice_link_cleared"] = "Voice link removed for %s",
    ["voice_link_invalid"] = "Voice link must start with https://discord.gg/ or https://discord.com/invite/",
    ["voice_no_link"] = "No voice link set for this group",
    ["voice_link_prompt"] = "Paste Discord/TeamSpeak invite URL:",
    ["voice_save"] = "Save Voice Link",
    ["voice_test"] = "Test Voice",
    ["voice_url_label"] = "Voice URL (Discord/TS)",
    ["voice_url_desc"] = "Your Discord/TS link. It will be automatically attached to your FrostNet listings.",
    ["voice_copy"] = "Copy",
    ["voice_copy_ok"] = "URL copied to clipboard",
    ["voice_select_hint"] = "CopyToClipboard not available - URL selected, press Ctrl+C",
    ["voice_popup_hint1"] = "Select the URL below and press Ctrl+C to copy,",
    ["voice_popup_hint2"] = "or click Copy to copy automatically (Retail+ only).",

    ["settings_language"] = "Language",
    ["settings_language_desc"] = "auto = follow WoW client language",
    ["settings_log_level"] = "Log Level",
    ["settings_log_level_desc"] = "Controls /fsldumplog verbosity",
    ["settings_language_changed"] = "Language changed to %s. Reload the UI to apply?",
    ["settings_reload_now"] = "Reload Now",
    ["settings_reload_later"] = "Later",
    ["settings_language_set"] = "Language set to %s",

    ["core_loaded"] = "FrostSeekLight v%s loaded!",
    ["core_modules_loaded"] = "FrostSeekLight: v%s -- All modules loaded",
    ["core_module_init_error"] = "FrostSeekLight Core: Error initializing '%s': %s",
    ["core_lfg_popups_disabled"] = "FrostSeekLight: LFG + Popups |cffff4444disabled|r",
    ["core_lfg_popups_disabled_hint"] = "FrostSeekLight: LFG + Popups |cffff4444disabled|r |cff888888(Ctrl+Click again to re-enable)|r",
    ["core_lfg_popups_enabled"] = "FrostSeekLight: LFG + Popups |cff44ff44enabled|r",
    ["core_welcome"] = "FrostSeekLight: Welcome, adventurer!",
    ["core_ping_sent"] = "FrostNet: Ping sent!",
    ["core_shared_not_loaded"] = "FrostSeekLight: Shared module not loaded!",
    ["core_class_override_set"] = "FrostSeekLight: Manual class override set to %s",
    ["core_class_override_hint"] = "Type /fslclass reset to remove the override.",
    ["core_class_override_cleared"] = "FrostSeekLight: Manual class override cleared. Using auto-detection.",
    ["core_usage_loadtemplate"] = "FrostSeekLight: Usage: /fslloadtemplate <name>",
    ["core_usage_deltemplate"] = "FrostSeekLight: Usage: /fsldeltemplate <name>",
    ["core_log_empty"] = "FrostSeekLight: Logger not initialised.",
    ["core_net_not_loaded"] = "FrostSeekLight: Network module not loaded!",
    ["core_net_tip_1"] = "Tip: ask your friends to run /fslnet too and compare ChannelId.",
    ["core_net_tip_2"] = "If your ChannelId is nil while 'Connected: true', there's a sync bug.",
    ["core_net_tip_3"] = "If your friends show 0 online users, the FSK channel is realm-locked or faction-locked.",
    ["core_reset_done"] = "FrostSeekLight: Settings reset complete. Reload UI (/reload) for full effect.",
    ["core_reset_warning"] = "FrostSeekLight: This will WIPE all settings, listings, history, voice links.",
    ["core_reset_hint"] = "Type /fslreset confirm to proceed (your LFM favorite templates will be preserved).",

    ["app_accepted_col"] = "|cff44ff44Accepted|r",
    ["app_declined_col"] = "|cffff5555Declined|r",
    ["app_expired_col"] = "|cffff8800Expired|r",
    ["app_pending_col"] = "|cffffcc00Pending|r",
    ["app_withdrawn_col"] = "|cff888888Withdrawn|r",
    ["event_board_queued"] = "Evento salvato localmente, sara' inviato quando il canale FSK-EVT sara' disponibile",
    ["lbl_default_prefix"] = "|cff888888Default:|r ",
    ["lbl_discord"] = "Discord",
    ["lbl_focus"] = "Focus",
    ["lbl_lang"] = "Lang",
    ["lbl_seen"] = "Seen",
    ["lbl_sender"] = "Sender",
    ["msg_added_favorite"] = "|cff88ccffFrostSeek:|r Added |cffb366ff",
    ["msg_all_kw_reset"] = "|cff88ccffFrostSeek:|r All custom keywords reset",
    ["msg_all_searches_cleared"] = "|cff88ccffFrostSeek LFG:|r All searches cleared",
    ["msg_apply_whisper_prefix"] = "|cff88ccffFrostSeek:|r Apply-whisper ",
    ["msg_auto_invite_disabled"] = "|cff88ccffFrostSeek LFM:|r Auto-Invite disabled",
    ["msg_auto_invite_enabled_ilvl"] = "|cff88ccffFrostSeek LFM:|r Auto-Invite enabled (min iLvl: ",
    ["msg_auto_invite_invited"] = "|cff88ccffFrostSeek Auto-Invite:|r Invited ",
    ["msg_auto_invite_rejected"] = "|cffffaa00FrostSeek Auto-Invite:|r Rejected ",
    ["msg_auto_spam_started"] = "|cff88ccffFrostSeek LFM:|r Auto-spam started (every ",
    ["msg_auto_spam_stopped"] = "|cff88ccffFrostSeek LFM:|r Auto-spam stopped",
    ["msg_auto_stop_at"] = "|cff88ccffFrostSeek LFM:|r Auto-stop spam at ",
    ["msg_auto_stop_disabled"] = "|cff88ccffFrostSeek LFM:|r Auto-stop spam disabled",
    ["msg_auto_stop_threshold_set"] = "|cff88ccffFrostSeek:|r Auto-stop threshold set to ",
    ["msg_cannot_save_no_guild"] = "|cffff5555FrostSeek:|r Cannot save template without a guild name",
    ["msg_cannot_start_no_ch"] = "|cffff0000FrostSeek LFM:|r Cannot start spam - no channels selected!",
    ["msg_cannot_start_no_msg"] = "|cffff0000FrostSeek LFM:|r Cannot start spam - no message!",
    ["msg_channel_slot"] = "|cffff0000FrostSeek LFM:|r Channel slot ",
    ["msg_community_module_loaded"] = "|cff88ccffFrostSeek Community:|r Module loaded",
    ["msg_debug_mode"] = "|cff88ccffFrostSeek:|r Debug mode ",
    ["msg_deleted_template"] = "|cff88ccffFrostSeek:|r Template eliminato '",
    ["msg_empty_recruitment_msg"] = "|cffff5555FrostSeek:|r Empty recruitment message",
    ["msg_events_requested"] = "|cff88ccffFrostSeek:|r Requested events from other players",
    ["msg_failed_send_channel"] = "|cffff0000FrostSeek LFM:|r Failed to send on channel ",
    ["msg_failed_send_on"] = "|cffff0000FrostSeek LFM:|r Failed to send on ",
    ["msg_favorites_cleared"] = "|cff88ccffFrostSeek:|r Favorites cleared",
    ["msg_favorites_header"] = "|cff88ccffFrostSeek Favorites:|r",
    ["msg_friend_request_sent_to"] = "|cff88ccffFrostSeek:|r Friend request sent to ",
    ["msg_frostnet_popup_anchor_saved"] = "|cff88ccffFrostSeek:|r FrostNet popup anchor saved. Hold |cffffcc00Shift|r and drag a popup to move it again.",
    ["msg_group_reached"] = "|cff88ccffFrostSeek Auto-Spam:|r |cffffcc00Group reached ",
    ["msg_guild_db_cleared"] = "|cff88ccffFrostSeek:|r Guild database cleared",
    ["msg_invite_sent_to"] = "|cff88ccffFrostSeek:|r Invite sent to ",
    ["msg_lfg_module_not_loaded"] = "|cffff5555FrostSeek:|r LFG module not loaded.",
    ["msg_lfg_system_initialized"] = "|cff88ccffFrostSeek LFG:|r System initialized",
    ["msg_lfg_whisper_sent_to"] = "|cff88ccffFrostSeek:|r LFG whisper sent to ",
    ["msg_lfm_sent_to"] = "|cff88ccffFrostSeek LFM:|r Sent to ",
    ["msg_lfm_warning_prefix"] = "|cffffaa00FrostSeek LFM:|r ",
    ["msg_loaded_template"] = "|cff88ccffFrostSeek:|r Template caricato '",
    ["msg_log_level_set"] = "|cff88ccffFrostSeek:|r Log level set to ",
    ["msg_min_ilvl_set"] = "|cff88ccffFrostSeek LFM:|r Auto-Invite min iLvl set to ",
    ["msg_no_channels_selected"] = "|cffff0000FrostSeek Auto-Spam:|r No channels selected!",
    ["msg_no_favorites_set"] = "|cff88ccffFrostSeek:|r No favorites set. Shift+Click a player in Presence to add.",
    ["msg_no_keystone_found"] = "|cffff0000FrostSeek LFM:|r No Keystone found!",
    ["msg_no_message_set"] = "|cffff0000FrostSeek Auto-Spam:|r No message set!",
    ["msg_no_message_to_send"] = "|cffff0000FrostSeek LFM:|r No message to send!",
    ["msg_no_saved_templates"] = "|cffffaa00FrostSeek:|r No saved templates",
    ["msg_no_sender_known"] = "|cffff5555FrostSeek:|r No sender known for this guild",
    ["msg_no_spam_channels"] = "|cffff0000FrostSeek LFM:|r No spam channels selected! Select Ch# toggles above.",
    ["msg_no_templates_to_delete"] = "|cffffaa00FrostSeek:|r No templates to delete",
    ["msg_no_voice_link_for"] = "|cffff5555No voice link for ",
    ["msg_no_voice_links"] = "|cff88ccffFrostSeek VoiceBridge:|r no links stored",
    ["msg_popup_anchor_saved"] = "|cff88ccffFrostSeek:|r Popup anchor saved. Hold |cffffcc00Shift|r and drag a popup to move it again.",
    ["msg_popup_anchors_reset"] = "|cff88ccffFrostSeek:|r Popup anchors reset to defaults.",
    ["msg_popup_anchors_saved"] = "|cff88ccffFrostSeek:|r Popup anchors saved.",
    ["msg_popup_editor_open"] = "|cff88ccffFrostSeek:|r Popup anchor editor open. Drag the demo boxes, then click |cff44ff44Save|r.",
    ["msg_recruit_sent_to"] = "|cff88ccffFrostSeek:|r Recruitment message sent to ",
    ["msg_recruit_sent_to_guild"] = "|cff88ccffFrostSeek:|r Recruitment message sent to GUILD (channel ",
    ["msg_recruit_sent_to_say"] = "|cffffaa00FrostSeek:|r Recruitment message sent to SAY (configured channel failed)",
    ["msg_recruit_spam_started"] = "|cff88ccffFrostSeek:|r Recruitment spam started (every ",
    ["msg_recruit_spam_stopped"] = "|cff88ccffFrostSeek:|r Recruitment spam stopped",
    ["msg_removed_favorite"] = "|cff88ccffFrostSeek:|r Removed |cffb366ff",
    ["msg_role_set_dps"] = "|cff88ccffFrostSeek:|r Role set to |cffff5555DPS|r. You can change it later in LFG.",
    ["msg_role_set_healer"] = "|cff88ccffFrostSeek:|r Role set to |cff44ff66Healer|r. You can change it later in LFG.",
    ["msg_role_set_tank"] = "|cff88ccffFrostSeek:|r Role set to |cff4aa3ffTank|r. You can change it later in LFG.",
    ["msg_role_set_to"] = "|cff88ccffFrostNet:|r Role set to ",
    ["msg_role_set_to_lfg"] = "|cff88ccffFrostSeek LFG:|r Role set to: ",
    ["msg_sent_to"] = "|cff88ccffFrostSeek Auto-Spam:|r Sent to ",
    ["msg_session_stats_reset"] = "|cff88ccffFrostSeek:|r Session stats reset",
    ["msg_setup_complete"] = "|cff88ccffFrostSeek:|r Setup complete! Reloading UI...",
    ["msg_setup_skipped"] = "|cff888888FrostSeek:|r Setup skipped. You can re-run it via |cff88ccff/fsetup|r.",
    ["msg_skipped_addon_channel"] = "|cffff0000FrostSeek LFM:|r Canale addon saltato '",
    ["msg_spam_channels_reset"] = "|cff88ccffFrostSeek LFM:|r Spam channels reset",
    ["msg_template_saved_as"] = "|cff88ccffFrostSeek:|r Template salvato come '",
    ["msg_templates_deletable_hdr"] = "|cff88ccffFrostSeek Templates (deletable via /fsldeltemplate <name>):|r",
    ["msg_templates_header"] = "|cff88ccffFrostSeek Templates:|r",
    ["msg_theme_apply_live"] = "|cff88ccffFrostSeek:|r Tema |cff88ccff",
    ["msg_theme_change_cancelled"] = "|cff888888FrostSeek:|r Theme change cancelled (dialog dismissed).",
    ["msg_type_reload_manual"] = "|cff88ccffFrostSeek:|r Type |cffffffff/reload|r manually to apply the theme.",
    ["msg_usage_get"] = "|cffff5555Usage:|r /fslvoice get <leaderName>",
    ["msg_usage_remove"] = "|cffff5555Usage:|r /fslvoice remove <leaderName>",
    ["msg_usage_set"] = "|cffff5555Usage:|r /fslvoice set <leaderName> <URL>",
    ["msg_use_fsloadtemplate"] = "|cff888888Use /fslloadtemplate <name> to load|r",
    ["msg_voice_link_removed_for"] = "|cff88ccffFrostSeek:|r Voice link removed for ",
    ["msg_voicebridge_not_loaded"] = "|cffff5555FrostSeek:|r VoiceBridge module not loaded.",
    ["msg_whisper_sent_to_lfg"] = "|cff88ccffFrostSeek LFG:|r Whisper sent to ",
    ["msg_whispering"] = "|cff88ccffFrostSeek:|r Whispering ",
    ["msg_window_positions_reset"] = "|cff88ccffFrostSeek:|r Window positions reset",
    ["opt_advanced_desc"] = "Advanced configuration options",
    ["opt_auto_invite_min_ilvl_long_desc"] = "Livello oggetti minimo richiesto per auto-invita. Predefinito al tuo ilvl - 5 (limitato al range della tua espansione). 0 per usare il default automatico.",
    ["opt_clear_all_data_desc"] = "Clear all saved data",
    ["opt_clear_favorites"] = "Clear Favorites",
    ["opt_clear_favorites_desc"] = "Remove all favorite players",
    ["opt_enable_popups"] = "Enable Popups",
    ["opt_enable_popups_desc"] = "Enable popup notifications. When ON (green), popups will appear for matching LFG/LFM messages. When OFF (red), no popups will show.",
    ["opt_enable_popups_for"] = "Enable popups for:",
    ["opt_enable_popups_for_desc"] = "Show popups for all categories. Selecting a single category below will turn this OFF and enable only that one. Clicking All when individuals are selected turns them all on.",
    ["opt_enable_sounds_desc"] = "Master sound on/off toggle. Turning this off disables and greys out all the sound options below.",
    ["opt_how_popups_work_desc"] = "Hover for an explanation, or click to open a popup with the full text.",
    ["opt_kw_dungeon_desc"] = "Keywords that classify a message as a Dungeon run",
    ["opt_kw_keystone_desc"] = "Keywords that classify a message as Keystone/Mythic+",
    ["opt_kw_manastorm_desc"] = "Keywords that classify a message as Manastorm",
    ["opt_kw_misc_desc"] = "Uncategorized LFG messages",
    ["opt_kw_pvp_desc"] = "Keywords that classify a message as PvP",
    ["opt_kw_raid_desc"] = "Keywords that classify a message as a Raid",
    ["opt_kw_world_boss_desc"] = "Keywords that classify a message as a World Boss",
    ["opt_list_favorites"] = "List Favorites",
    ["opt_list_favorites_desc"] = "Print all favorite players to chat",
    ["opt_new_listing_sound"] = "New Listing Sound",
    ["opt_new_listing_sound_desc"] = "Play sound when a new LFG listing is detected",
    ["opt_popup_categories_desc"] = "Select which categories trigger popup notifications. Click a single category to switch from All to that one only; click it again to switch back to All.",
    ["opt_popups_dungeons_desc"] = "Normal and heroic dungeons",
    ["opt_popups_keystone_desc"] = "Mythic+ keystone runs",
    ["opt_popups_manastorm_desc"] = "Manastorm activities",
    ["opt_popups_pvp_desc"] = "Arena and battlegrounds",
    ["opt_popups_raids_desc"] = "All raid instances",
    ["opt_popups_world_bosses_desc"] = "Azuregos, Kazzak, Emeriss, Soggoth, etc.",
    ["opt_reset_position_desc"] = "Reset main window to default position",
    ["opt_reset_session_stats"] = "Reset Session Stats",
    ["opt_reset_session_stats_desc"] = "Reset all session counters (listings, applicants, applications, peak online)",
    ["opt_reset_spam_channels_desc"] = "Clear all selected spam channels",
    ["opt_select_theme_desc"] = "Select a color theme. Some themes may need to be unlocked...",
    ["opt_sound_applicant_desc"] = "Play sound when a new applicant is received",
    ["opt_sound_notifications_desc"] = "Configure sound notifications",
    ["opt_sound_popup_desc"] = "Play sound when a popup notification appears",
    ["opt_var_class_desc"] = "Your character class",
    ["opt_var_ilvl_desc"] = "Equipped item level",
    ["opt_var_keystone_desc"] = "Keystone auto-detected from bags",
    ["opt_var_level_desc"] = "Character level",
    ["opt_var_role_desc"] = "Selected LFG role",
    ["opt_var_spec_desc"] = "Spec / mystic enchant (formerly {ench})",
    ["options_open_profile_desc"] = "Apri il tuo profilo FrostSeekLight",
    ["popup_btn_apply_now"] = "Apply Now",
    ["popup_btn_apply_reload"] = "Apply + Reload",
    ["popup_btn_close"] = "Close",
    ["popup_role_prompt_text"] = "|cff88ccffFrostSeek:|r No LFG role is set for this character.\\\n\\\nPlease pick a role so group leaders know what to expect when you apply:",
    ["popup_theme_reload_text"] = "FrostSeekLight: Apply theme |cffffffff%s|r?\\\n\\\n|cff88ccffApply Now|r switches colors live without reload.\\\n|cff88ccffApply + Reload|r reloads the UI for a fully clean refresh.",
    ["settings_language_auto"] = "Auto-rileva",
    ["tip_apply_whisper_explain"] = "When applying to a group, also send a [FrostSeekLight] whisper to the leader.",
    ["tip_apply_whisper_useful"] = "Useful if the leader does not run FrostSeekLight; the FSK APP message alone is enough for addon users.",
    ["tip_bonus_coin_announce"] = "It rewards bonus loot and should be announced in your LFM message.",
    ["tip_bonus_coin_enable"] = "If your keystone is bonuscoin, enable this.",
    ["tip_bonus_coin_explain"] = "Bonus Coin is earned the first time you complete a keystone at a given level.",
    ["tip_category_label"] = "|cFF88CCFFCategory:|r ",
    ["tip_channel_n"] = "Channel ",
    ["tip_click_to_copy"] = "Click to copy to clipboard (or chat box if unavailable).",
    ["tip_contact_label"] = "|cff88ccffContact:|r ",
    ["tip_custom_kw_match"] = "Custom keywords you type above are matched in addition to these defaults.",
    ["tip_discord_label"] = "Discord: |cff4aa3ff",
    ["tip_dungeon_label"] = "|cFF88CCFFDungeon:|r ",
    ["tip_focus_label"] = "Focus: ",
    ["tip_full_message"] = "|cFF00FF00Full Message:|r",
    ["tip_guild_label"] = "Guild: ",
    ["tip_host_label"] = "|cff88ccffHost:|r ",
    ["tip_language_label"] = "Language: ",
    ["tip_last_recruiter"] = "Last recruiter: |cff88ccff",
    ["tip_left_click_increase"] = "Left-click: increase",
    ["tip_left_details_right_whisp"] = "|cff888888Left-click: details  |  Right-click: whisper|r",
    ["tip_looking_for_label"] = "|cFF88CCFFLooking for:|r ",
    ["tip_no_default_keywords"] = "(no default keywords)",
    ["tip_no_message_captured"] = "|cff888888No message captured|r",
    ["tip_online_now"] = "Online now: ",
    ["tip_popups_all_fire"] = "Popups fire for every category. Individual toggles are ignored.",
    ["tip_popups_all_selected"] = "ALL selected:",
    ["tip_popups_none_explain"] = "If you deselect the last remaining category, All is automatically re-enabled to keep popups from going silent.",
    ["tip_popups_none_selected"] = "None selected:",
    ["tip_popups_single_explain"] = "Clicking a single category switches OFF All and enables only that one. Click it again to switch back to All.",
    ["tip_popups_single_selected"] = "Single category selected:",
    ["tip_preview_base"] = "Preview (base):",
    ["tip_preview_custom"] = "Preview (custom):",
    ["tip_hover_categories"] = "Tip: hover the category names for a per-category description.",
    ["lfg_min_keystone"] = "Min Key:",
    ["lfg_min_keystone_desc"] = "Only show keystones at this level or higher. 0 = disabled.",
    ["options_keystone_filter"] = "Keystone Filter",
    ["options_keystone_min_level"] = "Min Keystone Level",
    ["options_keystone_min_level_desc"] = "Only show keystones at this level or higher (0 = disabled). Applied to popups and recruiters list.",
    ["options_chat_filter"] = "Chat Filter",
    ["options_chat_filter_desc"] = "Chat filter",
    ["options_chat_filter_enabled"] = "Filter Normal Channels (Channel/Yell/Say)",
    ["options_chat_filter_enabled_desc"] = "Hide LFG/LFM messages from normal chat channels. Does NOT affect Guild/Party/Raid (use the dedicated toggle below).",
    ["options_chat_filter_gpr"] = "Filter Guild/Officer/Party/Raid",
    ["options_chat_filter_gpr_desc"] = "INDEPENDENT filter from the main one: hides LFG/LFM messages from Guild, Officer, Party and Raid. Works even when the main filter is off. Disabled by default (these channels are NOT filtered).",
    ["options_chat_filter_hide_own"] = "Hide Own Messages",
    ["options_chat_filter_hide_own_desc"] = "When enabled, your own messages matching the filter keywords are also hidden from your chat frame. When disabled, your own messages are always shown (other players' messages are still filtered as normal).",
    ["options_chat_filter_keywords"] = "Filter Keywords",
    ["options_chat_filter_keywords_desc"] = "Comma-separated keywords that trigger the filter. Apply to both filters (normal channels and Guild/Party/Raid). Short keywords (<=4 chars) use word boundary to avoid false positives.",
    ["tip_range_0_10"] = "Range: 0 - 10",
    ["tip_required_role"] = "Required ",
    ["tip_right_click_decrease"] = "Right-click: decrease",
    ["tip_right_click_whisper"] = "Right-click for menu",
    ["tip_left_click_whisper"] = "Left-click to Whisper",
    ["tip_right_click_menu"] = "Right-click for menu",
    ["tip_right_click_whisper_rec"] = "Right-click to whisper last recruiter",
    ["tip_right_dismiss_left_copy"] = "|cff888888Right-click: dismiss  |  Left-click: copy to chat|r",
    ["tip_seen_label"] = "Seen ",
    ["tip_sends_to_all_ch"] = "Sends the message to all selected Ch#.",
    ["tip_shift_click_favorite"] = "Shift+Click to toggle Favorite",
    ["tip_shift_click_remove_db"] = "Shift-click to remove from DB",
    ["tip_spec_label"] = "Spec: ",
    ["tip_time_label"] = "|cFF88CCFFTime:|r ",
    ["tip_update_frostnet"] = "|cffffcc00Ask them to update FrostNet!|r",
    ["tip_version_label"] = "Version: ",
    ["tip_warning_prefix"] = "Warning: ",
    ["tip_what_is_bonus_coin"] = "|cff88ccffWhat is Bonus Coin?|r",
    ["tip_when_label"] = "|cff88ccffWhen:|r ",
    ["tip_zone_label"] = "Zone: ",
    ["txt_applicants_colored"] = "|cff88ccffApplicants|r",
    ["txt_applicants_count_colored"] = "|cff88ccffApplicants|r (",
    ["txt_bonus_coin"] = "Bonus Coin",
    ["txt_bonus_coin_colored"] = "|cffffd966Bonus Coin|r",
    ["txt_click_to_cycle"] = "|cff88ccffClick to cycle (10s / 30s / 60s / OFF)|r",
    ["txt_custom_kw_tip"] = "|cff88ccffSuggerimento:|r Le parole chiave personalizzate sono verificate DOPO quelle predefinite. Se un messaggio corrisponde già a una parola chiave predefinita, quella personalizzata non la sovrascrive. Usalo per abbreviazioni specifiche del server o contenuti non ancora in FrostSeekLight.",
    ["txt_drag_demo_boxes"] = "Drag the LFG and FrostNet demo boxes to position popups",
    ["txt_drag_me_position"] = "Drag me to position",
    ["txt_frostnet_app_popup_anchor"] = "FrostNet Applicant Popup Anchor",
    ["txt_frostseek_settings_title"] = "|cff88ccffFrostSeek Settings|r",
    ["txt_invites_on_whisper"] = "(invites on whisper if iLvl/lvl >= threshold)",
    ["txt_lfg_popup_anchor"] = "LFG Popup Anchor",
    ["txt_looking_for"] = "|cff88ccffLooking for:|r ",
    ["txt_looking_for_anyone"] = "|cff888888Looking for: anyone|r",
    ["txt_menu_add_friend"] = "Aggiungi Amico",
    ["txt_menu_copy_name"] = "Copy Name",
    ["txt_menu_ignore"] = "|cffff5555Ignore|r",
    ["txt_menu_invite_to_group"] = "|cffffaa00Invite to Group|r",
    ["txt_menu_lfg_whisper_auto"] = "|cff2fff5fLFG Whisper (Auto)|r",
    ["txt_menu_whisper"] = "|cff88ccffWhisper|r",
    ["txt_now_colored"] = "|cff44ff44now|r",
    ["txt_offline_colored"] = "|cffff5555Offline|r",
    ["txt_player_menu_title"] = "FrostSeekLight Player Menu",
    ["txt_popup_anchor_editor"] = "FrostSeekLight Popup Anchor Editor",
    ["txt_shift_drag_reposition"] = "Shift+drag any live popup to reposition later",
    ["txt_tip_hold_shift"] = "Tip: hold Shift and drag any live popup to reposition it instantly",

    ["confirm_clear_favorites_msg"] = "Remove all favorite players?",
    ["confirm_clear_favorites_title"] = "Clear Favorites",
    ["confirm_reset_lfg_filters_msg"] = "Uncheck all activity filters?\nYou can re-enable them individually or use Select All.",
    ["confirm_reset_lfg_filters_title"] = "Reset LFG Filters",
    ["core_class_ascension_mode"] = "   Ascension mode   : ",
    ["core_class_broadcast_class"] = "7. Broadcast class  : ",
    ["core_class_broadcast_not_pinged"] = " |cff888888(not yet pinged)|r",
    ["core_class_debug_header"] = "|cff88ccff========== CLASS DETECTION DEBUG ==========|r",
    ["core_class_gettalenttabinfo_unavail"] = "   |cffff5555GetTalentTabInfo not available|r",
    ["core_class_icon_path"] = "6. Icon path        : ",
    ["core_class_is_coa"] = "   IsCoA            : ",
    ["core_class_manual_override"] = "1. Manual override : ",
    ["core_class_override_hint_cmd"] = "|cff888888To override: /fslclass set Templar|r",
    ["core_class_realm"] = "3. Realm            : ",
    ["core_class_reset_hint_cmd"] = "|cff888888To reset:    /fslclass reset|r",
    ["core_class_resolved_class"] = "5. Resolved class   : |cff44ff44",
    ["core_class_server_type"] = "   Server type      : ",
    ["core_class_tab_prefix"] = "   Tab ",
    ["core_class_talent_tabs"] = "4. Talent tabs      :",
    ["core_class_unit_class"] = "2. UnitClass        : ",
    ["core_debug_and_more"] = "    ... and %d more",
    ["core_debug_auto_open"] = "autoOpen = ",
    ["core_debug_channel"] = "  Channel: ",
    ["core_debug_channel_id"] = "  ChannelId: ",
    ["core_debug_connected"] = "  Connected: ",
    ["core_debug_debug_mode"] = "debugMode = ",
    ["core_debug_frostnet_enabled"] = "frostnetEnabled = ",
    ["core_debug_frostnet_header"] = "|cff88ccffFrostNet:|r",
    ["core_debug_header"] = "|cff88ccff========== FSLIGHT DEBUG ==========|r",
    ["core_debug_language"] = "language = ",
    ["core_debug_lfg_disable_lfg"] = "LFG.disableLFG    = ",
    ["core_debug_lfg_disable_popups"] = "LFG.disablePopups = ",
    ["core_debug_log_level"] = "logLevel = ",
    ["core_debug_logger"] = "  Logger: %d/200 entries buffered, level=%s",
    ["core_debug_mainframe_scale"] = "MainFrame scale = ",
    ["core_debug_mainframe_shown"] = "MainFrame is shown = ",
    ["core_debug_minimap_button"] = "minimapButton = ",
    ["core_debug_modules_header"] = "|cff88ccffModules:|r",
    ["core_debug_online_users"] = "  Online users: ",
    ["core_debug_queue_length"] = "  Queue length: ",
    ["core_debug_quick_disabled"] = "Quick-disabled (LFG+Popups OFF) = ",
    ["core_debug_save_position"] = "savePosition = ",
    ["core_debug_schema_version"] = "schemaVersion = ",
    ["core_debug_separator"] = "|cff88ccff====================================|r",
    ["core_debug_ui_scale"] = "uiScale = ",
    ["core_debug_v225_modules_header"] = "|cff88ccffv1.0.0 Modules:|r",
    ["core_debug_version"] = "version = ",
    ["core_debug_voicebridge_api"] = "  VoiceBridge API: ",
    ["core_debug_voicebridge_count"] = "  VoiceBridge: %d stored voice links",
    ["core_debug_voicebridge_not_loaded"] = "  VoiceBridge: not loaded",
    ["core_dumplog_entries_suffix"] = " entries) ==========|r",
    ["core_dumplog_footer"] = "|cff88ccff==================================================|r",
    ["core_dumplog_header"] = "|cff88ccff========== FSLIGHT LOG (last ",
    ["core_minimap_ctrl_click_label"] = "|cff88ccffCtrl + Click:|r ",
    ["core_minimap_disable_lfg_popups"] = "Disable LFG+Popups",
    ["core_minimap_disabled_frostnet"] = "|cff888888FrostNet and LFM are still active.|r",
    ["core_minimap_disabled_lfg"] = "|cffff4444LFG radar and popups are disabled.|r",
    ["core_minimap_disabled_reenable"] = "|cff88ccffCtrl + Click|r to re-enable",
    ["core_minimap_disabled_title"] = "|cff88ccffFrostSeek|r |cffff4444[LFG+Popups OFF]|r",
    ["core_minimap_drag_move"] = "Drag: Move button",
    ["core_minimap_enable_lfg_popups"] = "Enable LFG+Popups",
    ["core_minimap_left_click"] = "Left Click: Open LFG",
    ["core_minimap_new_cat_title"] = "FrostSeekLight - |cff88ccffNew ",
    ["core_minimap_online_count"] = "|cff88ccffFrostNet:|r %d online",
    ["core_net_and_more"] = "  ... and %d more",
    ["core_net_channel_id"] = "ChannelId         : ",
    ["core_net_channel_name"] = "Channel name      : ",
    ["core_net_channels_seen_header"] = "|cff88ccff--- Channels seen by WoW client ---|r",
    ["core_net_connected"] = "Connected         : ",
    ["core_net_getnumchannels_unavail"] = "  GetNumDisplayChannels not available on this client",
    ["core_net_join_attempts"] = "Join attempts     : ",
    ["core_net_listing_activity"] = "  activity : ",
    ["core_net_listing_id"] = "  id       : ",
    ["core_net_listing_leader"] = "  leader   : ",
    ["core_net_listing_members"] = "  members  : ",
    ["core_net_listing_type"] = "  type     : ",
    ["core_net_module_not_loaded_err"] = "|cffff5555Network module not loaded!|r",
    ["core_net_my_listing_header"] = "|cff88ccff--- My listing ---|r",
    ["core_net_no_active_listing"] = "  (no active listing)",
    ["core_net_no_channels_msg"] = "  (no channels — player may not be in any custom channel)",
    ["core_net_online_count"] = "  Online count: ",
    ["core_net_online_users_header"] = "|cff88ccff--- Online users ---|r",
    ["core_net_queue_length"] = "Queue length      : ",
    ["core_net_status_header"] = "|cff88ccff========== FROSTNET STATUS ==========|r",
    ["core_net_total_listings_cache"] = "  Total listings in cache: ",
    ["core_net_was_connected"] = "WasConnected ever : ",
    ["core_popup_frostnet_anchor_default"] = "|cff44dd77FrostSeek:|r FrostNet popup anchor: default (TOPLEFT/TOPLEFT @ 10, -40)",
    ["core_popup_frostnet_anchor_saved"] = "|cff44dd77FrostSeek:|r FrostNet popup anchor: %s/%s @ %.0f, %.0f (saved)",
    ["core_popup_lfg_anchor_default"] = "|cff88ccffFrostSeek:|r LFG popup anchor: default (TOP/TOP @ 0, -40)",
    ["core_popup_lfg_anchor_saved"] = "|cff88ccffFrostSeek:|r LFG popup anchor: %s/%s @ %.0f, %.0f (saved)",
    ["msg_auto_invite_status"] = "|cff88ccffFrostSeek LFM:|r Auto-Invite %s",
    ["msg_auto_open_status"] = "|cff88ccffFrostSeek:|r Auto-open %s",
    ["msg_clear_all_data_warning"] = "This action cannot be undone!\n\nAll FrostSeekLight data will be reset to defaults.",
    ["msg_link_copied_to_clipboard"] = "|cff88ccffFrostSeek:|r %s link copied to clipboard: |cffffffff%s|r",
    ["msg_link_inserted_in_chat"] = "|cff88ccffFrostSeek:|r Link inserted in chat box! (Ctrl+C to copy)",
    ["msg_server_profile_changed"] = "Server Profile changed to %s.\nReload the UI to apply the new content filtering?",
    ["msg_theme_applied_live"] = "|cff88ccffFrostSeek:|r Theme |cff88ccff%s|r applied live. If some panels look wrong, run /reload.",
    ["msg_theme_applied_reloading"] = "|cff88ccffFrostSeek:|r Theme |cff88ccff%s|r applied. Reloading UI...",
    ["msg_warning_cannot_undo"] = "This cannot be undone!",
    ["opt_class_unknown"] = "Unknown",
    ["opt_no_content_selected"] = "No content selected",
    ["opt_no_keystone_found"] = "No Keystone",
    ["options_lfg_status_active_colored"] = "|cFF00FF00Active|r",
    ["options_lfg_status_disabled_colored"] = "|cFFFF0000Disabled|r",
    ["options_lfg_status_label"] = "LFG: %s   -   %s",
    ["setup_finish_hint"] = "|cff888888Finish — reloads the UI to save your choices.|r",
    ["tab_community"] = "Community",
    ["tab_community_desc"] = "Guild browser, recruitment & events",
    ["tab_dashboard"] = "Dashboard",
    ["tab_dashboard_desc"] = "System Overview & FrostNet",
    ["tab_frostnet_desc"] = "Browse, Create Groups & Profile",
    ["tab_lfg_desc"] = "Looking For Group",
    ["tab_lfm_desc"] = "Looking For Members",
    ["tab_options"] = "Options",
    ["tab_options_desc"] = "System Settings",
    ["tip_click_to_insert_template"] = "Click to insert into template",
    ["tip_default_keywords_suffix"] = " - default keywords",
    ["tip_link_label"] = "Link:",

    ["msg_added_to_ignore_list"] = " added to ignore list",
    ["msg_auto_invite_welcome"] = "Auto-invited! Welcome to the group.",
    ["msg_channel_count_suffix"] = " channel(s)",
    ["msg_channel_not_found_hint"] = " not found! Open chat channels to populate the list.",
    ["msg_clear_all_confirm"] = "Clear all active LFG searches?",
    ["msg_confirm_spam_continue"] = ". Continue?",
    ["msg_confirm_spam_every"] = "\" every ",
    ["msg_confirm_spam_on"] = "s on ",
    ["msg_confirm_spam_prefix"] = "This will spam \"",
    ["msg_invite_reject_include_role"] = " only. Please include your role in your whisper.",
    ["msg_invite_reject_min_level"] = "Sorry, minimum level required is ",
    ["msg_invite_reject_we_need"] = "Sorry, we need ",
    ["msg_invite_reject_you_are_level"] = ". You are level ",
    ["msg_invite_reject_you_stated"] = " only. You stated: ",
    ["msg_members_autostop_suffix"] = " members - auto-stopping spam.|r",
    ["msg_members_count"] = " members",
    ["msg_min_lvl_inline"] = ", min Lvl: ",
    ["msg_recruiters_count"] = " recruiters",
    ["msg_reject_got_suffix"] = ", got: ",
    ["msg_reject_level_low"] = " - Level too low (need: ",
    ["msg_reject_role_mismatch"] = " - Role mismatch (need: ",
    ["msg_slot_inline"] = "' (slot ",
    ["msg_spamming_every"] = "|cFF00FF00Spamming every %ds|r",
    ["tip_channel_empty"] = ": (empty)",
    ["txt_debug_disabled"] = "disabled",
    ["txt_debug_enabled"] = "enabled",
    ["txt_ilvl_inline"] = " (iLvl: ",
    ["txt_lvl_inline"] = " | Lvl: ",
    ["txt_role_inline"] = " Role: ",
    ["txt_role_not_set"] = "Role: Not Set",
    ["txt_role_prefix"] = "Role: ",
    ["txt_start_auto_spam"] = "Start Auto-Spam",

    ["community_channel_label"] = "Channel:|r",
    ["community_channel_prefix"] = " (channel ",
    ["community_contact_label"] = "Contact:|r",
    ["community_default_event_name"] = "Community Event",
    ["community_default_player_name"] = "Unknown",
    ["community_discord_label"] = "Discord:|r",
    ["community_discord_prefix"] = "Discord: ",
    ["community_events_count_suffix"] = " events|r",
    ["community_events_count_zero"] = "0 events|r",
    ["community_focus_label"] = "Focus:|r",
    ["community_guild_name_label"] = "Guild Name:|r",
    ["community_guilds_count_suffix"] = " guilds discovered|r",
    ["community_guilds_count_zero"] = "0 guilds discovered|r",
    ["community_interval_label"] = "Interval:|r",
    ["community_lang_label"] = "Lang:|r",
    ["community_last_recruiter_of_prefix"] = " (last recruiter of ",
    ["community_looking_for_members"] = "Looking for new members",
    ["community_looking_for_prefix"] = "Looking for ",
    ["community_name_label"] = "Name",
    ["community_need_prefix"] = "Need: ",
    ["community_not_available_suffix"] = " not available)",
    ["community_note_label"] = "Note:|r",
    ["community_players_suffix"] = " players",
    ["community_preview_label"] = "Preview:|r",
    ["community_recent_label"] = "Recent",
    ["community_recruit_sent_to_prefix"] = "|cff88ccffFrostSeek:|r Recruitment message sent to ",
    ["community_roles_needed_label"] = "Roles Needed:|r",
    ["community_search_label"] = "Search:|r",
    ["community_sender_label"] = "Sender",
    ["community_snippet_host_label"] = " - Host: ",
    ["community_sort_label"] = "Sort:|r",
    ["community_time_days_ago"] = "d ago",
    ["community_time_hours_ago"] = "h ago",
    ["community_time_minutes_ago"] = "m ago",
    ["community_time_seconds_ago"] = "s ago",
    ["community_times_suffix"] = " time(s)",
    ["event_expired_label"] = "Expired",
    ["event_never_label"] = "Never",
    ["msg_from_favorites_suffix"] = "|r from favorites",
    ["msg_to_favorites_suffix"] = "|r to favorites",
    ["presence_auto_refresh_label"] = "Auto-refresh: ",
    ["presence_auto_refresh_off"] = "|cffff5555Auto-refresh: OFF|r",
    ["presence_col_guild"] = "Guild",
    ["presence_col_lvl"] = "Lvl",
    ["presence_col_player"] = "Player",
    ["presence_col_role"] = "Role",
    ["presence_col_seen"] = "Seen",
    ["presence_col_status"] = "Status",
    ["presence_col_zone"] = "Zone",
    ["presence_favorite_online_msg"] = "|cffb366ff[Favorite]|r |cff88ccff%s|r (%s %s) just came online",
    ["presence_friends_label"] = "Friends:|r ",
    ["presence_guild_only_on"] = "Guild Only: ON",
    ["presence_lvl_label"] = " lvl ",
    ["presence_online_label"] = "online|r",
    ["presence_outdated_label"] = " |cffff5555(outdated)|r",
    ["presence_users_online_suffix"] = " users online",
    ["presence_with_role_label"] = "With Role:|r ",
    ["profile_application_profile_header"] = "--- Application Profile ---|r",
    ["profile_class_label"] = "  |cff88ccffClass:|r ",
    ["profile_disabled"] = "disabled",
    ["profile_discord_available"] = "|cff88ccffDiscord:|r |cff44ff44Available|r",
    ["profile_discord_label"] = "|cff88ccffDiscord:|r ",
    ["profile_discord_not_available_status"] = "|cffff5555Not Available|r",
    ["profile_discord_print_prefix"] = "|cff88ccffFrostNet:|r Discord ",
    ["profile_discord_ready_status"] = "|cff44ff44Ready|r",
    ["profile_enabled"] = "enabled",
    ["profile_ilvl_colon_label"] = "|cff88ccffiLvl:|r ",
    ["profile_ilvl_label"] = "|cff88ccffiLvl:|r |cff44ff44",
    ["profile_lv_label"] = "Lv ",
    ["profile_name_label"] = "|cff88ccffName:|r ",
    ["profile_no_label"] = "|cffff5555No|r",
    ["profile_notes_label"] = "|cff88ccffNotes:|r ",
    ["profile_role_inline_label"] = "  |cff88ccffRole:|r ",
    ["profile_role_label"] = "|cff88ccffRole:|r ",
    ["profile_spec_label"] = "|cff88ccffSpec:|r ",
    ["profile_test_btn"] = "Test",
    ["profile_whisper_off"] = "|cff888888Whisper OFF|r",
    ["profile_whisper_on"] = "|cff44ff44Whisper ON|r",
    ["profile_yes_label"] = "|cff44ff44Yes|r",
    ["voice_no_links_stored"] = "|cff88ccffFrostSeek VoiceBridge:|r no links stored",

    ["any_r"] = "Any|r",
    ["browse_groups_count_suffix"] = " groups",
    ["col_activity"] = "Activity",
    ["col_applied"] = "Applied",
    ["col_decided"] = "Decided",
    ["col_key"] = "Key",
    ["col_leader"] = "Leader",
    ["col_status"] = "Status",
    ["col_type"] = "Type",
    ["compat_backdrop_no"] = "|cffff8800BackdropTemplate: NO (native fallback)|r",
    ["compat_backdrop_yes"] = "|cff00ff00BackdropTemplate: YES|r",
    ["compat_ctimer_missing"] = "|cffff0000C_Timer: MISSING|r",
    ["compat_ctimer_ok"] = "|cff00ff00C_Timer: OK|r",
    ["compat_layer_loaded"] = "|cff00ff00Compat layer loaded|r",
    ["compat_server_label"] = "Server: ",
    ["compat_version_info"] = "|cff00ff00Interface: %d|r | |cff00ff00Version: %s|r",
    ["dash_connected"] = "|cff44ff44Connected|r",
    ["dash_footer_love"] = " MADE with |cffff6666Love|r by |cff88ccffAYRO|r ",
    ["dash_footer_love_caps"] = " MADE with |cffff6666LOVE|r by |cff88ccffAYRO|r  ",
    ["dash_friends_label"] = "Friends:|r ",
    ["dash_fsk_connected"] = "|cff44ff44FSK Connected|r",
    ["dash_fsk_connecting"] = "|cffffff00FSK Connecting...|r",
    ["dash_fsk_offline"] = "|cffff5555FSK Offline|r",
    ["dash_groups_label"] = "Groups:|r ",
    ["dash_lfg_activity_r"] = "LFG ACTIVITY|r",
    ["dash_no_role_colored"] = "|cFF888888No Role|r",
    ["dash_session_r"] = "Session|r",
    ["dash_today_r"] = "Today|r",
    ["dialog_are_you_sure"] = "Are you sure?",
    ["dialog_confirm"] = "Confirm",
    ["hint_discord_profile"] = "(set your Discord link in the Profile tab)|r",
    ["hint_withdraw_app"] = "Right-click pending app to withdraw|r",
    ["lbl_leader_r"] = "Leader:|r ",
    ["lbl_lf_r"] = "LF:|r ",
    ["lbl_loot_r"] = "Loot:|r ",
    ["lbl_members_r"] = "Members:|r ",
    ["lbl_min_ilvl_r"] = "Min iLvl:|r ",
    ["lbl_note_r"] = "Note:|r ",
    ["lbl_published_r"] = "Published:|r ",
    ["lbl_voice_r"] = "Voice:|r ",
    ["listings_no_active_group_full"] = "No active group.\nGo to 'Create Group' to publish a listing on FrostNet!|r",
    ["listings_select_group_r"] = "Select a group to see details|r",
    ["net_cannot_reach_prefix"] = "|cffff5555FrostNet:|r Cannot reach channel |cffffffffFSK|r — ",
    ["net_debug_id_close"] = "]|r",
    ["net_debug_id_prefix"] = ") |cff888888[id=",
    ["net_debug_len_label"] = " len=",
    ["net_messages_queued_hint"] = " messages queued. Run /fsldebug to check channel status.",
    ["net_published_prefix"] = "|cff88ccffFrostNet:|r Group published to channel |cffffffffFSK|r (",
    ["theme_error_applying"] = "|cffff0000FrostSeek Theme:|r Error applying theme to module: ",
    ["theme_initialized_active"] = "|cff88ccffFrostSeek Theme:|r Initialized - Active theme: ",
    ["time_hours_ago"] = "h ago",
    ["time_minutes_ago"] = "m ago",
    ["time_seconds_ago"] = "s ago",


}

local LOCALE_TABLES = { enUS = STRINGS }

function FrostSeekLight.RegisterLocale(code, tbl)
    if code and tbl then
        LOCALE_TABLES[code] = tbl
    end
end

function FrostSeekLight.GetAvailableLocales()
    local codes = {}
    for code, _ in pairs(LOCALE_TABLES) do
        table.insert(codes, code)
    end
    table.sort(codes)
    return codes
end

local function resolveLocaleCode()
    if FrostSeekLightDB and FrostSeekLightDB.Settings then
        local lang = FrostSeekLightDB.Settings.language
        if lang and lang ~= "auto" and LOCALE_TABLES[lang] then
            return lang
        end
    end
    local wowLocale = (GetLocale and GetLocale()) or "enUS"
    if LOCALE_TABLES[wowLocale] then return wowLocale end
    if wowLocale and #wowLocale >= 2 then
        local short = string.sub(wowLocale, 1, 2)
        local candidates = { it = "itIT", es = "esES", de = "deDE", fr = "frFR", pt = "ptBR" }
        local mapped = candidates[short]
        if mapped and LOCALE_TABLES[mapped] then return mapped end
    end
    return "enUS"
end

FrostSeekLight.L = setmetatable({}, {
    __index = function(_, key)
        local code = resolveLocaleCode()
        local tbl = LOCALE_TABLES[code] or STRINGS
        local v = tbl[key]
        if v == nil then
            v = STRINGS[key]
        end
        if v == nil then
            return key
        end
        return v
    end,
})

function FrostSeekLight.Lf(key, ...)
    local template = FrostSeekLight.L[key]
    return string.format(template, ...)
end

if StaticPopupDialogs and not StaticPopupDialogs["FROSTSEEK_LANGUAGE_RELOAD"] then
    StaticPopupDialogs["FROSTSEEK_LANGUAGE_RELOAD"] = {
        text = "%s",
        button1 = "Reload Now",
        button2 = "Later",
        timeout = 0,
        whileDead = true,
        hideOnEscape = true,
        OnAccept = function(self)
            if ReloadUI then
                ReloadUI()
            else
                ConsoleExec("reloadui")
            end
        end,
    }
end

function FrostSeekLight.PromptReloadUI(messageText)
    if not StaticPopupDialogs then return end
    local L = FrostSeekLight.L
    StaticPopupDialogs["FROSTSEEK_LANGUAGE_RELOAD"].button1 = L["settings_reload_now"] or "Reload Now"
    StaticPopupDialogs["FROSTSEEK_LANGUAGE_RELOAD"].button2 = L["settings_reload_later"] or "Later"
    if StaticPopup_FindVisible then
        local existing = StaticPopup_FindVisible("FROSTSEEK_LANGUAGE_RELOAD")
        if existing then existing:Hide() end
    end
    StaticPopup_Show("FROSTSEEK_LANGUAGE_RELOAD", messageText)
end