@lokascript/i18n 1.3.0 → 2.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/dist/browser.cjs +3625 -3581
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.cts +9 -3
- package/dist/browser.d.ts +9 -3
- package/dist/browser.js +3595 -3582
- package/dist/browser.js.map +1 -1
- package/dist/dictionaries/index.cjs +0 -44
- package/dist/dictionaries/index.cjs.map +1 -1
- package/dist/dictionaries/index.d.cts +29 -80
- package/dist/dictionaries/index.d.ts +29 -80
- package/dist/dictionaries/index.js +0 -44
- package/dist/dictionaries/index.js.map +1 -1
- package/dist/index.cjs +7605 -7544
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +36 -36
- package/dist/index.d.ts +36 -36
- package/dist/index.js +7576 -7545
- package/dist/index.js.map +1 -1
- package/dist/lokascript-i18n.min.js +1 -1
- package/dist/lokascript-i18n.min.js.map +1 -1
- package/dist/lokascript-i18n.mjs +3792 -3813
- package/dist/lokascript-i18n.mjs.map +1 -1
- package/dist/plugins/vite.cjs +0 -42
- package/dist/plugins/vite.cjs.map +1 -1
- package/dist/plugins/vite.js +0 -42
- package/dist/plugins/vite.js.map +1 -1
- package/dist/plugins/webpack.cjs +0 -42
- package/dist/plugins/webpack.cjs.map +1 -1
- package/dist/plugins/webpack.js +0 -42
- package/dist/plugins/webpack.js.map +1 -1
- package/dist/{transformer-BBKJJ2vd.d.ts → transformer-DN_HqdDB.d.ts} +107 -14
- package/dist/{transformer-D8MM2_rz.d.cts → transformer-kXwlqa5b.d.cts} +107 -14
- package/package.json +7 -6
- package/src/browser.ts +22 -1
- package/src/dictionaries/ar.ts +0 -2
- package/src/dictionaries/de.ts +0 -2
- package/src/dictionaries/derive.ts +0 -2
- package/src/dictionaries/en.ts +0 -2
- package/src/dictionaries/es.ts +0 -2
- package/src/dictionaries/fr.ts +0 -2
- package/src/dictionaries/hi.ts +0 -2
- package/src/dictionaries/id.ts +0 -2
- package/src/dictionaries/index.ts +79 -163
- package/src/dictionaries/it.ts +0 -2
- package/src/dictionaries/ja.ts +0 -2
- package/src/dictionaries/ko.ts +0 -2
- package/src/dictionaries/ms.ts +0 -2
- package/src/dictionaries/pl.ts +0 -2
- package/src/dictionaries/pt.ts +0 -2
- package/src/dictionaries/qu.ts +0 -2
- package/src/dictionaries/ru.ts +0 -2
- package/src/dictionaries/sw.ts +0 -2
- package/src/dictionaries/tl.ts +0 -2
- package/src/dictionaries/tr.ts +0 -2
- package/src/dictionaries/uk.ts +0 -2
- package/src/dictionaries/vi.ts +0 -2
- package/src/dictionaries/zh.ts +0 -2
- package/src/grammar/direct-mappings.ts +0 -2
- package/src/grammar/grammar.test.ts +98 -0
- package/src/grammar/index.ts +9 -0
- package/src/grammar/transformer.ts +125 -73
- package/src/index.ts +30 -0
- package/src/parser/ar.ts +1 -1
- package/src/parser/bn.ts +9 -0
- package/src/parser/de.ts +1 -1
- package/src/parser/es.ts +1 -1
- package/src/parser/fr.ts +1 -1
- package/src/parser/hi.ts +9 -0
- package/src/parser/id.ts +1 -1
- package/src/parser/index.ts +10 -0
- package/src/parser/it.ts +9 -0
- package/src/parser/ja.ts +1 -1
- package/src/parser/ko.ts +1 -1
- package/src/parser/locale-manager.ts +1 -1
- package/src/parser/ms.ts +9 -0
- package/src/parser/pl.ts +9 -0
- package/src/parser/pt.ts +1 -1
- package/src/parser/qu.ts +1 -1
- package/src/parser/ru.ts +9 -0
- package/src/parser/sw.ts +1 -1
- package/src/parser/th.ts +9 -0
- package/src/parser/tl.ts +9 -0
- package/src/parser/tr.ts +1 -1
- package/src/parser/uk.ts +9 -0
- package/src/parser/vi.ts +9 -0
- package/src/parser/zh.ts +1 -1
- package/src/runtime.test.ts +152 -0
- package/src/runtime.ts +32 -13
- package/src/utils/locale.test.ts +108 -0
- package/src/utils/locale.ts +19 -25
package/dist/browser.d.cts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
export {
|
|
2
|
-
import './types-naTJIIaT.cjs';
|
|
1
|
+
export { a1 as AdpositionType, E as ENGLISH_COMMANDS, d as ENGLISH_KEYWORDS, a5 as GrammarRule, aw as GrammarTransformer, a3 as GrammaticalMarker, K as KeywordProvider, a as KeywordProviderOptions, ab as LANGUAGE_FAMILY_DEFAULTS, a4 as LanguageProfile, Z as LocaleManager, a2 as MorphologyType, a9 as ParsedElement, a8 as ParsedStatement, a6 as PatternMatcher, a7 as PatternTransform, $ as SemanticRole, U as UNIVERSAL_ENGLISH_KEYWORDS, aa as UNIVERSAL_PATTERNS, a0 as WordOrder, n as ar, n as arDictionary, m as arKeywords, an as arabicProfile, R as bn, R as bnDictionary, Q as bnKeywords, am as chineseProfile, b as createEnglishProvider, c as createKeywordProvider, l as de, l as deDictionary, k as deKeywords, _ as detectBrowserLocale, aj as englishProfile, f as es, f as esDictionary, e as esKeywords, i as fr, i as frDictionary, h as frKeywords, ar as frenchProfile, aq as germanProfile, ah as getProfile, ai as getSupportedLocales, aB as grammarExamples, P as hiDictionary, O as hiKeywords, P as hindiDictionary, u as id, u as idDictionary, s as idKeywords, at as indonesianProfile, ad as insertMarkers, D as it, D as itDictionary, C as itKeywords, g as ja, g as jaDictionary, j as jaKeywords, ak as japaneseProfile, ae as joinTokens, p as ko, p as koDictionary, o as koKeywords, al as koreanProfile, W as ms, W as msDictionary, V as msKeywords, ax as parseStatement, I as pl, I as plDictionary, H as plKeywords, as as portugueseProfile, ag as profiles, B as pt, B as ptDictionary, A as ptKeywords, w as qu, w as quDictionary, v as quKeywords, au as quechuaProfile, ac as reorderRoles, L as ruDictionary, J as ruKeywords, L as russianDictionary, ap as spanishProfile, y as sw, y as swDictionary, x as swKeywords, av as swahiliProfile, T as th, T as thDictionary, S as thKeywords, Y as tl, Y as tlDictionary, X as tlKeywords, az as toEnglish, ay as toLocale, r as tr, r as trDictionary, t as trKeywords, af as transformStatement, aA as translate, ao as turkishProfile, N as ukDictionary, M as ukKeywords, N as ukrainianDictionary, G as vi, G as viDictionary, F as viKeywords, q as zh, q as zhDictionary, z as zhKeywords } from './transformer-kXwlqa5b.cjs';
|
|
2
|
+
import { D as Dictionary } from './types-naTJIIaT.cjs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* English dictionary - identity mapping since English is the canonical hyperscript language.
|
|
6
|
+
* This exists primarily for symmetry in translation operations (e.g., en -> es).
|
|
7
|
+
*/
|
|
8
|
+
declare const en: Dictionary;
|
|
3
9
|
|
|
4
10
|
/**
|
|
5
11
|
* Direct Language-Pair Mappings
|
|
@@ -48,4 +54,4 @@ declare function getSupportedDirectPairs(): Array<{
|
|
|
48
54
|
target: string;
|
|
49
55
|
}>;
|
|
50
56
|
|
|
51
|
-
export { directMappings, getDirectMapping, getSupportedDirectPairs, hasDirectMapping, translateWordDirect };
|
|
57
|
+
export { directMappings, en, getDirectMapping, getSupportedDirectPairs, hasDirectMapping, translateWordDirect };
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
export {
|
|
2
|
-
import './types-naTJIIaT.js';
|
|
1
|
+
export { a1 as AdpositionType, E as ENGLISH_COMMANDS, d as ENGLISH_KEYWORDS, a5 as GrammarRule, aw as GrammarTransformer, a3 as GrammaticalMarker, K as KeywordProvider, a as KeywordProviderOptions, ab as LANGUAGE_FAMILY_DEFAULTS, a4 as LanguageProfile, Z as LocaleManager, a2 as MorphologyType, a9 as ParsedElement, a8 as ParsedStatement, a6 as PatternMatcher, a7 as PatternTransform, $ as SemanticRole, U as UNIVERSAL_ENGLISH_KEYWORDS, aa as UNIVERSAL_PATTERNS, a0 as WordOrder, n as ar, n as arDictionary, m as arKeywords, an as arabicProfile, R as bn, R as bnDictionary, Q as bnKeywords, am as chineseProfile, b as createEnglishProvider, c as createKeywordProvider, l as de, l as deDictionary, k as deKeywords, _ as detectBrowserLocale, aj as englishProfile, f as es, f as esDictionary, e as esKeywords, i as fr, i as frDictionary, h as frKeywords, ar as frenchProfile, aq as germanProfile, ah as getProfile, ai as getSupportedLocales, aB as grammarExamples, P as hiDictionary, O as hiKeywords, P as hindiDictionary, u as id, u as idDictionary, s as idKeywords, at as indonesianProfile, ad as insertMarkers, D as it, D as itDictionary, C as itKeywords, g as ja, g as jaDictionary, j as jaKeywords, ak as japaneseProfile, ae as joinTokens, p as ko, p as koDictionary, o as koKeywords, al as koreanProfile, W as ms, W as msDictionary, V as msKeywords, ax as parseStatement, I as pl, I as plDictionary, H as plKeywords, as as portugueseProfile, ag as profiles, B as pt, B as ptDictionary, A as ptKeywords, w as qu, w as quDictionary, v as quKeywords, au as quechuaProfile, ac as reorderRoles, L as ruDictionary, J as ruKeywords, L as russianDictionary, ap as spanishProfile, y as sw, y as swDictionary, x as swKeywords, av as swahiliProfile, T as th, T as thDictionary, S as thKeywords, Y as tl, Y as tlDictionary, X as tlKeywords, az as toEnglish, ay as toLocale, r as tr, r as trDictionary, t as trKeywords, af as transformStatement, aA as translate, ao as turkishProfile, N as ukDictionary, M as ukKeywords, N as ukrainianDictionary, G as vi, G as viDictionary, F as viKeywords, q as zh, q as zhDictionary, z as zhKeywords } from './transformer-DN_HqdDB.js';
|
|
2
|
+
import { D as Dictionary } from './types-naTJIIaT.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* English dictionary - identity mapping since English is the canonical hyperscript language.
|
|
6
|
+
* This exists primarily for symmetry in translation operations (e.g., en -> es).
|
|
7
|
+
*/
|
|
8
|
+
declare const en: Dictionary;
|
|
3
9
|
|
|
4
10
|
/**
|
|
5
11
|
* Direct Language-Pair Mappings
|
|
@@ -48,4 +54,4 @@ declare function getSupportedDirectPairs(): Array<{
|
|
|
48
54
|
target: string;
|
|
49
55
|
}>;
|
|
50
56
|
|
|
51
|
-
export { directMappings, getDirectMapping, getSupportedDirectPairs, hasDirectMapping, translateWordDirect };
|
|
57
|
+
export { directMappings, en, getDirectMapping, getSupportedDirectPairs, hasDirectMapping, translateWordDirect };
|