cherry-studio/src
icarus 6cda7f891d refactor(translate): centralize language label handling with getLanguageLabel
Move language label generation from individual TranslateLanguage objects to a centralized getLanguageLabel function in useTranslate hook. This improves maintainability by removing duplicate label logic and makes it easier to update language labels globally.

- Remove label() method from TranslateLanguage type and all language objects
- Add getLanguageLabel function in useTranslate that handles label generation
- Update all components to use getLanguageLabel instead of label()
- Add labelMap for common language codes to avoid unnecessary lookups
2025-10-15 00:15:48 +08:00
..
main Merge branch 'main' of github.com:CherryHQ/cherry-studio into v2 2025-10-13 23:18:32 +08:00
preload Merge branch 'main' of github.com:CherryHQ/cherry-studio into v2 2025-10-13 23:18:32 +08:00
renderer refactor(translate): centralize language label handling with getLanguageLabel 2025-10-15 00:15:48 +08:00