Add Bulgarian translation#2585
Add Bulgarian translation#2585Pechenikov1 wants to merge 5 commits intoiNavFlight:maintenance-9.xfrom
Conversation
Branch Targeting SuggestionYou've targeted the
If This is an automated suggestion to help route contributions to the appropriate branch. |
Review Summary by QodoAdd Bulgarian language support to INAV Configurator
WalkthroughsDescription• Adds Bulgarian language support to INAV Configurator • Registers Bulgarian locale in available languages list • Includes complete Bulgarian translation file Diagramflowchart LR
A["Language Registration"] -- "adds 'bg' to availableLanguages" --> B["Bulgarian Support Enabled"]
C["Bulgarian Translation File"] -- "locale/bg/messages.json" --> B
File Changes1. js/localization.js
|
Code Review by Qodo
1. Bulgarian option shows false
|
|
|
||
|
|
||
| const availableLanguages = ['en', 'ja', 'ru', 'uk', 'zh_CN']; | ||
| const availableLanguages = ['en', 'ja', 'ru', 'bg', 'uk', 'zh_CN']; |
There was a problem hiding this comment.
1. Bulgarian option shows false 🐞 Bug ✓ Correctness
bg is added to availableLanguages, but locale/en/messages.json does not define language_bg.
The language selector builds option labels via i18n.getMessage('language_' + lng), which returns
false when the key doesn’t exist, so the Bulgarian entry will display incorrectly.
Agent Prompt
### Issue description
Bulgarian (`bg`) was added to the supported languages list, but the base English locale is missing the `language_bg` label. The language selector builds each option label by translating `language_<code>` and will render `false` when the key doesn’t exist.
### Issue Context
- The app iterates over `availableLanguages` and uses `i18n.getMessage('language_' + lng)` to label each dropdown option.
- `i18n.getMessage` returns `false` if the key doesn’t exist.
- i18next fallback is configured to English (`fallbackLng: 'en'`), so English must contain labels for all supported languages.
### Fix Focus Areas
- js/localization.js[9-9]
- js/configurator_main.js[345-347]
- locale/en/messages.json[1-28]
### Proposed change
Add:
```json
"language_bg": {
"message": "Български",
"_comment": "Don't translate!"
}
```
near the other `language_*` entries in `locale/en/messages.json`.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
|



This PR adds full Bulgarian language support to INAV Configurator.
Changes:
locale/bg.jsonwith complete translation of all interface stringsTesting:
The translation has been carefully checked and works flawlessly on both versions.
As requested, yarn.lock and .gitignore have been removed from this PR.
Only the translation files and language registration remain.