Skip to content

Commit ac03f80

Browse files
authored
Add 16 more languages to locales (78#1297)
* Add 16 more languages to locales * Update esp-wifi-connect component version
1 parent 9223861 commit ac03f80

File tree

259 files changed

+1002
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

259 files changed

+1002
-2
lines changed

main/CMakeLists.txt

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -584,12 +584,68 @@ elseif(CONFIG_LANGUAGE_UK_UA)
584584
set(LANG_DIR "uk-UA")
585585
elseif(CONFIG_LANGUAGE_RO_RO)
586586
set(LANG_DIR "ro-RO")
587+
elseif(CONFIG_LANGUAGE_BG_BG)
588+
set(LANG_DIR "bg-BG")
589+
elseif(CONFIG_LANGUAGE_CA_ES)
590+
set(LANG_DIR "ca-ES")
591+
elseif(CONFIG_LANGUAGE_DA_DK)
592+
set(LANG_DIR "da-DK")
593+
elseif(CONFIG_LANGUAGE_EL_GR)
594+
set(LANG_DIR "el-GR")
595+
elseif(CONFIG_LANGUAGE_FA_IR)
596+
set(LANG_DIR "fa-IR")
597+
elseif(CONFIG_LANGUAGE_FIL_PH)
598+
set(LANG_DIR "fil-PH")
599+
elseif(CONFIG_LANGUAGE_HE_IL)
600+
set(LANG_DIR "he-IL")
601+
elseif(CONFIG_LANGUAGE_HR_HR)
602+
set(LANG_DIR "hr-HR")
603+
elseif(CONFIG_LANGUAGE_HU_HU)
604+
set(LANG_DIR "hu-HU")
605+
elseif(CONFIG_LANGUAGE_MS_MY)
606+
set(LANG_DIR "ms-MY")
607+
elseif(CONFIG_LANGUAGE_NB_NO)
608+
set(LANG_DIR "nb-NO")
609+
elseif(CONFIG_LANGUAGE_NL_NL)
610+
set(LANG_DIR "nl-NL")
611+
elseif(CONFIG_LANGUAGE_SK_SK)
612+
set(LANG_DIR "sk-SK")
613+
elseif(CONFIG_LANGUAGE_SL_SI)
614+
set(LANG_DIR "sl-SI")
615+
elseif(CONFIG_LANGUAGE_SV_SE)
616+
set(LANG_DIR "sv-SE")
617+
elseif(CONFIG_LANGUAGE_SR_RS)
618+
set(LANG_DIR "sr-RS")
587619
endif()
588620

589621
# Define generation path
590622
set(LANG_JSON "${CMAKE_CURRENT_SOURCE_DIR}/assets/locales/${LANG_DIR}/language.json")
591623
set(LANG_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/assets/lang_config.h")
624+
625+
# Collect current language audio files
592626
file(GLOB LANG_SOUNDS ${CMAKE_CURRENT_SOURCE_DIR}/assets/locales/${LANG_DIR}/*.ogg)
627+
628+
# If not en-US, collect en-US audio files as fallback for missing files
629+
if(NOT LANG_DIR STREQUAL "en-US")
630+
file(GLOB EN_US_SOUNDS ${CMAKE_CURRENT_SOURCE_DIR}/assets/locales/en-US/*.ogg)
631+
632+
# Extract filenames (without path) from current language
633+
set(EXISTING_NAMES "")
634+
foreach(SOUND_FILE ${LANG_SOUNDS})
635+
get_filename_component(FILENAME ${SOUND_FILE} NAME)
636+
list(APPEND EXISTING_NAMES ${FILENAME})
637+
endforeach()
638+
639+
# Only add en-US audio files that are missing in current language
640+
foreach(EN_SOUND ${EN_US_SOUNDS})
641+
get_filename_component(FILENAME ${EN_SOUND} NAME)
642+
if(NOT ${FILENAME} IN_LIST EXISTING_NAMES)
643+
list(APPEND LANG_SOUNDS ${EN_SOUND})
644+
message(STATUS "Using en-US fallback for missing audio: ${FILENAME}")
645+
endif()
646+
endforeach()
647+
endif()
648+
593649
file(GLOB COMMON_SOUNDS ${CMAKE_CURRENT_SOURCE_DIR}/assets/common/*.ogg)
594650

595651
# If target chip is ESP32, exclude specific files to avoid build errors

main/Kconfig.projbuild

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,38 @@ choice
7878
bool "Ukrainian"
7979
config LANGUAGE_RO_RO
8080
bool "Romanian"
81+
config LANGUAGE_BG_BG
82+
bool "Bulgarian"
83+
config LANGUAGE_CA_ES
84+
bool "Catalan"
85+
config LANGUAGE_DA_DK
86+
bool "Danish"
87+
config LANGUAGE_EL_GR
88+
bool "Greek"
89+
config LANGUAGE_FA_IR
90+
bool "Persian"
91+
config LANGUAGE_FIL_PH
92+
bool "Filipino"
93+
config LANGUAGE_HE_IL
94+
bool "Hebrew"
95+
config LANGUAGE_HR_HR
96+
bool "Croatian"
97+
config LANGUAGE_HU_HU
98+
bool "Hungarian"
99+
config LANGUAGE_MS_MY
100+
bool "Malay"
101+
config LANGUAGE_NB_NO
102+
bool "Norwegian"
103+
config LANGUAGE_NL_NL
104+
bool "Dutch"
105+
config LANGUAGE_SK_SK
106+
bool "Slovak"
107+
config LANGUAGE_SL_SI
108+
bool "Slovenian"
109+
config LANGUAGE_SV_SE
110+
bool "Swedish"
111+
config LANGUAGE_SR_RS
112+
bool "Serbian"
81113
endchoice
82114

83115
choice BOARD_TYPE

main/assets/locales/bg-BG/0.ogg

2.31 KB
Binary file not shown.

main/assets/locales/bg-BG/1.ogg

1.82 KB
Binary file not shown.

main/assets/locales/bg-BG/2.ogg

2.3 KB
Binary file not shown.

main/assets/locales/bg-BG/3.ogg

2.19 KB
Binary file not shown.

main/assets/locales/bg-BG/4.ogg

2.55 KB
Binary file not shown.

main/assets/locales/bg-BG/5.ogg

1.97 KB
Binary file not shown.

main/assets/locales/bg-BG/6.ogg

2.18 KB
Binary file not shown.

main/assets/locales/bg-BG/7.ogg

2.22 KB
Binary file not shown.

0 commit comments

Comments
 (0)