feat: Complete localization system with i18n and DeepSeek AI translation

🌐 Interface Localization:
- Added i18next for multi-language interface support
- Created LocalizationService with language detection
- Added translation files for Russian and English
- Implemented language selection in user settings

🤖 AI Profile Translation (Premium feature):
- Integrated DeepSeek API for profile translation
- Added TranslationController for translation management
- Premium-only access to profile translation feature
- Support for 10 languages (ru, en, es, fr, de, it, pt, zh, ja, ko)

�� Database & Models:
- Added language field to users table with migration
- Updated User model to support language preferences
- Added language constraints and indexing

🎛️ User Interface:
- Added language settings menu in bot settings
- Implemented callback handlers for language selection
- Added translate profile button for VIP users
- Localized all interface strings

📚 Documentation:
- Created comprehensive LOCALIZATION.md guide
- Documented API usage and configuration
- Added examples for extending language support
This commit is contained in:
2025-09-13 08:59:10 +09:00
parent 975eb348dd
commit edddd52589
12 changed files with 992 additions and 8 deletions

101
src/locales/en.json Normal file
View File

@@ -0,0 +1,101 @@
{
"welcome": {
"greeting": "Welcome to Telegram Tinder Bot! 💕",
"description": "Find your soulmate right here!",
"getStarted": "Get Started"
},
"profile": {
"create": "Create Profile",
"edit": "Edit Profile",
"view": "View Profile",
"name": "Name",
"age": "Age",
"city": "City",
"bio": "About",
"photos": "Photos",
"gender": "Gender",
"lookingFor": "Looking for",
"datingGoal": "Dating Goal",
"hobbies": "Hobbies",
"lifestyle": "Lifestyle",
"male": "Male",
"female": "Female",
"both": "Both",
"relationship": "Relationship",
"friendship": "Friendship",
"dating": "Dating",
"hookup": "Hookup",
"marriage": "Marriage",
"networking": "Networking",
"travel": "Travel",
"business": "Business",
"other": "Other"
},
"search": {
"title": "Browse Profiles",
"noProfiles": "No more profiles! Try again later.",
"like": "❤️ Like",
"dislike": "👎 Pass",
"superLike": "⭐ Super Like",
"match": "It's a match! 🎉"
},
"vip": {
"title": "VIP Search",
"premiumRequired": "This feature is available for premium users only",
"filters": "Filters",
"ageRange": "Age Range",
"cityFilter": "City",
"datingGoalFilter": "Dating Goal",
"hobbiesFilter": "Hobbies",
"lifestyleFilter": "Lifestyle",
"applyFilters": "Apply Filters",
"clearFilters": "Clear Filters",
"noResults": "No profiles found with your filters",
"translateProfile": "🌐 Translate Profile"
},
"premium": {
"title": "Premium Subscription",
"features": "Premium features:",
"vipSearch": "• VIP search with filters",
"profileTranslation": "• Profile translation to your language",
"unlimitedLikes": "• Unlimited likes",
"superLikes": "• Extra super likes",
"price": "Price: $4.99/month",
"activate": "Activate Premium"
},
"translation": {
"translating": "Translating profile...",
"translated": "Profile translated:",
"error": "Translation error. Please try again later.",
"premiumOnly": "Translation is available for premium users only"
},
"commands": {
"start": "Main Menu",
"profile": "My Profile",
"search": "Browse",
"vip": "VIP Search",
"matches": "Matches",
"premium": "Premium",
"settings": "Settings",
"help": "Help"
},
"buttons": {
"back": "« Back",
"next": "Next »",
"save": "Save",
"cancel": "Cancel",
"confirm": "Confirm",
"edit": "Edit",
"delete": "Delete",
"yes": "Yes",
"no": "No"
},
"errors": {
"profileNotFound": "Profile not found",
"profileIncomplete": "Please complete your profile",
"ageInvalid": "Please enter a valid age (18-100)",
"photoRequired": "Please add at least one photo",
"networkError": "Network error. Please try again later.",
"serverError": "Server error. Please try again later."
}
}