feat: add i18n localization system (en/es/de) with admin panel

- Add i18n module with tForUser/tForLang/t functions and {{param}} interpolation
- Add 3 locale files: en.json, es.json, de.json (201 keys each)
- Add language selection on /start and /language command with flag emojis
- Localize all bot user-facing strings (handlers, keyboards, errors)
- Localize messageRouter keyboard matching via locale keys
- Add DB migrations 008 (language column) and 009 (language_set column)
- Add localization admin tab at /locales for editing translations
- Add userService.getUserLanguage/setUserLanguage methods
- Cache user object on msg.__user to avoid triple DB fetch
- Idempotent migrations with checkColumnExists guards
- Error boundary on i18n locale file loading
- Admin locales route uses AVAILABLE_LANGUAGES import
This commit is contained in:
NW
2026-06-25 21:22:32 +01:00
parent 41ff2b8769
commit a8bf50df24
29 changed files with 1606 additions and 365 deletions

219
src/i18n/locales/de.json Normal file
View File

@@ -0,0 +1,219 @@
{
"bot": {
"welcome": "Willkommen im Shop! Wähle eine Option:",
"language_select": "🌍 Bitte wähle deine Sprache:",
"language_changed": "✅ Sprache geändert zu {{language}}!",
"error_generic": "Fehler bei der Verarbeitung. Bitte versuche es erneut.",
"account_blocked": "⚠️ Dein Konto wurde vom Administrator gesperrt",
"account_deleted": "⚠️ Dein Konto wurde vom Administrator gelöscht",
"contact_support": "Support kontaktieren"
},
"profile": {
"title": "👤 *Dein Profil*",
"not_found": "Profil nicht gefunden. Bitte verwende /start um eines zu erstellen.",
"telegram_id": "📱 Telegram ID",
"location": "📍 Standort",
"location_not_set": "Nicht festgelegt",
"stats": "📊 Statistiken:",
"total_purchases": "Gesammte Käufe",
"total_spent": "Gesamtausgaben",
"active_wallets": "Aktive Wallets",
"archived_wallets": "Archivierte Wallets",
"bonus_balance": "Bonus-Guthaben",
"available_balance": "Verfügbares Guthaben",
"member_since": "📅 Mitglied seit",
"set_location": "📍 Standort festlegen",
"delete_account": "❌ Konto löschen",
"error_loading": "Fehler beim Laden des Profils. Bitte versuche es erneut."
},
"products": {
"select_country": "🌍 Wähle dein Land:",
"select_city": "🏙 Wähle eine Stadt in {{country}}:",
"select_district": "📍 Wähle einen Bezirk in {{city}}:",
"select_category": "📦 Wähle eine Kategorie:",
"select_product": "Wähle ein Produkt:",
"no_products": "Aktuell keine Produkte verfügbar.",
"no_products_category": "Keine Produkte in dieser Kategorie.",
"no_products_subcategory": "Keine Produkte in dieser Unterkategorie.",
"back_to_countries": "« Zurück zu den Ländern",
"back_to_cities": "« Zurück zu den Städten",
"back_to_subcategories": "« Zurück zu den Unterkategorien",
"back": "« Zurück",
"product_price": "💰 Preis",
"product_description": "📝 Beschreibung",
"product_available": "📦 Verfügbar",
"product_category": "Kategorie",
"buy_now": "🛒 Jetzt kaufen",
"increase": "",
"decrease": "",
"products_in": "📦 Produkte in {{name}}:",
"error_loading": "Fehler beim Laden der Produkte. Bitte versuche es erneut.",
"error_loading_cities": "Fehler beim Laden der Städte. Bitte versuche es erneut.",
"error_loading_districts": "Fehler beim Laden der Bezirke. Bitte versuche es erneut.",
"error_loading_categories": "Fehler beim Laden der Kategorien. Bitte versuche es erneut.",
"error_loading_product": "Fehler beim Laden der Produktdetails. Bitte versuche es erneut.",
"not_found": "Standort nicht gefunden. Zurück zum vorherigen Menü."
},
"purchase": {
"summary": "🛒 Kaufübersicht:",
"product": "Produkt",
"quantity": "Menge",
"total": "Gesamt",
"pay": "Bezahlen",
"cancel": "« Abbrechen",
"insufficient_balance": "❌ Nicht genug Guthaben. Dein aktuelles Guthaben: ${{balance}}. Du benötigst: ${{total}}.",
"need_wallet": "Du musst zuerst ein Krypto-Wallet hinzufügen, um Käufe zu tätigen.",
"add_wallet": " Wallet hinzufügen",
"top_up_balance": "💰 Guthaben aufladen",
"not_enough_stock": "❌ Nicht genug auf Lager. Nur {{count}} verfügbar.",
"not_enough_money": "Nicht genug Guthaben",
"details": "📦 Kaufdetails:",
"location": "Standort",
"category": "Kategorie",
"private_info": "🔒 Private Informationen:",
"hidden_location": "Versteckter Standort",
"coordinates": "Koordinaten",
"view_purchase": "Kauf ansehen",
"confirm_received": "Erhalten!",
"back_to_list": "« Zurück zur Kaufübersicht",
"history_empty": "Dein Kaufverlauf ist leer.",
"browse_products": "🛍 Produkte durchsuchen",
"select_purchase": "📦 Wähle einen Kauf für Details (Seite {{page}} von {{total}}):",
"page_back": "« Zurück (Seite {{page}})",
"page_next": "Weiter » (Seite {{page}})",
"page_info": "Seite {{current}} von {{total}}",
"no_such_purchase": "Kauf nicht gefunden",
"no_such_product": "Produkt nicht gefunden",
"purchase_received": "Danke! Dein Kauf wurde als erhalten markiert.",
"admin_notification": "Benutzer {{username}} hat den Erhalt von Kauf #{{purchaseId}} bestätigt.",
"error_loading": "Fehler beim Laden des Kaufverlaufs. Bitte versuche es erneut.",
"error_loading_details": "Fehler beim Laden der Kaufdetails. Bitte versuche es erneut.",
"error_confirming": "Fehler bei der Empfangsbestätigung. Bitte versuche es erneut.",
"error_processing": "Fehler bei der Kaufabwicklung. Bitte versuche es erneut.",
"invalid_wallet": "Ungültiger Wallet-Typ.",
"invalid_product": "Ungültiges Produkt.",
"invalid_quantity": "Ungültige Menge."
},
"wallet": {
"your_wallets": "💰 *Deine Wallets*",
"your_active_wallets": "💰 *Deine aktiven Wallets:*",
"balance": "Guthaben",
"value": "Wert",
"address": "Adresse",
"network": "Netzwerk",
"deposit": "💳 {{type}} aufladen",
"deposit_via_changenow": "💳 Über ChangeNOW aufladen",
"select_crypto": "🔐 Wähle eine Kryptowährung zum Wallet erstellen:",
"wallet_generated": "✅ Neues Wallet erfolgreich erstellt!",
"wallet_type": "Typ",
"previous_archived": " Dein vorheriges Wallet wurde archiviert.",
"recovery_stored": "⚠️ Wichtig: Deine Wiederherstellungsphrase wurde sicher gespeichert.",
"error_generating": "❌ Fehler beim Wallet erstellen. Bitte versuche es erneut.",
"no_wallets": "Du hast noch keine Wallets. Erstelle zuerst eines.",
"no_wallets_prefix": "❌ Du hast noch keine Wallets. Erstelle zuerst eines.",
"no_active_wallets": "Du hast keine aktiven Wallets.",
"back_to_balance": "« Zurück zum Guthaben",
"back": "« Zurück",
"invalid_wallet_type": "Ungültiger Wallet-Typ.",
"user_not_found": "Benutzer nicht gefunden.",
"profile_not_found": "Profil nicht gefunden. Bitte verwende /start.",
"profile_not_found_short": "Profil nicht gefunden.",
"error_loading": "Fehler beim Laden der Wallets. Bitte versuche es erneut.",
"error_loading_balance": "Fehler beim Laden des Guthabens. Bitte versuche es erneut.",
"error_loading_archived": "Fehler beim Laden der archivierten Wallets. Bitte versuche es erneut.",
"error_loading_history": "Fehler beim Laden der Transaktionshistorie. Bitte versuche es erneut.",
"error_refreshing_balances": "❌ Fehler beim Aktualisieren der Guthaben.",
"error_refreshing_balances_retry": "❌ Fehler beim Aktualisieren der Guthaben. Bitte versuche es erneut.",
"error_deposit_instructions": "Fehler beim Erstellen der Einzahlungsanleitung. Bitte versuche es erneut.",
"error_copying_address": "Fehler beim Kopieren der Adresse.",
"add_crypto_wallet": " Krypto-Wallet hinzufügen",
"top_up": "💸 Aufladen",
"refresh_balance": "🔄 Guthaben aktualisieren",
"refreshing_balances": "🔄 Guthaben werden aktualisiert...",
"archived_wallets_count": "📁 Archivierte Wallets ({{count}})",
"archived_wallets_title": "📁 *Archivierte Wallets:*",
"no_archived_wallets": "Keine archivierten Wallets gefunden.",
"archived_date": "Archiviert",
"total_crypto_balance": "📊 *Gesamtes Krypto-Guthaben:*",
"bonus_balance_label": "🎁 *Bonus-Guthaben:*",
"available_balance_label": "💰 *Verfügbares Guthaben:*",
"total_type": "📊 *Gesamt {{type}}:*",
"amount": "Betrag",
"total_archived_value": "💰 *Gesamtwert der archivierten Wallets:*",
"transaction_history": "📊 Transaktionshistorie",
"transaction_history_title": "📊 *Transaktionshistorie:*",
"recent_transactions": "📊 *Letzte Transaktionen:*",
"no_transactions": "Keine Transaktionen gefunden.",
"tx_amount": "💰 Betrag",
"tx_hash": "🔗 TX-Hash",
"tx_date": "🕒 Datum",
"tx_wallet_type": "💼 Wallet-Typ",
"previous_page": "⬅️ Zurück",
"next_page": "➡️ Weiter",
"wallet_not_found": "Wallet nicht gefunden. Bitte versuche es erneut.",
"wallet_not_found_short": "Wallet nicht gefunden.",
"deposit_changenow_select": "💳 *Einzahlung über ChangeNOW*\n\nWähle das Wallet zum Aufladen:",
"deposit_select_amount": "💳 *{{type}} aufladen*\n\nWähle den Betrag (USD) zum Aufladen:",
"deposit_title": "💳 *{{type}} aufladen — €{{amount}}*",
"deposit_instructions_title": "📋 *Schritt-für-Schritt-Anleitung:*",
"deposit_step1": "1⃣ Tippe auf *Adresse kopieren* unten, um deine Wallet-Adresse zu kopieren",
"deposit_step2": "2⃣ Tippe auf *ChangeNOW öffnen* \\— Betrag €{{amount}} und Währung {{type}} sind bereits eingestellt",
"deposit_step3": "3⃣ Füge auf ChangeNOW die kopierte Adresse als Empfangswallet ein",
"deposit_step4": "4⃣ Gib deine E-Mail ein und erstelle ein Passwort \\— dies ist *gesetzlich vorgeschrieben* für Kartenzahlungen \\(KYC-Verifizierung\\)\\. Deine Daten sind durch ChangeNOWs Sicherheit geschützt",
"deposit_step5": "5⃣ Bezahle mit deiner Bankkarte \\(Visa\\/Mastercard\\)",
"deposit_step6": "6⃣ Die Kryptowährung wird innerhalb von 5\\-30 Minuten in deinem Wallet eintreffen",
"deposit_your_address": "🔐 *Deine {{type}} Wallet-Adresse:*",
"deposit_important_title": "⚠️ *Wichtig:*",
"deposit_important1": "• Überprüfe die Wallet-Adresse doppelt vor der Bestätigung",
"deposit_important2": "• E-Mail \\+ Passwort auf ChangeNOW ist ein Standard-Verifizierungsschritt für Kartenzahlungen \\— keine Sorge\\, es ist sicher",
"deposit_important3": "• Wenn die Kryptowährung nicht innerhalb von 30 Minuten eintrifft \\— prüfe den Transaktionsstatus in deiner ChangeNOW E-Mail-Bestätigung",
"deposit_open_changenow": "🌐 ChangeNOW öffnen — €{{amount}} → {{type}}",
"deposit_copy_address": "📋 Adresse kopieren",
"deposit_change_amount": "🔄 Betrag ändern",
"deposit_choose_different": "💸 Anderes Wallet wählen",
"deposit_wallet_address": "{{type}} Wallet-Adresse:",
"back_to_deposit": "« Zurück zur Einzahlung",
"deposit_address_sent": "📋 {{type}}-Adresse gesendet! Kopiere sie aus der Nachricht unten.",
"network_erc20": "Ethereum-Netzwerk (ERC-20)",
"network_btc": "Bitcoin-Netzwerk",
"network_ltc": "Litecoin-Netzwerk",
"network_eth": "Ethereum-Netzwerk",
"network_unknown": "Unbekanntes Netzwerk"
},
"location": {
"select_country": "🌍 Wähle dein Land:",
"select_city": "🏙 Wähle eine Stadt in {{country}}:",
"select_district": "📍 Wähle einen Bezirk in {{city}}:",
"no_locations": "Noch keine Standorte verfügbar.",
"back_to_profile": "« Zurück zum Profil",
"back_to_countries": "« Zurück zu den Ländern",
"location_updated": "✅ Standort erfolgreich aktualisiert!",
"country": "Land",
"city": "Stadt",
"district": "Bezirk",
"error_loading_countries": "Fehler beim Laden der Länder. Bitte versuche es erneut.",
"error_loading_cities": "Fehler beim Laden der Städte. Bitte versuche es erneut.",
"error_loading_districts": "Fehler beim Laden der Bezirke. Bitte versuche es erneut.",
"error_updating": "Fehler beim Aktualisieren des Standorts. Bitte versuche es erneut."
},
"deletion": {
"confirm_title": "⚠️ Bist du sicher, dass du dein Konto löschen möchtest?",
"confirm_body": "Diese Aktion:\n- Löscht alle Benutzerdaten\n- Entfernt alle Wallets\n- Löscht den Kaufverlauf\n\nDiese Aktion kann nicht rückgängig gemacht werden!",
"confirm_button": "✅ Löschung bestätigen",
"cancel_button": "❌ Abbrechen",
"deleted": "⚠️ Dein Konto wurde erfolgreich gelöscht",
"error_processing": "Fehler bei der Löschanfrage. Bitte versuche es erneut.",
"error_deleting": "Fehler beim Löschen des Benutzers. Bitte versuche es erneut."
},
"keyboard": {
"products": "📦 Produkte",
"profile": "👤 Profil",
"purchases": "🛍 Käufe",
"wallets": "💰 Wallets",
"manage_products": "📦 Produkte verwalten",
"manage_users": "👥 Benutzer verwalten",
"manage_locations": "📍 Standorte verwalten",
"database_backup": "💾 Datenbank-Backup",
"manage_wallets": "💰 Wallets verwalten"
}
}

219
src/i18n/locales/en.json Normal file
View File

@@ -0,0 +1,219 @@
{
"bot": {
"welcome": "Welcome to the shop! Choose an option:",
"language_select": "🌍 Please select your language:",
"language_changed": "✅ Language changed to {{language}}!",
"error_generic": "Error processing request. Please try again.",
"account_blocked": "⚠️ Your account has been blocked by administrator",
"account_deleted": "⚠️ Your account has been deleted by administrator",
"contact_support": "Contact support"
},
"profile": {
"title": "👤 *Your Profile*",
"not_found": "Profile not found. Please use /start to create one.",
"telegram_id": "📱 Telegram ID",
"location": "📍 Location",
"location_not_set": "Not set",
"stats": "📊 Statistics:",
"total_purchases": "Total Purchases",
"total_spent": "Total Spent",
"active_wallets": "Active Wallets",
"archived_wallets": "Archived Wallets",
"bonus_balance": "Bonus Balance",
"available_balance": "Available Balance",
"member_since": "📅 Member since",
"set_location": "📍 Set Location",
"delete_account": "❌ Delete Account",
"error_loading": "Error loading profile. Please try again."
},
"products": {
"select_country": "🌍 Select your country:",
"select_city": "🏙 Select city in {{country}}:",
"select_district": "📍 Select district in {{city}}:",
"select_category": "📦 Select category:",
"select_product": "Select a product:",
"no_products": "No products available at the moment.",
"no_products_category": "No products available in this category.",
"no_products_subcategory": "No products available in this subcategory.",
"back_to_countries": "« Back to Countries",
"back_to_cities": "« Back to Cities",
"back_to_subcategories": "« Back to Subcategories",
"back": "« Back",
"product_price": "💰 Price",
"product_description": "📝 Description",
"product_available": "📦 Available",
"product_category": "Category",
"buy_now": "🛒 Buy Now",
"increase": "",
"decrease": "",
"products_in": "📦 Products in {{name}}:",
"error_loading": "Error loading products. Please try again.",
"error_loading_cities": "Error loading cities. Please try again.",
"error_loading_districts": "Error loading districts. Please try again.",
"error_loading_categories": "Error loading categories. Please try again.",
"error_loading_product": "Error loading product details. Please try again.",
"not_found": "Location not found. Returning to previous menu."
},
"purchase": {
"summary": "🛒 Purchase Summary:",
"product": "Product",
"quantity": "Quantity",
"total": "Total",
"pay": "Pay",
"cancel": "« Cancel",
"insufficient_balance": "❌ Insufficient balance. Your current balance is ${{balance}}. You need ${{total}} to complete this purchase.",
"need_wallet": "You need to add a crypto wallet first to make purchases.",
"add_wallet": " Add Wallet",
"top_up_balance": "💰 Top Up Balance",
"not_enough_stock": "❌ Not enough items in stock. Only {{count}} available.",
"not_enough_money": "Not enough money",
"details": "📦 Purchase Details:",
"location": "Location",
"category": "Category",
"private_info": "🔒 Private Information:",
"hidden_location": "Hidden Location",
"coordinates": "Coordinates",
"view_purchase": "View new purchase",
"confirm_received": "I've got it!",
"back_to_list": "« Back to Purchase List",
"history_empty": "Your purchase history is empty.",
"browse_products": "🛍 Browse Products",
"select_purchase": "📦 Select purchase to view detailed information (Page {{page}} of {{total}}):",
"page_back": "« Back (Page {{page}})",
"page_next": "Next » (Page {{page}})",
"page_info": "Page {{current}} of {{total}}",
"no_such_purchase": "No such purchase",
"no_such_product": "No such product",
"purchase_received": "Thank you! Your purchase has been marked as received.",
"admin_notification": "User {{username}} has confirmed receiving purchase #{{purchaseId}}.",
"error_loading": "Error loading purchase history. Please try again.",
"error_loading_details": "Error loading purchase details. Please try again.",
"error_confirming": "Error confirming receipt. Please try again.",
"error_processing": "Error processing purchase. Please try again.",
"invalid_wallet": "Invalid wallet type.",
"invalid_product": "Invalid product.",
"invalid_quantity": "Invalid quantity."
},
"wallet": {
"your_wallets": "💰 *Your Wallets*",
"your_active_wallets": "💰 *Your Active Wallets:*",
"balance": "Balance",
"value": "Value",
"address": "Address",
"network": "Network",
"deposit": "💳 Deposit {{type}}",
"deposit_via_changenow": "💳 Deposit via ChangeNOW",
"select_crypto": "🔐 Select cryptocurrency to generate wallet:",
"wallet_generated": "✅ New wallet generated successfully!",
"wallet_type": "Type",
"previous_archived": " Your previous wallet has been archived.",
"recovery_stored": "⚠️ Important: Your recovery phrase has been securely stored.",
"error_generating": "❌ Error generating wallet. Please try again.",
"no_wallets": "You don't have any wallets yet. Create one first.",
"no_wallets_prefix": "❌ You don't have any wallets yet. Create one first.",
"no_active_wallets": "You don't have any active wallets yet.",
"back_to_balance": "« Back to Balance",
"back": "« Back",
"invalid_wallet_type": "Invalid wallet type.",
"user_not_found": "User not found.",
"profile_not_found": "Profile not found. Please use /start to create one.",
"profile_not_found_short": "Profile not found.",
"error_loading": "Error loading wallets. Please try again.",
"error_loading_balance": "Error loading balance. Please try again.",
"error_loading_archived": "Error loading archived wallets. Please try again.",
"error_loading_history": "Error loading transaction history. Please try again.",
"error_refreshing_balances": "❌ Error refreshing balances.",
"error_refreshing_balances_retry": "❌ Error refreshing balances. Please try again.",
"error_deposit_instructions": "Error creating deposit instructions. Please try again.",
"error_copying_address": "Error copying address.",
"add_crypto_wallet": " Add Crypto Wallet",
"top_up": "💸 Top Up",
"refresh_balance": "🔄 Refresh Balance",
"refreshing_balances": "🔄 Refreshing balances...",
"archived_wallets_count": "📁 Archived Wallets ({{count}})",
"archived_wallets_title": "📁 *Archived Wallets:*",
"no_archived_wallets": "No archived wallets found.",
"archived_date": "Archived",
"total_crypto_balance": "📊 *Total Crypto Balance:*",
"bonus_balance_label": "🎁 *Bonus Balance:*",
"available_balance_label": "💰 *Available Balance:*",
"total_type": "📊 *Total {{type}}:*",
"amount": "Amount",
"total_archived_value": "💰 *Total Value of Archived Wallets:*",
"transaction_history": "📊 Transaction History",
"transaction_history_title": "📊 *Transaction History:*",
"recent_transactions": "📊 *Recent Transactions:*",
"no_transactions": "No transactions found.",
"tx_amount": "💰 Amount",
"tx_hash": "🔗 TX Hash",
"tx_date": "🕒 Date",
"tx_wallet_type": "💼 Wallet Type",
"previous_page": "⬅️ Previous",
"next_page": "➡️ Next",
"wallet_not_found": "Wallet not found. Please try again.",
"wallet_not_found_short": "Wallet not found.",
"deposit_changenow_select": "💳 *Deposit via ChangeNOW*\n\nSelect the wallet you want to top up:",
"deposit_select_amount": "💳 *Deposit {{type}}*\n\nSelect the amount (USD) you want to deposit:",
"deposit_title": "💳 *Deposit {{type}} — €{{amount}}*",
"deposit_instructions_title": "📋 *Step\\-by\\-step instructions:*",
"deposit_step1": "1⃣ Tap *Copy Address* below to copy your wallet address",
"deposit_step2": "2⃣ Tap *Open ChangeNOW* \\— the amount €{{amount}} and currency {{type}} are already set",
"deposit_step3": "3⃣ On ChangeNOW\\, paste the copied address as the receiving wallet",
"deposit_step4": "4⃣ Enter your email and create a password when prompted \\— this is *required by law* for card payments \\(KYC verification\\)\\. Your data is protected by ChangeNOW\\'s security",
"deposit_step5": "5⃣ Pay with your bank card \\(Visa\\/Mastercard\\)",
"deposit_step6": "6⃣ Crypto will arrive in your wallet within 5\\-30 minutes",
"deposit_your_address": "🔐 *Your {{type}} wallet address:*",
"deposit_important_title": "⚠️ *Important:*",
"deposit_important1": "• Double\\-check the wallet address before confirming",
"deposit_important2": "• Email \\+ password on ChangeNOW is a standard verification step for card payments \\— don\\'t worry\\, it\\'s safe",
"deposit_important3": "• If crypto doesn\\'t arrive within 30 min \\— check the transaction status in your ChangeNOW email confirmation",
"deposit_open_changenow": "🌐 Open ChangeNOW — €{{amount}} → {{type}}",
"deposit_copy_address": "📋 Copy Address",
"deposit_change_amount": "🔄 Change Amount",
"deposit_choose_different": "💸 Choose Different Wallet",
"deposit_wallet_address": "{{type}} wallet address:",
"back_to_deposit": "« Back to Deposit",
"deposit_address_sent": "📋 {{type}} address sent! Copy it from the message below.",
"network_erc20": "Ethereum Network (ERC-20)",
"network_btc": "Bitcoin Network",
"network_ltc": "Litecoin Network",
"network_eth": "Ethereum Network",
"network_unknown": "Unknown Network"
},
"location": {
"select_country": "🌍 Select your country:",
"select_city": "🏙 Select city in {{country}}:",
"select_district": "📍 Select district in {{city}}:",
"no_locations": "No locations available yet.",
"back_to_profile": "« Back to Profile",
"back_to_countries": "« Back to Countries",
"location_updated": "✅ Location updated successfully!",
"country": "Country",
"city": "City",
"district": "District",
"error_loading_countries": "Error loading countries. Please try again.",
"error_loading_cities": "Error loading cities. Please try again.",
"error_loading_districts": "Error loading districts. Please try again.",
"error_updating": "Error updating location. Please try again."
},
"deletion": {
"confirm_title": "⚠️ Are you sure you want to delete your account?",
"confirm_body": "This action will:\n- Delete all user data\n- Remove all wallets\n- Erase purchase history\n\nThis action cannot be undone!",
"confirm_button": "✅ Confirm Delete",
"cancel_button": "❌ Cancel",
"deleted": "⚠️ Your account has been successfully deleted",
"error_processing": "Error processing delete request. Please try again.",
"error_deleting": "Error deleting user. Please try again."
},
"keyboard": {
"products": "📦 Products",
"profile": "👤 Profile",
"purchases": "🛍 Purchases",
"wallets": "💰 Wallets",
"manage_products": "📦 Manage Products",
"manage_users": "👥 Manage Users",
"manage_locations": "📍 Manage Locations",
"database_backup": "💾 Database Backup",
"manage_wallets": "💰 Manage Wallets"
}
}

219
src/i18n/locales/es.json Normal file
View File

@@ -0,0 +1,219 @@
{
"bot": {
"welcome": "¡Bienvenido a la tienda! Elige una opción:",
"language_select": "🌍 Por favor, selecciona tu idioma:",
"language_changed": "✅ ¡Idioma cambiado a {{language}}!",
"error_generic": "Error al procesar la solicitud. Inténtalo de nuevo.",
"account_blocked": "⚠️ Tu cuenta ha sido bloqueada por el administrador",
"account_deleted": "⚠️ Tu cuenta ha sido eliminada por el administrador",
"contact_support": "Contactar soporte"
},
"profile": {
"title": "👤 *Tu Perfil*",
"not_found": "Perfil no encontrado. Usa /start para crear uno.",
"telegram_id": "📱 Telegram ID",
"location": "📍 Ubicación",
"location_not_set": "No establecida",
"stats": "📊 Estadísticas:",
"total_purchases": "Compras totales",
"total_spent": "Total gastado",
"active_wallets": "Billeteras activas",
"archived_wallets": "Billeteras archivadas",
"bonus_balance": "Saldo de bonificación",
"available_balance": "Saldo disponible",
"member_since": "📅 Miembro desde",
"set_location": "📍 Establecer ubicación",
"delete_account": "❌ Eliminar cuenta",
"error_loading": "Error al cargar perfil. Inténtalo de nuevo."
},
"products": {
"select_country": "🌍 Selecciona tu país:",
"select_city": "🏙 Selecciona ciudad en {{country}}:",
"select_district": "📍 Selecciona distrito en {{city}}:",
"select_category": "📦 Selecciona categoría:",
"select_product": "Selecciona un producto:",
"no_products": "No hay productos disponibles en este momento.",
"no_products_category": "No hay productos disponibles en esta categoría.",
"no_products_subcategory": "No hay productos disponibles en esta subcategoría.",
"back_to_countries": "« Volver a países",
"back_to_cities": "« Volver a ciudades",
"back_to_subcategories": "« Volver a subcategorías",
"back": "« Volver",
"product_price": "💰 Precio",
"product_description": "📝 Descripción",
"product_available": "📦 Disponibles",
"product_category": "Categoría",
"buy_now": "🛒 Comprar ahora",
"increase": "",
"decrease": "",
"products_in": "📦 Productos en {{name}}:",
"error_loading": "Error al cargar productos. Inténtalo de nuevo.",
"error_loading_cities": "Error al cargar ciudades. Inténtalo de nuevo.",
"error_loading_districts": "Error al cargar distritos. Inténtalo de nuevo.",
"error_loading_categories": "Error al cargar categorías. Inténtalo de nuevo.",
"error_loading_product": "Error al cargar detalles del producto. Inténtalo de nuevo.",
"not_found": "Ubicación no encontrada. Volviendo al menú anterior."
},
"purchase": {
"summary": "🛒 Resumen de compra:",
"product": "Producto",
"quantity": "Cantidad",
"total": "Total",
"pay": "Pagar",
"cancel": "« Cancelar",
"insufficient_balance": "❌ Saldo insuficiente. Tu saldo actual es ${{balance}}. Necesitas ${{total}} para completar esta compra.",
"need_wallet": "Necesitas agregar una billetera cripto primero para hacer compras.",
"add_wallet": " Agregar billetera",
"top_up_balance": "💰 Recargar saldo",
"not_enough_stock": "❌ No hay suficientes unidades en stock. Solo {{count}} disponibles.",
"not_enough_money": "Dinero insuficiente",
"details": "📦 Detalles de la compra:",
"location": "Ubicación",
"category": "Categoría",
"private_info": "🔒 Información privada:",
"hidden_location": "Ubicación oculta",
"coordinates": "Coordenadas",
"view_purchase": "Ver nueva compra",
"confirm_received": "¡Lo recibí!",
"back_to_list": "« Volver a la lista de compras",
"history_empty": "Tu historial de compras está vacío.",
"browse_products": "🛍 Ver productos",
"select_purchase": "📦 Selecciona una compra para ver detalles (Página {{page}} de {{total}}):",
"page_back": "« Anterior (Pág. {{page}})",
"page_next": "Siguiente » (Pág. {{page}})",
"page_info": "Pág. {{current}} de {{total}}",
"no_such_purchase": "No existe esa compra",
"no_such_product": "No existe ese producto",
"purchase_received": "¡Gracias! Tu compra ha sido marcada como recibida.",
"admin_notification": "El usuario {{username}} ha confirmado recibir la compra #{{purchaseId}}.",
"error_loading": "Error al cargar historial de compras. Inténtalo de nuevo.",
"error_loading_details": "Error al cargar detalles de la compra. Inténtalo de nuevo.",
"error_confirming": "Error al confirmar recepción. Inténtalo de nuevo.",
"error_processing": "Error al procesar la compra. Inténtalo de nuevo.",
"invalid_wallet": "Tipo de billetera inválido.",
"invalid_product": "Producto inválido.",
"invalid_quantity": "Cantidad inválida."
},
"wallet": {
"your_wallets": "💰 *Tus billeteras*",
"your_active_wallets": "💰 *Tus billeteras activas:*",
"balance": "Saldo",
"value": "Valor",
"address": "Dirección",
"network": "Red",
"deposit": "💳 Depositar {{type}}",
"deposit_via_changenow": "💳 Depositar vía ChangeNOW",
"select_crypto": "🔐 Selecciona criptomoneda para generar billetera:",
"wallet_generated": "✅ ¡Nueva billetera generada exitosamente!",
"wallet_type": "Tipo",
"previous_archived": " Tu billetera anterior ha sido archivada.",
"recovery_stored": "⚠️ Importante: Tu frase de recuperación ha sido almacenada de forma segura.",
"error_generating": "❌ Error al generar billetera. Inténtalo de nuevo.",
"no_wallets": "Aún no tienes billeteras. Crea una primero.",
"no_wallets_prefix": "❌ Aún no tienes billeteras. Crea una primero.",
"no_active_wallets": "Aún no tienes billeteras activas.",
"back_to_balance": "« Volver al saldo",
"back": "« Volver",
"invalid_wallet_type": "Tipo de billetera inválido.",
"user_not_found": "Usuario no encontrado.",
"profile_not_found": "Perfil no encontrado. Usa /start para crear uno.",
"profile_not_found_short": "Perfil no encontrado.",
"error_loading": "Error al cargar billeteras. Inténtalo de nuevo.",
"error_loading_balance": "Error al cargar saldo. Inténtalo de nuevo.",
"error_loading_archived": "Error al cargar billeteras archivadas. Inténtalo de nuevo.",
"error_loading_history": "Error al cargar historial de transacciones. Inténtalo de nuevo.",
"error_refreshing_balances": "❌ Error al actualizar saldos.",
"error_refreshing_balances_retry": "❌ Error al actualizar saldos. Inténtalo de nuevo.",
"error_deposit_instructions": "Error al crear instrucciones de depósito. Inténtalo de nuevo.",
"error_copying_address": "Error al copiar dirección.",
"add_crypto_wallet": " Agregar billetera cripto",
"top_up": "💸 Recargar",
"refresh_balance": "🔄 Actualizar saldo",
"refreshing_balances": "🔄 Actualizando saldos...",
"archived_wallets_count": "📁 Billeteras archivadas ({{count}})",
"archived_wallets_title": "📁 *Billeteras archivadas:*",
"no_archived_wallets": "No se encontraron billeteras archivadas.",
"archived_date": "Archivada",
"total_crypto_balance": "📊 *Saldo total cripto:*",
"bonus_balance_label": "🎁 *Saldo de bonificación:*",
"available_balance_label": "💰 *Saldo disponible:*",
"total_type": "📊 *Total {{type}}:*",
"amount": "Cantidad",
"total_archived_value": "💰 *Valor total de billeteras archivadas:*",
"transaction_history": "📊 Historial de transacciones",
"transaction_history_title": "📊 *Historial de transacciones:*",
"recent_transactions": "📊 *Transacciones recientes:*",
"no_transactions": "No se encontraron transacciones.",
"tx_amount": "💰 Cantidad",
"tx_hash": "🔗 TX Hash",
"tx_date": "🕒 Fecha",
"tx_wallet_type": "💼 Tipo de billetera",
"previous_page": "⬅️ Anterior",
"next_page": "➡️ Siguiente",
"wallet_not_found": "Billetera no encontrada. Inténtalo de nuevo.",
"wallet_not_found_short": "Billetera no encontrada.",
"deposit_changenow_select": "💳 *Depositar vía ChangeNOW*\n\nSelecciona la billetera que quieres recargar:",
"deposit_select_amount": "💳 *Depositar {{type}}*\n\nSelecciona la cantidad (USD) que quieres depositar:",
"deposit_title": "💳 *Depositar {{type}} — €{{amount}}*",
"deposit_instructions_title": "📋 *Instrucciones paso a paso:*",
"deposit_step1": "1⃣ Toca *Copiar dirección* abajo para copiar tu dirección de billetera",
"deposit_step2": "2⃣ Toca *Abrir ChangeNOW* \\— la cantidad €{{amount}} y la moneda {{type}} ya están configuradas",
"deposit_step3": "3⃣ En ChangeNOW\\, pega la dirección copiada como billetera receptora",
"deposit_step4": "4⃣ Ingresa tu correo y crea una contraseña cuando se solicite \\— esto es *requerido por ley* para pagos con tarjeta \\(verificación KYC\\)\\. Tus datos están protegidos por la seguridad de ChangeNOW",
"deposit_step5": "5⃣ Paga con tu tarjeta bancaria \\(Visa\\/Mastercard\\)",
"deposit_step6": "6⃣ Las criptomonedas llegarán a tu billetera en 5\\-30 minutos",
"deposit_your_address": "🔐 *Tu dirección de billetera {{type}}:*",
"deposit_important_title": "⚠️ *Importante:*",
"deposit_important1": "• Verifica dos veces la dirección de la billetera antes de confirmar",
"deposit_important2": "• Correo \\+ contraseña en ChangeNOW es un paso de verificación estándar para pagos con tarjeta \\— no te preocupes\\, es seguro",
"deposit_important3": "• Si las criptomonedas no llegan en 30 min \\— verifica el estado de la transacción en tu confirmación por correo de ChangeNOW",
"deposit_open_changenow": "🌐 Abrir ChangeNOW — €{{amount}} → {{type}}",
"deposit_copy_address": "📋 Copiar dirección",
"deposit_change_amount": "🔄 Cambiar cantidad",
"deposit_choose_different": "💸 Elegir otra billetera",
"deposit_wallet_address": "Dirección de billetera {{type}}:",
"back_to_deposit": "« Volver al depósito",
"deposit_address_sent": "📋 ¡Dirección {{type}} enviada! Cópiala del mensaje de abajo.",
"network_erc20": "Red Ethereum (ERC-20)",
"network_btc": "Red Bitcoin",
"network_ltc": "Red Litecoin",
"network_eth": "Red Ethereum",
"network_unknown": "Red desconocida"
},
"location": {
"select_country": "🌍 Selecciona tu país:",
"select_city": "🏙 Selecciona ciudad en {{country}}:",
"select_district": "📍 Selecciona distrito en {{city}}:",
"no_locations": "No hay ubicaciones disponibles aún.",
"back_to_profile": "« Volver al perfil",
"back_to_countries": "« Volver a países",
"location_updated": "✅ ¡Ubicación actualizada exitosamente!",
"country": "País",
"city": "Ciudad",
"district": "Distrito",
"error_loading_countries": "Error al cargar países. Inténtalo de nuevo.",
"error_loading_cities": "Error al cargar ciudades. Inténtalo de nuevo.",
"error_loading_districts": "Error al cargar distritos. Inténtalo de nuevo.",
"error_updating": "Error al actualizar ubicación. Inténtalo de nuevo."
},
"deletion": {
"confirm_title": "⚠️ ¿Estás seguro de que quieres eliminar tu cuenta?",
"confirm_body": "Esta acción:\n- Eliminará todos los datos de usuario\n- Eliminará todas las billeteras\n- Borrará el historial de compras\n\n¡Esta acción no se puede deshacer!",
"confirm_button": "✅ Confirmar eliminación",
"cancel_button": "❌ Cancelar",
"deleted": "⚠️ Tu cuenta ha sido eliminada exitosamente",
"error_processing": "Error al procesar la solicitud de eliminación. Inténtalo de nuevo.",
"error_deleting": "Error al eliminar usuario. Inténtalo de nuevo."
},
"keyboard": {
"products": "📦 Productos",
"profile": "👤 Perfil",
"purchases": "🛍 Compras",
"wallets": "💰 Billeteras",
"manage_products": "📦 Gestionar productos",
"manage_users": "👥 Gestionar usuarios",
"manage_locations": "📍 Gestionar ubicaciones",
"database_backup": "💾 Respaldo de base de datos",
"manage_wallets": "💰 Gestionar billeteras"
}
}