Skip to content

Commit 0696c86

Browse files
Merge pull request #3466 from opral/sherl-168-200-sherlock-is-unable-to-add-read-existing-messages-after-222
fix there is no plugin configured
2 parents 2931c04 + aeae571 commit 0696c86

File tree

7 files changed

+41
-13
lines changed

7 files changed

+41
-13
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"vs-code-extension": patch
3+
---
4+
5+
fix: save the inlang project after message extraction

.changeset/wet-cups-learn.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@inlang/plugin-m-function-matcher": patch
3+
"@inlang/plugin-t-function-matcher": patch
4+
"@inlang/plugin-i18next": patch
5+
---
6+
7+
fix: key name of sherlock extension

inlang/packages/plugins/i18next/src/plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ export const plugin: InlangPlugin<{
2424
exportFiles,
2525
toBeImportedFiles,
2626
meta: {
27-
"app.inlang.ide-extension": config,
27+
"app.inlang.ideExtension": config,
2828
},
2929
};

inlang/packages/plugins/m-function-matcher/src/plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ export const plugin: InlangPlugin<{
1414
"A plugin for the inlang SDK that uses a JSON file per language tag to store translations.",
1515
key,
1616
meta: {
17-
"app.inlang.ide-extension": config,
17+
"app.inlang.ideExtension": config,
1818
},
1919
};

inlang/packages/plugins/t-function-matcher/src/plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ export const plugin: InlangPlugin<{
1414
"A plugin for the inlang SDK that uses a JSON file per language tag to store translations.",
1515
key,
1616
meta: {
17-
"app.inlang.ide-extension": config,
17+
"app.inlang.ideExtension": config,
1818
},
1919
};

inlang/packages/sherlock/src/commands/extractMessage.test.ts

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,29 @@ vi.mock("../utilities/state", () => ({
1313
state: vi.fn(),
1414
}))
1515

16-
vi.mock("vscode", () => ({
17-
window: {
18-
showInputBox: vi.fn(),
19-
showQuickPick: vi.fn(),
20-
showErrorMessage: vi.fn(),
21-
},
22-
commands: {
23-
registerTextEditorCommand: vi.fn(),
24-
},
25-
}))
16+
vi.mock("vscode", async () => {
17+
return {
18+
window: {
19+
showInputBox: vi.fn(),
20+
showQuickPick: vi.fn(),
21+
showErrorMessage: vi.fn(),
22+
},
23+
commands: {
24+
registerTextEditorCommand: vi.fn(),
25+
},
26+
CodeActionKind: {
27+
QuickFix: "quickfix",
28+
Refactor: "refactor",
29+
},
30+
CodeAction: vi.fn().mockImplementation(function (title, kind) {
31+
return {
32+
title,
33+
kind,
34+
command: undefined,
35+
}
36+
}),
37+
}
38+
})
2639

2740
vi.mock("../utilities/messages/msg", () => ({
2841
msg: vi.fn(),

inlang/packages/sherlock/src/commands/extractMessage.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
type NewBundleNested,
1313
} from "@inlang/sdk"
1414
import { v4 as uuidv4 } from "uuid"
15+
import { saveProject } from "../main.js"
1516

1617
/**
1718
* Helps the user to extract messages from the active text editor.
@@ -144,6 +145,8 @@ export const extractMessageCommand = {
144145

145146
CONFIGURATION.EVENTS.ON_DID_EXTRACT_MESSAGE.fire()
146147

148+
await saveProject()
149+
147150
capture({
148151
event: "IDE-EXTENSION command executed: Extract Message",
149152
})

0 commit comments

Comments
 (0)