Skip to content

Improved locale handling for non-English IDE configurations #308

Open
@Canario5

Description

When using the plugin with:
English IDE + non-English OS locale, or
Non-English IDE + different OS locale

The locale display and LLM instructions could show unexpected language names due that plugin takes locales from OS locale and not IDE locale. This also probably causes confusion for some LLMs when generating commit messages.

In my case of Czech OS Windows, and Jetbrains IDE in English it listed languages names in Czech. It looked out of place in English ide. Also some smaller LLMs had a trouble use correct language for git commits.

Prompt is:
"Use {locale} language to answer."

So in my case it was:
"Use {angličtina (note: angličtina is Czech name fro English language)} language to answer." And this gave me mostly commit messages in English (correct), but sometimes it gave me commit messages in Czech (not correct). This happened to me with Llama 3.3 70b (and conventional commits). Bigger models like Sonnet were fine.

Also sorting in non English locales dont work properly with some unique symbols. For example Č for Čeština should be between C and D. Currently shows at the end. Example of sorting of unique characters at the end after z symbol:

Image

Proposed Solution:

  1. Use IDE's UI locale instead of system locale for language displays
  2. Standardize locale formatting in prompt to English Name (ISO 639) – Native Name; example "French (fr) – français"
  3. Implement proper collation for locale list sorting

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions