gt-vue 0.1.0-iris.2 → 0.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/CHANGELOG.md +26 -0
- package/README.md +11 -5
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# gt-vue
|
|
2
2
|
|
|
3
|
+
## 0.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#2012](https://github.com/generaltranslation/gt/pull/2012) [`8d376e2`](https://github.com/generaltranslation/gt/commit/8d376e23c80828dfd8756e2f0fbf0f7725e0f178) Thanks [@eoinest](https://github.com/eoinest)! - Add a lightweight Vue 3 runtime with catalog-backed string and rich-content
|
|
8
|
+
translation, cookie-backed reactive locale switching, child-only variables,
|
|
9
|
+
and typed value props for number, currency, and date formatting. Browser SPAs
|
|
10
|
+
restore the locale from a configurable cookie, while an explicit server locale
|
|
11
|
+
wins during SSR hydration.
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#2068](https://github.com/generaltranslation/gt/pull/2068) [`f2204b9`](https://github.com/generaltranslation/gt/commit/f2204b990278865c54d14d337392930ea1ec31bf) Thanks [@eoinest](https://github.com/eoinest)! - Translate statically authored custom-component default slots, preserve authored
|
|
16
|
+
Fragments, and align Branch and Plural wire values, rendering fallbacks, and
|
|
17
|
+
locale selection with React. Add React-compatible `context`, `id`, `maxChars`,
|
|
18
|
+
and `requiresReview` metadata to `<T>`, including compiler-facing `$` aliases.
|
|
19
|
+
|
|
20
|
+
- [#2080](https://github.com/generaltranslation/gt/pull/2080) [`5d8b78a`](https://github.com/generaltranslation/gt/commit/5d8b78a1085d5dadc5bdc7435b3c6addf8981c38) Thanks [@eoinest](https://github.com/eoinest)! - Migrate the package license from FSL-1.1-ALv2 to MIT.
|
|
21
|
+
|
|
22
|
+
- [#2090](https://github.com/generaltranslation/gt/pull/2090) [`95b48df`](https://github.com/generaltranslation/gt/commit/95b48df677d27f41a336f13e01ae7aa9aa484c73) Thanks [@eoinest](https://github.com/eoinest)! - Add browser SPA initialization and synchronous module-level `t()` translations
|
|
23
|
+
to gt-vue.
|
|
24
|
+
- Updated dependencies [[`f2204b9`](https://github.com/generaltranslation/gt/commit/f2204b990278865c54d14d337392930ea1ec31bf), [`b05b470`](https://github.com/generaltranslation/gt/commit/b05b4703fbbfd34a3cbee335c786e2e606346167), [`8d376e2`](https://github.com/generaltranslation/gt/commit/8d376e23c80828dfd8756e2f0fbf0f7725e0f178)]:
|
|
25
|
+
- @generaltranslation/format@0.1.8
|
|
26
|
+
- generaltranslation@9.1.7
|
|
27
|
+
- gt-i18n@1.0.17
|
|
28
|
+
|
|
3
29
|
## 0.1.0-iris.2
|
|
4
30
|
|
|
5
31
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -87,8 +87,8 @@ applied.
|
|
|
87
87
|
## Module-level translations in a Vite SPA
|
|
88
88
|
|
|
89
89
|
Browser-only SPAs can call `t()` at module scope after `initializeGTSPA()` has
|
|
90
|
-
loaded the active locale. Use
|
|
91
|
-
|
|
90
|
+
loaded the active locale. Use an async bootstrap function, and dynamically
|
|
91
|
+
import the rest of the application only after initialization.
|
|
92
92
|
This complements rather than replaces the `gt()` callback from `useGT()`,
|
|
93
93
|
which remains the normal API inside Vue components and for SSR applications.
|
|
94
94
|
|
|
@@ -98,9 +98,15 @@ import { initializeGTSPA } from 'gt-vue';
|
|
|
98
98
|
import gtConfig from '../gt.config.json';
|
|
99
99
|
import loadTranslations from './loadTranslations';
|
|
100
100
|
|
|
101
|
-
|
|
102
|
-
const
|
|
103
|
-
mount(
|
|
101
|
+
async function bootstrap() {
|
|
102
|
+
const gt = await initializeGTSPA({ ...gtConfig, loadTranslations });
|
|
103
|
+
const { mount } = await import('./main');
|
|
104
|
+
mount(gt);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
void bootstrap().catch((error: unknown) => {
|
|
108
|
+
console.error(error);
|
|
109
|
+
});
|
|
104
110
|
```
|
|
105
111
|
|
|
106
112
|
Configure the CLI output and the Vite loader to use the same directory:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gt-vue",
|
|
3
|
-
"version": "0.1.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "A lightweight Vue internationalization library for General Translation.",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
"vue": ">=3.3.0 <4.0.0"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"generaltranslation": "
|
|
19
|
-
"
|
|
20
|
-
"gt-i18n": "1.0.
|
|
18
|
+
"@generaltranslation/format": "0.1.8",
|
|
19
|
+
"generaltranslation": "9.1.7",
|
|
20
|
+
"gt-i18n": "1.0.17"
|
|
21
21
|
},
|
|
22
22
|
"repository": {
|
|
23
23
|
"type": "git",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"typescript": "^5.9.2",
|
|
38
38
|
"vitest": "^3.2.4",
|
|
39
39
|
"vue": "^3.5.0",
|
|
40
|
-
"@generaltranslation/react-core": "11.1.
|
|
40
|
+
"@generaltranslation/react-core": "11.1.14"
|
|
41
41
|
},
|
|
42
42
|
"exports": {
|
|
43
43
|
".": {
|