Skip to content

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

Open
Jaswanth-arjun wants to merge 1 commit into
apache:masterfrom
Jaswanth-arjun:fix/i18n-language-progress-crash
Open

fix(i18n): prevent crash when switching languages due to missing progress data#3338
Jaswanth-arjun wants to merge 1 commit into
apache:masterfrom
Jaswanth-arjun:fix/i18n-language-progress-crash

Conversation

@Jaswanth-arjun
Copy link
Copy Markdown

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.

Copy link
Copy Markdown
Author

@Jaswanth-arjun Jaswanth-arjun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, I have addressed the root cause by updating i18nProgress configuration and adding safe access for progress data. Please let me know if any improvements are needed. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant