|
2 | 2 |
|
3 | 3 | All notable changes to `laravel-localizer` will be documented in this file. |
4 | 4 |
|
5 | | -## [Unreleased] |
| 5 | +## v1.0.0 - 2025-11-09 |
| 6 | + |
| 7 | +### 🎉 Initial Stable Release |
| 8 | + |
| 9 | +This is the first stable release of Laravel Localizer, a powerful localization package that bridges Laravel translations to your SPA frontend (React/Vue) with automatic TypeScript generation. |
| 10 | + |
| 11 | +### ✨ Core Features |
| 12 | + |
| 13 | +- **Translation Management** |
| 14 | + - Create, read, update, and delete locales |
| 15 | + - Support for both JSON and PHP translation files |
| 16 | + - Bulk operations for efficient translation management |
| 17 | + - Nested translation support with dot notation |
| 18 | + - HTML entity escaping for security |
| 19 | + - In-memory caching for optimal performance |
| 20 | + |
| 21 | +- **Automatic Translation Scanning** |
| 22 | + - Scan codebase for `__()`, `trans()`, and `lang()` calls |
| 23 | + - Support for multiple file extensions (PHP, Blade, JS, JSX, TS, TSX, Vue) |
| 24 | + - Handles escaped quotes and special characters |
| 25 | + - Configurable include/exclude patterns |
| 26 | + - Preserves existing translations during sync |
| 27 | + |
| 28 | +- **TypeScript Generation** |
| 29 | + - Generate TypeScript files from Laravel translations |
| 30 | + - Auto-generated index file for easy imports |
| 31 | + - Type-safe translation keys |
| 32 | + - Vendor package translation support |
| 33 | + - Proper escaping for special characters |
| 34 | + |
| 35 | +- **Auto-translation** |
| 36 | + - Integrate with Google Translate for automatic translations |
| 37 | + - Queued job processing for background translation |
| 38 | + - Rate limiting to avoid API throttling |
| 39 | + - Skip already translated keys |
| 40 | + - Support for nested PHP translation arrays |
| 41 | + |
| 42 | +### 🎨 Frontend Integration |
| 43 | + |
| 44 | +- **React Package** - `@devwizard/laravel-localizer-react` |
| 45 | + - `useLocalizer()` hook |
| 46 | + - Vite plugin for automatic regeneration |
| 47 | + - Full TypeScript support |
| 48 | + - Inertia.js integration |
| 49 | + |
| 50 | +- **Vue Package** - `@devwizard/laravel-localizer-vue` |
| 51 | + - `useLocalizer()` composable |
| 52 | + - Reactive locale and direction |
| 53 | + - Vite plugin for automatic regeneration |
| 54 | + - Full TypeScript support |
| 55 | + - Inertia.js integration |
| 56 | + |
| 57 | +### 🛠️ Commands |
| 58 | + |
| 59 | +- `localizer:install` - Interactive installation wizard |
| 60 | +- `localizer:sync` - Scan and sync translation keys |
| 61 | +- `localizer:translate` - Auto-translate between locales |
| 62 | +- `localizer:generate` - Generate TypeScript files |
| 63 | + |
| 64 | +### 🔧 Middleware |
| 65 | + |
| 66 | +- **LocalizerMiddleware** - Automatic locale detection |
| 67 | + - Query parameter (`?locale=fr`) |
| 68 | + - Request header (`X-Locale`) |
| 69 | + - Session storage |
| 70 | + - User model method (`$user->getLocale()`) |
| 71 | + - Browser language (`Accept-Language`) |
| 72 | + - Fallback to default locale |
| 73 | + - Share locale data with Inertia.js |
| 74 | + |
| 75 | +### 📦 Configuration |
| 76 | + |
| 77 | +- Extensive configuration options |
| 78 | +- Support for multiple locales |
| 79 | +- Locale metadata (label, flag, direction) |
| 80 | +- RTL language support |
| 81 | +- Customizable paths and scan patterns |
| 82 | + |
| 83 | +### 🧪 Testing |
| 84 | + |
| 85 | +- Comprehensive test suite with 80+ test cases |
| 86 | +- Unit tests for core functionality |
| 87 | +- Command tests for all Artisan commands |
| 88 | +- Middleware tests for locale detection |
| 89 | +- Job tests for translation processing |
| 90 | +- 100% coverage of critical paths |
| 91 | + |
| 92 | +### 📚 Documentation |
| 93 | + |
| 94 | +- Complete README with examples |
| 95 | +- API documentation |
| 96 | +- Deployment guidelines |
| 97 | +- Frontend integration guides |
| 98 | +- Configuration reference |
| 99 | + |
| 100 | +### 🔒 Security |
| 101 | + |
| 102 | +- HTML entity escaping |
| 103 | +- Safe file operations |
| 104 | +- Protected against XSS |
| 105 | +- Validated locale codes |
| 106 | + |
| 107 | +### ⚡ Performance |
| 108 | + |
| 109 | +- In-memory caching |
| 110 | +- Efficient file operations |
| 111 | +- Build-time TypeScript generation |
| 112 | +- Lazy loading support |
| 113 | + |
| 114 | +### 📝 Requirements |
| 115 | + |
| 116 | +- PHP 8.4+ |
| 117 | +- Laravel 11.0+ or 12.0+ |
| 118 | +- Composer |
| 119 | + |
| 120 | +### 🔗 Dependencies |
| 121 | + |
| 122 | +- `spatie/laravel-package-tools` - Package scaffolding |
| 123 | +- `illuminate/contracts` - Laravel framework integration |
| 124 | +- `stichoza/google-translate-php` - Auto-translation (optional) |
6 | 125 |
|
7 | | -### Fixed |
8 | | -- Fixed `localizer:sync` command to properly detect translation strings with escaped quotes (e.g., `__('Here\'s a string')`) |
9 | | -- Improved regex patterns in `extractJsonKeys()` and `extractPhpKeys()` methods to handle escaped characters |
10 | | -- Translation keys with apostrophes and quotes are now correctly extracted and unescaped |
|
0 commit comments