@lokascript/i18n 2.7.2 → 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +51 -0
- package/README.md +1 -1
- package/dist/browser.cjs +649 -180
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.cts +2 -2
- package/dist/browser.d.ts +2 -2
- package/dist/browser.js +649 -180
- package/dist/browser.js.map +1 -1
- package/dist/dictionaries/index.cjs +370 -174
- package/dist/dictionaries/index.cjs.map +1 -1
- package/dist/dictionaries/index.js +370 -174
- package/dist/dictionaries/index.js.map +1 -1
- package/dist/index.cjs +649 -180
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +649 -180
- package/dist/index.js.map +1 -1
- package/dist/lokascript-i18n.min.js +1 -1
- package/dist/lokascript-i18n.min.js.map +1 -1
- package/dist/lokascript-i18n.mjs +678 -175
- package/dist/lokascript-i18n.mjs.map +1 -1
- package/dist/plugins/vite.cjs +370 -174
- package/dist/plugins/vite.cjs.map +1 -1
- package/dist/plugins/vite.js +370 -174
- package/dist/plugins/vite.js.map +1 -1
- package/dist/plugins/webpack.cjs +370 -174
- package/dist/plugins/webpack.cjs.map +1 -1
- package/dist/plugins/webpack.js +370 -174
- package/dist/plugins/webpack.js.map +1 -1
- package/dist/{transformer-DM7iplCU.d.cts → transformer--W46PGaW.d.cts} +8 -0
- package/dist/{transformer-BA8YX9u1.d.ts → transformer-FU06J6kG.d.ts} +8 -0
- package/package.json +9 -10
- package/src/dictionaries/ar.ts +20 -15
- package/src/dictionaries/bn.ts +10 -5
- package/src/dictionaries/de.ts +20 -8
- package/src/dictionaries/es.ts +10 -5
- package/src/dictionaries/fr.ts +15 -6
- package/src/dictionaries/he.ts +4 -0
- package/src/dictionaries/hi.ts +3 -2
- package/src/dictionaries/id.ts +31 -16
- package/src/dictionaries/it.ts +11 -4
- package/src/dictionaries/ja.ts +23 -15
- package/src/dictionaries/ko.ts +10 -5
- package/src/dictionaries/ms.ts +4 -1
- package/src/dictionaries/pl.ts +12 -5
- package/src/dictionaries/pt.ts +10 -5
- package/src/dictionaries/qu.ts +30 -19
- package/src/dictionaries/ru.ts +5 -2
- package/src/dictionaries/sw.ts +29 -14
- package/src/dictionaries/th.ts +5 -2
- package/src/dictionaries/tl.ts +4 -1
- package/src/dictionaries/tr.ts +24 -16
- package/src/dictionaries/uk.ts +5 -2
- package/src/dictionaries/vi.ts +23 -17
- package/src/dictionaries/zh.ts +24 -9
- package/src/grammar/grammar.test.ts +152 -0
- package/src/grammar/profiles/index.ts +316 -1
- package/src/grammar/transformer.ts +64 -1
- package/src/new-languages.test.ts +9 -3
- package/src/positional-keyword-drift.test.ts +6 -19
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to @lokascript/i18n will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [1.0.0] - 2025-01-19
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Grammar transformation engine for natural word order in 13 languages
|
|
13
|
+
- Language profiles with word order rules (SVO, SOV, VSO)
|
|
14
|
+
- Semantic role markers (destination, source, patient, style, instrument, manner)
|
|
15
|
+
- Support for agglutinative languages with join tokens (Turkish: -i, Japanese: を, Korean: 을/를)
|
|
16
|
+
- Dictionary validation system with coverage reports
|
|
17
|
+
- Runtime locale switching with automatic detection
|
|
18
|
+
- SSR integration with server-side locale detection
|
|
19
|
+
- CLDR-compliant pluralization rules for complex languages
|
|
20
|
+
- Locale-aware formatting (numbers, dates, currency, units)
|
|
21
|
+
- Vite and Webpack plugin integration
|
|
22
|
+
- Language detection from hyperscript code content
|
|
23
|
+
- Comprehensive test suite (424+ tests passing)
|
|
24
|
+
|
|
25
|
+
### Supported Languages
|
|
26
|
+
|
|
27
|
+
- English (SVO), Spanish (SVO), French (SVO), German (SVO/V2), Portuguese (SVO)
|
|
28
|
+
- Japanese (SOV), Korean (SOV), Turkish (SOV)
|
|
29
|
+
- Arabic (VSO)
|
|
30
|
+
- Chinese (SVO), Indonesian (SVO), Quechua (SOV), Swahili (SVO)
|
|
31
|
+
|
|
32
|
+
### Features
|
|
33
|
+
|
|
34
|
+
- Transform hyperscript to match native language grammar
|
|
35
|
+
- Handle possessive markers and case systems
|
|
36
|
+
- Support for different grammatical structures (prepositional vs postpositional)
|
|
37
|
+
- Bidirectional text support (Arabic, Hebrew)
|
|
38
|
+
- Conflict resolution with priority-based keyword mapping
|
|
39
|
+
- Translation validation with detailed error reporting
|
|
40
|
+
|
|
41
|
+
### Breaking Changes from 0.x
|
|
42
|
+
|
|
43
|
+
- Grammar transformer API standardized
|
|
44
|
+
- Language profile structure reorganized
|
|
45
|
+
- Plugin configuration format updated
|
|
46
|
+
|
|
47
|
+
### Notes
|
|
48
|
+
|
|
49
|
+
- This is the first stable release after extensive linguistic validation
|
|
50
|
+
- Grammar transformations preserve semantic meaning across languages
|
|
51
|
+
- All language profiles include native speaker review where available
|
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ npm install @lokascript/i18n
|
|
|
10
10
|
|
|
11
11
|
## Features
|
|
12
12
|
|
|
13
|
-
- **🌍 Multi-language Support**: Built-in dictionaries for
|
|
13
|
+
- **🌍 Multi-language Support**: Built-in dictionaries for 24 languages (Arabic, Bengali, Chinese, English, French, German, Hebrew, Hindi, Indonesian, Italian, Japanese, Korean, Malay, Polish, Portuguese, Quechua, Russian, Spanish, Swahili, Tagalog, Thai, Turkish, Ukrainian, Vietnamese)
|
|
14
14
|
- **🔄 Runtime Locale Switching**: Dynamic language switching in browser environments with automatic detection
|
|
15
15
|
- **⚡ SSR Integration**: Server-side rendering with locale detection, SEO optimization, and hydration support
|
|
16
16
|
- **📊 Pluralization**: CLDR-compliant pluralization rules for complex languages (Russian, Arabic, etc.)
|