From 23972a7aed0784927a4e4b64d2c0ac8c77c60cbb Mon Sep 17 00:00:00 2001 From: raslaan-dev Date: Thu, 8 Jan 2026 14:40:40 +0500 Subject: [PATCH 1/8] feat: add Dhivehi (Thaana) language support with RTL and Faruma font --- SETUP_GUIDE.md | 113 ++++++++++++++++++++ backend/.npmrc | 1 + frontend/.npmrc | 1 + frontend/src/styles/test.scss | 14 +++ frontend/src/ts/constants/languages.ts | 1 + frontend/src/ts/input/helpers/validation.ts | 22 ++-- frontend/src/ts/test/test-ui.ts | 19 +++- frontend/src/ts/test/words-generator.ts | 12 ++- frontend/src/ts/utils/strings.ts | 84 +++++++++++++-- frontend/static/languages/dhivehi.json | 107 ++++++++++++++++++ frontend/static/layouts/dhivehi.json | 62 +++++++++++ frontend/vite.config.ts | 1 + packages/schemas/src/languages.ts | 1 + packages/schemas/src/layouts.ts | 1 + 14 files changed, 418 insertions(+), 21 deletions(-) create mode 100644 SETUP_GUIDE.md create mode 100644 backend/.npmrc create mode 100644 frontend/.npmrc create mode 100644 frontend/static/languages/dhivehi.json create mode 100644 frontend/static/layouts/dhivehi.json diff --git a/SETUP_GUIDE.md b/SETUP_GUIDE.md new file mode 100644 index 000000000000..34df67f63da4 --- /dev/null +++ b/SETUP_GUIDE.md @@ -0,0 +1,113 @@ +# Monkeytype Local Setup Guide + +## Prerequisites + +- **Node.js 24.11.0** (or 22.21.0) - Install from https://nodejs.org/ or use nvm +- **PNPM 9.6.0** - Run: `npm install -g pnpm@9.6.0` +- **Docker Desktop** - Install from https://www.docker.com/get-started/ +- **Git** - Install from https://git-scm.com/ + +## Setup Steps + +### Step 1: Clone the Repository + +```bash +git clone https://github.com/monkeytypegame/monkeytype.git +cd monkeytype +``` + +### Step 2: Install Dependencies + +```bash +pnpm install +``` + +_Note: If you get Node version errors, create `.npmrc` files with `engine-strict=false` in root, backend, and frontend directories._ + +### Step 3: Configure Backend + +```bash +# Copy environment file +copy backend\example.env backend\.env + +# The .env file already has MODE=dev set, which is what you need +``` + +### Step 4: Create Firebase Config (Optional) + +Create `frontend/src/ts/constants/firebase-config.ts`: + +```typescript +export const firebaseConfig = { + apiKey: "", + authDomain: "", + projectId: "", + storageBucket: "", + messagingSenderId: "", + appId: "", +}; +``` + +_Leave empty for development without authentication features._ + +### Step 5: Start Databases + +```bash +cd backend +npm run docker-db-only +``` + +_This starts MongoDB (port 27017) and Redis (port 6379) in Docker containers._ + +### Step 6: Start Backend Server + +Open a new terminal: + +```bash +cd backend +npm run dev +``` + +_Backend will run on http://localhost:5005_ + +### Step 7: Start Frontend + +Open another new terminal: + +```bash +npm run dev-fe +``` + +_Frontend will run on http://localhost:3000_ + +### Step 8: Open Application + +Visit **http://localhost:3000** in your browser! + +## Quick Start Commands + +After initial setup, you only need: + +1. `cd backend && npm run docker-db-only` (start databases) +2. `cd backend && npm run dev` (start backend) +3. `npm run dev-fe` (start frontend) + +## Troubleshooting + +**Node version error?** + +- Use `nvm use 24.11.0` or create `.npmrc` files with `engine-strict=false` + +**Backend won't connect to database?** + +- Ensure Docker Desktop is running +- Check databases are running: `docker ps` + +**Firebase error on frontend?** + +- This is normal if you haven't set up Firebase +- You can still use all typing features without authentication + +**Port already in use?** + +- Stop other processes using ports 3000, 5005, 27017, or 6379 diff --git a/backend/.npmrc b/backend/.npmrc new file mode 100644 index 000000000000..c0c80ba447bd --- /dev/null +++ b/backend/.npmrc @@ -0,0 +1 @@ +engine-strict=false diff --git a/frontend/.npmrc b/frontend/.npmrc new file mode 100644 index 000000000000..c0c80ba447bd --- /dev/null +++ b/frontend/.npmrc @@ -0,0 +1 @@ +engine-strict=false diff --git a/frontend/src/styles/test.scss b/frontend/src/styles/test.scss index 82bfdb89c81a..bef641b3defa 100644 --- a/frontend/src/styles/test.scss +++ b/frontend/src/styles/test.scss @@ -1,3 +1,5 @@ +@import url("https://fonts.googleapis.com/css2?family=Faruma&display=swap"); + .highlightContainer { position: absolute; overflow: hidden; @@ -320,6 +322,18 @@ //flex-direction: row-reverse; // no need for hacking 😉, CSS fully support right-to-left languages direction: rtl; } + + &.thaanaTest { + font-family: "Faruma", "MV Faseyha", sans-serif; + + .word letter { + display: inline-block; + unicode-bidi: isolate; + vertical-align: baseline; + line-height: 1; + } + } + &.withLigatures { .word { overflow-wrap: anywhere; diff --git a/frontend/src/ts/constants/languages.ts b/frontend/src/ts/constants/languages.ts index fd963dfed479..254977e15bb7 100644 --- a/frontend/src/ts/constants/languages.ts +++ b/frontend/src/ts/constants/languages.ts @@ -368,6 +368,7 @@ export const LanguageGroups: Record = { "code_cuda", ], viossa: ["viossa", "viossa_njutro"], + dhivehi: ["dhivehi"], }; export type LanguageGroupName = keyof typeof LanguageGroups; diff --git a/frontend/src/ts/input/helpers/validation.ts b/frontend/src/ts/input/helpers/validation.ts index 408b5416eba7..0a7514f73be5 100644 --- a/frontend/src/ts/input/helpers/validation.ts +++ b/frontend/src/ts/input/helpers/validation.ts @@ -1,5 +1,9 @@ import Config from "../../config"; -import { isSpace } from "../../utils/strings"; +import { + isSpace, + splitIntoCharacters, + isCharacterMatch, +} from "../../utils/strings"; /** * Check if the input data is correct @@ -29,17 +33,21 @@ export function isCharCorrect(options: { return inputValue === targetWord; } - const targetChar = targetWord[inputValue.length]; + // Use splitIntoCharacters to properly handle combining characters (like Thaana fili) + const inputChars = splitIntoCharacters(inputValue + data); + const targetChars = splitIntoCharacters(targetWord); + + // Get the character we just typed (last in inputChars after combining) + const typedCharIndex = inputChars.length - 1; + const typedChar = inputChars[typedCharIndex]; + const targetChar = targetChars[typedCharIndex]; if (targetChar === undefined) { return false; } - if (data === targetChar) { - return true; - } - - return false; + // Use isCharacterMatch to handle partial matches (e.g., Thaana consonant before vowel mark) + return isCharacterMatch(typedChar ?? "", targetChar); } /** diff --git a/frontend/src/ts/test/test-ui.ts b/frontend/src/ts/test/test-ui.ts index 86dba54a5d7f..bc8ec38772ce 100644 --- a/frontend/src/ts/test/test-ui.ts +++ b/frontend/src/ts/test/test-ui.ts @@ -445,6 +445,17 @@ function updateWordWrapperClasses(): void { $("#resultReplay .words").removeClass("rightToLeftTest"); } + // Add special handling for Thaana (Dhivehi) script + if (Config.language.startsWith("dhivehi")) { + wordsEl.classList.add("thaanaTest"); + $("#resultWordsHistory .words").addClass("thaanaTest"); + $("#resultReplay .words").addClass("thaanaTest"); + } else { + wordsEl.classList.remove("thaanaTest"); + $("#resultWordsHistory .words").removeClass("thaanaTest"); + $("#resultReplay .words").removeClass("thaanaTest"); + } + const existing = wordsEl?.className .split(/\s+/) @@ -747,8 +758,14 @@ export async function updateWordLetters({ const inputChars = Strings.splitIntoCharacters(input); const currentWordChars = Strings.splitIntoCharacters(currentWord); + for (let i = 0; i < inputChars.length; i++) { - const charCorrect = currentWordChars[i] === inputChars[i]; + const inputChar = inputChars[i] ?? ""; + const targetChar = currentWordChars[i] ?? ""; + + const charCorrect = + inputChar === targetChar || + Strings.isCharacterMatchForDisplay(inputChar, targetChar); let currentLetter = currentWordChars[i] as string; let tabChar = ""; diff --git a/frontend/src/ts/test/words-generator.ts b/frontend/src/ts/test/words-generator.ts index a8de5f054090..d5a07a9d6a87 100644 --- a/frontend/src/ts/test/words-generator.ts +++ b/frontend/src/ts/test/words-generator.ts @@ -112,7 +112,8 @@ export async function punctuateWord( currentLanguage === "arabic" || currentLanguage === "persian" || currentLanguage === "urdu" || - currentLanguage === "kurdish" + currentLanguage === "kurdish" || + currentLanguage === "dhivehi" ) { word += "؟"; } else if (currentLanguage === "greek") { @@ -216,7 +217,11 @@ export async function punctuateWord( // However, a) it has fallen into disuse in contemporary times and // b) there isn't a dedicated key on a keyboard to input it word = "."; - } else if (currentLanguage === "arabic" || currentLanguage === "kurdish") { + } else if ( + currentLanguage === "arabic" || + currentLanguage === "kurdish" || + currentLanguage === "dhivehi" + ) { word += "؛"; } else if (currentLanguage === "chinese") { word += ";"; @@ -228,7 +233,8 @@ export async function punctuateWord( currentLanguage === "arabic" || currentLanguage === "urdu" || currentLanguage === "persian" || - currentLanguage === "kurdish" + currentLanguage === "kurdish" || + currentLanguage === "dhivehi" ) { word += "،"; } else if (currentLanguage === "japanese") { diff --git a/frontend/src/ts/utils/strings.ts b/frontend/src/ts/utils/strings.ts index 993f49682be5..8fc980cd50f8 100644 --- a/frontend/src/ts/utils/strings.ts +++ b/frontend/src/ts/utils/strings.ts @@ -176,18 +176,82 @@ export function cleanTypographySymbols(textToClean: string): string { } /** - * Split a string into characters. This supports multi-byte characters outside of the [Basic Multilinugal Plane](https://en.wikipedia.org/wiki/Plane_(Unicode). - * Using `string.length` and `string[index]` does not work. - * @param s string to be tokenized into characters - * @returns array of characters + * Check if a character is a Thaana combining vowel mark (fili) - U+07A6 to U+07B0 + */ +export function isThaanaCombiningMark(char: string): boolean { + const code = char.charCodeAt(0); + return code >= 0x07a6 && code <= 0x07b0; +} + +/** + * Check if a character is a Thaana consonant - U+0780 to U+07A5 + */ +export function isThaanaConsonant(char: string): boolean { + const code = char.charCodeAt(0); + return code >= 0x0780 && code <= 0x07a5; +} + +/** + * Split a string into individual Unicode code points. */ export function splitIntoCharacters(s: string): string[] { - const result: string[] = []; - for (const t of s) { - result.push(t); + // eslint-disable-next-line @typescript-eslint/no-misused-spread -- Intentional for Thaana character separation + return [...s]; +} + +const punctuationEquivalents: Record = { + "،": ",", + "؛": ";", + "؟": "?", +}; + +function arePunctuationEquivalent(char1: string, char2: string): boolean { + if (char1 === char2) return true; + if (punctuationEquivalents[char1] === char2) return true; + if (punctuationEquivalents[char2] === char1) return true; + return false; +} + +/** + * Check if input matches target, including partial Thaana matches and punctuation equivalents. + */ +export function isCharacterMatch( + inputChar: string, + targetChar: string, +): boolean { + if (inputChar === targetChar) return true; + + if (inputChar.length === 1 && targetChar.length === 1) { + if (arePunctuationEquivalent(inputChar, targetChar)) return true; + } + + if ( + inputChar.length === 1 && + targetChar.length === 2 && + isThaanaConsonant(inputChar) && + targetChar.startsWith(inputChar) && + isThaanaCombiningMark(targetChar.charAt(1)) + ) { + return true; + } + + return false; +} + +/** + * Check if input matches target for display (no partial Thaana matches). + */ +export function isCharacterMatchForDisplay( + inputChar: string, + targetChar: string, +): boolean { + if (inputChar === targetChar) return true; + + if (inputChar.length === 1 && targetChar.length === 1) { + if (arePunctuationEquivalent(inputChar, targetChar)) return true; } - return result; + return false; } /** @@ -219,9 +283,9 @@ function hasRTLCharacters(word: string): boolean { return false; } - // This covers Arabic, Farsi, Urdu, and other RTL scripts + // This covers Arabic, Farsi, Urdu, Hebrew, Thaana (Dhivehi), and other RTL scripts const rtlPattern = - /[\u0590-\u05FF\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]/; + /[\u0590-\u05FF\u0600-\u06FF\u0750-\u077F\u0780-\u07BF\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]/; return rtlPattern.test(word); } diff --git a/frontend/static/languages/dhivehi.json b/frontend/static/languages/dhivehi.json new file mode 100644 index 000000000000..54b82179f3d8 --- /dev/null +++ b/frontend/static/languages/dhivehi.json @@ -0,0 +1,107 @@ +{ + "name": "dhivehi", + "rightToLeft": true, + "ligatures": true, + "bcp47": "dv-MV", + "words": [ + "އެ", + "މި", + "ގެ", + "ވާ", + "ކަން", + "ދެން", + "ހެން", + "ކުރި", + "ހުރި", + "ތިބި", + "ނެތް", + "ވެސް", + "އިން", + "އަށް", + "ނޫން", + "އެއް", + "މީހުން", + "ބޭނުން", + "ދިވެހި", + "މާލެ", + "ރާއްޖެ", + "ގޮތް", + "ކަމެއް", + "އެހެން", + "ކޮށް", + "ފައިސާ", + "މަސް", + "އަހަރު", + "ދުވަސް", + "ވަގުތު", + "ގަޑި", + "ފެން", + "ކާނާ", + "ބަތް", + "ރިހަ", + "ރޮށި", + "ސައި", + "ކިރު", + "ރަށް", + "މޫދު", + "ކަނޑު", + "އިރު", + "ހަނދު", + "ތަރި", + "އުޑު", + "ބިން", + "ރުއް", + "ގަސް", + "މާ", + "ފަތް", + "މޭވާ", + "ކާށި", + "އަނބު", + "ކެޔޮ", + "ލޮނު", + "ހަކުރު", + "ތެޔޮ", + "ރަހަ", + "ފޮނި", + "ހުތް", + "ކުޅި", + "ހިތި", + "ކުލަ", + "ރަތް", + "ނޫ", + "ފެހި", + "ކަޅު", + "ހުދު", + "މުށި", + "ދޭއް", + "ބޮޑު", + "ކުޑަ", + "ދިގު", + "ކުރު", + "ފުޅާ", + "ހަނި", + "ބަރު", + "ލުއި", + "ފޯނު", + "ޓީވީ", + "ލަވަ", + "ވޮލީ", + "ވައި", + "ވާރޭ", + "އަވި", + "ހޫނު", + "ފިނި", + "ކެރި", + "ގަދަ", + "މަޑު", + "ނިދި", + "ބަލި", + "ބޭސް", + "މަގު", + "ބުރު", + "ކާރު", + "ބަސް", + "ދީން", + "ހާސް" + ] +} diff --git a/frontend/static/layouts/dhivehi.json b/frontend/static/layouts/dhivehi.json new file mode 100644 index 000000000000..a3322847c0ae --- /dev/null +++ b/frontend/static/layouts/dhivehi.json @@ -0,0 +1,62 @@ +{ + "keymapShowTopRow": false, + "type": "ansi", + "keys": { + "row1": [ + ["`", "~"], + ["1", "!"], + ["2", "@"], + ["3", "#"], + ["4", "$"], + ["5", "%"], + ["6", "^"], + ["7", "&"], + ["8", "*"], + ["9", ")"], + ["0", "("], + ["-", "_"], + ["=", "+"] + ], + "row2": [ + ["ޮ", "ޯ"], + ["އ", "ޢ"], + ["ެ", "ޭ"], + ["ރ", "ޜ"], + ["ތ", "ޓ"], + ["ޔ", "ޠ"], + ["ު", "ޫ"], + ["ި", "ީ"], + ["ޮ", "ޯ"], + ["ޕ", "÷"], + ["[", "{"], + ["]", "}"], + ["\\", "|"] + ], + "row3": [ + ["ަ", "ާ"], + ["ސ", "ށ"], + ["ދ", "ޑ"], + ["ފ", "ﷲ"], + ["ގ", "ޣ"], + ["ހ", "ޙ"], + ["ޖ", "ޛ"], + ["ކ", "ޚ"], + ["ލ", "ޅ"], + ["؛", ":"], + ["'", "\""] + ], + "row4": [ + ["ޒ", "ޡ"], + ["×", "ޘ"], + ["ޗ", "ޝ"], + ["ވ", "ޥ"], + ["ބ", "ޞ"], + ["ނ", "ޏ"], + ["މ", "ޟ"], + ["،", "ޤ"], + [".", ">"], + ["/", "؟"] + ], + "row5": [[" "]] + } +} diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index 0b81b5466492..47a5cb17010a 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -51,6 +51,7 @@ export default defineConfig(({ mode }): UserConfig => { open: env["SERVER_OPEN"] !== "false", port: 3000, host: env["BACKEND_URL"] !== undefined, + allowedHosts: true, watch: { //we rebuild the whole contracts package when a file changes //so we only want to watch one file diff --git a/packages/schemas/src/languages.ts b/packages/schemas/src/languages.ts index 7e26911a3c91..d076f17dcf8d 100644 --- a/packages/schemas/src/languages.ts +++ b/packages/schemas/src/languages.ts @@ -430,6 +430,7 @@ export const LanguageSchema = z.enum( "code_abap_1k", "code_yoptascript", "code_cuda", + "dhivehi", ], { errorMap: customEnumErrorHandler("Must be a supported language"), diff --git a/packages/schemas/src/layouts.ts b/packages/schemas/src/layouts.ts index f55d5f6abc1e..ee3587409d5c 100644 --- a/packages/schemas/src/layouts.ts +++ b/packages/schemas/src/layouts.ts @@ -96,6 +96,7 @@ export const LayoutNameSchema = z.enum( "arabic_101", "arabic_102", "arabic_mac", + "dhivehi", "hebrew", "urdu_phonetic", "brasileiro_nativo", From efecffba61a85d9fe9f27e9087b7a3a5dc6ad231 Mon Sep 17 00:00:00 2001 From: raslaan-dev Date: Thu, 15 Jan 2026 12:52:15 +0500 Subject: [PATCH 2/8] Update frontend/static/languages/dhivehi.json Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- frontend/static/languages/dhivehi.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/static/languages/dhivehi.json b/frontend/static/languages/dhivehi.json index 54b82179f3d8..f67bdc4e8b51 100644 --- a/frontend/static/languages/dhivehi.json +++ b/frontend/static/languages/dhivehi.json @@ -1,7 +1,7 @@ { "name": "dhivehi", "rightToLeft": true, - "ligatures": true, + "ligatures": false, "bcp47": "dv-MV", "words": [ "އެ", From a86d9a03d06ecf0864c87ab1280f5c48cce2aaab Mon Sep 17 00:00:00 2001 From: raslaan-dev Date: Thu, 15 Jan 2026 12:53:05 +0500 Subject: [PATCH 3/8] Update frontend/vite.config.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- frontend/vite.config.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index f0b3c0117dd0..53a19e315ebd 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -52,7 +52,8 @@ export default defineConfig(({ mode }): UserConfig => { open: env["SERVER_OPEN"] !== "false", port: 3000, host: env["BACKEND_URL"] !== undefined, - allowedHosts: true, + // Disable host header validation only when explicitly requested for special dev setups + allowedHosts: env["DISABLE_HOST_VALIDATION"] === "true" ? true : undefined, watch: { //we rebuild the whole contracts package when a file changes //so we only want to watch one file From b74fe0ca762572d6de64ef89b65a989d81c7b335 Mon Sep 17 00:00:00 2001 From: raslaan-dev Date: Thu, 15 Jan 2026 12:53:39 +0500 Subject: [PATCH 4/8] Update backend/.npmrc Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- backend/.npmrc | 1 - 1 file changed, 1 deletion(-) diff --git a/backend/.npmrc b/backend/.npmrc index c0c80ba447bd..e69de29bb2d1 100644 --- a/backend/.npmrc +++ b/backend/.npmrc @@ -1 +0,0 @@ -engine-strict=false From 1a78685e09412c5a34ea38ba53da9fe24d242675 Mon Sep 17 00:00:00 2001 From: raslaan-dev Date: Thu, 15 Jan 2026 12:53:53 +0500 Subject: [PATCH 5/8] Update frontend/.npmrc Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- frontend/.npmrc | 1 - 1 file changed, 1 deletion(-) diff --git a/frontend/.npmrc b/frontend/.npmrc index c0c80ba447bd..e69de29bb2d1 100644 --- a/frontend/.npmrc +++ b/frontend/.npmrc @@ -1 +0,0 @@ -engine-strict=false From 6e6f10f868a92340f51f8ff8333371a1c32f37b4 Mon Sep 17 00:00:00 2001 From: raslaan-dev Date: Thu, 15 Jan 2026 12:56:06 +0500 Subject: [PATCH 6/8] Update frontend/src/ts/utils/strings.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- frontend/src/ts/utils/strings.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/ts/utils/strings.ts b/frontend/src/ts/utils/strings.ts index dcdd3665e948..6334537e2a6a 100644 --- a/frontend/src/ts/utils/strings.ts +++ b/frontend/src/ts/utils/strings.ts @@ -195,7 +195,7 @@ export function isThaanaConsonant(char: string): boolean { * Split a string into individual Unicode code points. */ export function splitIntoCharacters(s: string): string[] { - // eslint-disable-next-line @typescript-eslint/no-misused-spread -- Intentional for Thaana character separation + // eslint-disable-next-line @typescript-eslint/no-misused-spread -- Intentional use of spread to split into Unicode code points (used by Thaana and other scripts) return [...s]; } From cf263dd9c077c76d8f2e257f02fabfe399218f91 Mon Sep 17 00:00:00 2001 From: raslaan-dev Date: Thu, 15 Jan 2026 12:56:18 +0500 Subject: [PATCH 7/8] Update packages/schemas/src/languages.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- packages/schemas/src/languages.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/schemas/src/languages.ts b/packages/schemas/src/languages.ts index d076f17dcf8d..7c0543f7bc88 100644 --- a/packages/schemas/src/languages.ts +++ b/packages/schemas/src/languages.ts @@ -431,6 +431,8 @@ export const LanguageSchema = z.enum( "code_yoptascript", "code_cuda", "dhivehi", + "dhivehi_1k", + "dhivehi_30k", ], { errorMap: customEnumErrorHandler("Must be a supported language"), From 6ab6caa261635d963ec6e480b1c4e0513dd0f767 Mon Sep 17 00:00:00 2001 From: raslaan-dev Date: Thu, 15 Jan 2026 13:12:47 +0500 Subject: [PATCH 8/8] fix: remove dhivehi_1k and dhivehi_30k, keep only dhivehi (200 words) --- frontend/static/languages/dhivehi.json | 3 ++- packages/schemas/src/languages.ts | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/frontend/static/languages/dhivehi.json b/frontend/static/languages/dhivehi.json index f67bdc4e8b51..c51d1a508d61 100644 --- a/frontend/static/languages/dhivehi.json +++ b/frontend/static/languages/dhivehi.json @@ -2,7 +2,8 @@ "name": "dhivehi", "rightToLeft": true, "ligatures": false, - "bcp47": "dv-MV", + "orderedByFrequency": true, + "bcp47": "dv", "words": [ "އެ", "މި", diff --git a/packages/schemas/src/languages.ts b/packages/schemas/src/languages.ts index 7c0543f7bc88..d076f17dcf8d 100644 --- a/packages/schemas/src/languages.ts +++ b/packages/schemas/src/languages.ts @@ -431,8 +431,6 @@ export const LanguageSchema = z.enum( "code_yoptascript", "code_cuda", "dhivehi", - "dhivehi_1k", - "dhivehi_30k", ], { errorMap: customEnumErrorHandler("Must be a supported language"),