mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-25 03:10:08 +08:00
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 |
||
|---|---|---|
| .. | ||
| main | ||
| preload | ||
| renderer | ||