Changelog
All notable changes to i18nizer are documented here.
0.7.1 - Pluralization and Rich Text Support
Release Date: January 2026
β¨ Added
-
Automatic Pluralization Detection: i18nizer now automatically detects and converts pluralization patterns
- Detects ternary patterns like
count === 1 ? 'item' : 'items' - Automatically generates ICU message format translations with plural rules
- Replaces patterns with
t("key", { count })calls - Preserves variable names in placeholders (e.g.,
totalItems,userCount) - Works in both JSX children and attributes
- Supports
===,==, and bothcount === 1and1 === countpatterns
- Detects ternary patterns like
-
Automatic Rich Text Formatting: i18nizer now automatically handles JSX elements within text
- Detects mixed text and inline elements (e.g.,
<a>,<strong>,<em>,<span>) - Automatically generates
t.rich()calls with element mappings - Preserves element structure:
a: (chunks) => <a>{chunks}</a> - Handles multiple inline elements in the same text
- Generates proper ICU MessageFormat with XML-style tags like
<a>link text</a> - Compatible with both next-intl's
t.rich()and i18next'sTranscomponent
- Detects mixed text and inline elements (e.g.,
-
Comprehensive Documentation: Added guides and examples for automatic transformations
- Before/after code samples showing automatic detection and conversion
- Integration examples with i18next and next-intl
- Real-world usage scenarios and patterns
- Support for multiple plural categories (zero, one, two, few, many, other)
π Changed
- Enhanced README with automatic pluralization and rich text transformation examples
- Updated documentation site with detailed automatic conversion guides
- Improved examples page with real-world automatic transformation scenarios
π Notes
- Pluralization and rich text are automatically detected and converted during extraction
- Generated translations use ICU MessageFormat compatible with i18next and next-intl
- No manual configuration or refactoring requiredβworks out of the box
- Both features are fully tested with comprehensive test suites
Documentation:
- See Examples Page for automatic pluralization and rich text transformation examples
- Check Configuration Guide for i18n library setup
0.7.0 - AI Provider and Paths Configuration
Release Date: January 2026
β¨ Added
-
AI Provider Configuration: Configure AI provider and model directly in
i18nizer.config.ymlai.provider: Choose betweenopenai,gemini, orhuggingface(default:openai)ai.model: Specify the model to use (default:gpt-4)- Provider validation ensures only supported providers are accepted
- CLI
--providerflag still works and overrides config setting
-
Paths Configuration: Define default project paths in config
paths.src: Source directory (default:src)paths.i18n: i18n output directory (default:i18n)
π Changed
- AI provider now defaults to
openaiinstead ofhuggingfacewhen not specified generateTranslations()function now accepts optionalmodelparameter for custom model selection
π Fixed
- Config merging now properly handles optional
aiandpathsfields
π Notes
- Fully backward compatible - existing configs without
aiorpathsfields will use default values - Configuration example:
ai:
provider: gemini
model: gemini-2.5-flash
paths:
src: source
i18n: locales
Documentation:
- See Configuration Guide for detailed AI and paths setup
- Check Getting Started for API key configuration
0.6.2 - Minor Fixes
- Bug fixes and stability improvements
0.6.1 - Some Improvements
β¨ Added
messages.generated.tsaggregator file consolidating all JSON translations by languageregenerateCLI command to rebuildmessages.generated.tsautomatically- Automatic addition of
i18nizer.config.ymlto.gitignoreif present - Option to use aggregator as single import point instead of multiple dynamic imports
π Changed
- JSON file naming convention standardized to lowercase with hyphens (e.g.,
notification-item.json) for valid TypeScript imports - Auto-generated aggregator now sanitizes identifiers for TypeScript, converting JSON filenames into valid import identifiers
- Namespaces inside JSON remain in PascalCase, keys remain camelCase
π Fixed
- Resolved invalid import errors caused by hyphens in JSON filenames
- Eliminated the need for multiple dynamic imports per component or page
π Notes
All messages for a given locale can now be accessed via messages.generated.ts:
import { messages } from './messages.generated';
const localeMessages = messages[locale];
This consolidates translations, simplifies imports, and improves performance.
0.6.0 - Opinionated System & Generated Aggregator
This release introduces an opinionated system with automatic aggregator generation and enhanced configuration options.
β¨ New Features
-
Auto-Generated Aggregator (
/i18n/messages.generated.ts)- Automatically scans
/messages/<locale>/directories and generates a TypeScript aggregator file - Imports all translation JSON files and exports them as a unified
messagesobject - Compatible with i18next and next-intl
- Includes warning comment to prevent manual editing
- Regenerates automatically after
translateandextractcommands - Displays statistics about processed locales and namespaces
- Automatically scans
-
Automatic .gitignore Management
.i18nizer/folder is automatically added to.gitignoreduringi18nizer start- Keeps cache and temporary files out of version control
i18nizer.config.ymlremains tracked in git for team collaboration- Prevents duplicate entries with intelligent pattern detection
- Handles various gitignore patterns (exact match, leading slash, wildcard)
-
Configurable Locales
- New
localesfield ini18nizer.config.ymlundermessagessection - Define project locales once in config instead of passing
--localesflag every time - Commands still accept
--localesflag to override config setting - Default locales:
["en", "es"]
- New
ποΈ Opinionated Structure
-
Messages Directory:
/messages/<lang>/<namespace>.json- Separate folders per language for easier versioning
- Namespace = PascalCase (component name)
- Keys = camelCase
- No language mixing in files
-
Generated Aggregator:
/i18n/messages.generated.ts- Spread operator pattern for compatibility
- Sorted imports for consistency
- Auto-regenerated, never edited manually
π§ͺ Testing
- Added 15 new comprehensive tests
- 7 tests for aggregator generation (edge cases, sorting, multiple locales)
- 8 tests for .gitignore management (patterns, duplicates, empty files)
- All 118 tests passing with no regressions
0.5.1 - Batch Key Generation
- Implement batch key generation to minimize AI requests
- Minor fixes
0.5.0 - AI Key Generation Improvements
β¨ New Features
- AI-Powered Key Generation
- Intelligent Caching
- Graceful Fallback
0.4.0 - Project Integration
This release completes Phase 1 - project-level integration with configuration, caching, and intelligent string management.
β¨ New Features
-
i18nizer startcommand: Initialize i18nizer in your project- Interactive mode with framework and i18n library detection
- Automatic framework detection (Next.js, React)
- Automatic i18n library detection (next-intl, react-i18next, i18next)
- Manual configuration with
--frameworkand--i18nflags - Non-interactive mode with
--yesflag for CI/automation - Framework presets with optimal defaults
- Generates
i18nizer.config.ymlconfiguration file - Creates
.i18nizer/directory for caching - Sets up configurable
messages/directory
-
i18nizer translatecommand: Enhanced translation workflow- Project-level mode with
--allflag to translate all components - Single-file mode for targeted translation
--dry-runflag to preview changes--show-jsonflag to display generated translation output- Integrated with project configuration system
- Project-level mode with
-
Configuration system:
- YAML-based configuration (
i18nizer.config.yml) - Framework presets (Next.js, React, Custom)
- I18n library-specific configurations
- Combined presets (e.g., Next.js + next-intl)
autoInjectToption to control automatic translation function injection- Configurable i18n function and import source
- Customizable messages directory and default locale
- Configurable behavior (deduplication, allowed props/functions)
- YAML-based configuration (
-
Intelligent caching:
- Translation cache in
.i18nizer/cache/ - Avoids redundant AI translation requests
- String-to-key mapping for fast lookups
- Persistent across multiple runs
- Translation cache in
-
String deduplication:
- Detects duplicate strings across components
- Reuses deterministic keys for identical strings
- Reduces translation costs and ensures consistency
-
Enhanced CLI feedback:
- Colored output with chalk
- Progress spinners with ora
- Interactive prompts with inquirer
- Detailed summary statistics
- Clear error messages and guidance
0.3.0 - Foundation & Reliability
This release completes Phase 0 - stabilizing the core extraction, replacement, and reliability features.
β¨ New Features
- Expanded prop support:
aria-placeholder,label,text,tooltip,helperText - Deterministic key generation with stable, human-readable camelCase keys
- Improved JSON output quality:
- Alphabetically sorted keys for stable output
- Consistent 2-space indentation
- Trailing newlines added to all JSON files
- Enhanced non-translatable filtering
π§ͺ Testing
- Expanded test suite from 26 to 60+ tests
- Comprehensive tests for:
- All new supported props
- Non-translatable content filtering
- Deterministic key generation
- JSON output quality and stability
- All tests passing on Node 18, 20, and latest
0.2.0 - Enhanced Text Extraction
-
Enhanced text extraction for complex JSX expressions:
- Support for ternary operators in JSX attributes and children
- Support for logical AND (
&&) and OR (||) operators - Support for curly-braced string literals in JSX attributes
- Improved filtering to skip non-translatable content
-
Improved test coverage:
- Comprehensive test suite for all extraction edge cases
- Tests verify ternary operators, logical operators, nested expressions
-
CI/CD improvements:
- Test status badge added to README
- Test workflow runs automatically on every push
0.1.5 - Minor Fixes
- Bug fixes and stability improvements
0.1.4 - Member Function Support
- Support for member function calls (e.g.,
toast.error,toast.success) getFullCallNamehelper added for member expressions- Template literals inside member functions now processed correctly
- Placeholders in
t("key", { ... })now supported - Comments updated to English for clarity
0.1.3 - TSX/JSX Parsing Fixes
- Fixed TSX/JSX parsing to work with any file path
- Avoided Windows EPERM errors when scanning system folders
- Updated parseFile to use minimal in-memory ts-morph project
- Fixed extraction of translation keys
- Updated buildPrompt for better AI outputs
0.1.2 - Minor Fixes
- Bug fixes and stability improvements
0.1.1 - Project Structure
- Added
.i18nizerfolder in project root.i18nizer/tsconfig.jsonfor isolated TypeScript analysis.i18nizer/api-keys.jsonfor storing API keys locally.i18nizer/messages/for generated locale JSON files
- Automatically creates default configs if they don't exist
- Ensures CLI works independently of user project tsconfig
0.1.0 - Initial Release
- Initial release of i18nizer
- Supported AI providers: OpenAI, Hugging Face, Gemini
- CLI works with JSX and TSX files
- Console logs show paths of saved locale files
- Works independently of user project tsconfig
For the latest updates, visit the GitHub repository.