@kizunajs/i18n 0.1.1 → 0.2.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 +74 -19
- package/dist/bin.cjs +1 -1
- package/dist/bin.mjs +1 -1
- package/dist/generate.cjs +95 -66
- package/dist/generate.d.cts +15 -10
- package/dist/generate.d.mts +15 -10
- package/dist/generate.mjs +95 -66
- package/dist/index.cjs +27 -18
- package/dist/index.d.cts +115 -51
- package/dist/index.d.mts +115 -51
- package/dist/index.mjs +27 -18
- package/dist/{load-CE9FYddD.mjs → load-CMmjOpu-.mjs} +21 -16
- package/dist/{load-dVzjsBK6.cjs → load-Ddl3iCSC.cjs} +21 -16
- package/dist/{source-CDwD6Wcn.cjs → source-B3RV-rox.cjs} +10 -0
- package/dist/{source-BrYHodVt.mjs → source-BWSeiZiF.mjs} +5 -1
- package/dist/source-C6_RixNW.d.cts +56 -0
- package/dist/source-Cu0aGXpT.d.mts +56 -0
- package/package.json +1 -1
- package/dist/source-CAF21cuM.d.cts +0 -35
- package/dist/source-DJMnQ2hS.d.mts +0 -35
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
//#region src/source.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* Where a message made by `i18n.message` keeps its definition.
|
|
4
|
-
*/
|
|
5
|
-
declare const messageSource: unique symbol;
|
|
6
|
-
/**
|
|
7
|
-
* Where a group made by `i18n.messages` keeps its messages.
|
|
8
|
-
*/
|
|
9
|
-
declare const messagesSource: unique symbol;
|
|
10
|
-
/**
|
|
11
|
-
* A language, and the language it falls back to.
|
|
12
|
-
*/
|
|
13
|
-
type LocaleDefinition = {
|
|
14
|
-
name: string;
|
|
15
|
-
fallback?: string;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* One message as `i18n.message` and its chained methods declare it.
|
|
19
|
-
*/
|
|
20
|
-
type MessageDefinition = {
|
|
21
|
-
translations: Record<string, string>;
|
|
22
|
-
description?: string;
|
|
23
|
-
maxLength?: number;
|
|
24
|
-
examples?: Record<string, string>;
|
|
25
|
-
};
|
|
26
|
-
/**
|
|
27
|
-
* Every group of an app's messages, by name, with the languages they were made for.
|
|
28
|
-
*/
|
|
29
|
-
type MessagesSource = {
|
|
30
|
-
base: string;
|
|
31
|
-
locales: LocaleDefinition[];
|
|
32
|
-
groups: Record<string, Record<string, MessageDefinition>>;
|
|
33
|
-
};
|
|
34
|
-
//#endregion
|
|
35
|
-
export { messagesSource as i, MessagesSource as n, messageSource as r, LocaleDefinition as t };
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
//#region src/source.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* Where a message made by `i18n.message` keeps its definition.
|
|
4
|
-
*/
|
|
5
|
-
declare const messageSource: unique symbol;
|
|
6
|
-
/**
|
|
7
|
-
* Where a group made by `i18n.messages` keeps its messages.
|
|
8
|
-
*/
|
|
9
|
-
declare const messagesSource: unique symbol;
|
|
10
|
-
/**
|
|
11
|
-
* A language, and the language it falls back to.
|
|
12
|
-
*/
|
|
13
|
-
type LocaleDefinition = {
|
|
14
|
-
name: string;
|
|
15
|
-
fallback?: string;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* One message as `i18n.message` and its chained methods declare it.
|
|
19
|
-
*/
|
|
20
|
-
type MessageDefinition = {
|
|
21
|
-
translations: Record<string, string>;
|
|
22
|
-
description?: string;
|
|
23
|
-
maxLength?: number;
|
|
24
|
-
examples?: Record<string, string>;
|
|
25
|
-
};
|
|
26
|
-
/**
|
|
27
|
-
* Every group of an app's messages, by name, with the languages they were made for.
|
|
28
|
-
*/
|
|
29
|
-
type MessagesSource = {
|
|
30
|
-
base: string;
|
|
31
|
-
locales: LocaleDefinition[];
|
|
32
|
-
groups: Record<string, Record<string, MessageDefinition>>;
|
|
33
|
-
};
|
|
34
|
-
//#endregion
|
|
35
|
-
export { messagesSource as i, MessagesSource as n, messageSource as r, LocaleDefinition as t };
|