Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

feat: add Romanian language support

Claudiu Constantin Bogdan74825caaab8e
diff --git a/apps/web/__tests__/unit/transcribe-language.test.ts b/apps/web/__tests__/unit/transcribe-language.test.ts
index 4e8a9d646..cc07bbb43 100644
--- a/apps/web/__tests__/unit/transcribe-language.test.ts
+++ b/apps/web/__tests__/unit/transcribe-language.test.ts
@@ -66,6 +66,12 @@ import {
import { getDeepgramTranscriptionOptions } from "@/workflows/transcribe";
describe("AI generation language support", () => {
+ it("exposes Romanian for AI generation", () => {
+ expect(AI_GENERATION_LANGUAGES.ro).toBe("Romanian");
+ expect(isAiGenerationLanguage("ro")).toBe(true);
+ expect(parseAiGenerationLanguage("ro")).toBe("ro");
+ });
+
it("does not expose unsupported transcription languages", () => {
expect(AI_GENERATION_LANGUAGES).not.toHaveProperty("pa");
expect(isAiGenerationLanguage("pa")).toBe(false);
@@ -75,11 +81,15 @@ describe("AI generation language support", () => {
it("constrains Deepgram auto-detection to detectable languages", () => {
expect(getDeepgramTranscriptionOptions("auto")).toMatchObject({
model: "nova-3",
- detect_language: expect.arrayContaining(["en", "es", "zh"]),
+ detect_language: expect.arrayContaining(["en", "es", "ro", "zh"]),
});
});
it("passes explicit languages to Deepgram", () => {
+ expect(getDeepgramTranscriptionOptions("ro")).toMatchObject({
+ model: "nova-3",
+ language: "ro",
+ });
expect(getDeepgramTranscriptionOptions("zh")).toMatchObject({
model: "nova-3",
language: "zh",
diff --git a/apps/web/workflows/transcribe.ts b/apps/web/workflows/transcribe.ts
index 1f985ce47..61d127033 100644
--- a/apps/web/workflows/transcribe.ts
+++ b/apps/web/workflows/transcribe.ts
@@ -364,6 +364,7 @@ const DEEPGRAM_DETECTABLE_LANGUAGES = [
"it",
"nl",
"pl",
+ "ro",
"sk",
"ru",
"tr",
diff --git a/packages/web-domain/src/Language.ts b/packages/web-domain/src/Language.ts
index 5c366239c..58218fed2 100644
--- a/packages/web-domain/src/Language.ts
+++ b/packages/web-domain/src/Language.ts
@@ -7,6 +7,7 @@ export const SUPPORTED_LANGUAGES = {
it: "Italian",
nl: "Dutch",
pl: "Polish",
+ ro: "Romanian",
sk: "Slovak",
ru: "Russian",
tr: "Turkish",
@@ -39,6 +40,7 @@ export const AI_GENERATION_LANGUAGE_CODES = [
"it",
"nl",
"pl",
+ "ro",
"sk",
"ru",
"tr",
@@ -74,6 +76,7 @@ export const AI_GENERATION_LANGUAGES = {
it: SUPPORTED_LANGUAGES.it,
nl: SUPPORTED_LANGUAGES.nl,
pl: SUPPORTED_LANGUAGES.pl,
+ ro: SUPPORTED_LANGUAGES.ro,
sk: SUPPORTED_LANGUAGES.sk,
ru: SUPPORTED_LANGUAGES.ru,
tr: SUPPORTED_LANGUAGES.tr,