@aidc-toolkit/core 0.9.18-beta → 0.9.19-beta

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 CHANGED
@@ -2,36 +2,35 @@
2
2
 
3
3
  **Copyright © 2024-2025 Dolphin Data Development Ltd. and AIDC Toolkit contributors**
4
4
 
5
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
6
- License. You may obtain a copy of the License at
5
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
7
6
 
8
- https://www.apache.org/licenses/LICENSE-2.0
7
+ https://www.apache.org/licenses/LICENSE-2.0
9
8
 
10
- Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an
11
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
9
+ Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
12
10
 
13
11
  ## Overview
14
12
 
15
- ⚠️ **This software is in beta**, with production release is scheduled for 2024Q4. To follow the status of that and other
16
- projects, go to the AIDC Toolkit [projects](https://github.com/orgs/aidc-toolkit/projects) page.
13
+ > [!WARNING]
14
+ >
15
+ > **This software is in beta**, with production release is scheduled for 2025Q4. To follow the status of this and other projects, go to the AIDC Toolkit [projects](https://github.com/orgs/aidc-toolkit/projects) page.
17
16
 
18
- The AIDC Toolkit `core` package contains artefacts to support other AIDC Toolkit packages; it does not itself provide
19
- any of the functionality of the AIDC Toolkit. It is a required dependency for all AIDC Toolkit packages.
17
+ The AIDC Toolkit `core` package contains artefacts to support other AIDC Toolkit packages; it does not itself provide any of the functionality of the AIDC Toolkit. It is a required dependency for all AIDC Toolkit packages.
20
18
 
21
- ## Localization
19
+ ## Internationalization
22
20
 
23
- All AIDC Toolkit packages require localization. The localization functionality in this package simplifies initialization
24
- and allows packages to share a common internationalization engine, whose initialization is the responsibility of the
25
- client application. Each package requires its own internationalization object and each is responsible for initializing
26
- those of its dependencies.
21
+ All AIDC Toolkit packages require internationalization. The localization functionality in this package, built on the robust and popular [`i18next`](https://i18next.com) package, simplifies initialization and allows packages to share a common internationalization engine. Each package, up to and including the client application, is responsible for initializing internationalization for each of the AIDC Toolkit packages on which it depends.
22
+
23
+ > [!TIP]
24
+ >
25
+ > For a complete example, including how to use application-specific resource bundles, see the AIDC Toolkit [demo source](https://github.com/aidc-toolkit/demo).
27
26
 
28
27
  Packages install their resources as follows in `i18n.ts` or similar:
29
28
 
30
29
  ```typescript
31
- import { i18nAssertValidResources, i18nCoreInit, type I18NEnvironment } from "@aidc-toolkit/core";
32
- import { i18nDependency1Init, dependency1Resources } from "@aidc-toolkit/dependency1";
33
- import { i18nDependency2Init, dependency2Resources } from "@aidc-toolkit/dependency2";
34
- import i18next from "i18next";
30
+ import { i18nAssertValidResources, i18nCoreInit, type I18nEnvironment } from "@aidc-toolkit/core";
31
+ import { dependency1Resources, i18nDependency1Init } from "@aidc-toolkit/dependency1";
32
+ import { dependency2Resources, i18nDependency2Init } from "@aidc-toolkit/dependency2";
33
+ import i18next, { type i18n, type Resource } from "i18next";
35
34
  import { localeStrings as enLocaleStrings } from "./en/locale-strings.js";
36
35
  import { localeStrings as frLocaleStrings } from "./fr/locale-strings.js";
37
36
 
@@ -47,7 +46,7 @@ i18nAssertValidResources(enLocaleStrings, "fr", frLocaleStrings);
47
46
  /**
48
47
  * Package resources.
49
48
  */
50
- export const packageResources = {
49
+ export const packageResources: Resource = {
51
50
  en: {
52
51
  aidct_package: enLocaleStrings
53
52
  },
@@ -56,7 +55,8 @@ export const packageResources = {
56
55
  }
57
56
  };
58
57
 
59
- export const i18nextPackage = i18next.createInstance();
58
+ // Explicit type is necessary to work around bug in type discovery with linked packages.
59
+ export const i18nextPackage: i18n = i18next.createInstance();
60
60
 
61
61
  /**
62
62
  * Initialize internationalization.
@@ -70,7 +70,7 @@ export const i18nextPackage = i18next.createInstance();
70
70
  * @returns
71
71
  * Void promise.
72
72
  */
73
- export async function i18nPackageInit(environment: I18NEnvironment, debug = false): Promise<void> {
73
+ export async function i18nPackageInit(environment: I18nEnvironment, debug = false): Promise<void> {
74
74
  await i18nDependency1Init(environment, debug);
75
75
  await i18nDependency2Init(environment, debug);
76
76
  await i18nCoreInit(i18nextPackage, environment, debug, packageNS, dependency1Resources, dependency2Resources, packageResources);
@@ -102,6 +102,91 @@ declare module "i18next" {
102
102
  }
103
103
  ```
104
104
 
105
+ Support is available for the following environments:
106
+
107
+ * [Command-line interface](#command-line-interface)
108
+ * Unit tests
109
+ * Batch applications
110
+ * Web server - *NOT YET IMPLEMENTED*
111
+ * [Web browser](#web-browser)
112
+
113
+ ### Command-line interface
114
+
115
+ Initializing internationalization for a command-line interface application is straightforward:
116
+
117
+ ```typescript
118
+ await i18nPackageInit(I18nEnvironment.CLI);
119
+ ```
120
+
121
+ ### Web browser
122
+
123
+ Initializing internationalization for a web browser requires awaiting the fulfillment of the `Promise` returned by the call to the initialization function before rendering any content. For example, in the React framework, this may be accomplished with a component like this:
124
+
125
+ ```typescript jsx
126
+ import { I18nEnvironment } from "@aidc-toolkit/core";
127
+ import { type ReactElement, type ReactNode, useEffect, useState } from "react";
128
+ import { i18nPackageInit, i18nextPackage } from "./locale/i18n.ts";
129
+
130
+ /**
131
+ * I18n wrapper properties.
132
+ */
133
+ export interface I18nProperties {
134
+ /**
135
+ * Children.
136
+ */
137
+ readonly children?: ReactNode | undefined;
138
+ }
139
+
140
+ /**
141
+ * I18n wrapper. Ensures initialization of internationalization regardless of entry point.
142
+ *
143
+ * @param properties
144
+ * Properties.
145
+ *
146
+ * @returns
147
+ * React element.
148
+ */
149
+ export function I18n(properties: I18nProperties): ReactElement {
150
+ const [isI18nInitialized, setIsI18nInitialized] = useState<boolean>(i18nextPackage.isInitialized);
151
+
152
+ useEffect(() => {
153
+ if (!isI18nInitialized) {
154
+ i18nPackageInit(I18nEnvironment.Browser).then(() => {
155
+ // Force refresh.
156
+ setIsI18nInitialized(true);
157
+ }).catch((e: unknown) => {
158
+ console.error(e);
159
+ alert(e);
160
+ });
161
+ }
162
+ }, [isI18nInitialized]);
163
+
164
+ return <>{isI18nInitialized ? properties.children : undefined}</>;
165
+ }
166
+ ```
167
+
168
+ The component would then wrap the application as follows:
169
+
170
+ ```typescript jsx
171
+ import { type ReactElement, StrictMode } from "react";
172
+ import { App } from "./App.tsx";
173
+ import { I18n } from "./I18n.tsx";
174
+
175
+ /**
176
+ * Index.
177
+ *
178
+ * @returns
179
+ * React element.
180
+ */
181
+ export default function Index(): ReactElement {
182
+ return <StrictMode>
183
+ <I18n>
184
+ <App />
185
+ </I18n>
186
+ </StrictMode>;
187
+ }
188
+ ```
189
+
105
190
  ## Resources
106
191
 
107
192
  The `resource` folder contains common resources (e.g., AIDC Toolkit icon) usable by all AIDC Toolkit packages.
@@ -8,7 +8,7 @@ export interface LocaleStrings {
8
8
  /**
9
9
  * Internationalization operating environment.
10
10
  */
11
- export declare enum I18NEnvironment {
11
+ export declare enum I18nEnvironment {
12
12
  /**
13
13
  * Command-line interface (e.g., unit tests).
14
14
  */
@@ -60,5 +60,5 @@ export declare function i18nAssertValidResources(enResources: object, lng: strin
60
60
  * @returns
61
61
  * Void promise.
62
62
  */
63
- export declare function i18nCoreInit(i18next: i18n, environment: I18NEnvironment, debug: boolean, defaultNS: string, ...resources: Resource[]): Promise<void>;
63
+ export declare function i18nCoreInit(i18next: i18n, environment: I18nEnvironment, debug: boolean, defaultNS: string, ...resources: Resource[]): Promise<void>;
64
64
  //# sourceMappingURL=i18n.d.ts.map
@@ -3,21 +3,21 @@ import I18nextCLILanguageDetector from "i18next-cli-language-detector";
3
3
  /**
4
4
  * Internationalization operating environment.
5
5
  */
6
- export var I18NEnvironment;
7
- (function (I18NEnvironment) {
6
+ export var I18nEnvironment;
7
+ (function (I18nEnvironment) {
8
8
  /**
9
9
  * Command-line interface (e.g., unit tests).
10
10
  */
11
- I18NEnvironment[I18NEnvironment["CLI"] = 0] = "CLI";
11
+ I18nEnvironment[I18nEnvironment["CLI"] = 0] = "CLI";
12
12
  /**
13
13
  * Web server.
14
14
  */
15
- I18NEnvironment[I18NEnvironment["Server"] = 1] = "Server";
15
+ I18nEnvironment[I18nEnvironment["Server"] = 1] = "Server";
16
16
  /**
17
17
  * Web browser.
18
18
  */
19
- I18NEnvironment[I18NEnvironment["Browser"] = 2] = "Browser";
20
- })(I18NEnvironment || (I18NEnvironment = {}));
19
+ I18nEnvironment[I18nEnvironment["Browser"] = 2] = "Browser";
20
+ })(I18nEnvironment || (I18nEnvironment = {}));
21
21
  /**
22
22
  * Assert that language resources are a type match for English (default) resources.
23
23
  *
@@ -115,12 +115,12 @@ export async function i18nCoreInit(i18next, environment, debug, defaultNS, ...re
115
115
  }
116
116
  let module;
117
117
  switch (environment) {
118
- case I18NEnvironment.CLI:
118
+ case I18nEnvironment.CLI:
119
119
  // TODO Refactor when https://github.com/neet/i18next-cli-language-detector/issues/281 resolved.
120
120
  // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- Per above.
121
121
  module = I18nextCLILanguageDetector;
122
122
  break;
123
- case I18NEnvironment.Browser:
123
+ case I18nEnvironment.Browser:
124
124
  module = I18nextBrowserLanguageDetector;
125
125
  break;
126
126
  default:
@@ -1 +1 @@
1
- {"version":3,"file":"i18n.js","sourceRoot":"","sources":["../../src/locale/i18n.ts"],"names":[],"mappings":"AACA,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAC9E,OAAO,0BAA0B,MAAM,+BAA+B,CAAC;AASvE;;GAEG;AACH,MAAM,CAAN,IAAY,eAeX;AAfD,WAAY,eAAe;IACvB;;OAEG;IACH,mDAAG,CAAA;IAEH;;OAEG;IACH,yDAAM,CAAA;IAEN;;OAEG;IACH,2DAAO,CAAA;AACX,CAAC,EAfW,eAAe,KAAf,eAAe,QAe1B;AAED;;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QAC5H,CAAC,CAAC,CAAC;IACP,CAAC;AACL,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aidc-toolkit/core",
3
- "version": "0.9.18-beta",
3
+ "version": "0.9.19-beta",
4
4
  "description": "Core functionality for AIDC Toolkit",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -26,11 +26,11 @@
26
26
  "build:doc": "npm run build:dev"
27
27
  },
28
28
  "devDependencies": {
29
- "@aidc-toolkit/dev": "^0.9.18-beta"
29
+ "@aidc-toolkit/dev": "beta"
30
30
  },
31
31
  "dependencies": {
32
- "i18next": "^25.2.1",
33
- "i18next-browser-languagedetector": "^8.1.0",
32
+ "i18next": "^25.6.3",
33
+ "i18next-browser-languagedetector": "^8.2.0",
34
34
  "i18next-cli-language-detector": "^1.1.8"
35
35
  }
36
36
  }