@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,16 +1,14 @@
1
- // packages/i18n/src/dictionaries/de.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 de: Dictionary = {
6
7
  commands: {
7
- // Event handling
8
8
  on: 'bei',
9
9
  tell: 'sagen',
10
10
  trigger: 'auslösen',
11
11
  send: 'senden',
12
-
13
- // DOM manipulation
14
12
  take: 'nehmen',
15
13
  put: 'setzen',
16
14
  set: 'festlegen',
@@ -20,8 +18,6 @@ export const de: Dictionary = {
20
18
  toggle: 'umschalten',
21
19
  hide: 'verstecken',
22
20
  show: 'zeigen',
23
-
24
- // Control flow
25
21
  if: 'wenn',
26
22
  unless: 'wennnicht',
27
23
  repeat: 'wiederholen',
@@ -31,54 +27,41 @@ export const de: Dictionary = {
31
27
  continue: 'weiter',
32
28
  break: 'unterbrechen',
33
29
  halt: 'anhalten',
34
-
35
- // Async
36
30
  wait: 'warten',
37
31
  fetch: 'holen',
38
32
  call: 'aufrufen',
39
33
  return: 'zurückgeben',
40
-
41
- // Other commands
42
34
  make: 'erstellen',
43
35
  log: 'protokollieren',
44
36
  throw: 'werfen',
45
37
  catch: 'fangen',
46
38
  measure: 'messen',
47
39
  transition: 'übergang',
48
-
49
- // Data Commands
50
40
  increment: 'erhöhen',
51
41
  decrement: 'verringern',
52
42
  default: 'standard',
53
-
54
- // Navigation Commands
55
43
  go: 'gehen',
56
44
  pushUrl: 'urlHinzufügen',
57
45
  replaceUrl: 'urlErsetzen',
58
-
59
- // Utility Commands
60
46
  copy: 'kopieren',
61
47
  pick: 'auswählen',
62
48
  beep: 'piepton',
63
-
64
- // Advanced Commands
65
49
  js: 'js',
66
50
  async: 'asynchron',
67
51
  render: 'rendern',
68
-
69
- // Animation Commands
70
52
  swap: 'tauschen',
71
53
  morph: 'verwandeln',
72
54
  settle: 'stabilisieren',
73
-
74
- // Content Commands
75
55
  append: 'anhängen',
76
-
77
- // Control Flow
78
56
  exit: 'beenden',
79
-
80
- // Behaviors
81
57
  install: 'installieren',
58
+ breakpoint: 'haltepunkt',
59
+ clear: 'löschen',
60
+ close: 'schließen',
61
+ open: 'öffnen',
62
+ select: 'auswählen',
63
+ clone: 'klonen',
64
+ prepend: 'voranstellen',
82
65
  },
83
66
 
84
67
  modifiers: {
@@ -110,23 +93,19 @@ export const de: Dictionary = {
110
93
  mouseover: 'mausüber',
111
94
  mouseout: 'maushinaus',
112
95
  mousemove: 'mausbewegen',
113
-
114
96
  keydown: 'tasteunten',
115
97
  keyup: 'tasteoben',
116
98
  keypress: 'tastedrücken',
117
-
118
99
  focus: 'fokus',
119
100
  blur: 'unscharf',
120
101
  change: 'ändern',
121
102
  input: 'eingabe',
122
103
  submit: 'absenden',
123
104
  reset: 'zurücksetzen',
124
-
125
105
  load: 'laden',
126
106
  unload: 'entladen',
127
107
  resize: 'größeändern',
128
108
  scroll: 'scrollen',
129
-
130
109
  touchstart: 'berührungstart',
131
110
  touchend: 'berührungend',
132
111
  touchmove: 'berührungbewegen',
@@ -145,12 +124,14 @@ export const de: Dictionary = {
145
124
  contains: 'enthält',
146
125
  includes: 'beinhaltet',
147
126
  equals: 'gleicht',
148
- has: 'hat', // third-person: es hat
149
- have: 'habe', // first-person: ich habe
127
+ has: 'hat',
128
+ have: 'habe',
150
129
  then: 'dann',
151
130
  else: 'sonst',
152
131
  otherwise: 'andernfalls',
153
132
  end: 'ende',
133
+ live: 'live',
134
+ changes: 'ändert',
154
135
  },
155
136
 
156
137
  temporal: {
@@ -179,7 +160,7 @@ export const de: Dictionary = {
179
160
  my: 'mein',
180
161
  you: 'du',
181
162
  your: 'dein',
182
- yourself: 'dich selbst', // REVIEW: native speaker
163
+ yourself: 'dich selbst',
183
164
  myself: 'ich selbst',
184
165
  element: 'element',
185
166
  target: 'ziel',
@@ -204,7 +185,6 @@ export const de: Dictionary = {
204
185
  },
205
186
 
206
187
  expressions: {
207
- // Positional
208
188
  first: 'erste',
209
189
  last: 'letzte',
210
190
  next: 'nächste',
@@ -212,20 +192,19 @@ export const de: Dictionary = {
212
192
  prev: 'vorh',
213
193
  at: 'bei',
214
194
  random: 'zufällig',
215
-
216
- // DOM Traversal
217
195
  closest: 'nächste',
218
196
  parent: 'elternteil',
219
197
  children: 'kinder',
220
198
  within: 'innerhalb',
221
-
222
- // Emptiness/Existence
223
199
  no: 'kein',
224
200
  empty: 'leer',
225
201
  some: 'einige',
226
-
227
- // String operations
228
202
  'starts with': 'beginnt mit',
229
203
  'ends with': 'endet mit',
204
+ 'ignoring case': 'ohne Groß-/Kleinschreibung',
205
+ 'sorted by': 'sortiert nach',
206
+ 'mapped to': 'zugeordnet zu',
207
+ 'split by': 'geteilt durch',
208
+ 'joined by': 'verbunden mit',
230
209
  },
231
210
  };
@@ -83,6 +83,23 @@ export const en: Dictionary = {
83
83
 
84
84
  // Behaviors
85
85
  install: 'install',
86
+
87
+ // v0.9.90 Phase 1 — DOM / form state / debug
88
+ open: 'open',
89
+ close: 'close',
90
+ select: 'select',
91
+ clear: 'clear',
92
+ breakpoint: 'breakpoint',
93
+
94
+ // Other commands with schemas (backfill — pre-existing gaps surfaced by
95
+ // the schema-alignment test)
96
+ prepend: 'prepend',
97
+ clone: 'clone',
98
+ // Navigation/DOM commands added in core (Dec 2025 / Apr 2026)
99
+ scroll: 'scroll',
100
+ push: 'push',
101
+ replace: 'replace',
102
+ process: 'process',
86
103
  },
87
104
 
88
105
  modifiers: {
@@ -155,6 +172,8 @@ export const en: Dictionary = {
155
172
  else: 'else',
156
173
  otherwise: 'otherwise',
157
174
  end: 'end',
175
+ live: 'live',
176
+ changes: 'changes',
158
177
  },
159
178
 
160
179
  temporal: {
@@ -231,5 +250,12 @@ export const en: Dictionary = {
231
250
  // String operations
232
251
  'starts with': 'starts with',
233
252
  'ends with': 'ends with',
253
+ 'ignoring case': 'ignoring case',
254
+
255
+ // Collection operations (v0.9.90)
256
+ 'sorted by': 'sorted by',
257
+ 'mapped to': 'mapped to',
258
+ 'split by': 'split by',
259
+ 'joined by': 'joined by',
234
260
  },
235
261
  };
@@ -1,16 +1,14 @@
1
- // packages/i18n/src/dictionaries/es.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 es: Dictionary = {
6
7
  commands: {
7
- // Event handling
8
8
  on: 'en',
9
9
  tell: 'decir',
10
10
  trigger: 'disparar',
11
11
  send: 'enviar',
12
-
13
- // DOM manipulation
14
12
  take: 'tomar',
15
13
  put: 'poner',
16
14
  set: 'establecer',
@@ -20,8 +18,6 @@ export const es: Dictionary = {
20
18
  toggle: 'alternar',
21
19
  hide: 'ocultar',
22
20
  show: 'mostrar',
23
-
24
- // Control flow
25
21
  if: 'si',
26
22
  unless: 'menos',
27
23
  repeat: 'repetir',
@@ -31,54 +27,41 @@ export const es: Dictionary = {
31
27
  continue: 'continuar',
32
28
  break: 'romper',
33
29
  halt: 'detener',
34
-
35
- // Async
36
30
  wait: 'esperar',
37
31
  fetch: 'buscar',
38
32
  call: 'llamar',
39
33
  return: 'retornar',
40
-
41
- // Other commands
42
34
  make: 'hacer',
43
35
  log: 'registrar',
44
36
  throw: 'lanzar',
45
37
  catch: 'atrapar',
46
38
  measure: 'medir',
47
39
  transition: 'transición',
48
-
49
- // Data Commands
50
40
  increment: 'incrementar',
51
41
  decrement: 'decrementar',
52
42
  default: 'predeterminar',
53
-
54
- // Navigation Commands
55
43
  go: 'ir',
56
44
  pushUrl: 'pushUrl',
57
45
  replaceUrl: 'reemplazarUrl',
58
-
59
- // Utility Commands
60
46
  copy: 'copiar',
61
47
  pick: 'escoger',
62
48
  beep: 'pitido',
63
-
64
- // Advanced Commands
65
49
  js: 'js',
66
50
  async: 'asíncrono',
67
51
  render: 'renderizar',
68
-
69
- // Animation Commands
70
52
  swap: 'intercambiar',
71
53
  morph: 'transformar',
72
54
  settle: 'estabilizar',
73
-
74
- // Content Commands
75
55
  append: 'añadir',
76
-
77
- // Control Flow
78
56
  exit: 'salir',
79
-
80
- // Behaviors
81
57
  install: 'instalar',
58
+ breakpoint: 'punto-interrupción',
59
+ clear: 'limpiar',
60
+ close: 'cerrar',
61
+ open: 'abrir',
62
+ select: 'seleccionar',
63
+ clone: 'clonar',
64
+ prepend: 'anteponer',
82
65
  },
83
66
 
84
67
  modifiers: {
@@ -110,23 +93,19 @@ export const es: Dictionary = {
110
93
  mouseover: 'ratónencima',
111
94
  mouseout: 'ratónfuera',
112
95
  mousemove: 'ratónmover',
113
-
114
96
  keydown: 'teclaabajo',
115
97
  keyup: 'teclaarriba',
116
98
  keypress: 'teclapresar',
117
-
118
99
  focus: 'enfocar',
119
100
  blur: 'desenfocar',
120
101
  change: 'cambiar',
121
102
  input: 'entrada',
122
103
  submit: 'enviar',
123
104
  reset: 'reiniciar',
124
-
125
105
  load: 'cargar',
126
106
  unload: 'descargar',
127
107
  resize: 'redimensionar',
128
108
  scroll: 'desplazar',
129
-
130
109
  touchstart: 'toqueempezar',
131
110
  touchend: 'toqueterminar',
132
111
  touchmove: 'toquemover',
@@ -145,12 +124,14 @@ export const es: Dictionary = {
145
124
  contains: 'contiene',
146
125
  includes: 'incluye',
147
126
  equals: 'iguala',
148
- has: 'tiene', // third-person: él/ella tiene
149
- have: 'tengo', // first-person: yo tengo
127
+ has: 'tiene',
128
+ have: 'tengo',
150
129
  then: 'entonces',
151
130
  else: 'sino',
152
131
  otherwise: 'delocontrario',
153
132
  end: 'fin',
133
+ live: 'vivo',
134
+ changes: 'cambia',
154
135
  },
155
136
 
156
137
  temporal: {
@@ -179,7 +160,7 @@ export const es: Dictionary = {
179
160
  my: 'mi',
180
161
  you: 'tu',
181
162
  your: 'tu',
182
- yourself: 'ti mismo', // REVIEW: native speaker
163
+ yourself: 'ti mismo',
183
164
  myself: 'yo mismo',
184
165
  element: 'elemento',
185
166
  target: 'objetivo',
@@ -204,7 +185,6 @@ export const es: Dictionary = {
204
185
  },
205
186
 
206
187
  expressions: {
207
- // Positional
208
188
  first: 'primero',
209
189
  last: 'último',
210
190
  next: 'siguiente',
@@ -212,20 +192,19 @@ export const es: Dictionary = {
212
192
  prev: 'ant',
213
193
  at: 'en',
214
194
  random: 'aleatorio',
215
-
216
- // DOM Traversal
217
195
  closest: 'máscercano',
218
196
  parent: 'padre',
219
197
  children: 'hijos',
220
198
  within: 'dentro',
221
-
222
- // Emptiness/Existence
223
199
  no: 'ningún',
224
200
  empty: 'vacío',
225
201
  some: 'algún',
226
-
227
- // String operations
228
202
  'starts with': 'empieza con',
229
203
  'ends with': 'termina con',
204
+ 'ignoring case': 'ignorando mayúsculas',
205
+ 'sorted by': 'ordenado por',
206
+ 'mapped to': 'transformado a',
207
+ 'split by': 'dividido por',
208
+ 'joined by': 'unido por',
230
209
  },
231
210
  };
@@ -1,16 +1,14 @@
1
- // packages/i18n/src/dictionaries/fr.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 fr: Dictionary = {
6
7
  commands: {
7
- // Event handling
8
8
  on: 'sur',
9
9
  tell: 'dire',
10
10
  trigger: 'déclencher',
11
11
  send: 'envoyer',
12
-
13
- // DOM manipulation
14
12
  take: 'prendre',
15
13
  put: 'mettre',
16
14
  set: 'définir',
@@ -20,8 +18,6 @@ export const fr: Dictionary = {
20
18
  toggle: 'basculer',
21
19
  hide: 'cacher',
22
20
  show: 'montrer',
23
-
24
- // Control flow
25
21
  if: 'si',
26
22
  unless: 'saufsi',
27
23
  repeat: 'répéter',
@@ -31,54 +27,41 @@ export const fr: Dictionary = {
31
27
  continue: 'continuer',
32
28
  break: 'arrêter',
33
29
  halt: 'stopper',
34
-
35
- // Async
36
30
  wait: 'attendre',
37
31
  fetch: 'récupérer',
38
32
  call: 'appeler',
39
33
  return: 'retourner',
40
-
41
- // Other commands
42
34
  make: 'créer',
43
35
  log: 'enregistrer',
44
36
  throw: 'lancer',
45
37
  catch: 'attraper',
46
38
  measure: 'mesurer',
47
39
  transition: 'transition',
48
-
49
- // Data Commands
50
40
  increment: 'incrémenter',
51
41
  decrement: 'décrémenter',
52
42
  default: 'défaut',
53
-
54
- // Navigation Commands
55
43
  go: 'aller',
56
44
  pushUrl: 'pousserUrl',
57
45
  replaceUrl: 'remplacerUrl',
58
-
59
- // Utility Commands
60
46
  copy: 'copier',
61
47
  pick: 'choisir',
62
48
  beep: 'bip',
63
-
64
- // Advanced Commands
65
49
  js: 'js',
66
50
  async: 'asynchrone',
67
51
  render: 'rendu',
68
-
69
- // Animation Commands
70
52
  swap: 'échanger',
71
53
  morph: 'transformer',
72
54
  settle: 'stabiliser',
73
-
74
- // Content Commands
75
55
  append: 'ajouter',
76
-
77
- // Control Flow
78
56
  exit: 'sortir',
79
-
80
- // Behaviors
81
57
  install: 'installer',
58
+ breakpoint: 'point-arrêt',
59
+ clear: 'effacer',
60
+ close: 'fermer',
61
+ open: 'ouvrir',
62
+ select: 'sélectionner',
63
+ clone: 'cloner',
64
+ prepend: 'préfixer',
82
65
  },
83
66
 
84
67
  modifiers: {
@@ -110,23 +93,19 @@ export const fr: Dictionary = {
110
93
  mouseover: 'sourissur',
111
94
  mouseout: 'sourisdehors',
112
95
  mousemove: 'sourisbouger',
113
-
114
96
  keydown: 'toucheappuyée',
115
97
  keyup: 'toucherelâchée',
116
98
  keypress: 'touchepressée',
117
-
118
99
  focus: 'focus',
119
100
  blur: 'flou',
120
101
  change: 'changer',
121
102
  input: 'saisie',
122
103
  submit: 'soumettre',
123
104
  reset: 'réinitialiser',
124
-
125
105
  load: 'charger',
126
106
  unload: 'décharger',
127
107
  resize: 'redimensionner',
128
108
  scroll: 'défiler',
129
-
130
109
  touchstart: 'touchercommencer',
131
110
  touchend: 'toucherfin',
132
111
  touchmove: 'toucherbouger',
@@ -145,12 +124,14 @@ export const fr: Dictionary = {
145
124
  contains: 'contient',
146
125
  includes: 'inclut',
147
126
  equals: 'égale',
148
- has: 'a', // third-person: il/elle a
149
- have: 'ai', // first-person: j'ai
127
+ has: 'a',
128
+ have: 'ai',
150
129
  then: 'alors',
151
130
  else: 'sinon',
152
131
  otherwise: 'autrement',
153
132
  end: 'fin',
133
+ live: 'vif',
134
+ changes: 'change',
154
135
  },
155
136
 
156
137
  temporal: {
@@ -179,7 +160,7 @@ export const fr: Dictionary = {
179
160
  my: 'mon',
180
161
  you: 'tu',
181
162
  your: 'ton',
182
- yourself: 'toi-même', // REVIEW: native speaker
163
+ yourself: 'toi-même',
183
164
  myself: 'moi-même',
184
165
  element: 'élément',
185
166
  target: 'cible',
@@ -204,7 +185,6 @@ export const fr: Dictionary = {
204
185
  },
205
186
 
206
187
  expressions: {
207
- // Positional
208
188
  first: 'premier',
209
189
  last: 'dernier',
210
190
  next: 'suivant',
@@ -212,20 +192,19 @@ export const fr: Dictionary = {
212
192
  prev: 'préc',
213
193
  at: 'à',
214
194
  random: 'aléatoire',
215
-
216
- // DOM Traversal
217
195
  closest: 'plusproche',
218
196
  parent: 'parent',
219
197
  children: 'enfants',
220
198
  within: 'dans',
221
-
222
- // Emptiness/Existence
223
199
  no: 'aucun',
224
200
  empty: 'vide',
225
201
  some: 'quelques',
226
-
227
- // String operations
228
202
  'starts with': 'commence par',
229
203
  'ends with': 'finit par',
204
+ 'ignoring case': 'en ignorant la casse',
205
+ 'sorted by': 'trié par',
206
+ 'mapped to': 'transformé en',
207
+ 'split by': 'divisé par',
208
+ 'joined by': 'joint par',
230
209
  },
231
210
  };
@@ -76,6 +76,8 @@ export const he: Dictionary = {
76
76
  else: 'אחרת',
77
77
  end: 'סוף',
78
78
  then: 'אז',
79
+ live: 'חי',
80
+ changes: 'משתנה',
79
81
  when: 'כאשר',
80
82
  where: 'איפה',
81
83
  },