generaltranslation 8.1.6 → 8.1.8
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 +12 -0
- package/README.md +14 -105
- package/dist/index.cjs.min.cjs +3 -3
- package/dist/index.cjs.min.cjs.map +1 -1
- package/dist/index.d.ts +83 -17
- package/dist/index.esm.min.mjs +3 -3
- package/dist/index.esm.min.mjs.map +1 -1
- package/dist/translate/getOrphanedFiles.d.ts +8 -0
- package/dist/translate/processFileMoves.d.ts +25 -0
- package/dist/types-dir/api/enqueueFiles.d.ts +3 -1
- package/dist/types-dir/api/file.d.ts +2 -1
- package/dist/types-dir/api/uploadFiles.d.ts +1 -0
- package/dist/types.d.ts +95 -57
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# generaltranslation
|
|
2
2
|
|
|
3
|
+
## 8.1.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#981](https://github.com/generaltranslation/gt/pull/981) [`fca3a25`](https://github.com/generaltranslation/gt/commit/fca3a2583eb7f21bc3ef13516351d479f7bef882) Thanks [@fernando-aviles](https://github.com/fernando-aviles)! - Handling source file movement to persist existing translations instead of retranslating
|
|
8
|
+
|
|
9
|
+
## 8.1.7
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#960](https://github.com/generaltranslation/gt/pull/960) [`eb07e8c`](https://github.com/generaltranslation/gt/commit/eb07e8ce1b610551437b40f96c72ac76d0af7b67) Thanks [@ErnestM1234](https://github.com/ErnestM1234)! - chore: upload shared id for static content
|
|
14
|
+
|
|
3
15
|
## 8.1.6
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1,116 +1,25 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<a href="https://generaltranslation.com"
|
|
3
|
-
<
|
|
2
|
+
<a href="https://generaltranslation.com/docs">
|
|
3
|
+
<picture>
|
|
4
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://generaltranslation.com/gt-logo-dark.svg">
|
|
5
|
+
<source media="(prefers-color-scheme: light)" srcset="https://generaltranslation.com/gt-logo-light.svg">
|
|
6
|
+
<img alt="General Translation" src="https://generaltranslation.com/gt-logo-light.svg" width="100" height="100">
|
|
7
|
+
</picture>
|
|
4
8
|
</a>
|
|
5
9
|
</p>
|
|
6
10
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
See our [docs](https://generaltranslation.com/docs) for more information including guides, examples, and API references.
|
|
12
|
-
|
|
13
|
-
## Development
|
|
14
|
-
|
|
15
|
-
### Prerequisites
|
|
16
|
-
|
|
17
|
-
- Node.js (>= 16.0.0)
|
|
18
|
-
- npm or yarn
|
|
19
|
-
|
|
20
|
-
### Installation
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
npm install
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## Testing
|
|
27
|
-
|
|
28
|
-
This project uses [Vitest](https://vitest.dev/) for testing with two types of tests:
|
|
29
|
-
|
|
30
|
-
### Test Types
|
|
31
|
-
|
|
32
|
-
- **Unit Tests** (`__tests__/`): Fast, isolated tests with mocking
|
|
33
|
-
|
|
34
|
-
### Running Tests
|
|
35
|
-
|
|
36
|
-
```bash
|
|
37
|
-
# Run all tests (unit + e2e)
|
|
38
|
-
npm test
|
|
39
|
-
|
|
40
|
-
# Run only unit tests
|
|
41
|
-
npm test -- __tests__
|
|
42
|
-
|
|
43
|
-
# Run tests in watch mode
|
|
44
|
-
npm run test:watch
|
|
45
|
-
|
|
46
|
-
# Run specific test file
|
|
47
|
-
npm test -- __tests__/logging/logger.test.ts
|
|
48
|
-
|
|
49
|
-
# Run tests matching a pattern
|
|
50
|
-
npm test -- -t "should handle translation"
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
### Environment Variables
|
|
54
|
-
|
|
55
|
-
#### Required for E2E Tests
|
|
56
|
-
|
|
57
|
-
Create a `.env` file in the project root with:
|
|
58
|
-
|
|
59
|
-
```bash
|
|
60
|
-
# GT API Configuration
|
|
61
|
-
VITE_GT_API_KEY="your-dev-api-key"
|
|
62
|
-
VITE_GT_PROJECT_ID="your-project-id"
|
|
63
|
-
VITE_GT_RUNTIME_URL="http://localhost:10000"
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
> **Note**: E2E tests require a running GT runtime server at the specified URL. Without proper configuration, e2e tests will skip gracefully.
|
|
67
|
-
|
|
68
|
-
#### Optional: Logger Configuration
|
|
69
|
-
|
|
70
|
-
```bash
|
|
71
|
-
# Set logging level for development/debugging
|
|
72
|
-
_GT_LOG_LEVEL=debug # Options: debug, info, warn, error (default: warn)
|
|
73
|
-
```
|
|
11
|
+
<p align="center">
|
|
12
|
+
<a href="https://generaltranslation.com/docs"><strong>Documentation</strong></a> · <a href="https://github.com/generaltranslation/gt/issues">Report Bug</a>
|
|
13
|
+
</p>
|
|
74
14
|
|
|
75
|
-
|
|
15
|
+
# generaltranslation
|
|
76
16
|
|
|
77
|
-
|
|
78
|
-
- **Timeout**: 15 seconds per test (suitable for network-dependent e2e tests)
|
|
79
|
-
- **Environment**: Node.js environment for testing
|
|
17
|
+
Core library for General Translation. Used internally by `gt-react` and `gt-next`.
|
|
80
18
|
|
|
81
|
-
|
|
19
|
+
## Installation
|
|
82
20
|
|
|
83
21
|
```bash
|
|
84
|
-
|
|
85
|
-
_GT_LOG_LEVEL=debug npm test --reporter=verbose
|
|
86
|
-
|
|
87
|
-
# Quick unit test validation
|
|
88
|
-
npm test -- __tests__
|
|
89
|
-
|
|
90
|
-
# Test specific functionality
|
|
91
|
-
npm test -- -t "logger" --reporter=verbose
|
|
92
|
-
|
|
93
|
-
# Watch mode for development
|
|
94
|
-
npm run test:watch -- __tests__/
|
|
22
|
+
npm install generaltranslation
|
|
95
23
|
```
|
|
96
24
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
```
|
|
100
|
-
__tests__/ # Unit tests with mocking
|
|
101
|
-
├── logging/ # Logger functionality tests
|
|
102
|
-
└── translate/ # Translation logic tests
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
## Contributing
|
|
106
|
-
|
|
107
|
-
We welcome any contributions to our libraries. Please submit a pull request!
|
|
108
|
-
|
|
109
|
-
### Development Workflow
|
|
110
|
-
|
|
111
|
-
1. Install dependencies: `npm install`
|
|
112
|
-
2. Set up environment variables (see Testing section)
|
|
113
|
-
3. Run tests: `npm test`
|
|
114
|
-
4. Make your changes
|
|
115
|
-
5. Run tests again to ensure everything works
|
|
116
|
-
6. Submit a pull request
|
|
25
|
+
See the [full documentation](https://generaltranslation.com/docs) for guides and API reference.
|