flutter_ai_i18n_extractor 1.0.2
flutter_ai_i18n_extractor: ^1.0.2 copied to clipboard
Automatically detect, extract, and intelligently translate hardcoded text in Flutter projects using AI-powered abbreviation generation and professional translations, fully compatible with Flutter's in [...]
Changelog #
1.0.0 2025-5-31 #
Added #
- π Smart String Detection: AST-based parsing to find hardcoded strings in Dart files
- π€ AI-Powered Key Generation: Intelligent localization key generation using OpenAI, Google AI, or Anthropic
- π Professional Translation: High-quality translations with context awareness
- π ARB File Generation: Creates and updates ARB files compatible with Flutter's localization system
- π Code Replacement: Automatically replaces hardcoded strings with localization calls
- π― Context-Aware Analysis: Analyzes UI context for better key naming and translations
- β
flutter_intl Compatibility: Full compatibility with existing
flutter_intlandintl_utilsworkflows - π οΈ CLI Interface: Command-line tool for easy integration into development workflows
- π Configuration Management: YAML-based configuration with environment variable support
- π§ Multiple AI Providers: Support for OpenAI, Google AI, and Anthropic APIs
- π Multi-language Support: Generate translations for multiple target languages simultaneously
- π¨ Context Types: Intelligent detection of UI element types (button, title, message, error, etc.)
- π Statistics and Reporting: Detailed statistics about extraction and translation processes
- π Backup System: Automatic backup of original files before modifications
- ποΈ Dry Run Mode: Preview changes before applying them
- π Pattern Matching: Flexible file inclusion/exclusion patterns
- π Key Naming Conventions: Support for camelCase and snake_case naming conventions
- π Comprehensive Documentation: Detailed README with examples and best practices
1.0.1 2025-5-31 #
Added #
- Free Translation Services (No API Key Required):
- Google Translate (now default provider)
- Google Translate 2 (alternative endpoint)
- Microsoft Bing Translate
- LibreTranslate (with custom URL support)
- Argos Translate (local installation)
- Translation Services (API Key Required):
- DeepL Translate with optional custom API URL
- AI Models (API Key Required):
- DeepSeek AI models with free tier availability
- Groq AI models with fast inference and free tier
- Cohere AI models with free tier availability
- Hugging Face AI models with free tier access
- Ollama local AI models (no API key required)
- Environment variable support for all providers:
DEEPL_API_KEYandDEEPL_API_URLfor DeepL TranslateLIBRETRANSLATE_URLfor custom LibreTranslate instancesARGOS_TRANSLATE_URLfor custom Argos Translate instancesDEEPSEEK_API_KEYfor DeepSeekGROQ_API_KEYfor GroqCOHERE_API_KEYfor CohereHUGGINGFACE_API_KEYfor Hugging Face
- Comprehensive translation provider comparison table in README
- Updated documentation with configuration examples for all providers
Changed #
- Default provider changed from OpenAI to Google Translate (free service)
- AI providers are now optional - free translation services available by default
- Reorganized documentation to clearly distinguish between free and paid services
Fixed #
- Fixed
displayNamegetter issue inExtractedStringclass - Resolved compilation errors and warnings
- Fixed unnecessary null comparisons in
ai_client.dart - Corrected import statements and dependencies
- Fixed
assignment_to_finalerrors by usingcopyWithmethod for context assignments
Improved #
- Enhanced provider factory pattern to support translation services and AI models
- Updated README.md with comprehensive provider comparison and usage examples
- Extended validation logic to support all new translation providers
- Improved error handling for unsupported providers
- Better categorization of services by cost and requirements
- Enhanced error handling and validation
- Better code organization and structure
- Improved performance and reliability
- Expanded AI provider ecosystem with free and local options