Skip to content

ECHO-734 Add Ukranian language support without translations#516

Merged
spashii merged 3 commits intomainfrom
testing
Apr 7, 2026
Merged

ECHO-734 Add Ukranian language support without translations#516
spashii merged 3 commits intomainfrom
testing

Conversation

@ussaama
Copy link
Copy Markdown
Contributor

@ussaama ussaama commented Apr 7, 2026

Summary by CodeRabbit

  • New Features
    • Added Ukrainian (uk-UA / uk) language support across the app: UI translations, language selection, date localization, onboarding flows, project/editor options, sharing/QR flow, and AI prompt templates for Ukrainian.
  • Documentation
    • Added Ukrainian translation catalog and locale messages for in‑app content.

ussaama and others added 2 commits April 7, 2026 22:18
- Updated localization files to include Ukrainian (uk-UA) translations.
- Enhanced language picker and configuration to support Ukrainian.
- Integrated Ukrainian language into date formatting and participant
onboarding flows.
- Added relevant onboarding cards and verification instructions in
Ukrainian.

This update improves accessibility for Ukrainian-speaking users and
ensures a more inclusive experience across the platform.
…al components

- Changed the label for Ukrainian from "Українська" to "Ukrainian" in the LanguagePicker.
- Added Ukrainian language support to the CustomTopicModal with the code "uk-UA".
@linear
Copy link
Copy Markdown

linear bot commented Apr 7, 2026

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 7, 2026

Walkthrough

Adds Ukrainian (uk / uk‑UA) localization across frontend and backend: i18n config, locale messages, UI language options, date locale, onboarding/verification content, translation catalogs, backend seeds/allowed languages, and 10 new Ukrainian Jinja prompt templates. No API signatures changed.

Changes

Cohort / File(s) Summary
Core i18n config & registration
echo/frontend/lingui.config.ts, echo/frontend/src/config.ts, echo/frontend/src/hooks/useLanguage.ts
Registered/added uk-UA to locales/SUPPORTED_LANGUAGES and loaded Ukrainian messages into i18n initialization.
Locale messages
echo/frontend/src/locales/uk-UA.ts
Added new Ukrainian messages module exporting messages.
Translation catalogs (.po)
echo/frontend/src/locales/de-DE.po, echo/frontend/src/locales/en-US.po, echo/frontend/src/locales/es-ES.po, echo/frontend/src/locales/fr-FR.po, echo/frontend/src/locales/it-IT.po, echo/frontend/src/locales/nl-NL.po
Updated source reference line numbers and added msgid "Ukrainian" translations in each catalog.
UI language selectors & schemas
echo/frontend/src/components/language/LanguagePicker.tsx, echo/frontend/src/components/project/ProjectPortalEditor.tsx
Added Ukrainian option/label, ISO639_1 mapping, and extended Zod/Form language enum to include uk.
Date formatting
echo/frontend/src/components/announcement/utils/dateUtils.ts
Imported date-fns uk locale and mapped "uk‑UA" for date formatting.
Onboarding & participant flows
echo/frontend/src/components/participant/ParticipantOnboardingCards.tsx, echo/frontend/src/components/participant/hooks/useOnboardingCards.ts
Added comprehensive Ukrainian onboarding cards/slides across tutorial/privacy/client modes; integrated getSystemCards("uk‑UA", ...) and language-specific slide content.
Verification / artefacts UI
echo/frontend/src/components/conversation/VerifiedArtefactsSection.tsx, echo/frontend/src/components/participant/verify/VerifiedArtefactsList.tsx, echo/frontend/src/components/participant/verify/VerifySelection.tsx
Extended LANGUAGE_TO_LOCALE mappings and LanguageCode union to include uk/uk‑UA for translation lookups and selection options.
Project/topic UI
echo/frontend/src/components/project/CustomTopicModal.tsx, echo/frontend/src/components/project/ProjectQRCode.tsx
Included uk‑UA in supported translation lists and project URL language mappings; enabled quick‑start visibility for Ukrainian.
Backend language registry & seed data
echo/server/dembrane/service/project.py, echo/server/dembrane/seed.py, echo/server/dembrane/prompts.py
Added "uk" to allowed languages, included uk‑UA in default Directus languages and topic translation seeds, and expanded prompt-support language columns to include uk.
Server prompt templates (Ukrainian)
echo/server/prompt_templates/context_conversations.uk.jinja, echo/server/prompt_templates/default_whisper_prompt.uk.jinja, echo/server/prompt_templates/generate_conversation_summary.uk.jinja, echo/server/prompt_templates/get_reply_brainstorm.uk.jinja, echo/server/prompt_templates/get_reply_summarize.uk.jinja, echo/server/prompt_templates/get_reply_system.uk.jinja, echo/server/prompt_templates/summary.uk.jinja, echo/server/prompt_templates/system_chat.uk.jinja, echo/server/prompt_templates/system_report.uk.jinja, echo/server/prompt_templates/translate_transcription.uk.jinja
Added 10 new Ukrainian Jinja2 templates for summarization, system prompts, translation, whisper/default prompts, and other AI reply modes.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title clearly identifies the main objective: adding Ukrainian language support. While there's a minor typo ('Ukranian' should be 'Ukrainian'), the title accurately reflects the core changeset across frontend configs, components, locale files, backend language mappings, and prompt templates.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch testing

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ussaama ussaama requested a review from spashii April 7, 2026 17:35
@coderabbitai coderabbitai bot added the Feature label Apr 7, 2026
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
echo/frontend/src/components/conversation/VerifiedArtefactsSection.tsx (1)

36-44: 🧹 Nitpick | 🔵 Trivial

Refactor opportunity — centralize locale mapping into one shared constant.

LGTM on uk, but this map is duplicated across multiple components; extract it to a shared i18n util to prevent locale drift.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@echo/frontend/src/components/conversation/VerifiedArtefactsSection.tsx`
around lines 36 - 44, The LANGUAGE_TO_LOCALE map in VerifiedArtefactsSection.tsx
is duplicated across components; extract the constant into a shared i18n utility
and import it everywhere to avoid drift. Create a single exported constant
(e.g., LANGUAGE_TO_LOCALE) in a new or existing i18n module, move the mapping
(including the "uk": "uk-UA" entry) there, update VerifiedArtefactsSection to
import that constant instead of declaring it inline, and update other components
that used their own copies to import the shared constant as well.
echo/frontend/src/components/project/CustomTopicModal.tsx (1)

26-34: 🧹 Nitpick | 🔵 Trivial

LGTM on the addition, but this duplicates config.ts.

The uk-UA entry is correct. However, this local SUPPORTED_LANGUAGES duplicates the canonical list in config.ts. If someone adds a language to one but not the other, things drift. Consider deriving this from the centralized config.

♻️ Optional: derive from centralized config
import { SUPPORTED_LANGUAGES as LOCALES } from "@/config";

const SUPPORTED_LANGUAGES = LOCALES.map((code) => ({
  code,
  label: {
    "en-US": "English",
    "nl-NL": "Nederlands",
    "de-DE": "Deutsch",
    "fr-FR": "Français",
    "es-ES": "Español",
    "it-IT": "Italiano",
    "uk-UA": "Ukrainian",
  }[code] ?? code,
}));
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@echo/frontend/src/components/project/CustomTopicModal.tsx` around lines 26 -
34, The SUPPORTED_LANGUAGES array in CustomTopicModal.tsx duplicates the
canonical list in config.ts; remove the local constant and import/derive it from
the centralized config (import SUPPORTED_LANGUAGES or SUPPORTED_LOCALES from
"@/config"), then map those codes to the existing labels in CustomTopicModal
(use the same label mapping currently used) so the component uses the single
source of truth; update references to the local SUPPORTED_LANGUAGES symbol to
the imported/derived value.
echo/frontend/src/components/project/ProjectPortalEditor.tsx (1)

241-246: ⚠️ Potential issue | 🟡 Minor

Type cast is stale — missing "uk" and "it".

The cast explicitly lists "en" | "nl" | "de" | "fr" | "es" but omits "it" and the new "uk". If a project has language: "uk", TypeScript won't catch it but the runtime will be fine. Still, keeping types tight prevents future footguns.

🔧 Proposed fix
 	const projectLanguageCode = (project.language ?? "en") as
 		| "en"
 		| "nl"
 		| "de"
 		| "fr"
-		| "es";
+		| "es"
+		| "it"
+		| "uk";
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@echo/frontend/src/components/project/ProjectPortalEditor.tsx` around lines
241 - 246, The explicit union cast for projectLanguageCode is missing the new
"uk" and "it" options, so update the cast on projectLanguageCode (and any
related handling of project.language) to include "uk" and "it" alongside
"en"|"nl"|"de"|"fr"|"es" (e.g., "en" | "nl" | "de" | "fr" | "es" | "it" | "uk")
so TypeScript correctly reflects allowed language values and prevents type
mismatches at compile time.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@echo/frontend/src/components/language/LanguagePicker.tsx`:
- Around line 54-59: The Ukrainian entry in the language list uses the English
label "Ukrainian"; update the label property of that object (the entry with flag
"🇺🇦", iso639_1 "uk", language "uk-UA") to the native name "Українська" so it
matches the other native-language labels used by LanguagePicker.tsx.

In `@echo/frontend/src/locales/es-ES.po`:
- Around line 6403-6406: The Spanish translation in the msgstr for the string
referenced by ProjectPortalEditor
(src/components/project/ProjectPortalEditor.tsx) contains a gender/article
mistake: change "el descarga de audio" to the correct "la descarga de audio" in
the msgstr so it reads "...la reproducción de audio, la descarga de audio y la
retranscripción...".
- Around line 6411-6414: Update the Spanish translation for the msgid "When
finishing the conversation, participants who haven't verified yet will be
prompted to verify or skip" (referenced in ProjectPortalEditor.tsx:1269) to use
more natural UX phrasing; replace the current msgstr with a clearer sentence
such as "Cuando finalices la conversación, se les pedirá a los participantes que
no hayan verificado que verifiquen o que omitan" to improve readability and
consistency.

In `@echo/server/prompt_templates/system_report.uk.jinja`:
- Around line 16-23: The Ukrainian system report template contains an English
sentence inside the user_instructions block ("The report creator has provided
the following guidance..."); update that string in system_report.uk.jinja to its
proper Ukrainian translation so the entire prompt is written in Ukrainian,
preserving the surrounding Jinja block and the variable interpolation
(user_instructions and the replace filters) and keeping the tag markers
<user_instructions>...</user_instructions> intact.

---

Outside diff comments:
In `@echo/frontend/src/components/conversation/VerifiedArtefactsSection.tsx`:
- Around line 36-44: The LANGUAGE_TO_LOCALE map in VerifiedArtefactsSection.tsx
is duplicated across components; extract the constant into a shared i18n utility
and import it everywhere to avoid drift. Create a single exported constant
(e.g., LANGUAGE_TO_LOCALE) in a new or existing i18n module, move the mapping
(including the "uk": "uk-UA" entry) there, update VerifiedArtefactsSection to
import that constant instead of declaring it inline, and update other components
that used their own copies to import the shared constant as well.

In `@echo/frontend/src/components/project/CustomTopicModal.tsx`:
- Around line 26-34: The SUPPORTED_LANGUAGES array in CustomTopicModal.tsx
duplicates the canonical list in config.ts; remove the local constant and
import/derive it from the centralized config (import SUPPORTED_LANGUAGES or
SUPPORTED_LOCALES from "@/config"), then map those codes to the existing labels
in CustomTopicModal (use the same label mapping currently used) so the component
uses the single source of truth; update references to the local
SUPPORTED_LANGUAGES symbol to the imported/derived value.

In `@echo/frontend/src/components/project/ProjectPortalEditor.tsx`:
- Around line 241-246: The explicit union cast for projectLanguageCode is
missing the new "uk" and "it" options, so update the cast on projectLanguageCode
(and any related handling of project.language) to include "uk" and "it"
alongside "en"|"nl"|"de"|"fr"|"es" (e.g., "en" | "nl" | "de" | "fr" | "es" |
"it" | "uk") so TypeScript correctly reflects allowed language values and
prevents type mismatches at compile time.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 74b040f3-ecb7-42f4-934a-be16d90cbb26

📥 Commits

Reviewing files that changed from the base of the PR and between 102ad56 and 0605e00.

📒 Files selected for processing (40)
  • echo/frontend/lingui.config.ts
  • echo/frontend/src/components/announcement/utils/dateUtils.ts
  • echo/frontend/src/components/conversation/VerifiedArtefactsSection.tsx
  • echo/frontend/src/components/language/LanguagePicker.tsx
  • echo/frontend/src/components/participant/ParticipantOnboardingCards.tsx
  • echo/frontend/src/components/participant/hooks/useOnboardingCards.ts
  • echo/frontend/src/components/participant/verify/VerifiedArtefactsList.tsx
  • echo/frontend/src/components/participant/verify/VerifySelection.tsx
  • echo/frontend/src/components/project/CustomTopicModal.tsx
  • echo/frontend/src/components/project/ProjectPortalEditor.tsx
  • echo/frontend/src/components/project/ProjectQRCode.tsx
  • echo/frontend/src/config.ts
  • echo/frontend/src/hooks/useLanguage.ts
  • echo/frontend/src/locales/de-DE.po
  • echo/frontend/src/locales/de-DE.ts
  • echo/frontend/src/locales/en-US.po
  • echo/frontend/src/locales/en-US.ts
  • echo/frontend/src/locales/es-ES.po
  • echo/frontend/src/locales/es-ES.ts
  • echo/frontend/src/locales/fr-FR.po
  • echo/frontend/src/locales/fr-FR.ts
  • echo/frontend/src/locales/it-IT.po
  • echo/frontend/src/locales/it-IT.ts
  • echo/frontend/src/locales/nl-NL.po
  • echo/frontend/src/locales/nl-NL.ts
  • echo/frontend/src/locales/uk-UA.po
  • echo/frontend/src/locales/uk-UA.ts
  • echo/server/dembrane/prompts.py
  • echo/server/dembrane/seed.py
  • echo/server/dembrane/service/project.py
  • echo/server/prompt_templates/context_conversations.uk.jinja
  • echo/server/prompt_templates/default_whisper_prompt.uk.jinja
  • echo/server/prompt_templates/generate_conversation_summary.uk.jinja
  • echo/server/prompt_templates/get_reply_brainstorm.uk.jinja
  • echo/server/prompt_templates/get_reply_summarize.uk.jinja
  • echo/server/prompt_templates/get_reply_system.uk.jinja
  • echo/server/prompt_templates/summary.uk.jinja
  • echo/server/prompt_templates/system_chat.uk.jinja
  • echo/server/prompt_templates/system_report.uk.jinja
  • echo/server/prompt_templates/translate_transcription.uk.jinja

Comment on lines +6403 to 6406
#: src/components/project/ProjectPortalEditor.tsx:1480
msgid "When enabled, all new transcripts will have personal information (names, emails, phone numbers, addresses) replaced with placeholders. Anonymized conversations also disable audio playback, audio download, and retranscription to protect participant privacy. This cannot be undone for already-processed conversations."
msgstr "Cuando esté activado, todas las nuevas transcripciones tendrán información personal (nombres, emails, números de teléfono, direcciones) reemplazadas por marcadores de posición. Las conversaciones anónimas también desactivan la reproducción de audio, el descarga de audio y la retranscripción para proteger la privacidad de los participantes. Esto no se puede deshacer para conversaciones ya procesadas."

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Minor grammar issue in Spanish translation.

Line 6405 uses "el descarga de audio"; it should be "la descarga de audio".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@echo/frontend/src/locales/es-ES.po` around lines 6403 - 6406, The Spanish
translation in the msgstr for the string referenced by ProjectPortalEditor
(src/components/project/ProjectPortalEditor.tsx) contains a gender/article
mistake: change "el descarga de audio" to the correct "la descarga de audio" in
the msgstr so it reads "...la reproducción de audio, la descarga de audio y la
retranscripción...".

Comment on lines +6411 to 6414
#: src/components/project/ProjectPortalEditor.tsx:1269
msgid "When finishing the conversation, participants who haven't verified yet will be prompted to verify or skip"
msgstr "Cuando finalices la conversación, los participantes que no han verificado aún serán solicitados para verificar o saltar"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Spanish copy is understandable but unnatural; improve phrasing for clarity.

Line 6413 ("serán solicitados para verificar o saltar") reads awkwardly. Consider standard Spanish UX phrasing like “se les pedirá verificar u omitir”.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@echo/frontend/src/locales/es-ES.po` around lines 6411 - 6414, Update the
Spanish translation for the msgid "When finishing the conversation, participants
who haven't verified yet will be prompted to verify or skip" (referenced in
ProjectPortalEditor.tsx:1269) to use more natural UX phrasing; replace the
current msgstr with a clearer sentence such as "Cuando finalices la
conversación, se les pedirá a los participantes que no hayan verificado que
verifiquen o que omitan" to improve readability and consistency.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@echo/server/prompt_templates/system_report.uk.jinja`:
- Around line 7-10: The template injects raw conversation.name,
conversation.tags and conversation.transcript (and similar user_instructions
fields) into XML-like blocks, allowing injected "<...>" to break boundaries; fix
by escaping or wrapping interpolated fields: apply Jinja escaping (e.g., use {{
conversation.name|e }}, {{ conversation.tags|e }}) for attribute-like fields and
put long free-text fields like {{ conversation.transcript }} and
user_instructions inside a safe container such as a CDATA block (<![CDATA[{{
conversation.transcript }}]]>) or use {{ conversation.transcript|e }} to ensure
any angle brackets/entities are encoded and cannot break the XML-like sections.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 008ef4df-ecc6-4dba-8bdd-89eefc69ae48

📥 Commits

Reviewing files that changed from the base of the PR and between 0605e00 and 19a7649.

📒 Files selected for processing (1)
  • echo/server/prompt_templates/system_report.uk.jinja

@spashii spashii merged commit 2d8ec68 into main Apr 7, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants