Skip to content

Add translations #128

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

tharun571
Copy link

@tharun571 tharun571 commented Jul 17, 2025

Changes made

  • Translation System Integration: Added @jupyterlab/translation dependency and integrated ITranslator into all plugins
  • French Translations: Created comprehensive French translation file (locale/fr.json) with 75 translations covering:
    • Settings panel labels and descriptions
    • Chat interface messages and commands
    • Error messages and notifications
    • Provider instructions and tooltips
    • Button labels and form elements
  • Build Process: Added build script to properly include locale files in the extension package
  • Source Code Updates: Updated all components to use trans.__() for user-facing strings

Issue: While the translation system is fully implemented, French translations are not appearing when JupyterLab language is set to French.

Fixes #12

@brichet
Copy link
Collaborator

brichet commented Jul 18, 2025

Thanks @tharun571 for working on this.

I don't really know how work the translation in jupyterlab and extensions, but I wonder if we should not use the official language-packs for a better integration in the long run.

@brichet
Copy link
Collaborator

brichet commented Jul 18, 2025

@jtpio
Copy link
Member

jtpio commented Aug 8, 2025

I don't really know how work the translation in jupyterlab and extensions, but I wonder if we should not use the official language-packs for a better integration in the long run.

Yes usually we don't need to embed the locales, since they are managed separately with other packages. There is a process to add new extensions here: https://github.com/jupyterlab/language-packs?tab=readme-ov-file#adding-a-new-extension

So we would likely need to open a PR on this repo to add jupyterlite-ai.

@jtpio
Copy link
Member

jtpio commented Aug 8, 2025

In the meantime, we can still move forward with this PR and use the translator for user facing strings, even if the translations are not ready yet.

@tharun571
Copy link
Author

@jtpio shall I add jupyter lite ai there and make translations work in the expected way?

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.

Use tranlator to localize user facing strings
3 participants