apisix-dashboard
apisix-dashboard copied to clipboard
fix(i18n): prevent crash when switching languages due to missing progress data
Problem
Switching languages caused a runtime error: "Cannot read properties of undefined (reading 'percent')".
This occurred because some languages were not included in i18nProgress configuration and the code accessed progress data without null checks.
Solution
- Added missing language ('tr') to i18nProgress configuration
- Added optional chaining to safely access progress data
Result
Language switching works correctly without runtime errors for all supported languages.