@lokascript/i18n 1.0.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/README.md +286 -0
- package/dist/browser.cjs +7669 -0
- package/dist/browser.cjs.map +1 -0
- package/dist/browser.d.cts +50 -0
- package/dist/browser.d.ts +50 -0
- package/dist/browser.js +7592 -0
- package/dist/browser.js.map +1 -0
- package/dist/hyperfixi-i18n.min.js +2 -0
- package/dist/hyperfixi-i18n.min.js.map +1 -0
- package/dist/hyperfixi-i18n.mjs +8558 -0
- package/dist/hyperfixi-i18n.mjs.map +1 -0
- package/dist/index.cjs +14205 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +947 -0
- package/dist/index.d.ts +947 -0
- package/dist/index.js +14095 -0
- package/dist/index.js.map +1 -0
- package/dist/transformer-Ckask-yw.d.cts +1041 -0
- package/dist/transformer-Ckask-yw.d.ts +1041 -0
- package/package.json +84 -0
- package/src/browser.ts +122 -0
- package/src/compatibility/browser-tests/grammar-demo.spec.ts +169 -0
- package/src/constants.ts +366 -0
- package/src/dictionaries/ar.ts +233 -0
- package/src/dictionaries/bn.ts +156 -0
- package/src/dictionaries/de.ts +233 -0
- package/src/dictionaries/derive.ts +515 -0
- package/src/dictionaries/en.ts +237 -0
- package/src/dictionaries/es.ts +233 -0
- package/src/dictionaries/fr.ts +233 -0
- package/src/dictionaries/hi.ts +270 -0
- package/src/dictionaries/id.ts +233 -0
- package/src/dictionaries/index.ts +238 -0
- package/src/dictionaries/it.ts +233 -0
- package/src/dictionaries/ja.ts +233 -0
- package/src/dictionaries/ko.ts +233 -0
- package/src/dictionaries/ms.ts +276 -0
- package/src/dictionaries/pl.ts +239 -0
- package/src/dictionaries/pt.ts +237 -0
- package/src/dictionaries/qu.ts +233 -0
- package/src/dictionaries/ru.ts +270 -0
- package/src/dictionaries/sw.ts +233 -0
- package/src/dictionaries/th.ts +156 -0
- package/src/dictionaries/tl.ts +276 -0
- package/src/dictionaries/tr.ts +233 -0
- package/src/dictionaries/uk.ts +270 -0
- package/src/dictionaries/vi.ts +210 -0
- package/src/dictionaries/zh.ts +233 -0
- package/src/enhanced-i18n.test.ts +454 -0
- package/src/enhanced-i18n.ts +713 -0
- package/src/examples/new-languages.ts +326 -0
- package/src/formatting.test.ts +213 -0
- package/src/formatting.ts +416 -0
- package/src/grammar/direct-mappings.ts +353 -0
- package/src/grammar/grammar.test.ts +1053 -0
- package/src/grammar/index.ts +59 -0
- package/src/grammar/profiles/index.ts +860 -0
- package/src/grammar/transformer.ts +1318 -0
- package/src/grammar/types.ts +630 -0
- package/src/index.ts +202 -0
- package/src/new-languages.test.ts +389 -0
- package/src/parser/analyze-conflicts.test.ts +229 -0
- package/src/parser/ar.ts +40 -0
- package/src/parser/create-provider.ts +309 -0
- package/src/parser/de.ts +36 -0
- package/src/parser/es.ts +31 -0
- package/src/parser/fr.ts +31 -0
- package/src/parser/id.ts +34 -0
- package/src/parser/index.ts +50 -0
- package/src/parser/ja.ts +36 -0
- package/src/parser/ko.ts +37 -0
- package/src/parser/locale-manager.test.ts +198 -0
- package/src/parser/locale-manager.ts +197 -0
- package/src/parser/parser-integration.test.ts +439 -0
- package/src/parser/pt.ts +37 -0
- package/src/parser/qu.ts +37 -0
- package/src/parser/sw.ts +37 -0
- package/src/parser/tr.ts +38 -0
- package/src/parser/types.ts +113 -0
- package/src/parser/zh.ts +38 -0
- package/src/plugins/vite.ts +224 -0
- package/src/plugins/webpack.ts +124 -0
- package/src/pluralization.test.ts +197 -0
- package/src/pluralization.ts +393 -0
- package/src/runtime.ts +441 -0
- package/src/ssr-integration.ts +225 -0
- package/src/test-setup.ts +195 -0
- package/src/translation-validation.test.ts +171 -0
- package/src/translator.test.ts +252 -0
- package/src/translator.ts +297 -0
- package/src/types.ts +209 -0
- package/src/utils/locale.ts +190 -0
- package/src/utils/tokenizer-adapter.ts +469 -0
- package/src/utils/tokenizer.ts +19 -0
- package/src/validators/index.ts +174 -0
- package/src/validators/schema.ts +129 -0
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
// packages/i18n/src/dictionaries/en.ts
|
|
2
|
+
|
|
3
|
+
import { Dictionary } from '../types';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* English dictionary - identity mapping since English is the canonical hyperscript language.
|
|
7
|
+
* This exists primarily for symmetry in translation operations (e.g., en -> es).
|
|
8
|
+
*/
|
|
9
|
+
export const en: Dictionary = {
|
|
10
|
+
commands: {
|
|
11
|
+
// Event handling
|
|
12
|
+
on: 'on',
|
|
13
|
+
tell: 'tell',
|
|
14
|
+
trigger: 'trigger',
|
|
15
|
+
send: 'send',
|
|
16
|
+
|
|
17
|
+
// DOM manipulation
|
|
18
|
+
take: 'take',
|
|
19
|
+
put: 'put',
|
|
20
|
+
set: 'set',
|
|
21
|
+
get: 'get',
|
|
22
|
+
add: 'add',
|
|
23
|
+
remove: 'remove',
|
|
24
|
+
toggle: 'toggle',
|
|
25
|
+
hide: 'hide',
|
|
26
|
+
show: 'show',
|
|
27
|
+
|
|
28
|
+
// Control flow
|
|
29
|
+
if: 'if',
|
|
30
|
+
unless: 'unless',
|
|
31
|
+
repeat: 'repeat',
|
|
32
|
+
for: 'for',
|
|
33
|
+
while: 'while',
|
|
34
|
+
until: 'until',
|
|
35
|
+
continue: 'continue',
|
|
36
|
+
break: 'break',
|
|
37
|
+
halt: 'halt',
|
|
38
|
+
|
|
39
|
+
// Async
|
|
40
|
+
wait: 'wait',
|
|
41
|
+
fetch: 'fetch',
|
|
42
|
+
call: 'call',
|
|
43
|
+
return: 'return',
|
|
44
|
+
|
|
45
|
+
// Other commands
|
|
46
|
+
make: 'make',
|
|
47
|
+
log: 'log',
|
|
48
|
+
throw: 'throw',
|
|
49
|
+
catch: 'catch',
|
|
50
|
+
measure: 'measure',
|
|
51
|
+
transition: 'transition',
|
|
52
|
+
|
|
53
|
+
// Data Commands
|
|
54
|
+
increment: 'increment',
|
|
55
|
+
decrement: 'decrement',
|
|
56
|
+
bind: 'bind',
|
|
57
|
+
default: 'default',
|
|
58
|
+
persist: 'persist',
|
|
59
|
+
|
|
60
|
+
// Navigation Commands
|
|
61
|
+
go: 'go',
|
|
62
|
+
pushUrl: 'pushUrl',
|
|
63
|
+
replaceUrl: 'replaceUrl',
|
|
64
|
+
|
|
65
|
+
// Utility Commands
|
|
66
|
+
copy: 'copy',
|
|
67
|
+
pick: 'pick',
|
|
68
|
+
beep: 'beep',
|
|
69
|
+
|
|
70
|
+
// Advanced Commands
|
|
71
|
+
js: 'js',
|
|
72
|
+
async: 'async',
|
|
73
|
+
render: 'render',
|
|
74
|
+
|
|
75
|
+
// Animation Commands
|
|
76
|
+
swap: 'swap',
|
|
77
|
+
morph: 'morph',
|
|
78
|
+
settle: 'settle',
|
|
79
|
+
|
|
80
|
+
// Content Commands
|
|
81
|
+
append: 'append',
|
|
82
|
+
|
|
83
|
+
// Control Flow
|
|
84
|
+
exit: 'exit',
|
|
85
|
+
|
|
86
|
+
// Behaviors
|
|
87
|
+
install: 'install',
|
|
88
|
+
},
|
|
89
|
+
|
|
90
|
+
modifiers: {
|
|
91
|
+
to: 'to',
|
|
92
|
+
from: 'from',
|
|
93
|
+
into: 'into',
|
|
94
|
+
with: 'with',
|
|
95
|
+
at: 'at',
|
|
96
|
+
in: 'in',
|
|
97
|
+
of: 'of',
|
|
98
|
+
as: 'as',
|
|
99
|
+
by: 'by',
|
|
100
|
+
before: 'before',
|
|
101
|
+
after: 'after',
|
|
102
|
+
over: 'over',
|
|
103
|
+
under: 'under',
|
|
104
|
+
between: 'between',
|
|
105
|
+
through: 'through',
|
|
106
|
+
without: 'without',
|
|
107
|
+
},
|
|
108
|
+
|
|
109
|
+
events: {
|
|
110
|
+
click: 'click',
|
|
111
|
+
dblclick: 'dblclick',
|
|
112
|
+
mousedown: 'mousedown',
|
|
113
|
+
mouseup: 'mouseup',
|
|
114
|
+
mouseenter: 'mouseenter',
|
|
115
|
+
mouseleave: 'mouseleave',
|
|
116
|
+
mouseover: 'mouseover',
|
|
117
|
+
mouseout: 'mouseout',
|
|
118
|
+
mousemove: 'mousemove',
|
|
119
|
+
|
|
120
|
+
keydown: 'keydown',
|
|
121
|
+
keyup: 'keyup',
|
|
122
|
+
keypress: 'keypress',
|
|
123
|
+
|
|
124
|
+
focus: 'focus',
|
|
125
|
+
blur: 'blur',
|
|
126
|
+
change: 'change',
|
|
127
|
+
input: 'input',
|
|
128
|
+
submit: 'submit',
|
|
129
|
+
reset: 'reset',
|
|
130
|
+
|
|
131
|
+
load: 'load',
|
|
132
|
+
unload: 'unload',
|
|
133
|
+
resize: 'resize',
|
|
134
|
+
scroll: 'scroll',
|
|
135
|
+
|
|
136
|
+
touchstart: 'touchstart',
|
|
137
|
+
touchend: 'touchend',
|
|
138
|
+
touchmove: 'touchmove',
|
|
139
|
+
touchcancel: 'touchcancel',
|
|
140
|
+
},
|
|
141
|
+
|
|
142
|
+
logical: {
|
|
143
|
+
when: 'when',
|
|
144
|
+
where: 'where',
|
|
145
|
+
and: 'and',
|
|
146
|
+
or: 'or',
|
|
147
|
+
not: 'not',
|
|
148
|
+
is: 'is',
|
|
149
|
+
exists: 'exists',
|
|
150
|
+
matches: 'matches',
|
|
151
|
+
contains: 'contains',
|
|
152
|
+
includes: 'includes',
|
|
153
|
+
equals: 'equals',
|
|
154
|
+
has: 'has', // third-person: "it has .class", "#element has .class"
|
|
155
|
+
have: 'have', // first-person: "I have .class"
|
|
156
|
+
then: 'then',
|
|
157
|
+
else: 'else',
|
|
158
|
+
otherwise: 'otherwise',
|
|
159
|
+
end: 'end',
|
|
160
|
+
},
|
|
161
|
+
|
|
162
|
+
temporal: {
|
|
163
|
+
seconds: 'seconds',
|
|
164
|
+
second: 'second',
|
|
165
|
+
milliseconds: 'milliseconds',
|
|
166
|
+
millisecond: 'millisecond',
|
|
167
|
+
minutes: 'minutes',
|
|
168
|
+
minute: 'minute',
|
|
169
|
+
hours: 'hours',
|
|
170
|
+
hour: 'hour',
|
|
171
|
+
ms: 'ms',
|
|
172
|
+
s: 's',
|
|
173
|
+
min: 'min',
|
|
174
|
+
h: 'h',
|
|
175
|
+
},
|
|
176
|
+
|
|
177
|
+
values: {
|
|
178
|
+
true: 'true',
|
|
179
|
+
false: 'false',
|
|
180
|
+
null: 'null',
|
|
181
|
+
undefined: 'undefined',
|
|
182
|
+
it: 'it',
|
|
183
|
+
its: 'its',
|
|
184
|
+
me: 'me',
|
|
185
|
+
my: 'my',
|
|
186
|
+
myself: 'myself',
|
|
187
|
+
you: 'you',
|
|
188
|
+
your: 'your',
|
|
189
|
+
yourself: 'yourself',
|
|
190
|
+
element: 'element',
|
|
191
|
+
target: 'target',
|
|
192
|
+
detail: 'detail',
|
|
193
|
+
event: 'event',
|
|
194
|
+
window: 'window',
|
|
195
|
+
document: 'document',
|
|
196
|
+
body: 'body',
|
|
197
|
+
result: 'result',
|
|
198
|
+
value: 'value',
|
|
199
|
+
},
|
|
200
|
+
|
|
201
|
+
attributes: {
|
|
202
|
+
class: 'class',
|
|
203
|
+
classes: 'classes',
|
|
204
|
+
style: 'style',
|
|
205
|
+
styles: 'styles',
|
|
206
|
+
attribute: 'attribute',
|
|
207
|
+
attributes: 'attributes',
|
|
208
|
+
property: 'property',
|
|
209
|
+
properties: 'properties',
|
|
210
|
+
},
|
|
211
|
+
|
|
212
|
+
expressions: {
|
|
213
|
+
// Positional
|
|
214
|
+
first: 'first',
|
|
215
|
+
last: 'last',
|
|
216
|
+
next: 'next',
|
|
217
|
+
previous: 'previous',
|
|
218
|
+
prev: 'prev',
|
|
219
|
+
at: 'at',
|
|
220
|
+
random: 'random',
|
|
221
|
+
|
|
222
|
+
// DOM Traversal
|
|
223
|
+
closest: 'closest',
|
|
224
|
+
parent: 'parent',
|
|
225
|
+
children: 'children',
|
|
226
|
+
within: 'within',
|
|
227
|
+
|
|
228
|
+
// Emptiness/Existence
|
|
229
|
+
no: 'no',
|
|
230
|
+
empty: 'empty',
|
|
231
|
+
some: 'some',
|
|
232
|
+
|
|
233
|
+
// String operations
|
|
234
|
+
'starts with': 'starts with',
|
|
235
|
+
'ends with': 'ends with',
|
|
236
|
+
},
|
|
237
|
+
};
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
// packages/i18n/src/dictionaries/es.ts
|
|
2
|
+
|
|
3
|
+
import { Dictionary } from '../types';
|
|
4
|
+
|
|
5
|
+
export const es: Dictionary = {
|
|
6
|
+
commands: {
|
|
7
|
+
// Event handling
|
|
8
|
+
on: 'en',
|
|
9
|
+
tell: 'decir',
|
|
10
|
+
trigger: 'disparar',
|
|
11
|
+
send: 'enviar',
|
|
12
|
+
|
|
13
|
+
// DOM manipulation
|
|
14
|
+
take: 'tomar',
|
|
15
|
+
put: 'poner',
|
|
16
|
+
set: 'establecer',
|
|
17
|
+
get: 'obtener',
|
|
18
|
+
add: 'agregar',
|
|
19
|
+
remove: 'quitar',
|
|
20
|
+
toggle: 'alternar',
|
|
21
|
+
hide: 'ocultar',
|
|
22
|
+
show: 'mostrar',
|
|
23
|
+
|
|
24
|
+
// Control flow
|
|
25
|
+
if: 'si',
|
|
26
|
+
unless: 'menos',
|
|
27
|
+
repeat: 'repetir',
|
|
28
|
+
for: 'para',
|
|
29
|
+
while: 'mientras',
|
|
30
|
+
until: 'hasta',
|
|
31
|
+
continue: 'continuar',
|
|
32
|
+
break: 'romper',
|
|
33
|
+
halt: 'detener',
|
|
34
|
+
|
|
35
|
+
// Async
|
|
36
|
+
wait: 'esperar',
|
|
37
|
+
fetch: 'buscar',
|
|
38
|
+
call: 'llamar',
|
|
39
|
+
return: 'retornar',
|
|
40
|
+
|
|
41
|
+
// Other commands
|
|
42
|
+
make: 'hacer',
|
|
43
|
+
log: 'registrar',
|
|
44
|
+
throw: 'lanzar',
|
|
45
|
+
catch: 'atrapar',
|
|
46
|
+
measure: 'medir',
|
|
47
|
+
transition: 'transición',
|
|
48
|
+
|
|
49
|
+
// Data Commands
|
|
50
|
+
increment: 'incrementar',
|
|
51
|
+
decrement: 'decrementar',
|
|
52
|
+
bind: 'vincular',
|
|
53
|
+
default: 'predeterminar',
|
|
54
|
+
persist: 'persistir',
|
|
55
|
+
|
|
56
|
+
// Navigation Commands
|
|
57
|
+
go: 'ir',
|
|
58
|
+
pushUrl: 'pushUrl',
|
|
59
|
+
replaceUrl: 'reemplazarUrl',
|
|
60
|
+
|
|
61
|
+
// Utility Commands
|
|
62
|
+
copy: 'copiar',
|
|
63
|
+
pick: 'escoger',
|
|
64
|
+
beep: 'pitido',
|
|
65
|
+
|
|
66
|
+
// Advanced Commands
|
|
67
|
+
js: 'js',
|
|
68
|
+
async: 'asíncrono',
|
|
69
|
+
render: 'renderizar',
|
|
70
|
+
|
|
71
|
+
// Animation Commands
|
|
72
|
+
swap: 'intercambiar',
|
|
73
|
+
morph: 'transformar',
|
|
74
|
+
settle: 'estabilizar',
|
|
75
|
+
|
|
76
|
+
// Content Commands
|
|
77
|
+
append: 'añadir',
|
|
78
|
+
|
|
79
|
+
// Control Flow
|
|
80
|
+
exit: 'salir',
|
|
81
|
+
|
|
82
|
+
// Behaviors
|
|
83
|
+
install: 'instalar',
|
|
84
|
+
},
|
|
85
|
+
|
|
86
|
+
modifiers: {
|
|
87
|
+
to: 'a',
|
|
88
|
+
from: 'de',
|
|
89
|
+
into: 'en',
|
|
90
|
+
with: 'con',
|
|
91
|
+
at: 'en',
|
|
92
|
+
in: 'en',
|
|
93
|
+
of: 'de',
|
|
94
|
+
as: 'como',
|
|
95
|
+
by: 'por',
|
|
96
|
+
before: 'antes',
|
|
97
|
+
after: 'después',
|
|
98
|
+
over: 'sobre',
|
|
99
|
+
under: 'bajo',
|
|
100
|
+
between: 'entre',
|
|
101
|
+
through: 'través',
|
|
102
|
+
without: 'sin',
|
|
103
|
+
},
|
|
104
|
+
|
|
105
|
+
events: {
|
|
106
|
+
click: 'clic',
|
|
107
|
+
dblclick: 'dobleclic',
|
|
108
|
+
mousedown: 'ratónabajo',
|
|
109
|
+
mouseup: 'ratónarriba',
|
|
110
|
+
mouseenter: 'ratónentrar',
|
|
111
|
+
mouseleave: 'ratónsalir',
|
|
112
|
+
mouseover: 'ratónencima',
|
|
113
|
+
mouseout: 'ratónfuera',
|
|
114
|
+
mousemove: 'ratónmover',
|
|
115
|
+
|
|
116
|
+
keydown: 'teclaabajo',
|
|
117
|
+
keyup: 'teclaarriba',
|
|
118
|
+
keypress: 'teclapresar',
|
|
119
|
+
|
|
120
|
+
focus: 'enfocar',
|
|
121
|
+
blur: 'desenfocar',
|
|
122
|
+
change: 'cambiar',
|
|
123
|
+
input: 'entrada',
|
|
124
|
+
submit: 'enviar',
|
|
125
|
+
reset: 'reiniciar',
|
|
126
|
+
|
|
127
|
+
load: 'cargar',
|
|
128
|
+
unload: 'descargar',
|
|
129
|
+
resize: 'redimensionar',
|
|
130
|
+
scroll: 'desplazar',
|
|
131
|
+
|
|
132
|
+
touchstart: 'toqueempezar',
|
|
133
|
+
touchend: 'toqueterminar',
|
|
134
|
+
touchmove: 'toquemover',
|
|
135
|
+
touchcancel: 'toquecancelar',
|
|
136
|
+
},
|
|
137
|
+
|
|
138
|
+
logical: {
|
|
139
|
+
when: 'cuando',
|
|
140
|
+
where: 'donde',
|
|
141
|
+
and: 'y',
|
|
142
|
+
or: 'o',
|
|
143
|
+
not: 'no',
|
|
144
|
+
is: 'es',
|
|
145
|
+
exists: 'existe',
|
|
146
|
+
matches: 'coincide',
|
|
147
|
+
contains: 'contiene',
|
|
148
|
+
includes: 'incluye',
|
|
149
|
+
equals: 'iguala',
|
|
150
|
+
has: 'tiene', // third-person: él/ella tiene
|
|
151
|
+
have: 'tengo', // first-person: yo tengo
|
|
152
|
+
then: 'entonces',
|
|
153
|
+
else: 'sino',
|
|
154
|
+
otherwise: 'delocontrario',
|
|
155
|
+
end: 'fin',
|
|
156
|
+
},
|
|
157
|
+
|
|
158
|
+
temporal: {
|
|
159
|
+
seconds: 'segundos',
|
|
160
|
+
second: 'segundo',
|
|
161
|
+
milliseconds: 'milisegundos',
|
|
162
|
+
millisecond: 'milisegundo',
|
|
163
|
+
minutes: 'minutos',
|
|
164
|
+
minute: 'minuto',
|
|
165
|
+
hours: 'horas',
|
|
166
|
+
hour: 'hora',
|
|
167
|
+
ms: 'ms',
|
|
168
|
+
s: 's',
|
|
169
|
+
min: 'min',
|
|
170
|
+
h: 'h',
|
|
171
|
+
},
|
|
172
|
+
|
|
173
|
+
values: {
|
|
174
|
+
true: 'verdadero',
|
|
175
|
+
false: 'falso',
|
|
176
|
+
null: 'nulo',
|
|
177
|
+
undefined: 'indefinido',
|
|
178
|
+
it: 'ello',
|
|
179
|
+
its: 'su',
|
|
180
|
+
me: 'yo',
|
|
181
|
+
my: 'mi',
|
|
182
|
+
you: 'tu',
|
|
183
|
+
your: 'tu',
|
|
184
|
+
yourself: 'ti mismo', // REVIEW: native speaker
|
|
185
|
+
myself: 'yo mismo',
|
|
186
|
+
element: 'elemento',
|
|
187
|
+
target: 'objetivo',
|
|
188
|
+
detail: 'detalle',
|
|
189
|
+
event: 'evento',
|
|
190
|
+
window: 'ventana',
|
|
191
|
+
document: 'documento',
|
|
192
|
+
body: 'cuerpo',
|
|
193
|
+
result: 'resultado',
|
|
194
|
+
value: 'valor',
|
|
195
|
+
},
|
|
196
|
+
|
|
197
|
+
attributes: {
|
|
198
|
+
class: 'clase',
|
|
199
|
+
classes: 'clases',
|
|
200
|
+
style: 'estilo',
|
|
201
|
+
styles: 'estilos',
|
|
202
|
+
attribute: 'atributo',
|
|
203
|
+
attributes: 'atributos',
|
|
204
|
+
property: 'propiedad',
|
|
205
|
+
properties: 'propiedades',
|
|
206
|
+
},
|
|
207
|
+
|
|
208
|
+
expressions: {
|
|
209
|
+
// Positional
|
|
210
|
+
first: 'primero',
|
|
211
|
+
last: 'último',
|
|
212
|
+
next: 'siguiente',
|
|
213
|
+
previous: 'anterior',
|
|
214
|
+
prev: 'ant',
|
|
215
|
+
at: 'en',
|
|
216
|
+
random: 'aleatorio',
|
|
217
|
+
|
|
218
|
+
// DOM Traversal
|
|
219
|
+
closest: 'máscercano',
|
|
220
|
+
parent: 'padre',
|
|
221
|
+
children: 'hijos',
|
|
222
|
+
within: 'dentro',
|
|
223
|
+
|
|
224
|
+
// Emptiness/Existence
|
|
225
|
+
no: 'ningún',
|
|
226
|
+
empty: 'vacío',
|
|
227
|
+
some: 'algún',
|
|
228
|
+
|
|
229
|
+
// String operations
|
|
230
|
+
'starts with': 'empieza con',
|
|
231
|
+
'ends with': 'termina con',
|
|
232
|
+
},
|
|
233
|
+
};
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
// packages/i18n/src/dictionaries/fr.ts
|
|
2
|
+
|
|
3
|
+
import { Dictionary } from '../types';
|
|
4
|
+
|
|
5
|
+
export const fr: Dictionary = {
|
|
6
|
+
commands: {
|
|
7
|
+
// Event handling
|
|
8
|
+
on: 'sur',
|
|
9
|
+
tell: 'dire',
|
|
10
|
+
trigger: 'déclencher',
|
|
11
|
+
send: 'envoyer',
|
|
12
|
+
|
|
13
|
+
// DOM manipulation
|
|
14
|
+
take: 'prendre',
|
|
15
|
+
put: 'mettre',
|
|
16
|
+
set: 'définir',
|
|
17
|
+
get: 'obtenir',
|
|
18
|
+
add: 'ajouter',
|
|
19
|
+
remove: 'supprimer',
|
|
20
|
+
toggle: 'basculer',
|
|
21
|
+
hide: 'cacher',
|
|
22
|
+
show: 'montrer',
|
|
23
|
+
|
|
24
|
+
// Control flow
|
|
25
|
+
if: 'si',
|
|
26
|
+
unless: 'saufsi',
|
|
27
|
+
repeat: 'répéter',
|
|
28
|
+
for: 'pour',
|
|
29
|
+
while: 'tantque',
|
|
30
|
+
until: 'jusquà',
|
|
31
|
+
continue: 'continuer',
|
|
32
|
+
break: 'arrêter',
|
|
33
|
+
halt: 'stopper',
|
|
34
|
+
|
|
35
|
+
// Async
|
|
36
|
+
wait: 'attendre',
|
|
37
|
+
fetch: 'récupérer',
|
|
38
|
+
call: 'appeler',
|
|
39
|
+
return: 'retourner',
|
|
40
|
+
|
|
41
|
+
// Other commands
|
|
42
|
+
make: 'créer',
|
|
43
|
+
log: 'enregistrer',
|
|
44
|
+
throw: 'lancer',
|
|
45
|
+
catch: 'attraper',
|
|
46
|
+
measure: 'mesurer',
|
|
47
|
+
transition: 'transition',
|
|
48
|
+
|
|
49
|
+
// Data Commands
|
|
50
|
+
increment: 'incrémenter',
|
|
51
|
+
decrement: 'décrémenter',
|
|
52
|
+
bind: 'lier',
|
|
53
|
+
default: 'défaut',
|
|
54
|
+
persist: 'persister',
|
|
55
|
+
|
|
56
|
+
// Navigation Commands
|
|
57
|
+
go: 'aller',
|
|
58
|
+
pushUrl: 'pousserUrl',
|
|
59
|
+
replaceUrl: 'remplacerUrl',
|
|
60
|
+
|
|
61
|
+
// Utility Commands
|
|
62
|
+
copy: 'copier',
|
|
63
|
+
pick: 'choisir',
|
|
64
|
+
beep: 'bip',
|
|
65
|
+
|
|
66
|
+
// Advanced Commands
|
|
67
|
+
js: 'js',
|
|
68
|
+
async: 'asynchrone',
|
|
69
|
+
render: 'rendu',
|
|
70
|
+
|
|
71
|
+
// Animation Commands
|
|
72
|
+
swap: 'échanger',
|
|
73
|
+
morph: 'transformer',
|
|
74
|
+
settle: 'stabiliser',
|
|
75
|
+
|
|
76
|
+
// Content Commands
|
|
77
|
+
append: 'ajouter',
|
|
78
|
+
|
|
79
|
+
// Control Flow
|
|
80
|
+
exit: 'sortir',
|
|
81
|
+
|
|
82
|
+
// Behaviors
|
|
83
|
+
install: 'installer',
|
|
84
|
+
},
|
|
85
|
+
|
|
86
|
+
modifiers: {
|
|
87
|
+
to: 'à',
|
|
88
|
+
from: 'de',
|
|
89
|
+
into: 'dans',
|
|
90
|
+
with: 'avec',
|
|
91
|
+
at: 'à',
|
|
92
|
+
in: 'en',
|
|
93
|
+
of: 'de',
|
|
94
|
+
as: 'comme',
|
|
95
|
+
by: 'par',
|
|
96
|
+
before: 'avant',
|
|
97
|
+
after: 'après',
|
|
98
|
+
over: 'sur',
|
|
99
|
+
under: 'sous',
|
|
100
|
+
between: 'entre',
|
|
101
|
+
through: 'à travers',
|
|
102
|
+
without: 'sans',
|
|
103
|
+
},
|
|
104
|
+
|
|
105
|
+
events: {
|
|
106
|
+
click: 'clic',
|
|
107
|
+
dblclick: 'doubleclic',
|
|
108
|
+
mousedown: 'sourisappuyée',
|
|
109
|
+
mouseup: 'sourisrelâchée',
|
|
110
|
+
mouseenter: 'sourisentrer',
|
|
111
|
+
mouseleave: 'sourissortir',
|
|
112
|
+
mouseover: 'sourissur',
|
|
113
|
+
mouseout: 'sourisdehors',
|
|
114
|
+
mousemove: 'sourisbouger',
|
|
115
|
+
|
|
116
|
+
keydown: 'toucheappuyée',
|
|
117
|
+
keyup: 'toucherelâchée',
|
|
118
|
+
keypress: 'touchepressée',
|
|
119
|
+
|
|
120
|
+
focus: 'focus',
|
|
121
|
+
blur: 'flou',
|
|
122
|
+
change: 'changer',
|
|
123
|
+
input: 'saisie',
|
|
124
|
+
submit: 'soumettre',
|
|
125
|
+
reset: 'réinitialiser',
|
|
126
|
+
|
|
127
|
+
load: 'charger',
|
|
128
|
+
unload: 'décharger',
|
|
129
|
+
resize: 'redimensionner',
|
|
130
|
+
scroll: 'défiler',
|
|
131
|
+
|
|
132
|
+
touchstart: 'touchercommencer',
|
|
133
|
+
touchend: 'toucherfin',
|
|
134
|
+
touchmove: 'toucherbouger',
|
|
135
|
+
touchcancel: 'toucherannuler',
|
|
136
|
+
},
|
|
137
|
+
|
|
138
|
+
logical: {
|
|
139
|
+
when: 'quand',
|
|
140
|
+
where: 'où',
|
|
141
|
+
and: 'et',
|
|
142
|
+
or: 'ou',
|
|
143
|
+
not: 'non',
|
|
144
|
+
is: 'est',
|
|
145
|
+
exists: 'existe',
|
|
146
|
+
matches: 'correspond',
|
|
147
|
+
contains: 'contient',
|
|
148
|
+
includes: 'inclut',
|
|
149
|
+
equals: 'égale',
|
|
150
|
+
has: 'a', // third-person: il/elle a
|
|
151
|
+
have: 'ai', // first-person: j'ai
|
|
152
|
+
then: 'alors',
|
|
153
|
+
else: 'sinon',
|
|
154
|
+
otherwise: 'autrement',
|
|
155
|
+
end: 'fin',
|
|
156
|
+
},
|
|
157
|
+
|
|
158
|
+
temporal: {
|
|
159
|
+
seconds: 'secondes',
|
|
160
|
+
second: 'seconde',
|
|
161
|
+
milliseconds: 'millisecondes',
|
|
162
|
+
millisecond: 'milliseconde',
|
|
163
|
+
minutes: 'minutes',
|
|
164
|
+
minute: 'minute',
|
|
165
|
+
hours: 'heures',
|
|
166
|
+
hour: 'heure',
|
|
167
|
+
ms: 'ms',
|
|
168
|
+
s: 's',
|
|
169
|
+
min: 'min',
|
|
170
|
+
h: 'h',
|
|
171
|
+
},
|
|
172
|
+
|
|
173
|
+
values: {
|
|
174
|
+
true: 'vrai',
|
|
175
|
+
false: 'faux',
|
|
176
|
+
null: 'nul',
|
|
177
|
+
undefined: 'indéfini',
|
|
178
|
+
it: 'ça',
|
|
179
|
+
its: 'son',
|
|
180
|
+
me: 'moi',
|
|
181
|
+
my: 'mon',
|
|
182
|
+
you: 'tu',
|
|
183
|
+
your: 'ton',
|
|
184
|
+
yourself: 'toi-même', // REVIEW: native speaker
|
|
185
|
+
myself: 'moi-même',
|
|
186
|
+
element: 'élément',
|
|
187
|
+
target: 'cible',
|
|
188
|
+
detail: 'détail',
|
|
189
|
+
event: 'événement',
|
|
190
|
+
window: 'fenêtre',
|
|
191
|
+
document: 'document',
|
|
192
|
+
body: 'corps',
|
|
193
|
+
result: 'résultat',
|
|
194
|
+
value: 'valeur',
|
|
195
|
+
},
|
|
196
|
+
|
|
197
|
+
attributes: {
|
|
198
|
+
class: 'classe',
|
|
199
|
+
classes: 'classes',
|
|
200
|
+
style: 'style',
|
|
201
|
+
styles: 'styles',
|
|
202
|
+
attribute: 'attribut',
|
|
203
|
+
attributes: 'attributs',
|
|
204
|
+
property: 'propriété',
|
|
205
|
+
properties: 'propriétés',
|
|
206
|
+
},
|
|
207
|
+
|
|
208
|
+
expressions: {
|
|
209
|
+
// Positional
|
|
210
|
+
first: 'premier',
|
|
211
|
+
last: 'dernier',
|
|
212
|
+
next: 'suivant',
|
|
213
|
+
previous: 'précédent',
|
|
214
|
+
prev: 'préc',
|
|
215
|
+
at: 'à',
|
|
216
|
+
random: 'aléatoire',
|
|
217
|
+
|
|
218
|
+
// DOM Traversal
|
|
219
|
+
closest: 'plusproche',
|
|
220
|
+
parent: 'parent',
|
|
221
|
+
children: 'enfants',
|
|
222
|
+
within: 'dans',
|
|
223
|
+
|
|
224
|
+
// Emptiness/Existence
|
|
225
|
+
no: 'aucun',
|
|
226
|
+
empty: 'vide',
|
|
227
|
+
some: 'quelques',
|
|
228
|
+
|
|
229
|
+
// String operations
|
|
230
|
+
'starts with': 'commence par',
|
|
231
|
+
'ends with': 'finit par',
|
|
232
|
+
},
|
|
233
|
+
};
|