Skip to content

Commit b421bad

Browse files
committed
feat(i18n): add internationalization support for issue input panel
- Add placeholder, submit, and cancel button translations for IssueInputViewPanel - Update MCP documentation link text in CustomizeConfigurable - Refactor text resources to use 'sketch' prefix for consistency
1 parent 7c2e7fd commit b421bad

File tree

4 files changed

+14
-7
lines changed

4 files changed

+14
-7
lines changed

core/src/main/kotlin/cc/unitmesh/devti/settings/customize/CustomizeConfigurable.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class CustomizeConfigurable(val project: Project) : BoundConfigurable(AutoDevBun
8787
}
8888
row {
8989
cell(jBLabel("counit.mcp.services.placeholder", 1))
90-
link(AutoDevBundle.message("counit.mcp.services.docs"), {
90+
link(AutoDevBundle.message("sketch.mcp.services.docs"), {
9191
BrowserUtil.browse("https://ide.unitmesh.cc/mcp")
9292
})
9393
button(AutoDevBundle.message("sketch.mcp.testMcp")) {

core/src/main/kotlin/cc/unitmesh/devti/shadow/IssueInputViewPanel.kt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package cc.unitmesh.devti.shadow
22

3+
import cc.unitmesh.devti.AutoDevBundle
34
import cc.unitmesh.devti.AutoDevNotifications
45
import cc.unitmesh.devti.gui.AutoDevToolWindowFactory
56
import cc.unitmesh.devti.gui.chat.message.ChatActionType
@@ -22,26 +23,26 @@ class IssueInputViewPanel(
2223
private var textArea: MarkdownLanguageField? = null
2324

2425
init {
25-
textArea = MarkdownLanguageField(project, "", "Enter Issue Description", "issue.md")
26+
textArea = MarkdownLanguageField(project, "", AutoDevBundle.message("sketch.issue.input.placeholder"), "issue.md")
2627

2728
val buttonPanel = JPanel(BorderLayout()).apply {
2829
background = textArea?.getEditor(true)?.backgroundColor
2930
}
3031

3132
val buttonsBox = Box.createHorizontalBox().apply {
32-
add(JButton("Submit").apply {
33+
add(JButton(AutoDevBundle.message("sketch.issue.input.submit")).apply {
3334
addActionListener {
3435
val text = textArea?.text ?: ""
3536
if (text.isNotBlank()) {
3637
handlingExecute(text)
3738
onSubmit(text)
3839
} else {
39-
AutoDevNotifications.notify(project, "Input cannot be empty")
40+
AutoDevNotifications.notify(project, AutoDevBundle.message("chat.input.tips"))
4041
}
4142
}
4243
})
4344
add(Box.createHorizontalStrut(8))
44-
add(JButton("Cancel").apply {
45+
add(JButton(AutoDevBundle.message("sketch.issue.input.cancel")).apply {
4546
addActionListener {
4647
onCancel()
4748
}

core/src/main/resources/messages/AutoDevBundle_en.properties

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,4 +207,7 @@ sketch.plan.rerun.task=Help me fix this failed task:
207207
sketch.terminal.stop=Stop Terminal
208208
sketch.mcp.testMcp=Test MCP Services
209209
sketch.mcp.loading=Loading MCP services...
210-
counit.mcp.services.docs=MCP Documentation
210+
sketch.mcp.services.docs=MCP Documentation
211+
sketch.issue.input.placeholder=Enter Issue Description
212+
sketch.issue.input.submit=Submit
213+
sketch.issue.input.cancel=Cancel

core/src/main/resources/messages/AutoDevBundle_zh.properties

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,4 +199,7 @@ planner.error.create.file=Create file error {0}
199199
sketch.plan.rerun.task=Help me fix this failed task:
200200
sketch.terminal.stop=Stop Terminal
201201
sketch.mcp.testMcp=Test MCP Services
202-
counit.mcp.services.docs=MCP 文档
202+
sketch.mcp.services.docs=MCP 文档
203+
sketch.issue.input.placeholder=请输入需求、问题描述
204+
sketch.issue.input.submit=提交
205+
sketch.issue.input.cancel=取消

0 commit comments

Comments
 (0)