creativetimofficial / vue-black-dashboard

Vue Black Dashboard
https://demos.creative-tim.com/vue-black-dashboard
MIT License
558 stars 847 forks source link

Switching the language Problem #69

Closed MZain-ul-Abideen closed 2 hours ago

MZain-ul-Abideen commented 2 hours ago

Bug Switching the application language from English to a non-English option (e.g., Arabic) and then back to English causes the routing to break. Specifically:

  1. Routes fail to update correctly, leading to inconsistent navigation behavior.
  2. Some pages are not fully translated into the selected secondary language, resulting in partial content translations.

Steps to Reproduce

  1. Open the application, starting with the default English language setting.
  2. Change the language to Arabic (or any non-English option) using the language switcher.
  3. Switch back to English using the language switcher.
  4. Observe the following issues: 4.1: The routes fail to update correctly and may not display the expected English content. 4.2: Navigation to another route temporarily resolves the issue, suggesting a refresh problem. 4.3: When in Arabic, certain pages are only partially translated, indicating incomplete translations.

Expected Behavior

  1. Switching back to English should restore English routes and content seamlessly, without additional user action.
  2. When selecting a non-English language (e.g., Arabic), all pages should display complete and accurate translations.

Actual Behavior

  1. Returning to English causes routing issues, with inconsistent content and navigation.
  2. Some pages remain untranslated or partially translated when switching to a non-English language (e.g., Arabic).
  3. Navigating to another route temporarily resolves the routing issue.

Screenshots Screenshot from 2024-11-15 18-11-06

Environment

Possible Causes

  1. Route Refresh Logic: Improper handling of route updates during language transitions.
  2. State Management Issues: Cached or inconsistent state is not being properly cleared.
  3. Translation Files: Missing or incomplete translations for some pages in the secondary language (e.g., Arabic).

Proposed Solutions

  1. Route Handling: Ensure route updates are correctly triggered and refreshed during language switches.
  2. State Management: Investigate state handling (e.g., Redux, Vuex, Context API) and verify proper state reinitialization during language changes.
  3. Translation Files: Validate that all translation files are complete and accurately loaded when switching languages.
  4. Testing: Introduce automated tests to verify routing and translation behavior for all supported languages.

Additional Context

github-actions[bot] commented 2 hours ago

@MZain-ul-Abideen this issue was automatically closed because it did not follow the bellow rules:


IMPORTANT: Please use the following link to create a new issue:

https://www.creative-tim.com/new-issue/vue-black-dashboard

**If your issue was not created using the app above, it will be closed immediately.**

Love Creative Tim? Do you need Angular, React, Vuejs or HTML? You can visit:
👉  https://www.creative-tim.com/bundles
👉  https://www.creative-tim.com