Skip to content

Commit ce4d9fe

Browse files
committed
refactor: Improve error message key in GeminiPRSummarizer
1 parent b5cf557 commit ce4d9fe

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

internal/infrastructure/ai/gemini/gemini_pr_summarizer_service.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@ package gemini
33
import (
44
"context"
55
"fmt"
6+
"strings"
7+
"unicode/utf8"
8+
69
"github.com/Tomas-vilte/MateCommit/internal/config"
710
"github.com/Tomas-vilte/MateCommit/internal/domain/models"
811
"github.com/Tomas-vilte/MateCommit/internal/i18n"
912
"github.com/Tomas-vilte/MateCommit/internal/infrastructure/ai"
1013
"github.com/google/generative-ai-go/genai"
1114
"google.golang.org/api/option"
12-
"strings"
13-
"unicode/utf8"
1415
)
1516

1617
type GeminiPRSummarizer struct {
@@ -117,7 +118,7 @@ func (gps *GeminiPRSummarizer) parseSummary(raw string) (models.PRSummary, error
117118
summary.Body = strings.Join(bodyParts, "\n\n")
118119

119120
if summary.Title == "" {
120-
msg := gps.trans.GetMessage("title_not_found", 0, nil)
121+
msg := gps.trans.GetMessage("gemini_serivce.title_not_found", 0, nil)
121122
return summary, fmt.Errorf("%s", msg)
122123
}
123124

0 commit comments

Comments
 (0)