Skip to content

Conversation

TiteTia
Copy link

@TiteTia TiteTia commented Jul 11, 2025

Multi-language support for the entire application is now complete: Language Configuration - 37 languages supported
Settings UI - language selection dropdown
Settings Store - language preference persistence
STT Provider - OpenAI, Gemini, Whisper support for multi-language LLM Provider - Ask functionality supports multi-language response Live insights - multi-language support is now supported too! Language Analytics Application Integration - Load language settings on startup


name: Pull Request
about: Propose a change to the codebase

Summary of Changes

Add Multi-Languages Support for Glass
Multi-language support for the entire application is now complete:
Language Configuration - 37 languages supported
Settings UI - language selection dropdown
Settings Store - language preference persistence
STT Provider - OpenAI, Gemini, Whisper support for multi-language
LLM Provider - Ask functionality supports multi-language response
Live insights - multi-language support is now supported too! Language Analytics
Application Integration - Load language settings on startup

Related Issue

Please replace XXX with the issue number that this pull request resolves. If it does not resolve a specific issue, please explain why this change is needed.

Contributor's Self-Review Checklist

Please check the boxes that apply. This is a reminder of what we look for in a good pull request.

  • [√] I have read the CONTRIBUTING.md document.
  • [√] My code follows the project's coding style and architectural patterns as described in DESIGN_PATTERNS.md.
  • [√] I have added or updated relevant tests for my changes. (Passed quick test and manual use(since the testcase was built by cursor, I didn't fully look through everything))
  • I have updated the documentation to reflect my changes (if applicable).
  • [√] My changes have been tested locally and are working as expected.

Additional Context (Optional)

Add any other context or screenshots about the pull request here.

TiteTia added 2 commits July 10, 2025 19:46
Multi-language support for the entire application is now complete:
Language Configuration - 37 languages supported
Settings UI - language selection dropdown
Settings Store - language preference persistence
STT Provider - OpenAI, Gemini, Whisper support for multi-language
LLM Provider - Ask functionality supports multi-language response
Live insights - multi-language support is now supported too! Language Analytics
Application Integration - Load language settings on startup
Passed with quick tests and manual test
@samtiz
Copy link
Contributor

samtiz commented Jul 11, 2025

Hey @TiteTia thanks for contribution! Nice work for language support! Really appreciate it.

However, after I dive into review, I think 3 main points needed:

  1. Actual language is not applied to stt sessions. Here is the log:
[SettingsService] Setting language: ko
[WindowNotificationManager] Sending settings-updated to 1 relevant windows
[WindowManager] Header gained focus
[WindowManager] Toggling feature: listen
[Repo] No active session for user default_user. Creating new 'listen' session.
SQLite: Created session 3c32fad9-27d2-45aa-ac5d-e016f304559f for user default_user (type: listen)
[DB] New listen session ensured: 3c32fad9-27d2-45aa-ac5d-e016f304559f
🔄 Conversation history and analysis state reset
New conversation session started: 3c32fad9-27d2-45aa-ac5d-e016f304559f
[SttService] Using language: en
[ModelStateService] Current Selection -> LLM: gpt-4.1 (Provider: openai), STT: gemini-live-2.5-flash-preview (Provider: gemini)
[SttService] Initializing STT for gemini using model gemini-live-2.5-flash-preview
[Gemini STT] Using language: en-US (from en)
[Gemini STT] Using language: en-US (from en)
[WindowManager] Header lost focus
✅ Both STT sessions initialized successfully.
✅ Listen service initialized successfully.

I guess we need to toss the language at "listenService.initializeSession()"

    ipcMain.handle('toggle-feature', async (event, featureName) => {
        if (!windowPool.get(featureName) && currentHeaderState === 'main') {
            createFeatureWindows(windowPool.get('header'));
        }

        const header = windowPool.get('header');
        if (featureName === 'listen') {
            console.log(`[WindowManager] Toggling feature: ${featureName}`);
            const listenWindow = windowPool.get(featureName);
            const listenService = global.listenService;
            if (listenService && listenService.isSessionActive()) {
                console.log('[WindowManager] Listen session is active, closing it via toggle.');
                await listenService.closeSession();
                listenWindow.webContents.send('session-state-changed', { isActive: false });
                header.webContents.send('session-state-text', 'Done');
                // return;
            } else {
                if (listenWindow.isVisible()) {
                    listenWindow.webContents.send('window-hide-animation');
                    listenWindow.webContents.send('session-state-changed', { isActive: false });
                    header.webContents.send('session-state-text', 'Listen');
                } else {
                    listenWindow.show();
                    updateLayout();
                    listenWindow.webContents.send('window-show-animation');
                    await listenService.initializeSession();
                    listenWindow.webContents.send('session-state-changed', { isActive: true });
                    header.webContents.send('session-state-text', 'Stop');
                }
            }
        }

which is in windowManager.js's toggle-feature ipc handler.

  1. Delete all test code
  2. Merge with current main branch to handle conflict.

Could you please update these? Thanks for your effort!

@TiteTia
Copy link
Author

TiteTia commented Jul 11, 2025

Hi @samtiz !
Thank you for replying! I solved the first issue you claimed and deleted the testcases also handled conflict already.

@TiteTia
Copy link
Author

TiteTia commented Jul 12, 2025

Hi @samtiz @RONNCC @avarayr @gvzq !
I just resolve the conflicts and I think it should be ready to merge to main. Does the code looks good to you? Thanks!

@RONNCC
Copy link
Contributor

RONNCC commented Jul 12, 2025

@TiteTia can you clean up the commits - perhaps squash them?

Updated the session initialization in createWindows to retrieve the current language setting using getSettings and pass it to listenService.initializeSession. If fetching the language fails, it defaults to 'en'. This ensures the session starts with the correct language context.

Remove all multi-language test files

Deleted the entire tests directory, including unit, integration, and end-to-end test files, Jest configuration, test runner scripts, and related documentation. This removes all automated testing and test documentation for multi-language support.

Update with new windowManager.js
@TiteTia TiteTia force-pushed the feat/Multi-Languages-Support branch from 598df42 to e1d858e Compare July 12, 2025 15:54
@TiteTia
Copy link
Author

TiteTia commented Jul 12, 2025

Hi @RONNCC I just squashed the commits

@TiteTia
Copy link
Author

TiteTia commented Jul 13, 2025

@samtiz @RONNCC Hi, I just saw the code has been refactored, since the code and structure have been changed a lot from previous version. I may not have time/ability to rewrite the entire feature to adapt to the new structure. If there are someone could help me adapt with the new structure that will be great for this feature.

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.

Mult-language support
3 participants