Skip to content

Commit 81a2ceb

Browse files
authored
Merge branch 'main' into eng-415/send-metadata-to-localization-endpoint
2 parents 6a9e519 + a40757b commit 81a2ceb

File tree

11 files changed

+93
-7
lines changed

11 files changed

+93
-7
lines changed

packages/cli/CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# lingo.dev
22

3+
## 0.132.7
4+
5+
### Patch Changes
6+
7+
- [#2019](https://github.com/lingodotdev/lingo.dev/pull/2019) [`e0a1bb3`](https://github.com/lingodotdev/lingo.dev/commit/e0a1bb3cd0e27416c2e5fc60a8fad2161e5736c7) Thanks [@cherkanovart](https://github.com/cherkanovart)! - fix(cli): add dev.usePseudotranslator to config schema and respect it in CLI setup
8+
9+
- Updated dependencies [[`e0a1bb3`](https://github.com/lingodotdev/lingo.dev/commit/e0a1bb3cd0e27416c2e5fc60a8fad2161e5736c7)]:
10+
- @lingo.dev/_spec@0.48.1
11+
- @lingo.dev/_compiler@0.11.5
12+
- @lingo.dev/_sdk@0.15.1
13+
314
## 0.132.6
415

516
### Patch Changes

packages/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lingo.dev",
3-
"version": "0.132.6",
3+
"version": "0.132.7",
44
"description": "Lingo.dev CLI",
55
"private": false,
66
"repository": {

packages/cli/src/cli/cmd/run/setup.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ export default async function setup(input: CmdRunContext) {
5050
{
5151
title: "Selecting localization provider",
5252
task: async (ctx, task) => {
53-
const provider = ctx.flags.pseudo ? "pseudo" : ctx.config?.provider;
53+
const isPseudo = ctx.flags.pseudo || ctx.config?.dev?.usePseudotranslator;
54+
const provider = isPseudo ? "pseudo" : ctx.config?.provider;
5455
const vNext = ctx.config?.vNext;
5556
ctx.localizer = createLocalizer(provider, ctx.flags.apiKey, vNext);
5657
if (!ctx.localizer) {
@@ -72,7 +73,8 @@ export default async function setup(input: CmdRunContext) {
7273
enabled: (ctx) =>
7374
(ctx.localizer?.id === "Lingo.dev" ||
7475
ctx.localizer?.id === "Lingo.dev vNext") &&
75-
!ctx.flags.pseudo,
76+
!ctx.flags.pseudo &&
77+
!ctx.config?.dev?.usePseudotranslator,
7678
task: async (ctx, task) => {
7779
const authStatus = await ctx.localizer!.checkAuth();
7880
if (!authStatus.authenticated) {

packages/compiler/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# @lingo.dev/\_compiler
22

3+
## 0.11.5
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [[`e0a1bb3`](https://github.com/lingodotdev/lingo.dev/commit/e0a1bb3cd0e27416c2e5fc60a8fad2161e5736c7)]:
8+
- @lingo.dev/_spec@0.48.1
9+
- @lingo.dev/_sdk@0.15.1
10+
311
## 0.11.4
412

513
### Patch Changes

packages/compiler/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lingo.dev/_compiler",
3-
"version": "0.11.4",
3+
"version": "0.11.5",
44
"description": "Lingo.dev Compiler",
55
"private": false,
66
"repository": {

packages/sdk/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# @lingo.dev/\_sdk
22

3+
## 0.15.1
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [[`e0a1bb3`](https://github.com/lingodotdev/lingo.dev/commit/e0a1bb3cd0e27416c2e5fc60a8fad2161e5736c7)]:
8+
- @lingo.dev/_spec@0.48.1
9+
310
## 0.15.0
411

512
### Minor Changes

packages/sdk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lingo.dev/_sdk",
3-
"version": "0.15.0",
3+
"version": "0.15.1",
44
"description": "Lingo.dev JS SDK",
55
"private": false,
66
"repository": {

packages/spec/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @lingo.dev/\_spec
22

3+
## 0.48.1
4+
5+
### Patch Changes
6+
7+
- [#2019](https://github.com/lingodotdev/lingo.dev/pull/2019) [`e0a1bb3`](https://github.com/lingodotdev/lingo.dev/commit/e0a1bb3cd0e27416c2e5fc60a8fad2161e5736c7) Thanks [@cherkanovart](https://github.com/cherkanovart)! - fix(cli): add dev.usePseudotranslator to config schema and respect it in CLI setup
8+
39
## 0.48.0
410

511
### Minor Changes

packages/spec/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lingo.dev/_spec",
3-
"version": "0.48.0",
3+
"version": "0.48.1",
44
"description": "Lingo.dev open specification",
55
"private": false,
66
"repository": {

packages/spec/src/config.spec.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,30 @@ describe("I18n Config Parser", () => {
115115
expect(result).toEqual(createV1_4Config());
116116
});
117117

118+
it("should parse config with dev.usePseudotranslator", () => {
119+
const configWithDev = {
120+
...createV1_4Config(),
121+
version: "1.14",
122+
dev: {
123+
usePseudotranslator: true,
124+
},
125+
};
126+
const result = parseI18nConfig(configWithDev);
127+
128+
expect(result.dev?.usePseudotranslator).toBe(true);
129+
expect(result.version).toBe("1.14");
130+
});
131+
132+
it("should parse config without dev field", () => {
133+
const configWithoutDev = {
134+
...createV1_4Config(),
135+
version: "1.14",
136+
};
137+
const result = parseI18nConfig(configWithoutDev);
138+
139+
expect(result.dev).toBeUndefined();
140+
});
141+
118142
it("should throw an error for unsupported locales", () => {
119143
const invalidLocaleConfig = createInvalidLocaleConfig();
120144
expect(() => parseI18nConfig(invalidLocaleConfig)).toThrow(

0 commit comments

Comments
 (0)