feat(i18n): add Bangla (Bangladesh) to AI_COMMIT_LANGUAGE#46
Open
tarikmanoar wants to merge 4 commits into
Open
feat(i18n): add Bangla (Bangladesh) to AI_COMMIT_LANGUAGE#46tarikmanoar wants to merge 4 commits into
tarikmanoar wants to merge 4 commits into
Conversation
- 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>
There was a problem hiding this comment.
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 on lines
+4
to
+5
| 'Bangla (Bangladesh)': 'standard formal Bangla (প্রমিত বাংলা) as used in Bangladesh' | ||
| }; |
Comment on lines
+33
to
+36
| const getLanguageStyleNote = (language: string): string => { | ||
| const note = LANGUAGE_STYLE_NOTES[language]; | ||
| return note ? `\n${note}\n` : ''; | ||
| }; |
| - No period at end | ||
| - Max 50 characters | ||
| - Must be in ${language} | ||
| - Must be in ${languageInstruction} |
| - Max 72 chars per line | ||
| - Explain what and why | ||
| - Must be in ${language} | ||
| - Must be in ${languageInstruction} |
|
|
||
| 1. Output ONLY the commit message | ||
| 2. Write ONLY in ${language} | ||
| 2. Write ONLY in ${languageInstruction} |
|
|
||
| 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.` |
| "Dutch", | ||
| "Portuguese", | ||
| "Vietnamese", | ||
| "Bangla (Bangladesh)", |
| "Nederlands", | ||
| "português", | ||
| "tiếng Việt", | ||
| "বাংলা (বাংলাদেশ)", |
- 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)Bangla (Bangladesh)to theai-commit.AI_COMMIT_LANGUAGEenum.বাংলা (বাংলাদেশ)at the matchingenumDescriptionsindex.Prompt behavior (
src/prompts.ts)LANGUAGE_INSTRUCTIONSmap so a language can map to a more precise instruction, with a passthrough fallback for all existing languages (no behavior change for them).LANGUAGE_STYLE_NOTESblock, 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)Testing
tsc --noEmit— passes, no type errors.npm run build(webpack production) — compiles successfully.enumandenumDescriptionsboth have 20 entries with the new value at the same index.বাংলা (বাংলাদেশ)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