@lokascript/i18n 2.3.1 → 2.5.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 +7 -7
  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,20 +1,14 @@
1
- // packages/i18n/src/dictionaries/pt.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
- * Portuguese (Português) dictionary for hyperscript keywords.
7
- * Brazilian Portuguese variant.
8
- */
9
6
  export const pt: Dictionary = {
10
7
  commands: {
11
- // Event handling
12
8
  on: 'em',
13
9
  tell: 'dizer',
14
10
  trigger: 'disparar',
15
11
  send: 'enviar',
16
-
17
- // DOM manipulation
18
12
  take: 'pegar',
19
13
  put: 'colocar',
20
14
  set: 'definir',
@@ -24,10 +18,8 @@ export const pt: Dictionary = {
24
18
  toggle: 'alternar',
25
19
  hide: 'esconder',
26
20
  show: 'mostrar',
27
-
28
- // Control flow
29
21
  if: 'se',
30
- unless: 'a_menos', // REVIEW: native speaker - multi-word
22
+ unless: 'a_menos',
31
23
  repeat: 'repetir',
32
24
  for: 'para',
33
25
  while: 'enquanto',
@@ -35,54 +27,41 @@ export const pt: Dictionary = {
35
27
  continue: 'continuar',
36
28
  break: 'parar',
37
29
  halt: 'interromper',
38
-
39
- // Async
40
30
  wait: 'esperar',
41
31
  fetch: 'buscar',
42
32
  call: 'chamar',
43
33
  return: 'retornar',
44
-
45
- // Other commands
46
34
  make: 'fazer',
47
35
  log: 'registrar',
48
36
  throw: 'lançar',
49
37
  catch: 'capturar',
50
38
  measure: 'medir',
51
39
  transition: 'transição',
52
-
53
- // Data Commands
54
40
  increment: 'incrementar',
55
41
  decrement: 'decrementar',
56
42
  default: 'padrão',
57
-
58
- // Navigation Commands
59
43
  go: 'ir',
60
44
  pushUrl: 'pushUrl',
61
45
  replaceUrl: 'substituirUrl',
62
-
63
- // Utility Commands
64
46
  copy: 'copiar',
65
47
  pick: 'escolher',
66
48
  beep: 'apitar',
67
-
68
- // Advanced Commands
69
49
  js: 'js',
70
50
  async: 'assíncrono',
71
51
  render: 'renderizar',
72
-
73
- // Animation Commands
74
52
  swap: 'trocar',
75
53
  morph: 'transformar',
76
54
  settle: 'estabilizar',
77
-
78
- // Content Commands
79
55
  append: 'anexar',
80
-
81
- // Control Flow
82
56
  exit: 'sair',
83
-
84
- // Behaviors
85
57
  install: 'instalar',
58
+ breakpoint: 'ponto-interrupção',
59
+ clear: 'limpar',
60
+ close: 'fechar',
61
+ open: 'abrir',
62
+ select: 'selecionar',
63
+ clone: 'clonar',
64
+ prepend: 'preceder',
86
65
  },
87
66
 
88
67
  modifiers: {
@@ -114,23 +93,19 @@ export const pt: Dictionary = {
114
93
  mouseover: 'mouseSobre',
115
94
  mouseout: 'mouseFora',
116
95
  mousemove: 'mouseMover',
117
-
118
96
  keydown: 'teclaBaixo',
119
97
  keyup: 'teclaCima',
120
98
  keypress: 'teclaPressionar',
121
-
122
99
  focus: 'foco',
123
100
  blur: 'desfoque',
124
101
  change: 'mudança',
125
102
  input: 'entrada',
126
103
  submit: 'envio',
127
104
  reset: 'reiniciar',
128
-
129
105
  load: 'carregar',
130
106
  unload: 'descarregar',
131
107
  resize: 'redimensionar',
132
108
  scroll: 'rolar',
133
-
134
109
  touchstart: 'toqueInício',
135
110
  touchend: 'toqueFim',
136
111
  touchmove: 'toqueMover',
@@ -149,12 +124,14 @@ export const pt: Dictionary = {
149
124
  contains: 'contém',
150
125
  includes: 'inclui',
151
126
  equals: 'igual',
152
- has: 'tem', // third-person: ele/ela tem
153
- have: 'tenho', // first-person: eu tenho
127
+ has: 'tem',
128
+ have: 'tenho',
154
129
  then: 'então',
155
130
  else: 'senão',
156
- otherwise: 'caso_contrário', // REVIEW: native speaker
131
+ otherwise: 'caso_contrário',
157
132
  end: 'fim',
133
+ live: 'vivo',
134
+ changes: 'muda',
158
135
  },
159
136
 
160
137
  temporal: {
@@ -181,10 +158,10 @@ export const pt: Dictionary = {
181
158
  its: 'seu',
182
159
  me: 'eu',
183
160
  my: 'meu',
184
- myself: 'eu mesmo', // REVIEW: native speaker
161
+ myself: 'eu mesmo',
185
162
  you: 'você',
186
163
  your: 'seu',
187
- yourself: 'você mesmo', // REVIEW: native speaker
164
+ yourself: 'você mesmo',
188
165
  element: 'elemento',
189
166
  target: 'alvo',
190
167
  detail: 'detalhe',
@@ -208,7 +185,6 @@ export const pt: Dictionary = {
208
185
  },
209
186
 
210
187
  expressions: {
211
- // Positional
212
188
  first: 'primeiro',
213
189
  last: 'último',
214
190
  next: 'próximo',
@@ -216,20 +192,19 @@ export const pt: Dictionary = {
216
192
  prev: 'ant',
217
193
  at: 'em',
218
194
  random: 'aleatório',
219
-
220
- // DOM Traversal
221
- closest: 'mais_próximo', // REVIEW: native speaker - multi-word
195
+ closest: 'mais_próximo',
222
196
  parent: 'pai',
223
197
  children: 'filhos',
224
198
  within: 'dentro',
225
-
226
- // Emptiness/Existence
227
199
  no: 'nenhum',
228
200
  empty: 'vazio',
229
201
  some: 'algum',
230
-
231
- // String operations
232
202
  'starts with': 'começa com',
233
203
  'ends with': 'termina com',
204
+ 'ignoring case': 'ignorando maiúsculas',
205
+ 'sorted by': 'ordenado por',
206
+ 'mapped to': 'mapeado para',
207
+ 'split by': 'dividido por',
208
+ 'joined by': 'unido por',
234
209
  },
235
210
  };
@@ -1,16 +1,14 @@
1
- // packages/i18n/src/dictionaries/qu.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 qu: Dictionary = {
6
7
  commands: {
7
- // Event handling
8
8
  on: 'kaqpi',
9
9
  tell: 'niy',
10
10
  trigger: 'kichay',
11
11
  send: 'kachay',
12
-
13
- // DOM manipulation
14
12
  take: 'hurquy',
15
13
  put: 'churay',
16
14
  set: 'churay',
@@ -20,8 +18,6 @@ export const qu: Dictionary = {
20
18
  toggle: 'tikray',
21
19
  hide: 'pakay',
22
20
  show: 'rikuchiy',
23
-
24
- // Control flow
25
21
  if: 'sichus',
26
22
  unless: 'mana_sichus',
27
23
  repeat: 'kutichiy',
@@ -31,54 +27,41 @@ export const qu: Dictionary = {
31
27
  continue: 'purichiy',
32
28
  break: 'p_akiy',
33
29
  halt: 'sayay',
34
-
35
- // Async
36
30
  wait: 'suyay',
37
31
  fetch: 'apamuy',
38
32
  call: 'qayay',
39
33
  return: 'kutimuy',
40
-
41
- // Other commands
42
34
  make: 'ruray',
43
35
  log: 'qillqay',
44
36
  throw: 'wikchuy',
45
37
  catch: 'hapsiy',
46
38
  measure: 'tupuy',
47
39
  transition: 'tikray',
48
-
49
- // Data Commands
50
40
  increment: 'yapay',
51
41
  decrement: 'pisiyachiy',
52
42
  default: 'ñawpaq_kaq',
53
-
54
- // Navigation Commands
55
43
  go: 'riy',
56
44
  pushUrl: 'url_tanqay',
57
45
  replaceUrl: 'url_tikray',
58
-
59
- // Utility Commands
60
46
  copy: 'qillqay',
61
47
  pick: 'akllay',
62
48
  beep: 'waqay',
63
-
64
- // Advanced Commands
65
49
  js: 'js',
66
50
  async: 'mana_suyaspa',
67
51
  render: 'rikuchiy',
68
-
69
- // Animation Commands
70
52
  swap: 'rantin_tikray',
71
53
  morph: 'tikrachiy',
72
54
  settle: 'tiyay',
73
-
74
- // Content Commands
75
55
  append: 'qhipaman_yapay',
76
-
77
- // Control Flow
78
56
  exit: 'lluqsiy',
79
-
80
- // Behaviors
81
57
  install: 'churay',
58
+ breakpoint: 'sayachinay',
59
+ clear: 'pichay',
60
+ close: 'wichqay',
61
+ open: 'kichay',
62
+ select: 'akllay',
63
+ clone: 'kikinchay',
64
+ prepend: 'ñawpachiy',
82
65
  },
83
66
 
84
67
  modifiers: {
@@ -110,23 +93,19 @@ export const qu: Dictionary = {
110
93
  mouseover: 'rat_hawapi',
111
94
  mouseout: 'rat_hawamanta',
112
95
  mousemove: 'rat_kuyuy',
113
-
114
96
  keydown: 'yupana_ñitiy',
115
97
  keyup: 'yupana_huqariy',
116
98
  keypress: 'yupana_ñitana',
117
-
118
99
  focus: 'qhaway',
119
100
  blur: 'paqariy',
120
101
  change: 'tikray',
121
102
  input: 'yaykuchiy',
122
103
  submit: 'kachay',
123
104
  reset: 'qallariy',
124
-
125
105
  load: 'apakuy',
126
106
  unload: 'urmay',
127
107
  resize: 'hatun_kay',
128
108
  scroll: 'kunray',
129
-
130
109
  touchstart: 'llamiy_qallay',
131
110
  touchend: 'llamiy_tukuy',
132
111
  touchmove: 'llamiy_kuyuy',
@@ -145,12 +124,14 @@ export const qu: Dictionary = {
145
124
  contains: 'ukupi_kan',
146
125
  includes: 'churasqa',
147
126
  equals: 'kikin',
148
- has: 'kachkan', // existence suffix (context-based)
149
- have: 'kachkani', // first-person with suffix
127
+ has: 'kachkan',
128
+ have: 'kachkani',
150
129
  then: 'chayqa',
151
130
  else: 'mana_chayqa',
152
131
  otherwise: 'huk_kaqpi',
153
132
  end: 'tukuy',
133
+ live: 'kawsay',
134
+ changes: 'tukurikun',
154
135
  },
155
136
 
156
137
  temporal: {
@@ -174,13 +155,13 @@ export const qu: Dictionary = {
174
155
  null: 'ch_usaq',
175
156
  undefined: 'mana_riqsisqa',
176
157
  it: 'chay',
177
- its: 'chaypaq', // REVIEW: native speaker
158
+ its: 'chaypaq',
178
159
  me: 'noqa',
179
160
  my: 'noqaq',
180
161
  myself: 'noqa killa',
181
- you: 'qam', // REVIEW: native speaker
182
- your: 'qampaq', // REVIEW: native speaker
183
- yourself: 'qam killa', // REVIEW: native speaker
162
+ you: 'qam',
163
+ your: 'qampaq',
164
+ yourself: 'qam killa',
184
165
  element: 'raku',
185
166
  target: 'punta',
186
167
  detail: 'sut_iy',
@@ -204,7 +185,6 @@ export const qu: Dictionary = {
204
185
  },
205
186
 
206
187
  expressions: {
207
- // Positional
208
188
  first: 'ñawpaq',
209
189
  last: 'qhipa',
210
190
  next: 'qhipantin',
@@ -212,20 +192,19 @@ export const qu: Dictionary = {
212
192
  prev: 'ñawpaq',
213
193
  at: 'pi',
214
194
  random: 'imaymanata',
215
-
216
- // DOM Traversal
217
195
  closest: 'aswan_kaylla',
218
196
  parent: 'mama_tayta',
219
197
  children: 'wawakuna',
220
198
  within: 'ukupi',
221
-
222
- // Emptiness/Existence
223
199
  no: 'mana_kanchu',
224
200
  empty: 'ch_usaq',
225
201
  some: 'wakin',
226
-
227
- // String operations
228
202
  'starts with': 'qallarisqa wan',
229
203
  'ends with': 'tukusqa wan',
204
+ 'ignoring case': 'hatun-huchuy qillqata-saqiy',
205
+ 'sorted by': 'niqpi ruwasqa',
206
+ 'mapped to': 'kay kaqman',
207
+ 'split by': 'rakisqa',
208
+ 'joined by': 'huñusqa',
230
209
  },
231
210
  };
@@ -1,21 +1,14 @@
1
- /**
2
- * Russian Dictionary
3
- *
4
- * Translations for Russian language support.
5
- * Uses infinitive verbs (common in software UIs).
6
- */
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
7
3
 
8
4
  import { Dictionary } from '../types';
9
5
 
10
6
  export const russianDictionary: Dictionary = {
11
7
  commands: {
12
- // Event handling
13
8
  on: 'при',
14
9
  tell: 'сказать',
15
10
  trigger: 'вызвать',
16
11
  send: 'отправить',
17
-
18
- // DOM manipulation
19
12
  take: 'взять',
20
13
  put: 'положить',
21
14
  set: 'установить',
@@ -25,8 +18,6 @@ export const russianDictionary: Dictionary = {
25
18
  toggle: 'переключить',
26
19
  hide: 'скрыть',
27
20
  show: 'показать',
28
-
29
- // Control flow
30
21
  if: 'если',
31
22
  unless: 'если_не',
32
23
  repeat: 'повторить',
@@ -36,65 +27,46 @@ export const russianDictionary: Dictionary = {
36
27
  continue: 'продолжить',
37
28
  break: 'прервать',
38
29
  halt: 'остановить',
39
-
40
- // Async
41
30
  wait: 'ждать',
42
31
  fetch: 'загрузить',
43
32
  call: 'вызвать',
44
33
  return: 'вернуть',
45
-
46
- // Other commands
47
34
  make: 'создать',
48
35
  log: 'записать',
49
36
  throw: 'бросить',
50
37
  catch: 'поймать',
51
38
  measure: 'измерить',
52
39
  transition: 'анимировать',
53
-
54
- // Data Commands
55
40
  increment: 'увеличить',
56
41
  decrement: 'уменьшить',
57
42
  default: 'по_умолчанию',
58
-
59
- // Navigation Commands
60
43
  go: 'перейти',
61
44
  pushUrl: 'добавить_url',
62
45
  replaceUrl: 'заменить_url',
63
-
64
- // Utility Commands
65
46
  copy: 'копировать',
66
47
  pick: 'выбрать',
67
48
  beep: 'звук',
68
-
69
- // Advanced Commands
70
49
  js: 'js',
71
50
  async: 'асинхронно',
72
51
  render: 'отобразить',
73
-
74
- // Animation Commands
75
52
  swap: 'поменять',
76
53
  morph: 'трансформировать',
77
54
  settle: 'стабилизировать',
78
-
79
- // Content Commands
80
55
  append: 'добавить_в_конец',
81
-
82
- // Control Flow
83
56
  exit: 'выйти',
84
57
  else: 'иначе',
85
-
86
- // Behaviors
87
58
  install: 'установить',
88
59
  init: 'инициализировать',
89
60
  behavior: 'поведение',
90
-
91
- // Focus
92
61
  focus: 'сфокусировать',
93
62
  blur: 'размыть',
94
-
95
- // Clone
96
63
  clone: 'клонировать',
97
64
  prepend: 'добавить_в_начало',
65
+ breakpoint: 'точка-останова',
66
+ clear: 'очистить',
67
+ close: 'закрыть',
68
+ open: 'открыть',
69
+ select: 'выбрать',
98
70
  },
99
71
 
100
72
  modifiers: {
@@ -127,23 +99,19 @@ export const russianDictionary: Dictionary = {
127
99
  mouseover: 'наведение',
128
100
  mouseout: 'уход',
129
101
  mousemove: 'движение_мыши',
130
-
131
102
  keydown: 'клавиша_вниз',
132
103
  keyup: 'клавиша_вверх',
133
104
  keypress: 'нажатие_клавиши',
134
-
135
105
  focus: 'фокус',
136
106
  blur: 'потеря_фокуса',
137
107
  change: 'изменение',
138
108
  input: 'ввод',
139
109
  submit: 'отправка',
140
110
  reset: 'сброс',
141
-
142
111
  load: 'загрузка',
143
112
  unload: 'выгрузка',
144
113
  resize: 'изменение_размера',
145
114
  scroll: 'прокрутка',
146
-
147
115
  touchstart: 'касание_начало',
148
116
  touchend: 'касание_конец',
149
117
  touchmove: 'касание_движение',
@@ -166,8 +134,10 @@ export const russianDictionary: Dictionary = {
166
134
  else: 'иначе',
167
135
  otherwise: 'в_противном_случае',
168
136
  end: 'конец',
169
- has: 'имеет', // third-person: он/она имеет
170
- have: 'имею', // first-person: я имею
137
+ live: 'живой',
138
+ changes: 'изменяется',
139
+ has: 'имеет',
140
+ have: 'имею',
171
141
  isNot: 'не_есть',
172
142
  empty: 'пустой',
173
143
  },
@@ -241,7 +211,6 @@ export const russianDictionary: Dictionary = {
241
211
  },
242
212
 
243
213
  expressions: {
244
- // Positional
245
214
  first: 'первый',
246
215
  last: 'последний',
247
216
  next: 'следующий',
@@ -249,20 +218,21 @@ export const russianDictionary: Dictionary = {
249
218
  prev: 'пред',
250
219
  at: 'в',
251
220
  random: 'случайный',
252
-
253
- // DOM Traversal
254
221
  closest: 'ближайший',
255
222
  parent: 'родитель',
256
223
  children: 'дети',
257
224
  within: 'внутри',
258
-
259
- // Emptiness/Existence
260
225
  no: 'нет',
261
226
  empty: 'пустой',
262
227
  some: 'некоторые',
263
-
264
- // String operations
265
228
  'starts with': 'начинается_с',
266
229
  'ends with': 'заканчивается_на',
230
+ 'ignoring case': 'без_учёта_регистра',
231
+ 'sorted by': 'сортировано_по',
232
+ 'mapped to': 'преобразовано_в',
233
+ 'split by': 'разделено_по',
234
+ 'joined by': 'объединено_через',
267
235
  },
268
236
  };
237
+
238
+ export const ru = russianDictionary;