Skip to content

Commit 0cf4531

Browse files
committed
chore(messages): add missing messages
1 parent 5b8071b commit 0cf4531

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/main/kotlin/com/github/blarc/ai/commits/intellij/plugin/settings/clients/LLMClientService.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ abstract class LLMClientService<T : LLMClientConfiguration>(private val cs: Coro
2222

2323
fun generateCommitMessage(client: T, prompt: String, project: Project, commitMessage: CommitMessage) {
2424
cs.launch(Dispatchers.Default) {
25-
withBackgroundProgress(project, "Generating commit") {
25+
withBackgroundProgress(project, message("action.background")) {
2626
sendRequest(client, prompt, onSuccess = {
2727
withContext(Dispatchers.EDT) {
2828
commitMessage.setCommitMessage(it)
@@ -39,7 +39,7 @@ abstract class LLMClientService<T : LLMClientConfiguration>(private val cs: Coro
3939

4040
fun verifyConfiguration(client: T, label: JBLabel) {
4141
// TODO @Blarc: Can you make this better? with notifications?
42-
label.text = "Verifying configuration..."
42+
label.text = message("settings.verify.running")
4343
cs.launch(Dispatchers.Default) {
4444
sendRequest(client, "test", onSuccess = {
4545
// This can't be called from EDT thread, because dialog blocks the EDT thread
@@ -68,9 +68,9 @@ abstract class LLMClientService<T : LLMClientConfiguration>(private val cs: Coro
6868
}
6969
onSuccess(response)
7070
} catch (e: IllegalArgumentException) {
71-
onError("Invalid configuration: ${e.message ?: "unknown"}.")
71+
onError(message("settings.verify.invalid", e.message ?: message("unknown-error")))
7272
} catch (e: Exception) {
73-
onError(e.message ?: "Unknown error.")
73+
onError(e.message ?: message("unknown-error"))
7474
}
7575
}
7676
}

src/main/resources/messages/AiCommitsBundle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ settings.prompt=Prompt
77
settings.report-bug=Report bug
88
settings.verifyToken=Verify
99
settings.verify.valid=Configuration is valid.
10-
settings.verify.invalid=Configuration is not valid ({0}).
10+
settings.verify.invalid=Invalid configuration: {0}.
1111
settings.verify.running=Verifying configuration...
12-
settings.verify.token-is-empty=Open AI token is empty.
1312
settings.refreshModels=Refresh
13+
unknown-error=Unknown error
1414

1515
action.background=Generating commit message
1616
action.error=Commit message could not be generated.

0 commit comments

Comments
 (0)