# DigiDala — Alpha 50.9.1 Changeset

## Scope

Alpha.50.9.1 completes the RU/EN localization and branding foundation for the Telegram bot introduced in Alpha 50.9.

### Telegram bot localization

- Adds a dedicated RU/EN bot i18n layer independent from the Mini App source tree.
- Adds a shared supported-locale registry under `packages/i18n/locales.mjs`.
- Selects a bot user's locale from saved preference first, then Telegram `language_code`, with English fallback.
- Adds `/language` and a compact language selector.
- Localizes public menu labels, commands, support/payment messages, errors and the existing help/start/app behavior.
- Localizes administration menus, Competitive Mandala creation/editing flow, queue output and administrator management messages.
- Keeps campaign content itself in localized records rather than mixing campaign data with bot UI strings.

### Localized bot content storage

- Adds localized storage for `welcome_message` and `about_message`.
- Seeds the approved RU/EN public texts, including the approved explanation of the mandala concept and the future visual-donation direction.
- Keeps legacy `bot_settings` synchronized with Russian content for backward compatibility.
- Stores a persistent per-Telegram-user language preference in the backend.

### Branding

- User-facing bot copy consistently uses `DigiDala`.
- The existing Telegram bot account, username `@PixDala_bot`, token and technical deployment identifiers remain unchanged.

### Startup defect fixed

- Removes the broken Alpha 50.9 bot import of `apps/miniapp/i18n/locales.mjs` relative to `bot/`.
- Bot campaign locale metadata now comes from the shared locale registry.
- Adds regression coverage so the bot no longer depends directly on Mini App locale source files.
- Preserves existing administrator-edited `bot_settings` content as the Russian localization during migration.
- Rejects unsupported locale codes when localized bot content is written.
- Uses the active bot locale when confirming a newly queued Competitive Mandala.

### Existing behavior preserved

No changes are intended to:

- Mandala cell ownership or lifecycle;
- Competitive queue and activation mechanics;
- Pix balances or prices;
- Telegram Stars payment verification or completion;
- authentication and authorization;
- archive behavior;
- navigation, deep links or share links;
- polling or server-authoritative synchronization.

## Final verification and release

```text
Commit: 3200550
Tag: v0.4.0-alpha.50.9.1

Structure: OK
JavaScript syntax: OK
Unit: 42/42
Integration: 49/49
API: 17/17
Total: 108/108

Deployment: successful
Active release: /opt/pixdala/releases/v0.4.0-alpha.50.9.1
```

Manual Telegram QA passed for RU/EN language selection, persistence and localized bot content. The approved Russian `О нас` text was restored through the administrator content editor after the test database was found to contain legacy default content; this was runtime data correction only.

Alpha.50.9.2 is the follow-up patch for welcome-message line-break formatting and immediate message replacement during language switching.
