Skip to content

Added si.json file for messages#1110

Open
MiyuruWijesinghe wants to merge 2 commits intof:mainfrom
MiyuruWijesinghe:mkw-dev
Open

Added si.json file for messages#1110
MiyuruWijesinghe wants to merge 2 commits intof:mainfrom
MiyuruWijesinghe:mkw-dev

Conversation

@MiyuruWijesinghe
Copy link
Copy Markdown

@MiyuruWijesinghe MiyuruWijesinghe commented Mar 28, 2026

Description

I have created si.json to translate messages into Sinhala Language. Sinhala is the main language of Sri Lankan people and there are lots of people have AI contributions and usages. So this will help for Sinhala language usages.

Type of Change

  • Other (please describe):
image

Summary by CodeRabbit

Release Notes

  • New Features
    • Added Sinhala language support. Users can now select Sinhala as their preferred language through the application's language switcher, enabling comprehensive translation of the entire interface including navigation, menus, buttons, controls, settings, authentication flows, user profiles, prompts management, and all content throughout the platform.

MiyuruWijesinghe and others added 2 commits March 28, 2026 21:05
I have created si.json to translate messages into Sinhala Language. Sinhala is the main language of Sri Lankan people and there are lots of people have AI contributions and usages. So this will help for Sinhala language usages.
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 28, 2026

📝 Walkthrough

Walkthrough

This change adds Sinhala language support to the application by registering a new locale (si) across configuration files, adding a comprehensive set of Sinhala UI translation strings, and updating the language switcher component to include Sinhala as a selectable option.

Changes

Cohort / File(s) Summary
Locale Configuration
prompts.config.ts, src/lib/i18n/config.ts
Updated i18n configuration and supported locales list to include "si" (Sinhala) as a new supported locale.
Translation Strings
messages/si.json
Added comprehensive Sinhala translation file (~1,896 lines) with localized UI text for controls, navigation, authentication, prompts, settings, admin sections, user profiles, and other application features.
Language Switcher
src/components/prompts/language-switcher.tsx
Extended language options to include Sinhala ({ code: "si", name: "සිංහල" }) in the language selection dropdown.

Poem

🐰 A new tongue arrives from distant shores,
සිංහල now opens translation doors,
From config to switcher, the locale spreads wide,
With strings of meaning, cultural pride! ✨

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding a Sinhala language translation file (si.json) to support localization.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

Copy link
Copy Markdown

@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

🧹 Nitpick comments (1)
src/components/prompts/language-switcher.tsx (1)

14-33: Consider deriving the dropdown list from a single locale source.

The locale list is duplicated here and in config, which can drift over time. Pulling codes from a shared constant (then mapping to labels) would reduce sync bugs.

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

In `@src/components/prompts/language-switcher.tsx` around lines 14 - 33, The
duplicated hardcoded languages array should be replaced by deriving entries from
the shared locale source (e.g., a SUPPORTED_LOCALES or LOCALES constant exported
from your config) instead of the local languages array; update
language-switcher.tsx to import that constant and map each locale code to a
display label (either via a shared labels map in config or using
Intl.DisplayNames as a fallback) and use that mapped list wherever the current
languages variable is referenced so there is a single source of truth.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@messages/si.json`:
- Around line 1-1896: The Sinhala locale file is missing many translation keys
(notably the book.chapterDescriptions.* and book.chapters.* ranges 00a–25 plus
other feature keys) and has 9 placeholder mismatches that will break runtime
interpolation; add the missing keys under book.chapterDescriptions and
book.chapters (00a–25) and any other missing feature keys, and fix the
placeholder tokens so they match the source keys exactly for
comments.showReplies, prompts.confirmGenerationDescription,
prompts.contentExistsError, prompts.requiresImage, prompts.requiresVideo,
prompts.requiresDocument, promptWritingGuide.variables.tip1,
promptWritingGuide.variables.tip4, and user.privatePromptsNote by restoring the
missing placeholders ({replies}, {reply}, {model}, {author}, {title}, {image},
{images}, {video}, {videos}, {document}, {documents}, {topic}, {x},
{target_audience}, {prompt}, {prompts}) to the Sinhala strings.

---

Nitpick comments:
In `@src/components/prompts/language-switcher.tsx`:
- Around line 14-33: The duplicated hardcoded languages array should be replaced
by deriving entries from the shared locale source (e.g., a SUPPORTED_LOCALES or
LOCALES constant exported from your config) instead of the local languages
array; update language-switcher.tsx to import that constant and map each locale
code to a display label (either via a shared labels map in config or using
Intl.DisplayNames as a fallback) and use that mapped list wherever the current
languages variable is referenced so there is a single source of truth.
🪄 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: CHILL

Plan: Pro

Run ID: f3ac8bd2-12d4-437a-b433-d04db94abe5f

📥 Commits

Reviewing files that changed from the base of the PR and between 4e6928e and 1248b78.

📒 Files selected for processing (4)
  • messages/si.json
  • prompts.config.ts
  • src/components/prompts/language-switcher.tsx
  • src/lib/i18n/config.ts

Comment thread messages/si.json
@MiyuruWijesinghe
Copy link
Copy Markdown
Author

Hi @f , can you check these changes ☺️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants