Skip to content

Commit 07cae74

Browse files
committed
🐛 修正(generateCommitMessageFromGitDiff.ts): 翻訳の誤りを修正しました
このコミットでは、generateCommitMessageFromGitDiff.tsファイルの翻訳の誤りを修正しました。"insert its translation by"というフレーズが"by"でなく"insert"であることを明確にしました。 ※翻訳の間違いでなくて入れる順番を変えた 🐛 fix(generateCommitMessageFromGitDiff.ts): fix translation error This commit fixes a translation error in the generateCommitMessageFromGitDiff.ts file. The phrase "insert its translation by" has been clarified to be "insert" instead of "by".
1 parent 559b7e9 commit 07cae74

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/generateCommitMessageFromGitDiff.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const INIT_MESSAGES_PROMPT: Array<ChatCompletionRequestMessage> = [
1818
content: `You are to act as the author of a commit message in git. Your mission is to create clean and comprehensive commit messages in the conventional commit convention and explain WHAT were the changes and WHY the changes were done. I'll send you an output of 'git diff --staged' command, and you convert it into a commit message.
1919
${config?.OCO_EMOJI ? 'Use GitMoji convention to preface the commit.' : 'Do not preface the commit with anything.'}
2020
${config?.OCO_DESCRIPTION ? 'Add a short description of WHY the changes are done after the commit message. Don\'t start it with "This commit", just describe the changes.' : "Don't add any descriptions to the commit, only commit message."}
21-
Use the present tense. Lines must not be longer than 74 characters. Use ${translation.localLanguage} to answer. And add its translation by ${translation.localLanguage}.`
21+
Use the present tense. Lines must not be longer than 74 characters. Use ${translation.localLanguage} to answer. And insert its translation by ${translation.localLanguage}.`
2222
},
2323
{
2424
role: ChatCompletionRequestMessageRoleEnum.User,
@@ -49,13 +49,13 @@ app.use((_, res, next) => {
4949
},
5050
{
5151
role: ChatCompletionRequestMessageRoleEnum.Assistant,
52-
content: `${config?.OCO_EMOJI ? '🐛 ' : ''}${i18n['en'].commitFix}
52+
content: (translation === i18n['en'] ? '' :
53+
`${config?.OCO_EMOJI ? '🐛 ' : ''}${translation.commitFix}
54+
${config?.OCO_EMOJI ? '✨ ' : ''}${translation.commitFeat}
55+
${config?.OCO_DESCRIPTION ? '\n' + translation.commitDescription + '\n\n' : ''}`) +
56+
`${config?.OCO_EMOJI ? '🐛 ' : ''}${i18n['en'].commitFix}
5357
${config?.OCO_EMOJI ? '✨ ' : ''}${i18n['en'].commitFeat}
5458
${config?.OCO_DESCRIPTION ? '\n' + i18n['en'].commitDescription : ''}`
55-
+ (translation === i18n['en'] ? '' : `
56-
${config?.OCO_EMOJI ? '🐛 ' : ''}${translation.commitFix}
57-
${config?.OCO_EMOJI ? '✨ ' : ''}${translation.commitFeat}
58-
${config?.OCO_DESCRIPTION ? '\n' + translation.commitDescription : ''}`)
5959
}
6060
];
6161

0 commit comments

Comments
 (0)