rewine
|
fb35b0c890
|
chore: improvement fixes the translation configuration
This improvement fixes the translation configuration to automatically support multiple languages instead of being limited to Chinese and English only.
Created `cmake/TranslationUtils.cmake` file with two main functions:
- `setup_translations(TARGET_NAME TRANSLATION_PREFIX)`: For plugin and example translation configuration
- `setup_main_translations(TARGET_NAME)`: For main program translation configuration
Uses `file(GLOB ...)` command to automatically discover all available translation files, supporting languages including:
- Afrikaans (af)
- Amharic (am_ET)
- Arabic (ar)
- Asturian (ast)
- Azerbaijani (az)
- Bulgarian (bg)
- Bengali (bn)
- Tibetan (bo)
- Bakhtiari (bqi)
- Breton (br)
- Catalan (ca)
- Kurdish (ckb)
- Czech (cs)
- Danish (da)
- German (de)
- Greek (el)
- English (en_US)
- Spanish (es)
- Persian (fa)
- Finnish (fi)
- French (fr)
- Galician (gl_ES)
- Hebrew (he)
- Hindi (hi_IN)
- Croatian (hr)
- Hungarian (hu)
- Indonesian (id)
- Italian (it)
- Japanese (ja)
- Georgian (ka)
- Kabyle (kab)
- Khmer (km_KH)
- Korean (ko)
- Kurdish (ku)
- Lithuanian (lt)
- Malay (ms)
- Norwegian (nb)
- Nepali (ne)
- Dutch (nl)
- Polish (pl)
- Portuguese (pt)
- Brazilian Portuguese (pt_BR)
- Romanian (ro)
- Russian (ru)
- Sinhala (si)
- Slovak (sk)
- Slovenian (sl)
- Albanian (sq)
- Serbian (sr)
- Swedish (sv)
- Tamil (ta)
- Telugu (te)
- Thai (th)
- Turkish (tr)
- Tamazight (tzm)
- Uyghur (ug)
- Ukrainian (uk)
- Vietnamese (vi)
- Simplified Chinese (zh_CN)
- Traditional Chinese (zh_HK, zh_TW)
- `src/CMakeLists.txt`: Main program translation configuration
- `src/plugins/lockscreen/CMakeLists.txt`: Lock screen plugin translation configuration
- `src/plugins/multitaskview/CMakeLists.txt`: Multitask view plugin translation configuration
- `examples/test_set_treeland_wallpaper/CMakeLists.txt`: Wallpaper setting example translation configuration
- `cmake/TranslationUtils.cmake`: New translation utilities file
|
2025-06-30 13:40:51 +08:00 |