apisix-dashboard icon indicating copy to clipboard operation
apisix-dashboard copied to clipboard

fix(i18n): prevent crash when switching languages due to missing progress data

Open Jaswanth-arjun opened this issue 8 months ago • 0 comments

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.

Jaswanth-arjun avatar Mar 20 '26 06:03 Jaswanth-arjun