Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed language issue #1040

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

slimskhab
Copy link
Contributor

Description

This update addresses an issue where changing the language in the translation toolbar didn't reflect in the application settings. To resolve this, adjustments were made to ensure that selecting a language in the toolbar updates the corresponding language parameter in the settings.

Related Issues

#1031

Steps to Test

  1. Change language from header
  2. Check if it changed in the app settings
  3. Change language from app settings
  4. Check if it changed in the header

Screenshots (if applicable)

image

Checklist

  • I have tested these changes
  • I have updated the relevant documentation
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the codebase
  • My changes generate no new warnings or errors
  • The title of my pull request is clear and descriptive

Copy link

@Skanderloueti Skanderloueti left a comment

Choose a reason for hiding this comment

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

Thank you for the PR! please review the changes!

@@ -22,8 +24,10 @@ export default function GeneralSettingForm() {
},
]}
>
<p style={{display:"none"}}>{langCode}</p>

Choose a reason for hiding this comment

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

I think this line doesn't serve any purpose and we can just remove it since the display is already "none"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Due to how Form.Item works in Ant Design when used with controlled components. When the value prop of the Select component inside Form.Item changes, it doesn't trigger a re-render of the Form.Item itself, that's why that line is needed to trigger the UI to re-render

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.

None yet

2 participants