@lokascript/i18n 1.3.0 → 2.1.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 +30 -81
- package/dist/dictionaries/index.d.ts +30 -81
- 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 +38 -38
- package/dist/index.d.ts +38 -38
- 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-B6NgN3JQ.d.ts} +108 -15
- package/dist/{transformer-D8MM2_rz.d.cts → transformer-DQqxl6hb.d.cts} +108 -15
- package/dist/{types-naTJIIaT.d.cts → types-BYtpqGq3.d.cts} +1 -1
- package/dist/{types-naTJIIaT.d.ts → types-BYtpqGq3.d.ts} +1 -1
- package/package.json +8 -7
- 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-
|
|
1
|
+
export { A as AdpositionType, E as ENGLISH_COMMANDS, a as ENGLISH_KEYWORDS, G as GrammarRule, b as GrammarTransformer, c as GrammaticalMarker, K as KeywordProvider, d as KeywordProviderOptions, L as LANGUAGE_FAMILY_DEFAULTS, e as LanguageProfile, f as LocaleManager, M as MorphologyType, P as ParsedElement, g as ParsedStatement, h as PatternMatcher, i as PatternTransform, S as SemanticRole, U as UNIVERSAL_ENGLISH_KEYWORDS, j as UNIVERSAL_PATTERNS, W as WordOrder, k as ar, k as arDictionary, l as arKeywords, m as arabicProfile, n as bn, n as bnDictionary, o as bnKeywords, p as chineseProfile, q as createEnglishProvider, r as createKeywordProvider, s as de, s as deDictionary, t as deKeywords, u as detectBrowserLocale, v as englishProfile, w as es, w as esDictionary, x as esKeywords, y as fr, y as frDictionary, z as frKeywords, B as frenchProfile, C as germanProfile, D as getProfile, F as getSupportedLocales, H as grammarExamples, I as hiDictionary, J as hiKeywords, I as hindiDictionary, N as id, N as idDictionary, O as idKeywords, Q as indonesianProfile, R as insertMarkers, T as it, T as itDictionary, V as itKeywords, X as ja, X as jaDictionary, Y as jaKeywords, Z as japaneseProfile, _ as joinTokens, $ as ko, $ as koDictionary, a0 as koKeywords, a1 as koreanProfile, a2 as ms, a2 as msDictionary, a3 as msKeywords, a4 as parseStatement, a5 as pl, a5 as plDictionary, a6 as plKeywords, a7 as portugueseProfile, a8 as profiles, a9 as pt, a9 as ptDictionary, aa as ptKeywords, ab as qu, ab as quDictionary, ac as quKeywords, ad as quechuaProfile, ae as reorderRoles, af as ruDictionary, ag as ruKeywords, af as russianDictionary, ah as spanishProfile, ai as sw, ai as swDictionary, aj as swKeywords, ak as swahiliProfile, al as th, al as thDictionary, am as thKeywords, an as tl, an as tlDictionary, ao as tlKeywords, ap as toEnglish, aq as toLocale, ar as tr, ar as trDictionary, as as trKeywords, at as transformStatement, au as translate, av as turkishProfile, aw as ukDictionary, ax as ukKeywords, aw as ukrainianDictionary, ay as vi, ay as viDictionary, az as viKeywords, aA as zh, aA as zhDictionary, aB as zhKeywords } from './transformer-DQqxl6hb.cjs';
|
|
2
|
+
import { D as Dictionary } from './types-BYtpqGq3.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-
|
|
1
|
+
export { A as AdpositionType, E as ENGLISH_COMMANDS, a as ENGLISH_KEYWORDS, G as GrammarRule, b as GrammarTransformer, c as GrammaticalMarker, K as KeywordProvider, d as KeywordProviderOptions, L as LANGUAGE_FAMILY_DEFAULTS, e as LanguageProfile, f as LocaleManager, M as MorphologyType, P as ParsedElement, g as ParsedStatement, h as PatternMatcher, i as PatternTransform, S as SemanticRole, U as UNIVERSAL_ENGLISH_KEYWORDS, j as UNIVERSAL_PATTERNS, W as WordOrder, k as ar, k as arDictionary, l as arKeywords, m as arabicProfile, n as bn, n as bnDictionary, o as bnKeywords, p as chineseProfile, q as createEnglishProvider, r as createKeywordProvider, s as de, s as deDictionary, t as deKeywords, u as detectBrowserLocale, v as englishProfile, w as es, w as esDictionary, x as esKeywords, y as fr, y as frDictionary, z as frKeywords, B as frenchProfile, C as germanProfile, D as getProfile, F as getSupportedLocales, H as grammarExamples, I as hiDictionary, J as hiKeywords, I as hindiDictionary, N as id, N as idDictionary, O as idKeywords, Q as indonesianProfile, R as insertMarkers, T as it, T as itDictionary, V as itKeywords, X as ja, X as jaDictionary, Y as jaKeywords, Z as japaneseProfile, _ as joinTokens, $ as ko, $ as koDictionary, a0 as koKeywords, a1 as koreanProfile, a2 as ms, a2 as msDictionary, a3 as msKeywords, a4 as parseStatement, a5 as pl, a5 as plDictionary, a6 as plKeywords, a7 as portugueseProfile, a8 as profiles, a9 as pt, a9 as ptDictionary, aa as ptKeywords, ab as qu, ab as quDictionary, ac as quKeywords, ad as quechuaProfile, ae as reorderRoles, af as ruDictionary, ag as ruKeywords, af as russianDictionary, ah as spanishProfile, ai as sw, ai as swDictionary, aj as swKeywords, ak as swahiliProfile, al as th, al as thDictionary, am as thKeywords, an as tl, an as tlDictionary, ao as tlKeywords, ap as toEnglish, aq as toLocale, ar as tr, ar as trDictionary, as as trKeywords, at as transformStatement, au as translate, av as turkishProfile, aw as ukDictionary, ax as ukKeywords, aw as ukrainianDictionary, ay as vi, ay as viDictionary, az as viKeywords, aA as zh, aA as zhDictionary, aB as zhKeywords } from './transformer-B6NgN3JQ.js';
|
|
2
|
+
import { D as Dictionary } from './types-BYtpqGq3.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 };
|