()
| 263 | |
| 264 | # Load language configuration |
| 265 | def load_lang_config(): |
| 266 | default_config = { |
| 267 | "supported_languages": { |
| 268 | "en": "English", |
| 269 | "ja": "Japanese (日本語)", |
| 270 | "zh": "Mandarin Chinese (中文)", |
| 271 | "zh-tw": "Traditional Chinese (繁體中文)", |
| 272 | "es": "Spanish (Español)", |
| 273 | "kr": "Korean (한국어)", |
| 274 | "vi": "Vietnamese (Tiếng Việt)", |
| 275 | "pt-br": "Brazilian Portuguese (Português Brasileiro)", |
| 276 | "fr": "Français (French)", |
| 277 | "ru": "Русский (Russian)" |
| 278 | }, |
| 279 | "default": "en" |
| 280 | } |
| 281 | |
| 282 | loaded_config = load_json_config("lang.json") # Let load_json_config handle path and loading |
| 283 | |
| 284 | if not loaded_config: |
| 285 | return default_config |
| 286 | |
| 287 | if "supported_languages" not in loaded_config or "default" not in loaded_config: |
| 288 | logger.warning("Language configuration file 'lang.json' is malformed. Using default language configuration.") |
| 289 | return default_config |
| 290 | |
| 291 | return loaded_config |
| 292 | |
| 293 | # Default excluded directories and files |
| 294 | DEFAULT_EXCLUDED_DIRS: List[str] = [ |
no test coverage detected