gt 2.14.27 → 2.14.28

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.14.28
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1295](https://github.com/generaltranslation/gt/pull/1295) [`17cf156`](https://github.com/generaltranslation/gt/commit/17cf156403de524a665903c9d45262acf4dbe657) Thanks [@fernando-aviles](https://github.com/fernando-aviles)! - Pass metadata to for tagged templates
8
+
3
9
  ## 2.14.27
4
10
 
5
11
  ### Patch Changes
@@ -1 +1 @@
1
- export declare const PACKAGE_VERSION = "2.14.27";
1
+ export declare const PACKAGE_VERSION = "2.14.28";
@@ -1,2 +1,2 @@
1
1
  // This file is auto-generated. Do not edit manually.
2
- export const PACKAGE_VERSION = '2.14.27';
2
+ export const PACKAGE_VERSION = '2.14.28';
@@ -4,7 +4,8 @@ import { ParsingConfig, ParsingOutput } from '../types.js';
4
4
  * Processes a tagged template expression (e.g., t`hello ${name}`).
5
5
  * Extracts the translatable string with numeric placeholders for expressions.
6
6
  *
7
- * Tagged templates don't support an options argument, so metadata is empty.
7
+ * Tagged templates don't support an options argument, but still carry
8
+ * source metadata for dashboard grouping and source context.
8
9
  *
9
10
  * @param tPath - The path to the tag identifier
10
11
  * @param config - Parsing configuration
@@ -1,10 +1,13 @@
1
1
  import * as t from '@babel/types';
2
2
  import { handleTaggedTemplateTranslationCall } from './handleTaggedTemplateTranslationCall.js';
3
+ import { extractStringEntryMetadata } from '../processTranslationCall/extractStringEntryMetadata.js';
4
+ import { SURROUNDING_LINE_COUNT } from '../../../../../utils/constants.js';
3
5
  /**
4
6
  * Processes a tagged template expression (e.g., t`hello ${name}`).
5
7
  * Extracts the translatable string with numeric placeholders for expressions.
6
8
  *
7
- * Tagged templates don't support an options argument, so metadata is empty.
9
+ * Tagged templates don't support an options argument, but still carry
10
+ * source metadata for dashboard grouping and source context.
8
11
  *
9
12
  * @param tPath - The path to the tag identifier
10
13
  * @param config - Parsing configuration
@@ -15,10 +18,16 @@ export function processTaggedTemplateCall(tPath, config, output) {
15
18
  tPath.parent.tag !== tPath.node) {
16
19
  return;
17
20
  }
21
+ const metadata = extractStringEntryMetadata({
22
+ output,
23
+ config,
24
+ nodeLoc: tPath.parent.loc,
25
+ surroundingLineCount: SURROUNDING_LINE_COUNT,
26
+ });
18
27
  handleTaggedTemplateTranslationCall({
19
28
  tPath,
20
29
  quasi: tPath.parent.quasi,
21
- metadata: {},
30
+ metadata,
22
31
  config,
23
32
  output,
24
33
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gt",
3
- "version": "2.14.27",
3
+ "version": "2.14.28",
4
4
  "main": "dist/index.js",
5
5
  "bin": "dist/main.js",
6
6
  "files": [