@inlang/paraglide-js 1.2.3 → 1.2.4

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
@@ -360,6 +360,13 @@ Of course, we're not done yet! We plan on adding the following features to Parag
360
360
  - Web Zurich December 2023
361
361
  - [Svelte London January 2024](https://www.youtube.com/watch?v=eswNQiq4T2w&t=646s)
362
362
 
363
+ # Working with Translators
364
+
365
+ Paraglide JS is part of the inlang ecosystem, so it integrates nicely with all the other inlang compatible tools. If you are working with translators and/or designers you will find the following tools useful:
366
+
367
+ - [Fink](https://inlang.com/m/tdozzpar/app-inlang-finkLocalizationEditor) - An Online UI for editing translations. Changes made in Fink are committed to a translation branch or submitted via pull request.
368
+ - [Parrot](https://inlang.com/m/gkrpgoir/app-parrot-figmaPlugin) - A Figma Plugin for previewing translations right in your Figma designs. This avoids any layout issues that might occur due to different text lengths in different languages.
369
+
363
370
  # Pricing
364
371
 
365
- <doc-dev-tool-pricing></doc-dev-tool-pricing>
372
+ <doc-dev-tool-pricing></doc-dev-tool-pricing>
@@ -11,4 +11,5 @@ import { ProjectSettings, type Message } from "@inlang/sdk";
11
11
  export declare const compile: (args: {
12
12
  messages: Readonly<Message[]>;
13
13
  settings: ProjectSettings;
14
+ projectId?: string | undefined;
14
15
  }) => Promise<Record<string, string>>;
package/dist/index.js CHANGED
@@ -29183,18 +29183,20 @@ var telemetry = new Proxy(posthog, {
29183
29183
  return target[prop];
29184
29184
  }
29185
29185
  });
29186
- function capture2(args) {
29186
+ function capture2(args, projectId) {
29187
29187
  if (!publicEnv.PUBLIC_POSTHOG_TOKEN) {
29188
29188
  return;
29189
29189
  }
29190
- return posthog.capture({
29190
+ const data = {
29191
29191
  ...args,
29192
29192
  distinctId: "unknown"
29193
- // TODO add a project UUID to the tele.groups internal #196
29194
- // groups: {
29195
- // repository: gitOrigin,
29196
- // },
29197
- });
29193
+ };
29194
+ if (projectId) {
29195
+ data.groups = {
29196
+ project: projectId
29197
+ };
29198
+ }
29199
+ return posthog.capture(data);
29198
29200
  }
29199
29201
 
29200
29202
  // src/services/telemetry/stack-detection.ts
@@ -29303,12 +29305,15 @@ var compile = async (args) => {
29303
29305
  );
29304
29306
  const pkgJson = await getPackageJson(fs, process.cwd());
29305
29307
  const stack = getStackInfo(pkgJson);
29306
- telemetry.capture({
29307
- event: "PARAGLIDE-JS compile executed",
29308
- properties: {
29309
- stack
29310
- }
29311
- });
29308
+ telemetry.capture(
29309
+ {
29310
+ event: "PARAGLIDE-JS compile executed",
29311
+ properties: {
29312
+ stack
29313
+ }
29314
+ },
29315
+ args.projectId
29316
+ );
29312
29317
  const resources = {};
29313
29318
  for (const compiledMessage of compiledMessages) {
29314
29319
  for (const languageTag of Object.keys(compiledMessage)) {
@@ -29644,12 +29649,13 @@ var compileCommand = new Command().name("compile").summary("Compiles inlang Para
29644
29649
  await new Promise((resolve3) => setTimeout(resolve3, 1e4));
29645
29650
  }
29646
29651
  }
29647
- logger.info("Sucessfully compiled the project.");
29652
+ logger.info("Successfully compiled the project.");
29648
29653
  });
29649
29654
  async function executeCompilation(project, outputDirectory, fs3) {
29650
29655
  const output = await compile({
29651
29656
  messages: project.query.messages.getAll(),
29652
- settings: project.settings()
29657
+ settings: project.settings(),
29658
+ projectId: project.id
29653
29659
  });
29654
29660
  await writeOutput(outputDirectory, output, fs3);
29655
29661
  }
@@ -11,7 +11,7 @@ export declare const telemetry: Omit<PostHog, "capture"> & {
11
11
  /**
12
12
  * Wrapper to auto inject the git origin url and user id.
13
13
  */
14
- declare function capture(args: CaptureEventArguments): void;
14
+ declare function capture(args: CaptureEventArguments, projectId?: string): void;
15
15
  /**
16
16
  * Typesafe wrapper around the `telemetryNode.capture` method.
17
17
  *
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@inlang/paraglide-js",
3
3
  "type": "module",
4
- "version": "1.2.3",
4
+ "version": "1.2.4",
5
5
  "license": "Apache-2.0",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -48,8 +48,8 @@
48
48
  "isomorphic-git": "1.24.5",
49
49
  "json5": "2.2.3",
50
50
  "posthog-node": "3.1.3",
51
- "@inlang/detect-json-formatting": "1.0.0",
52
- "@inlang/language-tag": "1.4.0"
51
+ "@inlang/language-tag": "1.5.0",
52
+ "@inlang/detect-json-formatting": "1.0.0"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@rollup/plugin-terser": "0.4.3",
@@ -65,8 +65,8 @@
65
65
  "typescript": "5.2.2",
66
66
  "vitest": "0.34.3",
67
67
  "@inlang/env-variables": "0.2.0",
68
- "@inlang/sdk": "0.26.1",
69
- "@inlang/telemetry": "0.3.9",
68
+ "@inlang/sdk": "0.26.2",
69
+ "@inlang/telemetry": "0.3.10",
70
70
  "@lix-js/client": "0.8.0",
71
71
  "@lix-js/fs": "0.6.0",
72
72
  "@inlang/plugin-message-format": "2.0.0"