Skip to content

feat: Implement language selection and internationalization support i… - #1275

Open
FerdyARTs wants to merge 1 commit into
ciromattia:masterfrom
FerdyARTs:feature/language-selection-and-spanish-idiom
Open

feat: Implement language selection and internationalization support i…#1275
FerdyARTs wants to merge 1 commit into
ciromattia:masterfrom
FerdyARTs:feature/language-selection-and-spanish-idiom

Conversation

@FerdyARTs

@FerdyARTs FerdyARTs commented Mar 19, 2026

Copy link
Copy Markdown

🌐 Improved Internationalization & macOS Stability

This pr is create with: Use Antigravity with its free tier, switching between Gemini and Claude within free versions.

This PR introduces comprehensive support for Spanish translation, instant language switching.

🚀 Key Features

  • Spanish Translation Support: Added a complete kcc_es.json locale file providing full Spanish coverage for the UI, tooltips, and dynamic tips.
  • Instant Language Switching: Users can now switch between English and Spanish directly from the UI without restarting the application. The system dynamically reloads the translator into the application and refreshes all UI elements, including existing messages and tips in the job list.
  • Dynamic Translation System (JsonTranslator):
    • Implemented a specialized JsonTranslator that integrates with the standard QTranslator interface.
    • Added a robust fallback mechanism that returns the original English text if a translation key is missing, preventing blank UI elements.
    • Retranslation logic correctly handles HTML-formatted tips and warnings within the job list.

🛠 Stability & UI Improvements

  • Enhanced UI Layout: Added a dedicated "Language" selection button to the main interface, carefully adjusted alongside existing buttons to maintain perfect symmetry and window dimensions.
  • Dynamic Message Retranslation: Updated addMessage to ensure that even messages already present in the list are updated when the language is changed.

📝 Technical Overview

  • i18n.py: Added support for dynamic loading and switching of JSON-based translation files.
  • KCC_gui.py: Modified initialization and changeLanguage methods to handle immediate re-translation of all widgets.
  • locales/kcc_es.json: New localization file for Spanish users.

Created with 💙 to improve KCC accessibility.

@axu2

axu2 commented Mar 20, 2026

Copy link
Copy Markdown
Collaborator

Please share the prompts used to generate this and which model.

@FerdyARTs

Copy link
Copy Markdown
Author

Use Antigravity with its free tier, switching between Gemini and Claude within free versions.

@axu2

axu2 commented Mar 20, 2026

Copy link
Copy Markdown
Collaborator

And I've used KCC on macOS 14+ and macOS 10.14+ and don't know what you mean by crashing, I've seen no reports.

@FerdyARTs

Copy link
Copy Markdown
Author

Sorry, I generated the documentation with AI and included in the report some problems I had when launching the application; they were local problems that have nothing to do with the change I made. I have modified the comment.

You can try the PR and verify that it works correctly. If you're interested in integrating it into the main branch, let me know. Thank you very much.

@axu2

axu2 commented Mar 31, 2026

Copy link
Copy Markdown
Collaborator

May take a while to review this, I don't have much bandwidth in the near term, but internationalization does sound valuable.

@FerdyARTs

Copy link
Copy Markdown
Author

Great, if you need help tell me

@axu2

axu2 commented Apr 12, 2026

Copy link
Copy Markdown
Collaborator

Ok, looking closer this is a little tough because there are already some GUI related changes I've left in the pipeline for way too long, so I feel like this is tough to do until the GUI is a little more stable.

@FerdyARTs

Copy link
Copy Markdown
Author

If you want, when the merges are happening, let me know and I'll check the conflicts to see if we can adapt it.

@axu2

axu2 commented Apr 16, 2026

Copy link
Copy Markdown
Collaborator

Currently in the middle of a bunch of changes, so I feel any effort on your part might be wasted if you do it in the middle of it. Also, the changes might take quite a while, so I probably would hold off for now.

@FerdyARTs

Copy link
Copy Markdown
Author

Sure, if you ever need help implementing it, just let me know. Thanks anyway!

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