Skip to content

feat(i18n): add Bangla (Bangladesh) to AI_COMMIT_LANGUAGE#46

Open
tarikmanoar wants to merge 4 commits into
Sitoi:mainfrom
tarikmanoar:copilot/implement-bangla-ai-commit-language
Open

feat(i18n): add Bangla (Bangladesh) to AI_COMMIT_LANGUAGE#46
tarikmanoar wants to merge 4 commits into
Sitoi:mainfrom
tarikmanoar:copilot/implement-bangla-ai-commit-language

Conversation

@tarikmanoar

Copy link
Copy Markdown

Summary

Adds Bangla (Bangladesh) as a supported AI_COMMIT_LANGUAGE, bringing the total to 20 languages. Bangla output is explicitly guided toward standard formal Bangla (প্রমিত বাংলা) as written professionally in Bangladesh — not colloquial/regional dialect, and not West Bengal (India) vocabulary.

Changes

  • Configuration (package.json)

    • Added Bangla (Bangladesh) to the ai-commit.AI_COMMIT_LANGUAGE enum.
    • Added the localized label বাংলা (বাংলাদেশ) at the matching enumDescriptions index.
  • Prompt behavior (src/prompts.ts)

    • Introduced a LANGUAGE_INSTRUCTIONS map so a language can map to a more precise instruction, with a passthrough fallback for all existing languages (no behavior change for them).
    • Added an optional LANGUAGE_STYLE_NOTES block, injected into the prompt only for languages that define it. For Bangla it provides explicit do/don't word forms (e.g. থেকে not থিকা, করা হয়েছে not হইল, জন্য not লাইগা, পুরনো not পুরান) to keep output in professional written Bangla while keeping technical terms in English.
  • Docs (README.md, README.zh_CN.md)

    • Updated supported-language count 19 → 20.

Testing

  • tsc --noEmit — passes, no type errors.
  • npm run build (webpack production) — compiles successfully.
  • Verified enum and enumDescriptions both have 20 entries with the new value at the same index.
  • Manually tested in the Extension Development Host: selecting বাংলা (বাংলাদেশ) produces commit messages in standard formal Bangla.

All existing languages are unaffected — the style note and instruction override only apply when a language has a dedicated entry.

🤖 Generated with Claude Code

Copilot AI and others added 3 commits June 2, 2026 02:38
- Replace "Bangladeshi tone and accent" instruction that produced
  colloquial/regional dialect (হইল, থিকা, লাইগা) with standard
  formal Bangla (প্রমিত বাংলা)
- Add LANGUAGE_STYLE_NOTES with explicit do/don't word forms to steer
  output toward professional written Bangla as used in Bangladesh
- Keep technical terms in English; inject notes only for languages
  that define them

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 2, 2026 06:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds first-class support for Bangla (Bangladesh) commit message generation by mapping language selection to more explicit prompt instructions and appending locale-specific style rules; docs are updated to reflect the new language count.

Changes:

  • Added language-to-instruction mapping plus Bangla (Bangladesh) style notes and injected them into the system prompt.
  • Added “Bangla (Bangladesh)” to the language lists in package.json.
  • Updated README language support count from 19 → 20.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 8 comments.

File Description
src/prompts.ts Adds language instruction mapping and injects Bangla-specific writing rules into the system prompt.
package.json Adds Bangla (Bangladesh) to supported language display/value lists.
README.md Updates supported language count to 20.
README.zh_CN.md Updates supported language count to 20.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/prompts.ts Outdated
Comment on lines +4 to +5
'Bangla (Bangladesh)': 'standard formal Bangla (প্রমিত বাংলা) as used in Bangladesh'
};
Comment thread src/prompts.ts
Comment on lines +33 to +36
const getLanguageStyleNote = (language: string): string => {
const note = LANGUAGE_STYLE_NOTES[language];
return note ? `\n${note}\n` : '';
};
Comment thread src/prompts.ts Outdated
- No period at end
- Max 50 characters
- Must be in ${language}
- Must be in ${languageInstruction}
Comment thread src/prompts.ts Outdated
- Max 72 chars per line
- Explain what and why
- Must be in ${language}
- Must be in ${languageInstruction}
Comment thread src/prompts.ts Outdated

1. Output ONLY the commit message
2. Write ONLY in ${language}
2. Write ONLY in ${languageInstruction}
Comment thread src/prompts.ts Outdated

Remember: All output MUST be in ${language} language. You are to act as a pure commit message generator. Your response should contain NOTHING but the commit message itself.`
});
Remember: All output MUST be in ${languageInstruction} language. You are to act as a pure commit message generator. Your response should contain NOTHING but the commit message itself.`
Comment thread package.json
"Dutch",
"Portuguese",
"Vietnamese",
"Bangla (Bangladesh)",
Comment thread package.json
"Nederlands",
"português",
"tiếng Việt",
"বাংলা (বাংলাদেশ)",
@tarikmanoar tarikmanoar closed this Jun 2, 2026
@tarikmanoar tarikmanoar deleted the copilot/implement-bangla-ai-commit-language branch June 2, 2026 06:10
@tarikmanoar tarikmanoar restored the copilot/implement-bangla-ai-commit-language branch June 2, 2026 06:12
@tarikmanoar tarikmanoar reopened this Jun 2, 2026
- Use the language name (not a descriptive phrase) in the
  "Must be in <language>" / "in <language> language" lines so they stay
  grammatical; move all descriptive guidance into the appended style note
- getLanguageStyleNote now returns the raw note; INIT_MAIN_PROMPT owns the
  surrounding blank-line spacing so output stays consistent with/without a note
- Drop the now-unused LANGUAGE_INSTRUCTIONS map and getLanguageInstruction

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants