Skip to content

Conversation

@System233
Copy link
Contributor

@System233 System233 commented Feb 17, 2025

Description

Language codes such as zh-cn are not mapped correctly

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Checklist:

  • My code follows the patterns of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation

Additional context

Related Issues

Reviewers


Important

Fixes language code mapping in ClineProvider.ts to correctly map zh and zh-cn to "Simplified Chinese".

  • Behavior:
    • Fixes language code mapping in ClineProvider.ts to correctly map zh and zh-cn to "Simplified Chinese".
    • Updates default language mapping logic to handle full language codes before splitting by -.
  • Misc:
    • No changes to tests or documentation.

This description was created by Ellipsis for bb38b4a. It will automatically update as commits are pushed.

@changeset-bot
Copy link

changeset-bot bot commented Feb 17, 2025

⚠️ No Changeset found

Latest commit: bb38b4a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

}
// Return mapped language or default to English
return langMap[vscodeLang.split("-")[0]] ?? "English"
return langMap[vscodeLang] ?? langMap[vscodeLang.split("-")[0]] ?? "English"
Copy link
Contributor

Choose a reason for hiding this comment

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

Please consider adding unit tests for various locale formats (e.g., 'en-US', 'pt-BR', etc.) to ensure the fallback works as expected.

@mrubens mrubens merged commit a55939e into RooCodeInc:main Feb 18, 2025
9 checks passed
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