Skip to content

Add Gujarati language support with translations#14752

Merged
rustdesk merged 1 commit into
rustdesk:masterfrom
leolouis:patch-4
Apr 14, 2026
Merged

Add Gujarati language support with translations#14752
rustdesk merged 1 commit into
rustdesk:masterfrom
leolouis:patch-4

Conversation

@leolouis

@leolouis leolouis commented Apr 13, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features
    • Added Gujarati language support with comprehensive translations for all UI elements including connection states, settings, file transfer, multimedia features, and security options.

@coderabbitai

coderabbitai Bot commented Apr 13, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

A new Gujarati language localization module is added at src/lang/gu.rs containing a lazy-static HashMap with 746 lines of UI text translations covering connection states, prompts, errors, settings, file transfer, media features, security, and other interface labels.

Changes

Cohort / File(s) Summary
Gujarati Localization
src/lang/gu.rs
New language module with lazy-static HashMap mapping UI strings to Gujarati translations across all major features (connections, sessions, settings, file transfer, media, security, etc.).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • #14694: Modifies language modules by updating the same exported pub static ref T: HashMap<&'static str, &'static str> translation map pattern (Arabic localization).

Poem

🐰 Hop, hop, translations bloom,
Gujarati fills the room,
Words in maps, so neat and bright,
Users chat through the night!

🚥 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 title 'Add Gujarati language support with translations' directly and clearly describes the main change: adding a new Gujarati localization module with translated UI strings.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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 `@src/lang/gu.rs`:
- Around line 1-3: Add Gujarati to the module list and language maps: declare
mod gu; in the module declarations, add ("gu", "Gujarati") to the LANGS
constant, and add the match arm "gu" => gu::T.deref() inside translate_locale()
so that the static translation map T from src/lang/gu.rs is exposed and
selectable; update the module declarations, LANGS constant, and
translate_locale() match to reference gu and gu::T.deref() accordingly.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7a4db183-7803-4462-b1f5-281be95a1e85

📥 Commits

Reviewing files that changed from the base of the PR and between a8dc6fc and ebf6819.

📒 Files selected for processing (1)
  • src/lang/gu.rs

Comment thread src/lang/gu.rs
Comment on lines +1 to +3
lazy_static::lazy_static! {
pub static ref T: std::collections::HashMap<&'static str, &'static str> =
[

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Verify Gujarati language wiring in src/lang.rs
rg -n --fixed-strings 'mod gu;' src/lang.rs
rg -n --fixed-strings '("gu",' src/lang.rs
rg -n --fixed-strings '"gu" => gu::T.deref(),' src/lang.rs

Repository: rustdesk/rustdesk

Length of output: 43


🏁 Script executed:

# First, check if src/lang.rs exists and examine its structure
head -100 src/lang.rs

# Check how many lines are in src/lang.rs
wc -l src/lang.rs

Repository: rustdesk/rustdesk

Length of output: 1669


🏁 Script executed:

# Look for a known language registration pattern (e.g., English 'en')
# to understand the expected structure
rg -n --fixed-strings 'mod en;' src/lang.rs
rg -n --fixed-strings '("en",' src/lang.rs
rg -n --fixed-strings '"en" => en::T.deref(),' src/lang.rs

Repository: rustdesk/rustdesk

Length of output: 97


🏁 Script executed:

# Verify that src/lang/gu.rs actually exists
ls -la src/lang/gu.rs

Repository: rustdesk/rustdesk

Length of output: 125


🏁 Script executed:

# Search for translate_locale function and its match arms
rg -n 'translate_locale' src/lang.rs -A 50

Repository: rustdesk/rustdesk

Length of output: 1944


🏁 Script executed:

# Get more of the translate_locale function to see all match arms
rg -n 'translate_locale' src/lang.rs -A 100 | tail -60

Repository: rustdesk/rustdesk

Length of output: 2785


🏁 Script executed:

# Specifically search for "gu" in the match arms
rg -n '"gu"' src/lang.rs

Repository: rustdesk/rustdesk

Length of output: 43


Gujarati will not be usable unless it is registered in src/lang.rs.

src/lang/gu.rs exists but is missing three required registrations:

  • mod gu; declaration (not in module list)
  • ("gu", "Gujarati") entry in the LANGS constant
  • "gu" => gu::T.deref() match arm in translate_locale()

Without these, users cannot select Gujarati.

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

In `@src/lang/gu.rs` around lines 1 - 3, Add Gujarati to the module list and
language maps: declare mod gu; in the module declarations, add ("gu",
"Gujarati") to the LANGS constant, and add the match arm "gu" => gu::T.deref()
inside translate_locale() so that the static translation map T from
src/lang/gu.rs is exposed and selectable; update the module declarations, LANGS
constant, and translate_locale() match to reference gu and gu::T.deref()
accordingly.

@rustdesk
rustdesk merged commit 2d41b3e into rustdesk:master Apr 14, 2026
20 checks passed
changsongyang pushed a commit to changsongyang/rustdesk that referenced this pull request Apr 14, 2026
changsongyang pushed a commit to changsongyang/rustdesk that referenced this pull request Apr 19, 2026
ssh4net pushed a commit to RustAdministrator/rustadmin that referenced this pull request Apr 24, 2026
changsongyang pushed a commit to changsongyang/rustdesk that referenced this pull request Apr 25, 2026
@coderabbitai coderabbitai Bot mentioned this pull request May 30, 2026
5 tasks
@coderabbitai coderabbitai Bot mentioned this pull request Jul 15, 2026
10 tasks
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