@lokascript/i18n 2.3.0 → 2.4.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.
Files changed (71) hide show
  1. package/dist/browser.cjs +626 -473
  2. package/dist/browser.cjs.map +1 -1
  3. package/dist/browser.d.cts +25 -3
  4. package/dist/browser.d.ts +25 -3
  5. package/dist/browser.js +623 -474
  6. package/dist/browser.js.map +1 -1
  7. package/dist/dictionaries/index.cjs +489 -472
  8. package/dist/dictionaries/index.cjs.map +1 -1
  9. package/dist/dictionaries/index.d.cts +5 -3
  10. package/dist/dictionaries/index.d.ts +5 -3
  11. package/dist/dictionaries/index.js +489 -473
  12. package/dist/dictionaries/index.js.map +1 -1
  13. package/dist/index.cjs +617 -473
  14. package/dist/index.cjs.map +1 -1
  15. package/dist/index.d.cts +37 -37
  16. package/dist/index.d.ts +37 -37
  17. package/dist/index.js +617 -473
  18. package/dist/index.js.map +1 -1
  19. package/dist/lokascript-i18n.min.js +1 -1
  20. package/dist/lokascript-i18n.min.js.map +1 -1
  21. package/dist/lokascript-i18n.mjs +730 -478
  22. package/dist/lokascript-i18n.mjs.map +1 -1
  23. package/dist/plugins/vite.cjs +488 -472
  24. package/dist/plugins/vite.cjs.map +1 -1
  25. package/dist/plugins/vite.js +488 -472
  26. package/dist/plugins/vite.js.map +1 -1
  27. package/dist/plugins/webpack.cjs +488 -472
  28. package/dist/plugins/webpack.cjs.map +1 -1
  29. package/dist/plugins/webpack.js +488 -472
  30. package/dist/plugins/webpack.js.map +1 -1
  31. package/dist/{transformer-B0zy-kti.d.ts → transformer-BLv389qz.d.ts} +12 -47
  32. package/dist/{transformer-CzY_vHU0.d.cts → transformer-PFsYELrc.d.cts} +12 -47
  33. package/dist/{types-BYtpqGq3.d.cts → types-BcALAO6h.d.cts} +1 -1
  34. package/dist/{types-BYtpqGq3.d.ts → types-BcALAO6h.d.ts} +1 -1
  35. package/package.json +5 -5
  36. package/src/browser.ts +3 -0
  37. package/src/constants.ts +9 -0
  38. package/src/dictionaries/ar.ts +22 -43
  39. package/src/dictionaries/bn.ts +17 -0
  40. package/src/dictionaries/de.ts +19 -40
  41. package/src/dictionaries/en.ts +26 -0
  42. package/src/dictionaries/es.ts +19 -40
  43. package/src/dictionaries/fr.ts +19 -40
  44. package/src/dictionaries/he.ts +2 -0
  45. package/src/dictionaries/hi.ts +18 -48
  46. package/src/dictionaries/id.ts +22 -43
  47. package/src/dictionaries/index.ts +5 -1
  48. package/src/dictionaries/it.ts +18 -39
  49. package/src/dictionaries/ja.ts +18 -39
  50. package/src/dictionaries/ko.ts +22 -43
  51. package/src/dictionaries/ms.ts +16 -50
  52. package/src/dictionaries/pl.ts +18 -45
  53. package/src/dictionaries/pt.ts +23 -48
  54. package/src/dictionaries/qu.ts +22 -43
  55. package/src/dictionaries/ru.ts +18 -48
  56. package/src/dictionaries/sw.ts +22 -43
  57. package/src/dictionaries/th.ts +17 -0
  58. package/src/dictionaries/tl.ts +16 -50
  59. package/src/dictionaries/tr.ts +24 -45
  60. package/src/dictionaries/uk.ts +18 -48
  61. package/src/dictionaries/vi.ts +17 -0
  62. package/src/dictionaries/zh.ts +22 -43
  63. package/src/grammar/grammar.test.ts +143 -24
  64. package/src/grammar/index.ts +1 -0
  65. package/src/grammar/profiles/index.ts +31 -0
  66. package/src/grammar/transformer.ts +161 -0
  67. package/src/parser/he.ts +29 -0
  68. package/src/parser/index.ts +1 -0
  69. package/src/schema-alignment.test.ts +154 -0
  70. package/src/test-utils/complete-languages.ts +40 -0
  71. package/src/translation-validation.test.ts +1 -26
@@ -1,4 +1,4 @@
1
- import { D as Dictionary } from './types-BYtpqGq3.js';
1
+ import { a as Dictionary } from './types-BcALAO6h.js';
2
2
 
3
3
  /**
4
4
  * KeywordProvider interface for locale-aware parsing.
@@ -661,10 +661,6 @@ declare const sw: Dictionary;
661
661
  */
662
662
  declare const swKeywords: KeywordProvider;
663
663
 
664
- /**
665
- * Portuguese (Português) dictionary for hyperscript keywords.
666
- * Brazilian Portuguese variant.
667
- */
668
664
  declare const pt: Dictionary;
669
665
 
670
666
  /**
@@ -702,45 +698,18 @@ declare const vi: Dictionary;
702
698
 
703
699
  declare const viKeywords: KeywordProvider;
704
700
 
705
- /**
706
- * Polish Dictionary
707
- *
708
- * Polish uses IMPERATIVE verb forms for software commands
709
- * (unlike most languages which use infinitive).
710
- */
711
701
  declare const pl: Dictionary;
712
702
 
713
703
  declare const plKeywords: KeywordProvider;
714
704
 
715
- /**
716
- * Russian Dictionary
717
- *
718
- * Translations for Russian language support.
719
- * Uses infinitive verbs (common in software UIs).
720
- */
721
-
722
705
  declare const russianDictionary: Dictionary;
723
706
 
724
707
  declare const ruKeywords: KeywordProvider;
725
708
 
726
- /**
727
- * Ukrainian Dictionary
728
- *
729
- * Translations for Ukrainian language support.
730
- * Uses infinitive verbs (common in software UIs).
731
- */
732
-
733
709
  declare const ukrainianDictionary: Dictionary;
734
710
 
735
711
  declare const ukKeywords: KeywordProvider;
736
712
 
737
- /**
738
- * Hindi Dictionary
739
- *
740
- * Translations for Hindi language support.
741
- * Uses imperative verb forms (common in software UIs).
742
- */
743
-
744
713
  declare const hindiDictionary: Dictionary;
745
714
 
746
715
  declare const hiKeywords: KeywordProvider;
@@ -753,24 +722,10 @@ declare const th: Dictionary;
753
722
 
754
723
  declare const thKeywords: KeywordProvider;
755
724
 
756
- /**
757
- * Malay Dictionary
758
- *
759
- * Malay translations for hyperscript keywords.
760
- * Malay is an SVO (Subject-Verb-Object) language with prepositions.
761
- */
762
-
763
725
  declare const ms: Dictionary;
764
726
 
765
727
  declare const msKeywords: KeywordProvider;
766
728
 
767
- /**
768
- * Tagalog Dictionary
769
- *
770
- * Tagalog translations for hyperscript keywords.
771
- * Tagalog is a VSO (Verb-Subject-Object) language with rich verbal morphology.
772
- */
773
-
774
729
  declare const tl: Dictionary;
775
730
 
776
731
  declare const tlKeywords: KeywordProvider;
@@ -916,6 +871,7 @@ declare const portugueseProfile: LanguageProfile;
916
871
  declare const indonesianProfile: LanguageProfile;
917
872
  declare const quechuaProfile: LanguageProfile;
918
873
  declare const swahiliProfile: LanguageProfile;
874
+ declare const hebrewProfile: LanguageProfile;
919
875
  declare const profiles: Record<string, LanguageProfile>;
920
876
  declare function getProfile(locale: string): LanguageProfile | undefined;
921
877
  declare function getSupportedLocales(): string[];
@@ -949,6 +905,15 @@ declare class GrammarTransformer {
949
905
  * Transform a single hyperscript statement (no compound "then" chains).
950
906
  */
951
907
  private transformSingle;
908
+ /**
909
+ * Translate a reactive block by translating the head/tail/connector
910
+ * via the dictionary, recursively transforming the body through the
911
+ * regular pipeline, and rejoining in source-language position order.
912
+ * Block-syntactic tokens are never reordered: they're delimiters, not
913
+ * arguments, and authors expect them at start/end positions
914
+ * regardless of target word order.
915
+ */
916
+ private transformBlock;
952
917
  /**
953
918
  * Find the best matching rule for this statement
954
919
  */
@@ -1000,4 +965,4 @@ declare const examples: {
1000
965
  };
1001
966
  };
1002
967
 
1003
- export { ko as $, type AdpositionType as A, frenchProfile as B, germanProfile as C, getProfile as D, ENGLISH_COMMANDS as E, getSupportedLocales as F, type GrammarRule as G, examples as H, hindiDictionary as I, hiKeywords as J, type KeywordProvider as K, LANGUAGE_FAMILY_DEFAULTS as L, type MorphologyType as M, id as N, idKeywords as O, type ParsedElement as P, indonesianProfile as Q, insertMarkers as R, type SemanticRole as S, it as T, UNIVERSAL_ENGLISH_KEYWORDS as U, itKeywords as V, type WordOrder as W, ja as X, jaKeywords as Y, japaneseProfile as Z, joinTokens as _, ENGLISH_KEYWORDS as a, koKeywords as a0, koreanProfile as a1, ms as a2, msKeywords as a3, parseStatement as a4, pl as a5, plKeywords as a6, portugueseProfile as a7, profiles as a8, pt as a9, zh as aA, zhKeywords as aB, ptKeywords as aa, qu as ab, quKeywords as ac, quechuaProfile as ad, reorderRoles as ae, russianDictionary as af, ruKeywords as ag, spanishProfile as ah, sw as ai, swKeywords as aj, swahiliProfile as ak, th as al, thKeywords as am, tl as an, tlKeywords as ao, toEnglish as ap, toLocale as aq, tr as ar, trKeywords as as, transformStatement as at, translate as au, turkishProfile as av, ukrainianDictionary as aw, ukKeywords as ax, vi as ay, viKeywords as az, GrammarTransformer as b, type GrammaticalMarker as c, type KeywordProviderOptions as d, type LanguageProfile as e, LocaleManager as f, type ParsedStatement as g, type PatternMatcher as h, type PatternTransform as i, UNIVERSAL_PATTERNS as j, ar as k, arKeywords as l, arabicProfile as m, bn as n, bnKeywords as o, chineseProfile as p, createEnglishProvider as q, createKeywordProvider as r, de as s, deKeywords as t, detectBrowserLocale as u, englishProfile as v, es as w, esKeywords as x, fr as y, frKeywords as z };
968
+ export { joinTokens as $, type AdpositionType as A, frKeywords as B, frenchProfile as C, germanProfile as D, ENGLISH_COMMANDS as E, getProfile as F, type GrammarRule as G, getSupportedLocales as H, hebrewProfile as I, hiKeywords as J, type KeywordProvider as K, LANGUAGE_FAMILY_DEFAULTS as L, type MorphologyType as M, hindiDictionary as N, id as O, type ParsedElement as P, idKeywords as Q, indonesianProfile as R, type SemanticRole as S, insertMarkers as T, UNIVERSAL_ENGLISH_KEYWORDS as U, it as V, type WordOrder as W, itKeywords as X, ja as Y, jaKeywords as Z, japaneseProfile as _, ENGLISH_KEYWORDS as a, ko as a0, koKeywords as a1, koreanProfile as a2, ms as a3, msKeywords as a4, parseStatement as a5, pl as a6, plKeywords as a7, portugueseProfile as a8, profiles as a9, viKeywords as aA, zh as aB, zhKeywords as aC, pt as aa, ptKeywords as ab, qu as ac, quKeywords as ad, quechuaProfile as ae, reorderRoles as af, ruKeywords as ag, russianDictionary as ah, spanishProfile as ai, sw as aj, swKeywords as ak, swahiliProfile as al, th as am, thKeywords as an, tl as ao, tlKeywords as ap, toEnglish as aq, toLocale as ar, tr as as, trKeywords as at, transformStatement as au, translate as av, turkishProfile as aw, ukKeywords as ax, ukrainianDictionary as ay, vi as az, GrammarTransformer as b, type GrammaticalMarker as c, type KeywordProviderOptions as d, type LanguageProfile as e, LocaleManager as f, type ParsedStatement as g, type PatternMatcher as h, type PatternTransform as i, UNIVERSAL_PATTERNS as j, ar as k, arKeywords as l, arabicProfile as m, bn as n, bnKeywords as o, chineseProfile as p, createEnglishProvider as q, createKeywordProvider as r, de as s, deKeywords as t, detectBrowserLocale as u, englishProfile as v, es as w, esKeywords as x, examples as y, fr as z };
@@ -1,4 +1,4 @@
1
- import { D as Dictionary } from './types-BYtpqGq3.cjs';
1
+ import { a as Dictionary } from './types-BcALAO6h.cjs';
2
2
 
3
3
  /**
4
4
  * KeywordProvider interface for locale-aware parsing.
@@ -661,10 +661,6 @@ declare const sw: Dictionary;
661
661
  */
662
662
  declare const swKeywords: KeywordProvider;
663
663
 
664
- /**
665
- * Portuguese (Português) dictionary for hyperscript keywords.
666
- * Brazilian Portuguese variant.
667
- */
668
664
  declare const pt: Dictionary;
669
665
 
670
666
  /**
@@ -702,45 +698,18 @@ declare const vi: Dictionary;
702
698
 
703
699
  declare const viKeywords: KeywordProvider;
704
700
 
705
- /**
706
- * Polish Dictionary
707
- *
708
- * Polish uses IMPERATIVE verb forms for software commands
709
- * (unlike most languages which use infinitive).
710
- */
711
701
  declare const pl: Dictionary;
712
702
 
713
703
  declare const plKeywords: KeywordProvider;
714
704
 
715
- /**
716
- * Russian Dictionary
717
- *
718
- * Translations for Russian language support.
719
- * Uses infinitive verbs (common in software UIs).
720
- */
721
-
722
705
  declare const russianDictionary: Dictionary;
723
706
 
724
707
  declare const ruKeywords: KeywordProvider;
725
708
 
726
- /**
727
- * Ukrainian Dictionary
728
- *
729
- * Translations for Ukrainian language support.
730
- * Uses infinitive verbs (common in software UIs).
731
- */
732
-
733
709
  declare const ukrainianDictionary: Dictionary;
734
710
 
735
711
  declare const ukKeywords: KeywordProvider;
736
712
 
737
- /**
738
- * Hindi Dictionary
739
- *
740
- * Translations for Hindi language support.
741
- * Uses imperative verb forms (common in software UIs).
742
- */
743
-
744
713
  declare const hindiDictionary: Dictionary;
745
714
 
746
715
  declare const hiKeywords: KeywordProvider;
@@ -753,24 +722,10 @@ declare const th: Dictionary;
753
722
 
754
723
  declare const thKeywords: KeywordProvider;
755
724
 
756
- /**
757
- * Malay Dictionary
758
- *
759
- * Malay translations for hyperscript keywords.
760
- * Malay is an SVO (Subject-Verb-Object) language with prepositions.
761
- */
762
-
763
725
  declare const ms: Dictionary;
764
726
 
765
727
  declare const msKeywords: KeywordProvider;
766
728
 
767
- /**
768
- * Tagalog Dictionary
769
- *
770
- * Tagalog translations for hyperscript keywords.
771
- * Tagalog is a VSO (Verb-Subject-Object) language with rich verbal morphology.
772
- */
773
-
774
729
  declare const tl: Dictionary;
775
730
 
776
731
  declare const tlKeywords: KeywordProvider;
@@ -916,6 +871,7 @@ declare const portugueseProfile: LanguageProfile;
916
871
  declare const indonesianProfile: LanguageProfile;
917
872
  declare const quechuaProfile: LanguageProfile;
918
873
  declare const swahiliProfile: LanguageProfile;
874
+ declare const hebrewProfile: LanguageProfile;
919
875
  declare const profiles: Record<string, LanguageProfile>;
920
876
  declare function getProfile(locale: string): LanguageProfile | undefined;
921
877
  declare function getSupportedLocales(): string[];
@@ -949,6 +905,15 @@ declare class GrammarTransformer {
949
905
  * Transform a single hyperscript statement (no compound "then" chains).
950
906
  */
951
907
  private transformSingle;
908
+ /**
909
+ * Translate a reactive block by translating the head/tail/connector
910
+ * via the dictionary, recursively transforming the body through the
911
+ * regular pipeline, and rejoining in source-language position order.
912
+ * Block-syntactic tokens are never reordered: they're delimiters, not
913
+ * arguments, and authors expect them at start/end positions
914
+ * regardless of target word order.
915
+ */
916
+ private transformBlock;
952
917
  /**
953
918
  * Find the best matching rule for this statement
954
919
  */
@@ -1000,4 +965,4 @@ declare const examples: {
1000
965
  };
1001
966
  };
1002
967
 
1003
- export { ko as $, type AdpositionType as A, frenchProfile as B, germanProfile as C, getProfile as D, ENGLISH_COMMANDS as E, getSupportedLocales as F, type GrammarRule as G, examples as H, hindiDictionary as I, hiKeywords as J, type KeywordProvider as K, LANGUAGE_FAMILY_DEFAULTS as L, type MorphologyType as M, id as N, idKeywords as O, type ParsedElement as P, indonesianProfile as Q, insertMarkers as R, type SemanticRole as S, it as T, UNIVERSAL_ENGLISH_KEYWORDS as U, itKeywords as V, type WordOrder as W, ja as X, jaKeywords as Y, japaneseProfile as Z, joinTokens as _, ENGLISH_KEYWORDS as a, koKeywords as a0, koreanProfile as a1, ms as a2, msKeywords as a3, parseStatement as a4, pl as a5, plKeywords as a6, portugueseProfile as a7, profiles as a8, pt as a9, zh as aA, zhKeywords as aB, ptKeywords as aa, qu as ab, quKeywords as ac, quechuaProfile as ad, reorderRoles as ae, russianDictionary as af, ruKeywords as ag, spanishProfile as ah, sw as ai, swKeywords as aj, swahiliProfile as ak, th as al, thKeywords as am, tl as an, tlKeywords as ao, toEnglish as ap, toLocale as aq, tr as ar, trKeywords as as, transformStatement as at, translate as au, turkishProfile as av, ukrainianDictionary as aw, ukKeywords as ax, vi as ay, viKeywords as az, GrammarTransformer as b, type GrammaticalMarker as c, type KeywordProviderOptions as d, type LanguageProfile as e, LocaleManager as f, type ParsedStatement as g, type PatternMatcher as h, type PatternTransform as i, UNIVERSAL_PATTERNS as j, ar as k, arKeywords as l, arabicProfile as m, bn as n, bnKeywords as o, chineseProfile as p, createEnglishProvider as q, createKeywordProvider as r, de as s, deKeywords as t, detectBrowserLocale as u, englishProfile as v, es as w, esKeywords as x, fr as y, frKeywords as z };
968
+ export { joinTokens as $, type AdpositionType as A, frKeywords as B, frenchProfile as C, germanProfile as D, ENGLISH_COMMANDS as E, getProfile as F, type GrammarRule as G, getSupportedLocales as H, hebrewProfile as I, hiKeywords as J, type KeywordProvider as K, LANGUAGE_FAMILY_DEFAULTS as L, type MorphologyType as M, hindiDictionary as N, id as O, type ParsedElement as P, idKeywords as Q, indonesianProfile as R, type SemanticRole as S, insertMarkers as T, UNIVERSAL_ENGLISH_KEYWORDS as U, it as V, type WordOrder as W, itKeywords as X, ja as Y, jaKeywords as Z, japaneseProfile as _, ENGLISH_KEYWORDS as a, ko as a0, koKeywords as a1, koreanProfile as a2, ms as a3, msKeywords as a4, parseStatement as a5, pl as a6, plKeywords as a7, portugueseProfile as a8, profiles as a9, viKeywords as aA, zh as aB, zhKeywords as aC, pt as aa, ptKeywords as ab, qu as ac, quKeywords as ad, quechuaProfile as ae, reorderRoles as af, ruKeywords as ag, russianDictionary as ah, spanishProfile as ai, sw as aj, swKeywords as ak, swahiliProfile as al, th as am, thKeywords as an, tl as ao, tlKeywords as ap, toEnglish as aq, toLocale as ar, tr as as, trKeywords as at, transformStatement as au, translate as av, turkishProfile as aw, ukKeywords as ax, ukrainianDictionary as ay, vi as az, GrammarTransformer as b, type GrammaticalMarker as c, type KeywordProviderOptions as d, type LanguageProfile as e, LocaleManager as f, type ParsedStatement as g, type PatternMatcher as h, type PatternTransform as i, UNIVERSAL_PATTERNS as j, ar as k, arKeywords as l, arabicProfile as m, bn as n, bnKeywords as o, chineseProfile as p, createEnglishProvider as q, createKeywordProvider as r, de as s, deKeywords as t, detectBrowserLocale as u, englishProfile as v, es as w, esKeywords as x, examples as y, fr as z };
@@ -119,4 +119,4 @@ interface TranslationResult {
119
119
  warnings?: string[];
120
120
  }
121
121
 
122
- export { type Dictionary as D, type I18nConfig as I, type LocaleMetadata as L, type TranslationOptions as T, type ValidationResult as V, type TranslationResult as a, type Token as b, DICTIONARY_CATEGORIES as c, type DictionaryCategory as d, type TokenType as e, type TranslationContext as f, type ValidationError as g, type ValidationWarning as h, findInDictionary as i, forEachCategory as j, getDictionaryCategory as k, isDictionaryCategory as l, translateFromEnglish as t };
122
+ export { DICTIONARY_CATEGORIES as D, type I18nConfig as I, type LocaleMetadata as L, type Token as T, type ValidationError as V, type Dictionary as a, type DictionaryCategory as b, type TokenType as c, type TranslationContext as d, type TranslationOptions as e, type TranslationResult as f, type ValidationResult as g, type ValidationWarning as h, findInDictionary as i, forEachCategory as j, getDictionaryCategory as k, isDictionaryCategory as l, translateFromEnglish as t };
@@ -119,4 +119,4 @@ interface TranslationResult {
119
119
  warnings?: string[];
120
120
  }
121
121
 
122
- export { type Dictionary as D, type I18nConfig as I, type LocaleMetadata as L, type TranslationOptions as T, type ValidationResult as V, type TranslationResult as a, type Token as b, DICTIONARY_CATEGORIES as c, type DictionaryCategory as d, type TokenType as e, type TranslationContext as f, type ValidationError as g, type ValidationWarning as h, findInDictionary as i, forEachCategory as j, getDictionaryCategory as k, isDictionaryCategory as l, translateFromEnglish as t };
122
+ export { DICTIONARY_CATEGORIES as D, type I18nConfig as I, type LocaleMetadata as L, type Token as T, type ValidationError as V, type Dictionary as a, type DictionaryCategory as b, type TokenType as c, type TranslationContext as d, type TranslationOptions as e, type TranslationResult as f, type ValidationResult as g, type ValidationWarning as h, findInDictionary as i, forEachCategory as j, getDictionaryCategory as k, isDictionaryCategory as l, translateFromEnglish as t };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lokascript/i18n",
3
- "version": "2.3.0",
3
+ "version": "2.4.0",
4
4
  "description": "Grammar transformation and keyword translation for hyperscript",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -67,8 +67,8 @@
67
67
  "dependencies": {
68
68
  "@hyperfixi/core": "*",
69
69
  "@lokascript/semantic": "*",
70
- "esbuild": "0.27.4",
71
- "happy-dom": "20.0.6",
70
+ "esbuild": "^0.28.0",
71
+ "happy-dom": "^20.8.9",
72
72
  "vite": "^7.1.12"
73
73
  },
74
74
  "devDependencies": {
@@ -78,10 +78,10 @@
78
78
  "@types/node": "^20.0.0",
79
79
  "@vitest/coverage-v8": "^4.0.0",
80
80
  "eslint": "^8.0.0",
81
- "rollup": "^4.41.1",
81
+ "rollup": "^4.60.2",
82
82
  "tsup": "^8.0.0",
83
83
  "typescript": "^5.0.0",
84
- "vitest": "^4.0.0"
84
+ "vitest": "^4.1.5"
85
85
  },
86
86
  "files": [
87
87
  "dist",
package/src/browser.ts CHANGED
@@ -59,6 +59,7 @@ export { bnKeywords, bnDictionary } from './parser/bn';
59
59
  export { thKeywords, thDictionary } from './parser/th';
60
60
  export { msKeywords, msDictionary } from './parser/ms';
61
61
  export { tlKeywords, tlDictionary } from './parser/tl';
62
+ export { heKeywords, heDictionary } from './parser/he';
62
63
 
63
64
  // Locale management
64
65
  export { LocaleManager, detectBrowserLocale } from './parser/locale-manager';
@@ -87,6 +88,7 @@ export { bn } from './dictionaries/bn';
87
88
  export { th } from './dictionaries/th';
88
89
  export { ms } from './dictionaries/ms';
89
90
  export { tl } from './dictionaries/tl';
91
+ export { he } from './dictionaries/he';
90
92
 
91
93
  // Grammar-aware transformation system (Phase 2)
92
94
  export {
@@ -127,6 +129,7 @@ export {
127
129
  indonesianProfile,
128
130
  quechuaProfile,
129
131
  swahiliProfile,
132
+ hebrewProfile,
130
133
  // Direct language-pair translation
131
134
  directMappings,
132
135
  hasDirectMapping,
package/src/constants.ts CHANGED
@@ -59,13 +59,19 @@ export const ENGLISH_COMMANDS: Set<string> = new Set([
59
59
  'append',
60
60
  'async',
61
61
  'beep',
62
+ 'blur', // v0.9.90 phase 1
62
63
  'break',
64
+ 'breakpoint', // v0.9.90 phase 1
63
65
  'call',
66
+ 'clear', // v0.9.90 phase 1
67
+ 'close', // v0.9.90 phase 1
64
68
  'continue',
65
69
  'decrement',
66
70
  'default',
71
+ 'empty', // v0.9.90 phase 1
67
72
  'exit',
68
73
  'fetch',
74
+ 'focus', // v0.9.90 phase 1
69
75
  'for',
70
76
  'get',
71
77
  'go',
@@ -79,6 +85,7 @@ export const ENGLISH_COMMANDS: Set<string> = new Set([
79
85
  'make',
80
86
  'measure',
81
87
  'morph',
88
+ 'open', // v0.9.90 phase 1
82
89
  'pick',
83
90
  'process',
84
91
  'push',
@@ -87,7 +94,9 @@ export const ENGLISH_COMMANDS: Set<string> = new Set([
87
94
  'render',
88
95
  'repeat',
89
96
  'replace',
97
+ 'reset', // v0.9.90 phase 1
90
98
  'return',
99
+ 'select', // v0.9.90 phase 1
91
100
  'send',
92
101
  'set',
93
102
  'settle',
@@ -1,16 +1,14 @@
1
- // packages/i18n/src/dictionaries/ar.ts
1
+ // Generated/merged from semantic profiles — hand-written entries are preserved
2
+ // To add derived entries, update the semantic profile and run: npm run generate:language-assets
2
3
 
3
4
  import { Dictionary } from '../types';
4
5
 
5
6
  export const ar: Dictionary = {
6
7
  commands: {
7
- // Event handling
8
8
  on: 'على',
9
9
  tell: 'أخبر',
10
10
  trigger: 'تشغيل',
11
11
  send: 'أرسل',
12
-
13
- // DOM manipulation
14
12
  take: 'خذ',
15
13
  put: 'ضع',
16
14
  set: 'اضبط',
@@ -20,8 +18,6 @@ export const ar: Dictionary = {
20
18
  toggle: 'بدل',
21
19
  hide: 'اخف',
22
20
  show: 'اظهر',
23
-
24
- // Control flow
25
21
  if: 'إذا',
26
22
  unless: 'إلا إذا',
27
23
  repeat: 'كرر',
@@ -31,54 +27,41 @@ export const ar: Dictionary = {
31
27
  continue: 'واصل',
32
28
  break: 'توقف',
33
29
  halt: 'أوقف',
34
-
35
- // Async
36
30
  wait: 'انتظر',
37
31
  fetch: 'احضر',
38
32
  call: 'استدع',
39
33
  return: 'ارجع',
40
-
41
- // Other commands
42
34
  make: 'اصنع',
43
35
  log: 'سجل',
44
36
  throw: 'ارم',
45
37
  catch: 'التقط',
46
38
  measure: 'قس',
47
39
  transition: 'انتقال',
48
-
49
- // Data Commands
50
40
  increment: 'زِد',
51
41
  decrement: 'أنقص',
52
42
  default: 'افتراضي',
53
-
54
- // Navigation Commands
55
43
  go: 'اذهب',
56
44
  pushUrl: 'ادفع رابط',
57
45
  replaceUrl: 'استبدل رابط',
58
-
59
- // Utility Commands
60
46
  copy: 'انسخ',
61
47
  pick: 'اختر',
62
48
  beep: 'صفّر',
63
-
64
- // Advanced Commands
65
49
  js: 'جافاسكربت',
66
50
  async: 'متزامن',
67
51
  render: 'ارسم',
68
-
69
- // Animation Commands
70
52
  swap: 'بدّل',
71
53
  morph: 'حوّل',
72
54
  settle: 'استقر',
73
-
74
- // Content Commands
75
55
  append: 'ألحق',
76
-
77
- // Control Flow
78
56
  exit: 'اخرج',
79
-
80
- // Behaviors
81
57
  install: 'ثبّت',
58
+ breakpoint: 'نقطة-توقف',
59
+ clear: 'امسح',
60
+ close: 'أغلق',
61
+ open: 'افتح',
62
+ select: 'اختر',
63
+ clone: 'استنسخ',
64
+ prepend: 'سبق',
82
65
  },
83
66
 
84
67
  modifiers: {
@@ -110,23 +93,19 @@ export const ar: Dictionary = {
110
93
  mouseover: 'فأرة فوق',
111
94
  mouseout: 'فأرة خارج',
112
95
  mousemove: 'فأرة تحرك',
113
-
114
96
  keydown: 'مفتاح أسفل',
115
97
  keyup: 'مفتاح أعلى',
116
98
  keypress: 'مفتاح ضغط',
117
-
118
99
  focus: 'تركيز',
119
100
  blur: 'ضبابية',
120
101
  change: 'تغيير',
121
102
  input: 'إدخال',
122
103
  submit: 'إرسال',
123
104
  reset: 'إعادة تعيين',
124
-
125
105
  load: 'تحميل',
126
106
  unload: 'إلغاء تحميل',
127
107
  resize: 'تغيير حجم',
128
108
  scroll: 'تمرير',
129
-
130
109
  touchstart: 'بداية لمس',
131
110
  touchend: 'نهاية لمس',
132
111
  touchmove: 'تحرك لمس',
@@ -145,12 +124,14 @@ export const ar: Dictionary = {
145
124
  contains: 'يحتوي',
146
125
  includes: 'يشمل',
147
126
  equals: 'يساوي',
148
- has: 'لديه', // third-person: he/it has
149
- have: 'لدي', // first-person: I have
127
+ has: 'لديه',
128
+ have: 'لدي',
150
129
  then: 'ثم',
151
130
  else: 'وإلا',
152
131
  otherwise: 'خلاف ذلك',
153
132
  end: 'النهاية',
133
+ live: 'حي',
134
+ changes: 'يتغير',
154
135
  },
155
136
 
156
137
  temporal: {
@@ -174,13 +155,13 @@ export const ar: Dictionary = {
174
155
  null: 'فارغ',
175
156
  undefined: 'غير معرف',
176
157
  it: 'هو',
177
- its: 'له', // REVIEW: native speaker
158
+ its: 'له',
178
159
  me: 'أنا',
179
160
  my: 'لي',
180
161
  myself: 'نفسي',
181
- you: 'أنت', // REVIEW: native speaker
182
- your: 'لك', // REVIEW: native speaker
183
- yourself: 'نفسك', // REVIEW: native speaker
162
+ you: 'أنت',
163
+ your: 'لك',
164
+ yourself: 'نفسك',
184
165
  element: 'عنصر',
185
166
  target: 'هدف',
186
167
  detail: 'تفاصيل',
@@ -204,7 +185,6 @@ export const ar: Dictionary = {
204
185
  },
205
186
 
206
187
  expressions: {
207
- // Positional
208
188
  first: 'أول',
209
189
  last: 'آخر',
210
190
  next: 'التالي',
@@ -212,20 +192,19 @@ export const ar: Dictionary = {
212
192
  prev: 'سابق',
213
193
  at: 'عند',
214
194
  random: 'عشوائي',
215
-
216
- // DOM Traversal
217
195
  closest: 'الأقرب',
218
196
  parent: 'والد',
219
197
  children: 'أطفال',
220
198
  within: 'داخل',
221
-
222
- // Emptiness/Existence
223
199
  no: 'لا يوجد',
224
200
  empty: 'فارغ',
225
201
  some: 'بعض',
226
-
227
- // String operations
228
202
  'starts with': 'يبدأ بـ',
229
203
  'ends with': 'ينتهي بـ',
204
+ 'ignoring case': 'مع تجاهل الحالة',
205
+ 'sorted by': 'مرتب حسب',
206
+ 'mapped to': 'محول إلى',
207
+ 'split by': 'مقسم بواسطة',
208
+ 'joined by': 'مدموج بواسطة',
230
209
  },
231
210
  };
@@ -58,6 +58,11 @@ export const bengaliDictionary: Dictionary = {
58
58
  pick: 'বাছুন',
59
59
  render: 'রেন্ডার',
60
60
  until: 'পর্যন্ত',
61
+ breakpoint: 'ব্রেকপয়েন্ট',
62
+ clear: 'পরিষ্কার',
63
+ close: 'বন্ধ',
64
+ open: 'খুলুন',
65
+ select: 'নির্বাচন',
61
66
  },
62
67
 
63
68
  modifiers: {
@@ -73,6 +78,7 @@ export const bengaliDictionary: Dictionary = {
73
78
  at: 'এ',
74
79
  in: 'এ',
75
80
  over: 'উপর',
81
+ between: 'মধ্যে',
76
82
  then: 'তারপর',
77
83
  and: 'এবং',
78
84
  end: 'শেষ',
@@ -88,6 +94,7 @@ export const bengaliDictionary: Dictionary = {
88
94
  load: 'লোড',
89
95
  focus: 'ফোকাস',
90
96
  blur: 'ঝাপসা',
97
+ reset: 'রিসেট',
91
98
  keydown: 'কি-ডাউন',
92
99
  keyup: 'কি-আপ',
93
100
  mouseover: 'মাউস-ওভার',
@@ -116,6 +123,8 @@ export const bengaliDictionary: Dictionary = {
116
123
  undefined: 'অনির্ধারিত',
117
124
  end: 'শেষ',
118
125
  then: 'তারপর',
126
+ live: 'লাইভ',
127
+ changes: 'পরিবর্তিত হলে',
119
128
  },
120
129
 
121
130
  temporal: {
@@ -165,6 +174,14 @@ export const bengaliDictionary: Dictionary = {
165
174
  random: 'এলোমেলো',
166
175
  length: 'দৈর্ঘ্য',
167
176
  index: 'সূচক',
177
+ empty: 'খালি-করুন',
178
+ 'starts with': 'দিয়ে_শুরু',
179
+ 'ends with': 'দিয়ে_শেষ',
180
+ 'ignoring case': 'কেস_উপেক্ষা',
181
+ 'sorted by': 'দ্বারা_সাজানো',
182
+ 'mapped to': 'তে_রূপান্তরিত',
183
+ 'split by': 'দ্বারা_বিভক্ত',
184
+ 'joined by': 'দ্বারা_যুক্ত',
168
185
  },
169
186
  };
170
187