Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
b04d556
feat(i18n): Add comprehensive internationalization support for Gemini…
hoteye Aug 20, 2025
fdd3979
feat(i18n): Add additional internationalization components and utilities
hoteye Aug 20, 2025
a5650e7
chore: update vscode settings for i18n development
hoteye Aug 20, 2025
9a1e4c5
feat(i18n): Add French language support and refine internationalization
hoteye Aug 21, 2025
883509c
feat(i18n): Add comprehensive internationalization support
hoteye Aug 21, 2025
5dbaa6c
feat(i18n): Enhance UI components with comprehensive internationaliza…
hoteye Aug 21, 2025
6d752ca
feat(i18n): Add comprehensive internationalization support with multi…
hoteye Aug 22, 2025
149d9d5
feat(i18n): Add comprehensive internationalization support
hoteye Aug 22, 2025
6076b74
fix: Add error handling for i18n initialization and language changes
hoteye Aug 22, 2025
1710683
refactor: Simplify error translator implementation
hoteye Aug 22, 2025
e2c025d
chore: Remove documentation and config files not meant for PR
hoteye Aug 23, 2025
bfc0e96
chore: Restore .vscode/settings.json as requested by maintainer
hoteye Aug 29, 2025
dee772d
fix(i18n): Use process.env.DEBUG instead of hardcoded debug flag
hoteye Aug 29, 2025
55940fd
style(i18n): Run prettier formatting on i18n configuration
hoteye Aug 29, 2025
8d7de35
style(i18n): Format internationalization related code
hoteye Aug 29, 2025
a437341
fix(i18n): Remove browser-specific language switching logic
hoteye Aug 29, 2025
3224af2
feat(i18n): Complete Jacob314 feedback implementation
hoteye Aug 29, 2025
f81e3a4
feat(i18n): Implement language settings in /setting dialog
hoteye Aug 29, 2025
fb32dce
fix(ui): Fix language setting display showing 'false*' instead of lan…
hoteye Aug 29, 2025
09aa0bc
feat(i18n): Implement left-right arrow language selector with concise UI
hoteye Aug 30, 2025
6460009
chore: Remove redundant SettingsDialogI18n.tsx file
hoteye Aug 30, 2025
0b497d7
revert: Remove loop detection changes unrelated to i18n
hoteye Aug 30, 2025
46a4854
fix: Revert memory command descriptions to original shorter versions
hoteye Aug 30, 2025
649dde3
refactor: Consolidate settings translations to dialogs namespace
hoteye Aug 30, 2025
afbaae9
refactor(i18n): Simplify language switching to single /settings approach
hoteye Aug 30, 2025
c7441c1
refactor(i18n): Integrate with official settings system and remove co…
hoteye Aug 30, 2025
c8b68a4
feat(i18n): Complete comprehensive UI internationalization
hoteye Aug 30, 2025
2e6b2b9
docs(i18n): Add comprehensive internationalization documentation
hoteye Sep 1, 2025
8d3c6f6
test(i18n): Add comprehensive translation integrity testing
hoteye Sep 1, 2025
ca8faad
chore: Update gitignore to exclude development artifacts
hoteye Sep 1, 2025
f4ef763
feat(i18n): Complete internationalization implementation with compreh…
hoteye Sep 2, 2025
4f1fa38
feat(i18n): Add comprehensive unused translation detection tool
hoteye Sep 2, 2025
773bf04
feat(i18n): Clean up unused translations and update documentation
hoteye Sep 2, 2025
f466be2
fix(i18n): Fix settings namespace loading and improve code quality
hoteye Sep 3, 2025
e981001
fix(i18n, core): Resolve i18n warnings and fix test conflicts
hoteye Sep 3, 2025
55b4eb4
chore: Clean up .gitignore and move personal rules to global config
hoteye Sep 3, 2025
e0fc1b9
feat(i18n): Add Unix environment variable support and improve testing
hoteye Sep 4, 2025
aec4afc
docs: Update configuration and i18n documentation
hoteye Sep 4, 2025
5269115
revert: Complete .vscode/settings.json cleanup
hoteye Sep 4, 2025
e2fff1b
fix(i18n): Handle multi-line messages correctly in auth validation
hoteye Sep 4, 2025
f8ada66
chore: Remove snapshot files from git tracking
hoteye Sep 4, 2025
098ddab
feat(i18n): Improve translation coverage to 98.4%+ for all languages
hoteye Sep 4, 2025
a73648b
feat: Implement proper separation of concerns for enum sorting
hoteye Sep 5, 2025
1d3f51e
feat: Replace empty string with '__ENV__' identifier for environment …
hoteye Sep 5, 2025
79b37c1
docs: Update EnumSelector comment
hoteye Sep 5, 2025
cacf0da
refactor(i18n): Remove GEMINI_LANG support, use standard UNIX environ…
hoteye Sep 5, 2025
c6c7621
fix: Address code review feedback
hoteye Sep 5, 2025
adb268b
fix(ui): Replace triangle arrows with symmetric left-right arrows in …
hoteye Sep 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(ui): Fix language setting display showing 'false*' instead of lan…
…guage name

- Extend getDisplayValue function to support string type settings
- Add LANGUAGE_DISPLAY_NAMES mapping for friendly display names
- Language setting now shows 'English', '中文', etc. instead of 'false*'
- Fix type assumptions in getDisplayValue (was boolean-only)
- Improve user experience for string-based settings

Fixes UI issue where language setting displayed incorrect boolean value
instead of the actual selected language name.
  • Loading branch information
hoteye committed Aug 29, 2025
commit fb32dce32f538c9befdbdcdb05672d2e20db2388
31 changes: 25 additions & 6 deletions packages/cli/src/utils/settingsUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,16 @@ export function saveModifiedSettings(
});
}

/**
* Language code to display name mapping
*/
const LANGUAGE_DISPLAY_NAMES: Record<string, string> = {
en: 'English',
zh: '中文',
es: 'Español',
fr: 'Français',
};

/**
* Get the display value for a setting, showing current scope value with default change indicator
*/
Expand All @@ -425,8 +435,11 @@ export function getDisplayValue(
modifiedSettings: Set<string>,
pendingSettings?: Settings,
): string {
// Get the setting definition to understand the type
const definition = getSettingDefinition(key);

// Prioritize pending changes if user has modified this setting
let value: boolean;
let value: unknown;
if (pendingSettings && settingExistsInScope(key, pendingSettings)) {
// Show the value from the pending (unsaved) edits when it exists
value = getSettingValue(key, pendingSettings, {});
Expand All @@ -435,16 +448,22 @@ export function getDisplayValue(
value = getSettingValue(key, settings, {});
} else {
// Fall back to the schema default when the key is unset in this scope
const defaultValue = getDefaultValue(key);
value = typeof defaultValue === 'boolean' ? defaultValue : false;
value = getDefaultValue(key);
}

const valueString = String(value);
// Convert value to display string based on type
let valueString: string;
if (definition?.type === 'string' && key === 'language') {
// Special handling for language setting
const langCode = typeof value === 'string' ? value : 'en';
valueString = LANGUAGE_DISPLAY_NAMES[langCode] || langCode;
} else {
valueString = String(value);
}

// Check if value is different from default OR if it's in modified settings OR if there are pending changes
const defaultValue = getDefaultValue(key);
const isChangedFromDefault =
typeof defaultValue === 'boolean' ? value !== defaultValue : value === true;
const isChangedFromDefault = value !== defaultValue;
const isInModifiedSettings = modifiedSettings.has(key);

// Mark as modified if setting exists in current scope OR is in modified settings
Expand Down