Skip to content

Commit

Permalink
🐛 修正(generateCommitMessageFromGitDiff.ts): 翻訳の誤りを修正しました
Browse files Browse the repository at this point in the history
このコミットでは、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".
  • Loading branch information
takuya-o committed Jun 9, 2023
1 parent 559b7e9 commit 07cae74
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/generateCommitMessageFromGitDiff.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const INIT_MESSAGES_PROMPT: Array<ChatCompletionRequestMessage> = [
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.
${config?.OCO_EMOJI ? 'Use GitMoji convention to preface the commit.' : 'Do not preface the commit with anything.'}
${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."}
Use the present tense. Lines must not be longer than 74 characters. Use ${translation.localLanguage} to answer. And add its translation by ${translation.localLanguage}.`
Use the present tense. Lines must not be longer than 74 characters. Use ${translation.localLanguage} to answer. And insert its translation by ${translation.localLanguage}.`
},
{
role: ChatCompletionRequestMessageRoleEnum.User,
Expand Down Expand Up @@ -49,13 +49,13 @@ app.use((_, res, next) => {
},
{
role: ChatCompletionRequestMessageRoleEnum.Assistant,
content: `${config?.OCO_EMOJI ? '🐛 ' : ''}${i18n['en'].commitFix}
content: (translation === i18n['en'] ? '' :
`${config?.OCO_EMOJI ? '🐛 ' : ''}${translation.commitFix}
${config?.OCO_EMOJI ? '✨ ' : ''}${translation.commitFeat}
${config?.OCO_DESCRIPTION ? '\n' + translation.commitDescription + '\n\n' : ''}`) +
`${config?.OCO_EMOJI ? '🐛 ' : ''}${i18n['en'].commitFix}
${config?.OCO_EMOJI ? '✨ ' : ''}${i18n['en'].commitFeat}
${config?.OCO_DESCRIPTION ? '\n' + i18n['en'].commitDescription : ''}`
+ (translation === i18n['en'] ? '' : `
${config?.OCO_EMOJI ? '🐛 ' : ''}${translation.commitFix}
${config?.OCO_EMOJI ? '✨ ' : ''}${translation.commitFeat}
${config?.OCO_DESCRIPTION ? '\n' + translation.commitDescription : ''}`)
}
];

Expand Down

0 comments on commit 07cae74

Please sign in to comment.