@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,238 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dictionary Index
|
|
3
|
+
*
|
|
4
|
+
* Exports dictionaries for all supported languages.
|
|
5
|
+
*
|
|
6
|
+
* Strategy: Dictionaries are derived from semantic profiles where possible,
|
|
7
|
+
* with fallbacks to manual definitions for categories not in profiles
|
|
8
|
+
* (events, temporal, some values, attributes).
|
|
9
|
+
*
|
|
10
|
+
* The semantic package's language profiles are the single source of truth
|
|
11
|
+
* for command/modifier/logical keyword translations.
|
|
12
|
+
*
|
|
13
|
+
* TRANSITION NOTE: Currently using full legacy overrides to preserve
|
|
14
|
+
* backward compatibility. Once profiles and dictionaries are synchronized,
|
|
15
|
+
* the legacy overrides can be reduced to only non-profile categories.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import { Dictionary } from '../types';
|
|
19
|
+
|
|
20
|
+
// NOTE: Derivation infrastructure is ready but not yet active.
|
|
21
|
+
// The languageProfiles from @lokascript/semantic can be used with deriveFromProfile()
|
|
22
|
+
// once we're ready to transition away from legacy dictionaries.
|
|
23
|
+
// See ./derive.ts for the derivation utilities.
|
|
24
|
+
|
|
25
|
+
// Import legacy dictionaries for overrides
|
|
26
|
+
// These provide backward compatibility during the transition period
|
|
27
|
+
import { en as enLegacy } from './en';
|
|
28
|
+
import { es as esLegacy } from './es';
|
|
29
|
+
import { ko as koLegacy } from './ko';
|
|
30
|
+
import { zh as zhLegacy } from './zh';
|
|
31
|
+
import { fr as frLegacy } from './fr';
|
|
32
|
+
import { de as deLegacy } from './de';
|
|
33
|
+
import { ja as jaLegacy } from './ja';
|
|
34
|
+
import { ar as arLegacy } from './ar';
|
|
35
|
+
import { tr as trLegacy } from './tr';
|
|
36
|
+
import { id as idLegacy } from './id';
|
|
37
|
+
import { qu as quLegacy } from './qu';
|
|
38
|
+
import { sw as swLegacy } from './sw';
|
|
39
|
+
import { pt as ptLegacy } from './pt';
|
|
40
|
+
import { it as itLegacy } from './it';
|
|
41
|
+
import { vi as viLegacy } from './vi';
|
|
42
|
+
import { pl as plLegacy } from './pl';
|
|
43
|
+
import { russianDictionary as ruLegacy } from './ru';
|
|
44
|
+
import { ukrainianDictionary as ukLegacy } from './uk';
|
|
45
|
+
import { hindiDictionary as hiLegacy } from './hi';
|
|
46
|
+
import { bengaliDictionary as bnLegacy } from './bn';
|
|
47
|
+
import { thaiDictionary as thLegacy } from './th';
|
|
48
|
+
import { malayDictionary as msLegacy } from './ms';
|
|
49
|
+
import { tagalogDictionary as tlLegacy } from './tl';
|
|
50
|
+
|
|
51
|
+
// =============================================================================
|
|
52
|
+
// Derived Dictionaries with Legacy Overrides
|
|
53
|
+
// =============================================================================
|
|
54
|
+
|
|
55
|
+
// For backward compatibility, we use full legacy overrides.
|
|
56
|
+
// This ensures no translation changes while establishing the derivation infrastructure.
|
|
57
|
+
// Future: Reduce overrides to only non-profile categories as profiles are synchronized.
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* English dictionary - uses legacy values for full compatibility.
|
|
61
|
+
*/
|
|
62
|
+
export const en: Dictionary = enLegacy;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Spanish dictionary - legacy overrides for compatibility.
|
|
66
|
+
*/
|
|
67
|
+
export const es: Dictionary = esLegacy;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Japanese dictionary - legacy overrides for compatibility.
|
|
71
|
+
*/
|
|
72
|
+
export const ja: Dictionary = jaLegacy;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Korean dictionary - legacy overrides for compatibility.
|
|
76
|
+
*/
|
|
77
|
+
export const ko: Dictionary = koLegacy;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Chinese dictionary - legacy overrides for compatibility.
|
|
81
|
+
*/
|
|
82
|
+
export const zh: Dictionary = zhLegacy;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* French dictionary - legacy overrides for compatibility.
|
|
86
|
+
*/
|
|
87
|
+
export const fr: Dictionary = frLegacy;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* German dictionary - legacy overrides for compatibility.
|
|
91
|
+
*/
|
|
92
|
+
export const de: Dictionary = deLegacy;
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Arabic dictionary - legacy overrides for compatibility.
|
|
96
|
+
*/
|
|
97
|
+
export const ar: Dictionary = arLegacy;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Turkish dictionary - legacy overrides for compatibility.
|
|
101
|
+
*/
|
|
102
|
+
export const tr: Dictionary = trLegacy;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Indonesian dictionary - legacy overrides for compatibility.
|
|
106
|
+
*/
|
|
107
|
+
export const id: Dictionary = idLegacy;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Portuguese dictionary - legacy overrides for compatibility.
|
|
111
|
+
*/
|
|
112
|
+
export const pt: Dictionary = ptLegacy;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Quechua dictionary - legacy overrides for compatibility.
|
|
116
|
+
*/
|
|
117
|
+
export const qu: Dictionary = quLegacy;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Swahili dictionary - legacy overrides for compatibility.
|
|
121
|
+
*/
|
|
122
|
+
export const sw: Dictionary = swLegacy;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Italian dictionary - legacy overrides for compatibility.
|
|
126
|
+
*/
|
|
127
|
+
export const it: Dictionary = itLegacy;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Vietnamese dictionary - legacy overrides for compatibility.
|
|
131
|
+
*/
|
|
132
|
+
export const vi: Dictionary = viLegacy;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Polish dictionary - legacy overrides for compatibility.
|
|
136
|
+
*/
|
|
137
|
+
export const pl: Dictionary = plLegacy;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Russian dictionary - legacy overrides for compatibility.
|
|
141
|
+
*/
|
|
142
|
+
export const ru: Dictionary = ruLegacy;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Ukrainian dictionary - legacy overrides for compatibility.
|
|
146
|
+
*/
|
|
147
|
+
export const uk: Dictionary = ukLegacy;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Hindi dictionary - legacy overrides for compatibility.
|
|
151
|
+
*/
|
|
152
|
+
export const hi: Dictionary = hiLegacy;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Bengali dictionary - legacy overrides for compatibility.
|
|
156
|
+
*/
|
|
157
|
+
export const bn: Dictionary = bnLegacy;
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Thai dictionary - legacy overrides for compatibility.
|
|
161
|
+
*/
|
|
162
|
+
export const th: Dictionary = thLegacy;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Malay dictionary - legacy overrides for compatibility.
|
|
166
|
+
*/
|
|
167
|
+
export const ms: Dictionary = msLegacy;
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Tagalog dictionary - legacy overrides for compatibility.
|
|
171
|
+
*/
|
|
172
|
+
export const tl: Dictionary = tlLegacy;
|
|
173
|
+
|
|
174
|
+
// =============================================================================
|
|
175
|
+
// Dictionary Registry
|
|
176
|
+
// =============================================================================
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* All available dictionaries indexed by locale code.
|
|
180
|
+
*/
|
|
181
|
+
export const dictionaries: Record<string, Dictionary> = {
|
|
182
|
+
en,
|
|
183
|
+
es,
|
|
184
|
+
ko,
|
|
185
|
+
zh,
|
|
186
|
+
fr,
|
|
187
|
+
de,
|
|
188
|
+
ja,
|
|
189
|
+
ar,
|
|
190
|
+
tr,
|
|
191
|
+
id,
|
|
192
|
+
qu,
|
|
193
|
+
sw,
|
|
194
|
+
pt,
|
|
195
|
+
it,
|
|
196
|
+
vi,
|
|
197
|
+
pl,
|
|
198
|
+
ru,
|
|
199
|
+
uk,
|
|
200
|
+
hi,
|
|
201
|
+
bn,
|
|
202
|
+
th,
|
|
203
|
+
ms,
|
|
204
|
+
tl,
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
// =============================================================================
|
|
208
|
+
// Helper Functions
|
|
209
|
+
// =============================================================================
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Get all supported locale codes.
|
|
213
|
+
*/
|
|
214
|
+
export const supportedLocales = Object.keys(dictionaries);
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Check if a locale is supported.
|
|
218
|
+
*/
|
|
219
|
+
export const isLocaleSupported = (locale: string): boolean => {
|
|
220
|
+
return locale in dictionaries;
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Get dictionary with fallback to another locale.
|
|
225
|
+
*/
|
|
226
|
+
export const getDictionary = (locale: string, fallback: string = 'en'): Dictionary | null => {
|
|
227
|
+
return dictionaries[locale] || dictionaries[fallback] || null;
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
// =============================================================================
|
|
231
|
+
// Derivation Utilities (for future use)
|
|
232
|
+
// =============================================================================
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Re-export derivation utilities for external use.
|
|
236
|
+
* These can be used to derive dictionaries from profiles when ready.
|
|
237
|
+
*/
|
|
238
|
+
export { deriveFromProfile, createEnglishDictionary, validateDictionary } from './derive';
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
// packages/i18n/src/dictionaries/it.ts
|
|
2
|
+
|
|
3
|
+
import { Dictionary } from '../types';
|
|
4
|
+
|
|
5
|
+
export const it: Dictionary = {
|
|
6
|
+
commands: {
|
|
7
|
+
// Event handling
|
|
8
|
+
on: 'su',
|
|
9
|
+
tell: 'dire',
|
|
10
|
+
trigger: 'scatenare',
|
|
11
|
+
send: 'inviare',
|
|
12
|
+
|
|
13
|
+
// DOM manipulation
|
|
14
|
+
take: 'prendere',
|
|
15
|
+
put: 'mettere',
|
|
16
|
+
set: 'impostare',
|
|
17
|
+
get: 'ottenere',
|
|
18
|
+
add: 'aggiungere',
|
|
19
|
+
remove: 'rimuovere',
|
|
20
|
+
toggle: 'commutare',
|
|
21
|
+
hide: 'nascondere',
|
|
22
|
+
show: 'mostrare',
|
|
23
|
+
|
|
24
|
+
// Control flow
|
|
25
|
+
if: 'se',
|
|
26
|
+
unless: 'a meno che',
|
|
27
|
+
repeat: 'ripetere',
|
|
28
|
+
for: 'per',
|
|
29
|
+
while: 'mentre',
|
|
30
|
+
until: 'fino',
|
|
31
|
+
continue: 'continuare',
|
|
32
|
+
break: 'interrompere',
|
|
33
|
+
halt: 'fermare',
|
|
34
|
+
|
|
35
|
+
// Async
|
|
36
|
+
wait: 'aspettare',
|
|
37
|
+
fetch: 'recuperare',
|
|
38
|
+
call: 'chiamare',
|
|
39
|
+
return: 'ritornare',
|
|
40
|
+
|
|
41
|
+
// Other commands
|
|
42
|
+
make: 'fare',
|
|
43
|
+
log: 'registrare',
|
|
44
|
+
throw: 'lanciare',
|
|
45
|
+
catch: 'catturare',
|
|
46
|
+
measure: 'misurare',
|
|
47
|
+
transition: 'transizione',
|
|
48
|
+
|
|
49
|
+
// Data Commands
|
|
50
|
+
increment: 'incrementare',
|
|
51
|
+
decrement: 'decrementare',
|
|
52
|
+
bind: 'vincolare',
|
|
53
|
+
default: 'predefinito',
|
|
54
|
+
persist: 'persistere',
|
|
55
|
+
|
|
56
|
+
// Navigation Commands
|
|
57
|
+
go: 'andare',
|
|
58
|
+
pushUrl: 'pushUrl',
|
|
59
|
+
replaceUrl: 'sostituireUrl',
|
|
60
|
+
|
|
61
|
+
// Utility Commands
|
|
62
|
+
copy: 'copiare',
|
|
63
|
+
pick: 'scegliere',
|
|
64
|
+
beep: 'beep',
|
|
65
|
+
|
|
66
|
+
// Advanced Commands
|
|
67
|
+
js: 'js',
|
|
68
|
+
async: 'asincrono',
|
|
69
|
+
render: 'renderizzare',
|
|
70
|
+
|
|
71
|
+
// Animation Commands
|
|
72
|
+
swap: 'scambiare',
|
|
73
|
+
morph: 'trasformare',
|
|
74
|
+
settle: 'stabilizzare',
|
|
75
|
+
|
|
76
|
+
// Content Commands
|
|
77
|
+
append: 'aggiungere',
|
|
78
|
+
|
|
79
|
+
// Control Flow
|
|
80
|
+
exit: 'uscire',
|
|
81
|
+
|
|
82
|
+
// Behaviors
|
|
83
|
+
install: 'installare',
|
|
84
|
+
},
|
|
85
|
+
|
|
86
|
+
modifiers: {
|
|
87
|
+
to: 'a',
|
|
88
|
+
from: 'da',
|
|
89
|
+
into: 'in',
|
|
90
|
+
with: 'con',
|
|
91
|
+
at: 'a',
|
|
92
|
+
in: 'in',
|
|
93
|
+
of: 'di',
|
|
94
|
+
as: 'come',
|
|
95
|
+
by: 'per',
|
|
96
|
+
before: 'prima',
|
|
97
|
+
after: 'dopo',
|
|
98
|
+
over: 'sopra',
|
|
99
|
+
under: 'sotto',
|
|
100
|
+
between: 'tra',
|
|
101
|
+
through: 'attraverso',
|
|
102
|
+
without: 'senza',
|
|
103
|
+
},
|
|
104
|
+
|
|
105
|
+
events: {
|
|
106
|
+
click: 'clic',
|
|
107
|
+
dblclick: 'doppioclic',
|
|
108
|
+
mousedown: 'mousegiù',
|
|
109
|
+
mouseup: 'mousesu',
|
|
110
|
+
mouseenter: 'mouseentra',
|
|
111
|
+
mouseleave: 'mouseesce',
|
|
112
|
+
mouseover: 'mousesopra',
|
|
113
|
+
mouseout: 'mousefuori',
|
|
114
|
+
mousemove: 'mousemuovi',
|
|
115
|
+
|
|
116
|
+
keydown: 'tastogiù',
|
|
117
|
+
keyup: 'tastosu',
|
|
118
|
+
keypress: 'tastopremi',
|
|
119
|
+
|
|
120
|
+
focus: 'fuoco',
|
|
121
|
+
blur: 'sfuocatura',
|
|
122
|
+
change: 'cambio',
|
|
123
|
+
input: 'input',
|
|
124
|
+
submit: 'invio',
|
|
125
|
+
reset: 'reset',
|
|
126
|
+
|
|
127
|
+
load: 'carica',
|
|
128
|
+
unload: 'scarica',
|
|
129
|
+
resize: 'ridimensiona',
|
|
130
|
+
scroll: 'scorrimento',
|
|
131
|
+
|
|
132
|
+
touchstart: 'toccoinizia',
|
|
133
|
+
touchend: 'toccofine',
|
|
134
|
+
touchmove: 'toccomuovi',
|
|
135
|
+
touchcancel: 'toccoannulla',
|
|
136
|
+
},
|
|
137
|
+
|
|
138
|
+
logical: {
|
|
139
|
+
when: 'quando',
|
|
140
|
+
where: 'dove',
|
|
141
|
+
and: 'e',
|
|
142
|
+
or: 'o',
|
|
143
|
+
not: 'non',
|
|
144
|
+
is: 'è',
|
|
145
|
+
exists: 'esiste',
|
|
146
|
+
matches: 'corrisponde',
|
|
147
|
+
contains: 'contiene',
|
|
148
|
+
includes: 'include',
|
|
149
|
+
equals: 'uguale',
|
|
150
|
+
has: 'ha', // third-person: lui/lei ha
|
|
151
|
+
have: 'ho', // first-person: io ho
|
|
152
|
+
then: 'allora',
|
|
153
|
+
else: 'altrimenti',
|
|
154
|
+
otherwise: 'altrimenti',
|
|
155
|
+
end: 'fine',
|
|
156
|
+
},
|
|
157
|
+
|
|
158
|
+
temporal: {
|
|
159
|
+
seconds: 'secondi',
|
|
160
|
+
second: 'secondo',
|
|
161
|
+
milliseconds: 'millisecondi',
|
|
162
|
+
millisecond: 'millisecondo',
|
|
163
|
+
minutes: 'minuti',
|
|
164
|
+
minute: 'minuto',
|
|
165
|
+
hours: 'ore',
|
|
166
|
+
hour: 'ora',
|
|
167
|
+
ms: 'ms',
|
|
168
|
+
s: 's',
|
|
169
|
+
min: 'min',
|
|
170
|
+
h: 'h',
|
|
171
|
+
},
|
|
172
|
+
|
|
173
|
+
values: {
|
|
174
|
+
true: 'vero',
|
|
175
|
+
false: 'falso',
|
|
176
|
+
null: 'nullo',
|
|
177
|
+
undefined: 'indefinito',
|
|
178
|
+
it: 'esso',
|
|
179
|
+
its: 'suo',
|
|
180
|
+
me: 'io',
|
|
181
|
+
my: 'mio',
|
|
182
|
+
you: 'tu',
|
|
183
|
+
your: 'tuo',
|
|
184
|
+
yourself: 'te stesso',
|
|
185
|
+
myself: 'me stesso',
|
|
186
|
+
element: 'elemento',
|
|
187
|
+
target: 'obiettivo',
|
|
188
|
+
detail: 'dettaglio',
|
|
189
|
+
event: 'evento',
|
|
190
|
+
window: 'finestra',
|
|
191
|
+
document: 'documento',
|
|
192
|
+
body: 'corpo',
|
|
193
|
+
result: 'risultato',
|
|
194
|
+
value: 'valore',
|
|
195
|
+
},
|
|
196
|
+
|
|
197
|
+
attributes: {
|
|
198
|
+
class: 'classe',
|
|
199
|
+
classes: 'classi',
|
|
200
|
+
style: 'stile',
|
|
201
|
+
styles: 'stili',
|
|
202
|
+
attribute: 'attributo',
|
|
203
|
+
attributes: 'attributi',
|
|
204
|
+
property: 'proprietà',
|
|
205
|
+
properties: 'proprietà',
|
|
206
|
+
},
|
|
207
|
+
|
|
208
|
+
expressions: {
|
|
209
|
+
// Positional
|
|
210
|
+
first: 'primo',
|
|
211
|
+
last: 'ultimo',
|
|
212
|
+
next: 'prossimo',
|
|
213
|
+
previous: 'precedente',
|
|
214
|
+
prev: 'prec',
|
|
215
|
+
at: 'a',
|
|
216
|
+
random: 'casuale',
|
|
217
|
+
|
|
218
|
+
// DOM Traversal
|
|
219
|
+
closest: 'piùvicino',
|
|
220
|
+
parent: 'genitore',
|
|
221
|
+
children: 'figli',
|
|
222
|
+
within: 'dentro',
|
|
223
|
+
|
|
224
|
+
// Emptiness/Existence
|
|
225
|
+
no: 'nessun',
|
|
226
|
+
empty: 'vuoto',
|
|
227
|
+
some: 'qualche',
|
|
228
|
+
|
|
229
|
+
// String operations
|
|
230
|
+
'starts with': 'inizia con',
|
|
231
|
+
'ends with': 'finisce con',
|
|
232
|
+
},
|
|
233
|
+
};
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
// packages/i18n/src/dictionaries/ja.ts
|
|
2
|
+
|
|
3
|
+
import { Dictionary } from '../types';
|
|
4
|
+
|
|
5
|
+
export const ja: Dictionary = {
|
|
6
|
+
commands: {
|
|
7
|
+
// Event handling
|
|
8
|
+
on: 'で',
|
|
9
|
+
tell: '伝える',
|
|
10
|
+
trigger: '引き金',
|
|
11
|
+
send: '送る',
|
|
12
|
+
|
|
13
|
+
// DOM manipulation
|
|
14
|
+
take: '取る',
|
|
15
|
+
put: '置く',
|
|
16
|
+
set: '設定',
|
|
17
|
+
get: '取得',
|
|
18
|
+
add: '追加',
|
|
19
|
+
remove: '削除',
|
|
20
|
+
toggle: '切り替え',
|
|
21
|
+
hide: '隠す',
|
|
22
|
+
show: '表示',
|
|
23
|
+
|
|
24
|
+
// Control flow
|
|
25
|
+
if: 'もし',
|
|
26
|
+
unless: 'でなければ',
|
|
27
|
+
repeat: '繰り返し',
|
|
28
|
+
for: 'ために',
|
|
29
|
+
while: 'の間',
|
|
30
|
+
until: 'まで',
|
|
31
|
+
continue: '続ける',
|
|
32
|
+
break: '中断',
|
|
33
|
+
halt: '停止',
|
|
34
|
+
|
|
35
|
+
// Async
|
|
36
|
+
wait: '待つ',
|
|
37
|
+
fetch: '取得',
|
|
38
|
+
call: '呼び出し',
|
|
39
|
+
return: '戻る',
|
|
40
|
+
|
|
41
|
+
// Other commands
|
|
42
|
+
make: '作る',
|
|
43
|
+
log: '記録',
|
|
44
|
+
throw: '投げる',
|
|
45
|
+
catch: '捕まえる',
|
|
46
|
+
measure: '測定',
|
|
47
|
+
transition: '遷移',
|
|
48
|
+
|
|
49
|
+
// Data Commands
|
|
50
|
+
increment: '増加',
|
|
51
|
+
decrement: '減少',
|
|
52
|
+
bind: '結合',
|
|
53
|
+
default: '既定',
|
|
54
|
+
persist: '永続化',
|
|
55
|
+
|
|
56
|
+
// Navigation Commands
|
|
57
|
+
go: '移動',
|
|
58
|
+
pushUrl: 'URLプッシュ',
|
|
59
|
+
replaceUrl: 'URL置換',
|
|
60
|
+
|
|
61
|
+
// Utility Commands
|
|
62
|
+
copy: 'コピー',
|
|
63
|
+
pick: '選択',
|
|
64
|
+
beep: 'ビープ',
|
|
65
|
+
|
|
66
|
+
// Advanced Commands
|
|
67
|
+
js: 'JS実行',
|
|
68
|
+
async: '非同期',
|
|
69
|
+
render: '描画',
|
|
70
|
+
|
|
71
|
+
// Animation Commands
|
|
72
|
+
swap: '交換',
|
|
73
|
+
morph: '変形',
|
|
74
|
+
settle: '安定',
|
|
75
|
+
|
|
76
|
+
// Content Commands
|
|
77
|
+
append: '末尾追加',
|
|
78
|
+
|
|
79
|
+
// Control Flow
|
|
80
|
+
exit: '終了',
|
|
81
|
+
|
|
82
|
+
// Behaviors
|
|
83
|
+
install: 'インストール',
|
|
84
|
+
},
|
|
85
|
+
|
|
86
|
+
modifiers: {
|
|
87
|
+
to: 'に',
|
|
88
|
+
from: 'から',
|
|
89
|
+
into: 'へ',
|
|
90
|
+
with: 'と',
|
|
91
|
+
at: 'で',
|
|
92
|
+
in: 'の中',
|
|
93
|
+
of: 'の',
|
|
94
|
+
as: 'として',
|
|
95
|
+
by: 'によって',
|
|
96
|
+
before: '前に',
|
|
97
|
+
after: '後に',
|
|
98
|
+
over: '上に',
|
|
99
|
+
under: '下に',
|
|
100
|
+
between: '間に',
|
|
101
|
+
through: '通して',
|
|
102
|
+
without: 'なしで',
|
|
103
|
+
},
|
|
104
|
+
|
|
105
|
+
events: {
|
|
106
|
+
click: 'クリック',
|
|
107
|
+
dblclick: 'ダブルクリック',
|
|
108
|
+
mousedown: 'マウス押下',
|
|
109
|
+
mouseup: 'マウス解放',
|
|
110
|
+
mouseenter: 'マウス入る',
|
|
111
|
+
mouseleave: 'マウス離れる',
|
|
112
|
+
mouseover: 'マウス上',
|
|
113
|
+
mouseout: 'マウス外',
|
|
114
|
+
mousemove: 'マウス移動',
|
|
115
|
+
|
|
116
|
+
keydown: 'キー押下',
|
|
117
|
+
keyup: 'キー解放',
|
|
118
|
+
keypress: 'キー押す',
|
|
119
|
+
|
|
120
|
+
focus: 'フォーカス',
|
|
121
|
+
blur: 'ぼかし',
|
|
122
|
+
change: '変更',
|
|
123
|
+
input: '入力',
|
|
124
|
+
submit: '送信',
|
|
125
|
+
reset: 'リセット',
|
|
126
|
+
|
|
127
|
+
load: '読み込み',
|
|
128
|
+
unload: '読み込み解除',
|
|
129
|
+
resize: 'サイズ変更',
|
|
130
|
+
scroll: 'スクロール',
|
|
131
|
+
|
|
132
|
+
touchstart: 'タッチ開始',
|
|
133
|
+
touchend: 'タッチ終了',
|
|
134
|
+
touchmove: 'タッチ移動',
|
|
135
|
+
touchcancel: 'タッチキャンセル',
|
|
136
|
+
},
|
|
137
|
+
|
|
138
|
+
logical: {
|
|
139
|
+
when: 'とき',
|
|
140
|
+
where: 'どこ',
|
|
141
|
+
and: 'そして',
|
|
142
|
+
or: 'または',
|
|
143
|
+
not: 'ではない',
|
|
144
|
+
is: 'である',
|
|
145
|
+
exists: '存在する',
|
|
146
|
+
matches: '一致する',
|
|
147
|
+
contains: '含む',
|
|
148
|
+
includes: '含める',
|
|
149
|
+
equals: '等しい',
|
|
150
|
+
has: 'ある', // existence verb (context-based)
|
|
151
|
+
have: 'ある', // same verb for first/third person
|
|
152
|
+
then: 'それから',
|
|
153
|
+
else: 'そうでなければ',
|
|
154
|
+
otherwise: 'そうでなければ',
|
|
155
|
+
end: '終わり',
|
|
156
|
+
},
|
|
157
|
+
|
|
158
|
+
temporal: {
|
|
159
|
+
seconds: '秒',
|
|
160
|
+
second: '秒',
|
|
161
|
+
milliseconds: 'ミリ秒',
|
|
162
|
+
millisecond: 'ミリ秒',
|
|
163
|
+
minutes: '分',
|
|
164
|
+
minute: '分',
|
|
165
|
+
hours: '時間',
|
|
166
|
+
hour: '時間',
|
|
167
|
+
ms: 'ms',
|
|
168
|
+
s: '秒',
|
|
169
|
+
min: '分',
|
|
170
|
+
h: '時',
|
|
171
|
+
},
|
|
172
|
+
|
|
173
|
+
values: {
|
|
174
|
+
true: '真',
|
|
175
|
+
false: '偽',
|
|
176
|
+
null: 'null',
|
|
177
|
+
undefined: '未定義',
|
|
178
|
+
it: 'それ',
|
|
179
|
+
its: 'その',
|
|
180
|
+
me: '私',
|
|
181
|
+
my: '私の',
|
|
182
|
+
you: 'あなた',
|
|
183
|
+
your: 'あなたの',
|
|
184
|
+
yourself: 'あなた自身',
|
|
185
|
+
myself: '私自身',
|
|
186
|
+
element: '要素',
|
|
187
|
+
target: '対象',
|
|
188
|
+
detail: '詳細',
|
|
189
|
+
event: 'イベント',
|
|
190
|
+
window: 'ウィンドウ',
|
|
191
|
+
document: 'ドキュメント',
|
|
192
|
+
body: 'ボディ',
|
|
193
|
+
result: '結果',
|
|
194
|
+
value: '値',
|
|
195
|
+
},
|
|
196
|
+
|
|
197
|
+
attributes: {
|
|
198
|
+
class: 'クラス',
|
|
199
|
+
classes: 'クラス群',
|
|
200
|
+
style: 'スタイル',
|
|
201
|
+
styles: 'スタイル群',
|
|
202
|
+
attribute: '属性',
|
|
203
|
+
attributes: '属性群',
|
|
204
|
+
property: 'プロパティ',
|
|
205
|
+
properties: 'プロパティ群',
|
|
206
|
+
},
|
|
207
|
+
|
|
208
|
+
expressions: {
|
|
209
|
+
// Positional
|
|
210
|
+
first: '最初',
|
|
211
|
+
last: '最後',
|
|
212
|
+
next: '次',
|
|
213
|
+
previous: '前',
|
|
214
|
+
prev: '前',
|
|
215
|
+
at: 'で',
|
|
216
|
+
random: 'ランダム',
|
|
217
|
+
|
|
218
|
+
// DOM Traversal
|
|
219
|
+
closest: '最も近い',
|
|
220
|
+
parent: '親',
|
|
221
|
+
children: '子',
|
|
222
|
+
within: '以内',
|
|
223
|
+
|
|
224
|
+
// Emptiness/Existence
|
|
225
|
+
no: 'ない',
|
|
226
|
+
empty: '空',
|
|
227
|
+
some: 'いくつか',
|
|
228
|
+
|
|
229
|
+
// String operations
|
|
230
|
+
'starts with': 'で始まる',
|
|
231
|
+
'ends with': 'で終わる',
|
|
232
|
+
},
|
|
233
|
+
};
|