gtx-cli 2.1.11 → 2.1.12
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
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# gtx-cli
|
|
2
2
|
|
|
3
|
+
## 2.1.12
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#618](https://github.com/generaltranslation/gt/pull/618) [`195b65f`](https://github.com/generaltranslation/gt/commit/195b65fcbdebc027156ba04409b48f3ad175e20f) Thanks [@ErnestM1234](https://github.com/ErnestM1234)! - fix: src sepcification
|
|
8
|
+
|
|
3
9
|
## 2.1.11
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -8,7 +8,7 @@ import { Updates, TranslateFlags } from '../types/index.js';
|
|
|
8
8
|
* @param pkg - The package name
|
|
9
9
|
* @returns An object containing the updates and errors
|
|
10
10
|
*/
|
|
11
|
-
export declare function createUpdates(options: TranslateFlags, sourceDictionary: string | undefined, pkg: 'gt-react' | 'gt-next', validate: boolean): Promise<{
|
|
11
|
+
export declare function createUpdates(options: TranslateFlags, src: string[] | undefined, sourceDictionary: string | undefined, pkg: 'gt-react' | 'gt-next', validate: boolean): Promise<{
|
|
12
12
|
updates: Updates;
|
|
13
13
|
errors: string[];
|
|
14
14
|
warnings: string[];
|
|
@@ -14,7 +14,7 @@ import chalk from 'chalk';
|
|
|
14
14
|
* @param pkg - The package name
|
|
15
15
|
* @returns An object containing the updates and errors
|
|
16
16
|
*/
|
|
17
|
-
export async function createUpdates(options, sourceDictionary, pkg, validate) {
|
|
17
|
+
export async function createUpdates(options, src, sourceDictionary, pkg, validate) {
|
|
18
18
|
let updates = [];
|
|
19
19
|
let errors = [];
|
|
20
20
|
let warnings = [];
|
|
@@ -48,7 +48,7 @@ export async function createUpdates(options, sourceDictionary, pkg, validate) {
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
// Scan through project for <T> tags
|
|
51
|
-
const { updates: newUpdates, errors: newErrors, warnings: newWarnings, } = await createInlineUpdates(pkg, validate,
|
|
51
|
+
const { updates: newUpdates, errors: newErrors, warnings: newWarnings, } = await createInlineUpdates(pkg, validate, src);
|
|
52
52
|
errors = [...errors, ...newErrors];
|
|
53
53
|
warnings = [...warnings, ...newWarnings];
|
|
54
54
|
updates = [...updates, ...newUpdates];
|
|
@@ -15,7 +15,7 @@ export async function aggregateReactTranslations(options, settings, library) {
|
|
|
15
15
|
]);
|
|
16
16
|
}
|
|
17
17
|
// ---- CREATING UPDATES ---- //
|
|
18
|
-
const { updates, errors, warnings } = await createUpdates(options, options.dictionary, library, false);
|
|
18
|
+
const { updates, errors, warnings } = await createUpdates(options, settings.src, options.dictionary, library, false);
|
|
19
19
|
if (warnings.length > 0) {
|
|
20
20
|
logWarning(chalk.yellow(`CLI tool encountered ${warnings.length} warnings while scanning for translatable content.\n` +
|
|
21
21
|
warnings
|
|
@@ -27,7 +27,7 @@ export async function validateProject(settings, pkg, files) {
|
|
|
27
27
|
'./src/dictionary.ts',
|
|
28
28
|
]);
|
|
29
29
|
}
|
|
30
|
-
const { updates, errors, warnings } = await createUpdates(settings, settings.dictionary, pkg, true);
|
|
30
|
+
const { updates, errors, warnings } = await createUpdates(settings, settings.src, settings.dictionary, pkg, true);
|
|
31
31
|
if (warnings.length > 0) {
|
|
32
32
|
logWarning(chalk.yellow(`CLI tool encountered ${warnings.length} warnings while scanning for translatable content.`) +
|
|
33
33
|
'\n' +
|