local _, Addon = ...

local locale = type(GetLocale) == "function" and GetLocale() or "enUS"
local spanish = locale == "esES" or locale == "esMX"

local L = {
    APP_NAME = "Miyamap",
    MAP = "Map",
    DUNGEON = "Dungeon",
    ROUTE = "Route",
    SETTINGS = "Settings",
    VISIBLE = "Visible",
    HIDDEN = "Hidden",
    VISIBLE_PLURAL = "Visible",
    HIDDEN_PLURAL = "Hidden",
    ROUTE_HIDDEN_LABEL = "Hidden",
    AVAILABLE = "available",
    UNAVAILABLE = "unavailable",
    NOT_INITIALIZED = "not initialized",

    OPTIONS_DESCRIPTION = "Changes are applied immediately and saved for your next session.",
    QUICK_PROFILES = "Quick profiles",
    PROFILE_NORMAL = "Normal",
    PROFILE_COMPACT = "Compact",
    PROFILE_MINI = "Mini",
    MAP_SHAPE = "Map shape",
    SHAPE_SQUARE = "Square",
    SHAPE_CIRCLE = "Circular",
    MAP_SIZE = "Map size",
    ICON_SIZE = "Icon size",
    OPACITY = "Opacity",
    ICON_SPACING = "Icon spacing",
    BORDER_THICKNESS = "Border thickness",
    PREFERRED_COLUMNS = "Preferred columns",
    ARROW_SIZE = "Player arrow size",
    BEHAVIOR = "Behavior",
    REPLACE_MINIMAP = "Replace Blizzard minimap",
    SHOW_ADDON_BUTTON = "Show addon button",
    LOCK_MAP_BUTTONS = "Lock map and buttons",
    SHOW_DUNGEON_BOSSES = "Show dungeon bosses",
    SHOW_DUNGEON_ENEMIES = "Show dungeon enemies",
    REPOSITION_BUTTONS = "Reset button position",
    RESET_ALL = "Reset all",
    OPTIONS_HELP = "Ctrl + wheel: resize  |  Shift + drag: move map",

    REPLACEMENT_ENABLED = "minimap replacement enabled.",
    REPLACEMENT_DISABLED = "replacement disabled; Blizzard minimap restored.",
    DUNGEON_MIYAMAP_SAVED = "Miyamap was saved as the active map: enemies, bosses, and the MDT route are visible.",
    DUNGEON_MINIMAP_SAVED = "Blizzard's minimap was saved as the active map: it automatically follows your character.",
    THIS_DUNGEON = "this dungeon",
    DUNGEON_CHOICE_TEXT = "You entered |cffffd200%s|r.\n\n"
        .. "|cff33ccffMiyamap|r\n"
        .. "Advantages: shows enemies, bosses, MDT routes, and pull order.\n"
        .. "Warning: when WoW protects your position, the camera cannot follow the arrow and the full floor is shown.\n\n"
        .. "|cff7ee787Blizzard minimap|r\n"
        .. "Advantage: the camera always follows your character.\n"
        .. "Warning: does not show Miyamap enemies, bosses, or routes.\n\n"
        .. "Which one do you want to use? Your choice will be saved and this question will not appear again.",
    USE_MIYAMAP = "Use Miyamap",
    NORMAL_MINIMAP = "Blizzard minimap",
    CENTER_ON_PLAYER = "Center on player",
    LOADING_MAP = "Loading map...",
    LOADING = "Loading...",
    USE_ORIGINAL_MINIMAP = "Use Blizzard minimap",
    CLICK_RETURN_BLIZZARD = "Click: return to Blizzard's minimap",
    CLICK_USE_MIYAMAP = "Click: show enemies, bosses, and routes",
    RIGHT_CLICK_OPEN_CENTER = "Right-click: open and center Miyamap",
    SHOW_HIDE_ZONE_MAP = "Show or hide the zone map",
    SETTINGS_RESET = "settings reset.",

    ADDON_BUTTONS = "Addon buttons",
    ENEMIES = "Enemies",
    BOSSES = "Bosses",
    MDT_ROUTES = "MDT routes",
    CLICK_OPEN_CONTAINER = "Click: open the container",
    DRAG_MOVE_BUTTONS = "Drag: move the buttons",
    CLICK_OPEN_FOLIO = "Click: open the Folio",
    MAP_CONTROLS = "Map controls",
    CLICK_OPEN = "Click: open",
    DUNGEON_BOSSES = "Dungeon bosses",
    CLICK_SHOW_HIDE = "Click: show or hide",
    DUNGEON_ENEMIES = "Dungeon enemies",
    INTEGRATED_ENEMY_DATABASE = "Built-in enemy database",
    ROUTE_SUMMARY = "%s  |  %d pulls",
    ROUTE_COUNT_ONE = "%d saved route",
    ROUTE_COUNT_MANY = "%d saved routes",
    RIGHT_CLICK_SHOW_HIDE = "Right-click: show or hide",
    NO_IMPORTED_ROUTE = "No imported route",
    CLICK_IMPORT_MANAGE = "Click: import or manage",
    OPEN_OPTIONS = "Open Miyamap settings",
    NO_VISIBLE_ADDON_BUTTONS = "No visible addon buttons found.",
    ADDONS_COUNT = "Addons (%d)",
    BUTTONS_POSITION_RESET = "button position reset.",

    GATHERING_MENU = "Herbs and ore",
    GATHERING_TITLE = "Live herbs and ore",
    GATHERING_ENABLED = "Native view enabled",
    GATHERING_DISABLED = "Native view disabled",
    GATHERING_PAUSED = "Enabled; paused inside instances",
    GATHERING_DETAIL = "Uses Blizzard's minimap at full size",
    GATHERING_CLICK = "Click: enable or disable",
    GATHERING_OPTION = "Native minimap while gathering",
    GATHERING_BINDING = "Toggle gathering view",
    KEY_BINDINGS = "Key bindings",
    GATHERING_KEYBIND_LABEL = "Herbs and ore view",
    KEYBIND_NOT_SET = "Not assigned",
    KEYBIND_CAPTURE = "Press a key...",
    KEYBIND_CLEAR = "Clear",
    KEYBIND_SAVED = "herbs and ore shortcut set to %s.",
    KEYBIND_CLEARED = "herbs and ore shortcut cleared.",
    KEYBIND_FAILED = "the shortcut could not be saved.",
    KEYBIND_COMBAT = "shortcuts cannot be changed during combat.",
    GATHERING_WARNING = "The gathering view places Blizzard's native minimap inside Miyamap.\n\n"
        .. "|cff7ee787Advantage:|r it shows live herbs and ore detected nearby by Blizzard and automatically follows your character.\n\n"
        .. "|cffffd200Warnings:|r it temporarily replaces the zone map and also shows native terrain and other native points. Blizzard does not allow addons to separate gathering nodes from the minimap. It is paused inside dungeons and other instances to preserve Miyamap enemies, bosses, and routes.\n\n"
        .. "Your choice will be saved. Enable it?",
    GATHERING_ACCEPT = "Enable view",
    CANCEL = "Cancel",
    GATHERING_ENABLED_MESSAGE = "native gathering view enabled.",
    GATHERING_DISABLED_MESSAGE = "native gathering view disabled.",
    GATHERING_ERROR = "the native minimap could not be moved; its original position was restored.",
    NEARBY_SERVICES = "Nearby services",
    SHOW_NEARBY_SERVICES = "Show nearby minimap services",
    NEARBY_SERVICES_DETAIL = "Uses Blizzard's active minimap tracking filters",
    NEARBY_SERVICES_ENABLED = "Nearby services enabled",
    NEARBY_SERVICES_DISABLED = "Nearby services disabled",
    NATIVE_BLIP_ERROR = "nearby minimap services could not be displayed.",
    CORPSE = "Corpse",

    ROUTE_PASTE = "Paste a route exported by MDT.",
    ROUTE_TOO_LARGE = "The route is too large to import.",
    ROUTE_FORMAT_OLD = "The string does not use MDT's current export format.",
    ROUTE_LIBRARIES_FAILED = "The import libraries could not be loaded.",
    ROUTE_DECODE_FAILED = "The MDT string could not be decoded.",
    ROUTE_DAMAGED = "The MDT string is damaged or incomplete.",
    ROUTE_INVALID_PRESET = "The MDT route does not contain a valid preset.",
    ROUTE_INVALID = "The string does not contain a valid MDT route.",
    ROUTE_DUNGEON_UNSUPPORTED = "That dungeon is not included in Miyamap's data yet.",
    ROUTE_INVALID_PULL_COUNT = "The route does not contain a valid number of pulls.",
    ROUTE_DEFAULT_NAME = "MDT Route",
    ROUTE_INVALID_PULL = "Pull %d is not valid.",
    ROUTE_TOO_MANY_ENEMIES = "The route contains too many enemies.",
    ROUTE_ENTER_NAME = "Enter a name for the route.",
    ROUTE_TOO_MANY_SAVED = "Too many routes are already saved for that dungeon.",
    ROUTE_ADDED_SELECTED = "Route added and selected.",
    ROUTE_IMPORTED = "route \"%s\" imported: %d pulls, %d assigned enemies.",
    ROUTE_NAME_SAVED = "Route name saved.",
    ROUTE_SINGULAR = "route",
    ROUTE_PLURAL = "routes",
    ROUTE_WITH_PULLS = "%s (%d pulls)",
    ROUTES_WINDOW_TITLE = "Mythic Dungeon Tools routes",
    ROUTE_NAME = "Route name",
    RENAME = "Rename",
    IMPORT_NEW_ROUTE = "Import new route",
    SHOW_PULLS = "Show pulls",
    IMPORT = "Import",
    DELETE_ROUTE = "Delete route",
    ROUTE_DELETED = "Route \"%s\" deleted.",
    NO_SELECTED_ROUTE = "No route is selected.",
    RESET_KILLS = "Reset kills",
    KILL_PROGRESS_RESET = "Kill progress reset.",
    NO_DUNGEON = "No dungeon",
    SELECTED_ROUTE_STATUS = "Selected: %s  |  %d pulls  |  %d/%d defeated",
    NO_ROUTES_DUNGEON = "There are no saved routes for this dungeon.",
    NO_ROUTES = "No routes",
    ROUTE_PASTE_AND_IMPORT = "Paste the string exported by MDT and click Import.",

    MAP_POINT = "Map point",
    QUEST_FALLBACK = "Quest %d",
    TIME_REMAINING_HOURS = "Time remaining: %dh %02dm",
    TIME_REMAINING_MINUTES = "Time remaining: %dm",
    LEFT_CLICK_TRACK = "Left-click to track",
    RIGHT_CLICK_OPEN_WORLD_MAP = "Right-click to open this zone on the world map",
    DUNGEON_BOSS = "Dungeon boss",
    DEFEATED = "Defeated",
    DUNGEON_OR_RAID_BOSS = "Dungeon or raid boss",
    PULL_FORMAT = "Pull %d",
    CLICK_OPEN_ADVENTURE_GUIDE = "Click to open the Adventure Guide",
    DUNGEON_ENEMY = "Dungeon enemy",
    LEVEL_FORMAT = "Level %d",
    ENEMY_FORCES_FORMAT = "Enemy forces: %d",
    KILLED = "Defeated",
    INTERRUPTIBLE_SPELLS = "Has interruptible spells",
    PATROL = "Patrol",
    NPC_FORMAT = "NPC %d",
    DUNGEON_RAID_ENTRANCE = "Dungeon or raid entrance",
    ACCESS_OTHER_ZONE = "Access to another zone",
    UNDISCOVERED_FLIGHT_POINT = "Undiscovered flight point",
    FLIGHT_POINT = "Flight point",
    ARCHAEOLOGY_DIG = "Archaeology dig site",
    EVENT = "Event",
    DELVE = "Delve",
    SKYRIDING_RACE = "Skyriding race",
    QUEST_HUB = "Quest hub",
    CURRENT_EVENT = "Current event",
    POINT_OF_INTEREST = "Point of interest",
    GUARD_DIRECTIONS = "Guard directions",
    TREASURE = "Treasure",
    RARE_HIGHLIGHT = "Rare or highlighted point",
    CAMPAIGN_QUEST_AVAILABLE = "Campaign quest available",
    RECURRING_QUEST_AVAILABLE = "Recurring quest available",
    QUEST_AVAILABLE = "Quest available",
    WORLD_QUEST = "World quest",
    BONUS_OBJECTIVE = "Bonus objective",
    QUEST_TURN_IN = "Quest ready to turn in",
    ACTIVE_QUEST = "Active quest",
    RECURRING_QUEST = "Recurring quest",
    FULL_OVERVIEW = "Automatic full view",
    PROTECTED_POSITION = "Protected position",
    POSITION_UNAVAILABLE = "Position unavailable  |  Zoom %d/%d",

    NO_MAP_DATA = "No map data",
    NO_USABLE_MAP = "This zone does not provide a usable map.",
    MAP_TEXTURE_FAILED = "The map textures for this zone could not be loaded.",
    CENTER_SAVED = "center saved for %s.",
    THIS_FLOOR = "this floor",
    PROTECTED_POSITION_HELP = "Blizzard protects this position. Place the cursor over your arrow and right-click; if it is not detected, use Shift + right-click.",
    MODE_COORDINATES = "coordinates",
    MODE_FULL_OVERVIEW = "automatic full view",
    MODE_SAVED_CALIBRATION = "saved calibration",
    MODE_UNCALIBRATED = "protected, not calibrated",
    MODE_MANUAL_EXPLORATION = "manual exploration",
    MODE_MANUAL_CALIBRATION = "manual calibration",

    DEBUG_PROTECTED = "<protected>",
    DEBUG_MAP_INFO = "mapID=%s name=%s type=%s",
    DEBUG_UNIT_POSITION = "UnitPosition ok=%s x=%s y=%s z=%s instance=%s",
    DEBUG_WORLD_MAP = "World map instance=%s size=%.1fx%.1f",
    DEBUG_WORLD_MAP_NIL = "World map=nil",
    DEBUG_LUA_RESULT = "Lua result=%s,%s source=%s",
    DEBUG_NATIVE_FRAME = "UnitPositionFrame=%s",
    DEBUG_SHAPE_BUTTONS = "shape=%s, addon buttons=%d",
    DEBUG_CENTER = "centering=%s",

    INSTALLED_HELP = "installed. Type /mzm help to see the commands.",
    HELP_HEADER = "available commands:",
    HELP_TOGGLE = "/mzm - shows or hides the map.",
    HELP_CONFIG = "/mzm config - opens settings.",
    HELP_SIZE = "/mzm size 180 - changes size (120-650 circular; 220-650 square).",
    HELP_SHAPE = "/mzm shape circle - switches between circular and square.",
    HELP_BORDER = "/mzm border 5 - changes border thickness (0-16).",
    HELP_BUTTONS = "/mzm addonbuttons - shows or hides other addon buttons.",
    HELP_ICON_SIZE = "/mzm addonsize 28 - changes those button sizes (18-48).",
    HELP_ICON_GAP = "/mzm buttondistance 5 - changes icon spacing (0-30).",
    HELP_COLUMNS = "/mzm columns 4 - changes container columns (1-8).",
    HELP_HUB_RESET = "/mzm hubreset - returns the buttons beside the map.",
    HELP_PROFILE = "/mzm profile compact - applies normal, compact, or mini.",
    HELP_ARROW = "/mzm arrowsize 18 - changes your arrow size (8-40).",
    HELP_ALPHA = "/mzm alpha 0.9 - changes opacity (0.35-1).",
    HELP_LOCK = "/mzm lock - locks or unlocks the window.",
    HELP_REPLACE = "/mzm replace - toggles minimap replacement.",
    HELP_MINIMAP_BUTTON = "/mzm button - shows or hides the minimap button.",
    HELP_ENEMIES = "/mzm adds - shows or hides dungeon enemies.",
    HELP_GATHERING = "/mzm gathering - toggles the native gathering view.",
    HELP_ROUTE = "/mzm route - imports or manages an MDT route.",
    HELP_ROUTE_RESET = "/mzm route reset - resets defeated route enemies.",
    HELP_DEBUG = "/mzm debug - shows available position sources.",
    HELP_RESET = "/mzm reset - resets settings.",
    WINDOW_LOCKED = "window locked.",
    WINDOW_UNLOCKED = "window unlocked.",
    CIRCLE_APPLIED = "circular shape. Use Shift + drag to move it.",
    SQUARE_APPLIED = "square shape.",
    SHAPE_USAGE = "usage: /mzm shape circle  or  /mzm shape square",
    BORDER_USAGE = "usage: /mzm border 5 (between 0 and 16)",
    BORDER_VALUE = "border thickness: %d.",
    ADDON_BUTTONS_VISIBLE = "addon buttons visible.",
    ADDON_BUTTONS_HIDDEN = "addon buttons hidden.",
    ICON_SIZE_USAGE = "usage: /mzm addonsize 28 (between 18 and 48)",
    ICON_SIZE_VALUE = "button size: %d.",
    ICON_GAP_USAGE = "usage: /mzm buttondistance 5 (between 0 and 30)",
    ICON_GAP_VALUE = "icon spacing: %d.",
    COLUMNS_USAGE = "usage: /mzm columns 4 (between 1 and 8)",
    COLUMNS_VALUE = "container columns: %d.",
    PROFILE_USAGE = "usage: /mzm profile normal, compact, or mini",
    PROFILE_APPLIED = "profile %s applied.",
    MINIMAP_BUTTON_VISIBLE = "minimap button visible.",
    MINIMAP_BUTTON_HIDDEN = "minimap button hidden; use /mzm to open.",
    ENEMIES_VISIBLE = "dungeon enemies visible.",
    ENEMIES_HIDDEN = "dungeon enemies hidden.",
    ROUTE_VISIBLE_MESSAGE = "route visible.",
    ROUTE_HIDDEN_MESSAGE = "route hidden.",
    NO_ROUTE_SELECTED_LOWER = "no route is selected.",
    ROUTE_DELETED_LOWER = "route \"%s\" deleted.",
    ARROW_USAGE = "usage: /mzm arrowsize 18 (between 8 and 40)",
    ARROW_VALUE = "arrow size: %d.",
    SIZE_USAGE = "usage: /mzm size 320",
    SIZE_VALUE = "size: %d.",
    ALPHA_USAGE = "usage: /mzm alpha 0.9",
    ALPHA_VALUE = "opacity: %.2f.",
    UNKNOWN_COMMAND = "unknown command. Type /mzm help.",
}

local es = {
    APP_NAME = "Miyamap", MAP = "Mapa", DUNGEON = "Mazmorra", ROUTE = "Ruta",
    SETTINGS = "Configuración", VISIBLE = "Visible", HIDDEN = "Oculto", VISIBLE_PLURAL = "Visibles",
    HIDDEN_PLURAL = "Ocultos", ROUTE_HIDDEN_LABEL = "Oculta", AVAILABLE = "disponible",
    UNAVAILABLE = "no disponible", NOT_INITIALIZED = "sin inicializar",
    OPTIONS_DESCRIPTION = "Los cambios se aplican inmediatamente y quedan guardados para el próximo inicio.",
    QUICK_PROFILES = "Perfiles rápidos", PROFILE_COMPACT = "Compacto", MAP_SHAPE = "Forma del mapa",
    SHAPE_SQUARE = "Cuadrado", SHAPE_CIRCLE = "Circular", MAP_SIZE = "Tamaño del mapa",
    ICON_SIZE = "Tamaño de iconos", OPACITY = "Opacidad", ICON_SPACING = "Separación de iconos",
    BORDER_THICKNESS = "Grosor del marco", PREFERRED_COLUMNS = "Columnas preferidas",
    ARROW_SIZE = "Tamaño de tu flecha", BEHAVIOR = "Comportamiento",
    REPLACE_MINIMAP = "Reemplazar el minimapa original", SHOW_ADDON_BUTTON = "Mostrar el botón de addons",
    LOCK_MAP_BUTTONS = "Bloquear el mapa y los botones", SHOW_DUNGEON_BOSSES = "Mostrar jefes de mazmorra",
    SHOW_DUNGEON_ENEMIES = "Mostrar adds de mazmorra", REPOSITION_BUTTONS = "Recolocar botones",
    RESET_ALL = "Restablecer todo", OPTIONS_HELP = "Ctrl + rueda: tamaño  |  Shift + arrastrar: mover mapa",
    REPLACEMENT_ENABLED = "reemplazo del minimapa activado.",
    REPLACEMENT_DISABLED = "reemplazo desactivado; minimapa original restaurado.",
    DUNGEON_MIYAMAP_SAVED = "Miyamap quedó guardado como mapa activo: adds, jefes y ruta MDT visibles.",
    DUNGEON_MINIMAP_SAVED = "El minimapa original quedó guardado como mapa activo: seguimiento automático del personaje.",
    THIS_DUNGEON = "esta mazmorra",
    DUNGEON_CHOICE_TEXT = "Entraste a |cffffd200%s|r.\n\n|cff33ccffMiyamap|r\nVentajas: muestra adds, jefes, rutas MDT y el orden de pulls.\nAdvertencia: si WoW protege la posición, la cámara no puede seguir la flecha y se muestra el piso completo.\n\n|cff7ee787Minimapa normal|r\nVentaja: la cámara siempre sigue al personaje.\nAdvertencia: no muestra los adds, jefes ni rutas de Miyamap.\n\n¿Cuál quieres usar? La elección quedará guardada y esta pregunta no volverá a aparecer.",
    USE_MIYAMAP = "Usar Miyamap", NORMAL_MINIMAP = "Minimapa normal", CENTER_ON_PLAYER = "Centrar en el jugador",
    LOADING_MAP = "Cargando mapa...", LOADING = "Cargando...", USE_ORIGINAL_MINIMAP = "Usar minimapa original",
    CLICK_RETURN_BLIZZARD = "Clic: volver al minimapa de Blizzard", CLICK_USE_MIYAMAP = "Clic: mostrar adds, jefes y rutas",
    RIGHT_CLICK_OPEN_CENTER = "Clic derecho: abrir Miyamap y centrar", SHOW_HIDE_ZONE_MAP = "Mostrar u ocultar el mapa de zona",
    SETTINGS_RESET = "configuración restablecida.", ADDON_BUTTONS = "Botones de addons", ENEMIES = "Adds",
    BOSSES = "Jefes", MDT_ROUTES = "Rutas MDT", CLICK_OPEN_CONTAINER = "Clic: abrir el contenedor",
    DRAG_MOVE_BUTTONS = "Arrastrar: mover los botones", CLICK_OPEN_FOLIO = "Clic: abrir el Folio",
    MAP_CONTROLS = "Controles del mapa", CLICK_OPEN = "Clic: abrir", DUNGEON_BOSSES = "Jefes de mazmorra",
    CLICK_SHOW_HIDE = "Clic: mostrar u ocultar", DUNGEON_ENEMIES = "Adds de mazmorra",
    INTEGRATED_ENEMY_DATABASE = "Base de enemigos integrada", ROUTE_SUMMARY = "%s  |  %d pulls",
    ROUTE_COUNT_ONE = "%d ruta guardada", ROUTE_COUNT_MANY = "%d rutas guardadas",
    RIGHT_CLICK_SHOW_HIDE = "Clic derecho: mostrar u ocultar", NO_IMPORTED_ROUTE = "Sin ruta importada",
    CLICK_IMPORT_MANAGE = "Clic: importar o gestionar", OPEN_OPTIONS = "Abrir las opciones de Miyamap",
    NO_VISIBLE_ADDON_BUTTONS = "No se encontraron botones visibles.", ADDONS_COUNT = "Addons (%d)",
    BUTTONS_POSITION_RESET = "posición de los botones restablecida.",
    GATHERING_MENU = "Menas y hierbas", GATHERING_TITLE = "Menas y hierbas en vivo",
    GATHERING_ENABLED = "Vista nativa activada", GATHERING_DISABLED = "Vista nativa desactivada",
    GATHERING_PAUSED = "Activada; pausada dentro de instancias", GATHERING_DETAIL = "Usa el minimapa de Blizzard a tamaño completo",
    GATHERING_CLICK = "Clic: activar o desactivar", GATHERING_OPTION = "Minimapa nativo para recolección",
    GATHERING_BINDING = "Alternar vista de recolección",
    KEY_BINDINGS = "Atajos de teclado", GATHERING_KEYBIND_LABEL = "Vista de hierbas y menas",
    KEYBIND_NOT_SET = "Sin asignar", KEYBIND_CAPTURE = "Presiona una tecla...", KEYBIND_CLEAR = "Borrar",
    KEYBIND_SAVED = "atajo de hierbas y menas asignado a %s.", KEYBIND_CLEARED = "atajo de hierbas y menas borrado.",
    KEYBIND_FAILED = "no se pudo guardar el atajo.", KEYBIND_COMBAT = "no se pueden cambiar atajos durante el combate.",
    GATHERING_WARNING = "La vista de recolección coloca el minimapa nativo de Blizzard dentro de Miyamap.\n\n|cff7ee787Ventaja:|r muestra en vivo las menas y hierbas que Blizzard detecta cerca y sigue automáticamente al personaje.\n\n|cffffd200Advertencias:|r reemplaza temporalmente el mapa de zona y también muestra el terreno y otros puntos nativos. Blizzard no permite separar solamente los nodos de recolección. Dentro de mazmorras e instancias se pausa para conservar los adds, jefes y rutas de Miyamap.\n\nLa elección quedará guardada. ¿Quieres activarla?",
    GATHERING_ACCEPT = "Activar vista", CANCEL = "Cancelar", GATHERING_ENABLED_MESSAGE = "vista nativa de recolección activada.",
    GATHERING_DISABLED_MESSAGE = "vista nativa de recolección desactivada.",
    GATHERING_ERROR = "no se pudo mover el minimapa nativo; se restauró su posición original.",
    NEARBY_SERVICES = "Servicios cercanos", SHOW_NEARBY_SERVICES = "Mostrar servicios cercanos del minimapa",
    NEARBY_SERVICES_DETAIL = "Usa los filtros de rastreo activos del minimapa de Blizzard",
    NEARBY_SERVICES_ENABLED = "Servicios cercanos activados", NEARBY_SERVICES_DISABLED = "Servicios cercanos desactivados",
    NATIVE_BLIP_ERROR = "no se pudieron mostrar los servicios cercanos del minimapa.",
    CORPSE = "Cadáver",
    ROUTE_PASTE = "Pega una cadena exportada por MDT.", ROUTE_TOO_LARGE = "La ruta es demasiado grande para importarla.",
    ROUTE_FORMAT_OLD = "La cadena no usa el formato de exportación actual de MDT.",
    ROUTE_LIBRARIES_FAILED = "No se pudieron cargar las librerías de importación.",
    ROUTE_DECODE_FAILED = "La cadena de MDT no se pudo decodificar.", ROUTE_DAMAGED = "La cadena de MDT está dañada o incompleta.",
    ROUTE_INVALID_PRESET = "La ruta de MDT no contiene un preset válido.", ROUTE_INVALID = "La cadena no contiene una ruta de MDT válida.",
    ROUTE_DUNGEON_UNSUPPORTED = "Esa mazmorra todavía no está incluida en los datos de Miyamap.",
    ROUTE_INVALID_PULL_COUNT = "La ruta no contiene una cantidad válida de pulls.", ROUTE_DEFAULT_NAME = "Ruta MDT",
    ROUTE_INVALID_PULL = "El pull %d no es válido.", ROUTE_TOO_MANY_ENEMIES = "La ruta contiene demasiados enemigos.",
    ROUTE_ENTER_NAME = "Escribe un nombre para la ruta.", ROUTE_TOO_MANY_SAVED = "Ya hay demasiadas rutas guardadas para esa mazmorra.",
    ROUTE_ADDED_SELECTED = "Ruta agregada y seleccionada.", ROUTE_IMPORTED = "ruta \"%s\" importada: %d pulls, %d adds asignados.",
    ROUTE_NAME_SAVED = "Nombre de la ruta guardado.", ROUTE_SINGULAR = "ruta", ROUTE_PLURAL = "rutas",
    ROUTE_WITH_PULLS = "%s (%d pulls)", ROUTES_WINDOW_TITLE = "Rutas de Mythic Dungeon Tools", ROUTE_NAME = "Nombre de la ruta",
    RENAME = "Renombrar", IMPORT_NEW_ROUTE = "Importar nueva ruta", SHOW_PULLS = "Mostrar pulls", IMPORT = "Importar",
    DELETE_ROUTE = "Borrar ruta", ROUTE_DELETED = "Ruta \"%s\" borrada.", NO_SELECTED_ROUTE = "No hay una ruta seleccionada.",
    RESET_KILLS = "Reiniciar bajas", KILL_PROGRESS_RESET = "Progreso de bajas reiniciado.", NO_DUNGEON = "Sin mazmorra",
    SELECTED_ROUTE_STATUS = "Seleccionada: %s  |  %d pulls  |  %d/%d eliminados",
    NO_ROUTES_DUNGEON = "No hay rutas guardadas para esta mazmorra.", NO_ROUTES = "Sin rutas",
    ROUTE_PASTE_AND_IMPORT = "Pega la cadena exportada por MDT y pulsa Importar.", MAP_POINT = "Punto del mapa",
    QUEST_FALLBACK = "Misión %d", TIME_REMAINING_HOURS = "Tiempo restante: %dh %02dm",
    TIME_REMAINING_MINUTES = "Tiempo restante: %dm", LEFT_CLICK_TRACK = "Clic izquierdo para seguir",
    RIGHT_CLICK_OPEN_WORLD_MAP = "Clic derecho para abrir esa zona en el mapa grande", DUNGEON_BOSS = "Jefe de mazmorra",
    DEFEATED = "Derrotado", DUNGEON_OR_RAID_BOSS = "Jefe de mazmorra o banda", PULL_FORMAT = "Pull %d",
    CLICK_OPEN_ADVENTURE_GUIDE = "Clic para abrir la Guía de aventuras", DUNGEON_ENEMY = "Enemigo de mazmorra",
    LEVEL_FORMAT = "Nivel %d", ENEMY_FORCES_FORMAT = "Fuerzas enemigas: %d", KILLED = "Eliminado",
    INTERRUPTIBLE_SPELLS = "Contiene hechizos interrumpibles", PATROL = "Patrulla", NPC_FORMAT = "NPC %d",
    DUNGEON_RAID_ENTRANCE = "Entrada de mazmorra o banda", ACCESS_OTHER_ZONE = "Acceso a otra zona",
    UNDISCOVERED_FLIGHT_POINT = "Punto de vuelo sin descubrir", FLIGHT_POINT = "Punto de vuelo",
    ARCHAEOLOGY_DIG = "Excavación arqueológica", EVENT = "Evento", DELVE = "Abismo",
    SKYRIDING_RACE = "Carrera de surcacielos", QUEST_HUB = "Centro de misiones", CURRENT_EVENT = "Evento actual",
    POINT_OF_INTEREST = "Punto de interés", GUARD_DIRECTIONS = "Indicación del guardia",
    TREASURE = "Tesoro", RARE_HIGHLIGHT = "Raro o punto destacado",
    CAMPAIGN_QUEST_AVAILABLE = "Misión de campaña disponible", RECURRING_QUEST_AVAILABLE = "Misión recurrente disponible",
    QUEST_AVAILABLE = "Misión disponible",
    WORLD_QUEST = "Misión de mundo", BONUS_OBJECTIVE = "Objetivo adicional", QUEST_TURN_IN = "Misión lista para entregar",
    ACTIVE_QUEST = "Misión activa", RECURRING_QUEST = "Misión recurrente",
    FULL_OVERVIEW = "Vista completa automática", PROTECTED_POSITION = "Posición protegida",
    POSITION_UNAVAILABLE = "Posición no disponible  |  Zoom %d/%d", NO_MAP_DATA = "Sin datos de mapa",
    NO_USABLE_MAP = "Esta zona no proporciona un mapa utilizable.", MAP_TEXTURE_FAILED = "No se pudieron cargar las texturas de esta zona.",
    CENTER_SAVED = "centro guardado para %s.", THIS_FLOOR = "este piso",
    PROTECTED_POSITION_HELP = "Blizzard protege esta posición. Pon el cursor sobre tu flecha y haz clic derecho; si no la detecta, usa Shift + clic derecho.",
    MODE_COORDINATES = "coordenadas", MODE_FULL_OVERVIEW = "vista completa automática", MODE_SAVED_CALIBRATION = "calibrado guardado",
    MODE_UNCALIBRATED = "protegido sin calibrar", MODE_MANUAL_EXPLORATION = "exploración manual", MODE_MANUAL_CALIBRATION = "calibrado manual",
    DEBUG_PROTECTED = "<protegido>", DEBUG_MAP_INFO = "mapID=%s nombre=%s tipo=%s",
    DEBUG_UNIT_POSITION = "UnitPosition ok=%s x=%s y=%s z=%s instancia=%s", DEBUG_WORLD_MAP = "Mapa mundial instancia=%s tamaño=%.1fx%.1f",
    DEBUG_WORLD_MAP_NIL = "Mapa mundial=nil", DEBUG_LUA_RESULT = "Resultado Lua=%s,%s fuente=%s",
    DEBUG_NATIVE_FRAME = "UnitPositionFrame=%s", DEBUG_SHAPE_BUTTONS = "forma=%s, botones de addons=%d", DEBUG_CENTER = "centrado=%s",
    INSTALLED_HELP = "instalado. Escribe /mzm help para ver los comandos.", HELP_HEADER = "comandos disponibles:",
    HELP_TOGGLE = "/mzm — muestra u oculta el mapa.", HELP_CONFIG = "/mzm config — abre la interfaz de configuración.",
    HELP_SIZE = "/mzm size 180 — cambia el tamaño (120–650 circular; 220–650 cuadrado).",
    HELP_SHAPE = "/mzm forma circular — cambia entre circular y cuadrado.", HELP_BORDER = "/mzm marco 5 — cambia el grosor del marco (0–16).",
    HELP_BUTTONS = "/mzm botones — muestra u oculta los botones de otros addons.", HELP_ICON_SIZE = "/mzm iconos 28 — cambia el tamaño de esos botones (18–48).",
    HELP_ICON_GAP = "/mzm distancia 5 — separa los iconos dentro del contenedor (0–30).", HELP_COLUMNS = "/mzm columnas 4 — cambia las columnas del contenedor (1–8).",
    HELP_HUB_RESET = "/mzm moverboton reset — devuelve los botones junto al mapa.", HELP_PROFILE = "/mzm perfil compacto — aplica normal, compacto o mini.",
    HELP_ARROW = "/mzm flecha 18 — cambia el tamaño de tu flecha (8–40).", HELP_ALPHA = "/mzm alpha 0.9 — cambia la transparencia (0.35–1).",
    HELP_LOCK = "/mzm lock — bloquea o desbloquea la ventana.", HELP_REPLACE = "/mzm replace — activa o desactiva el reemplazo del minimapa.",
    HELP_MINIMAP_BUTTON = "/mzm button — muestra u oculta el botón del minimapa.", HELP_ENEMIES = "/mzm adds — muestra u oculta los adds de mazmorra.",
    HELP_GATHERING = "/mzm recoleccion — alterna la vista nativa de menas y hierbas.", HELP_ROUTE = "/mzm ruta — importa o gestiona una ruta de MDT.",
    HELP_ROUTE_RESET = "/mzm ruta reset — reinicia los adds eliminados de la ruta.", HELP_DEBUG = "/mzm debug — muestra las fuentes de posición disponibles.",
    HELP_RESET = "/mzm reset — restablece la configuración.", WINDOW_LOCKED = "ventana bloqueada.", WINDOW_UNLOCKED = "ventana desbloqueada.",
    CIRCLE_APPLIED = "forma circular. Usa Shift + arrastrar para moverla.", SQUARE_APPLIED = "forma cuadrada.",
    SHAPE_USAGE = "uso: /mzm forma circular  o  /mzm forma cuadrada", BORDER_USAGE = "uso: /mzm marco 5 (entre 0 y 16)",
    BORDER_VALUE = "grosor del marco: %d.", ADDON_BUTTONS_VISIBLE = "botones de addons visibles.", ADDON_BUTTONS_HIDDEN = "botones de addons ocultos.",
    ICON_SIZE_USAGE = "uso: /mzm iconos 28 (entre 18 y 48)", ICON_SIZE_VALUE = "tamaño de botones: %d.",
    ICON_GAP_USAGE = "uso: /mzm distancia 5 (entre 0 y 30)", ICON_GAP_VALUE = "separación de iconos: %d.",
    COLUMNS_USAGE = "uso: /mzm columnas 4 (entre 1 y 8)", COLUMNS_VALUE = "columnas del contenedor: %d.",
    PROFILE_USAGE = "uso: /mzm perfil normal, compacto o mini", PROFILE_APPLIED = "perfil %s aplicado.",
    MINIMAP_BUTTON_VISIBLE = "botón del minimapa visible.", MINIMAP_BUTTON_HIDDEN = "botón del minimapa oculto; usa /mzm para abrir.",
    ENEMIES_VISIBLE = "adds de mazmorra visibles.", ENEMIES_HIDDEN = "adds de mazmorra ocultos.", ROUTE_VISIBLE_MESSAGE = "ruta visible.",
    ROUTE_HIDDEN_MESSAGE = "ruta oculta.", NO_ROUTE_SELECTED_LOWER = "no hay una ruta seleccionada.", ROUTE_DELETED_LOWER = "ruta \"%s\" borrada.",
    ARROW_USAGE = "uso: /mzm flecha 18 (entre 8 y 40)", ARROW_VALUE = "tamaño de la flecha: %d.", SIZE_USAGE = "uso: /mzm size 320",
    SIZE_VALUE = "tamaño: %d.", ALPHA_USAGE = "uso: /mzm alpha 0.9", ALPHA_VALUE = "opacidad: %.2f.",
    UNKNOWN_COMMAND = "comando desconocido. Escribe /mzm help.",
}

if spanish then
    for key, value in pairs(es) do
        L[key] = value
    end
end

Addon.locale = locale
Addon.L = L
Addon.PREFIX = "|cff33ccff" .. L.APP_NAME .. ":|r "

function Addon:Format(key, ...)
    return string.format(self.L[key] or key, ...)
end

function Addon:GetCenterModeLabel(mode)
    local labels = {
        ["coordenadas"] = L.MODE_COORDINATES,
        ["vista completa automática"] = L.MODE_FULL_OVERVIEW,
        ["calibrado guardado"] = L.MODE_SAVED_CALIBRATION,
        ["protegido sin calibrar"] = L.MODE_UNCALIBRATED,
        ["exploración manual"] = L.MODE_MANUAL_EXPLORATION,
        ["calibrado manual"] = L.MODE_MANUAL_CALIBRATION,
    }
    return labels[mode] or mode or L.NOT_INITIALIZED
end
