-
Notifications
You must be signed in to change notification settings - Fork 127
Multilang in metadata editor #2324
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
base: master
Are you sure you want to change the base?
Conversation
render textMultilang fix title multilang schema fix metadata structure multilang fix support teaxareas fix update metadata multilang clean comments base multilang widget
Summary of ChangesHello @stefanocudini, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the metadata editor by introducing comprehensive multilingual support for text-based fields. It achieves this by integrating a new TextWidgetMultiLang component that provides a dynamic interface for users to manage content in multiple languages. The underlying MetadataEditor container has been refactored to intelligently transform the schema and metadata, ensuring seamless conversion between the multilingual display format and the single-language storage format, thereby enabling a more versatile and internationalized data entry experience. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces multi-language support for text fields in the metadata editor, a valuable feature enhancement. The implementation involves a new TextWidgetMultiLang widget and associated logic for data and schema transformation. My review has identified a critical issue regarding direct mutation of component props, which violates React's core principles and must be fixed. Additionally, there are high-severity issues related to hardcoded values and incomplete logic that impact maintainability and correctness. I have also included several medium-severity suggestions to improve code quality by removing unused code, debugging statements, and commented-out blocks. Addressing these points will significantly improve the robustness and quality of the new feature.
geonode_mapstore_client/client/js/plugins/MetadataEditor/containers/MetadataEditor.jsx
Outdated
Show resolved
Hide resolved
...mapstore_client/client/js/plugins/MetadataEditor/components/_widgets/TextWidgetMultiLang.jsx
Outdated
Show resolved
Hide resolved
geonode_mapstore_client/client/js/plugins/MetadataEditor/containers/MetadataEditor.jsx
Outdated
Show resolved
Hide resolved
geonode_mapstore_client/client/js/plugins/MetadataEditor/components/_fields/SchemaField.jsx
Outdated
Show resolved
Hide resolved
...mapstore_client/client/js/plugins/MetadataEditor/components/_widgets/TextWidgetMultiLang.jsx
Outdated
Show resolved
Hide resolved
...mapstore_client/client/js/plugins/MetadataEditor/components/_widgets/TextWidgetMultiLang.jsx
Outdated
Show resolved
Hide resolved
...mapstore_client/client/js/plugins/MetadataEditor/components/_widgets/TextWidgetMultiLang.jsx
Outdated
Show resolved
Hide resolved
...mapstore_client/client/js/plugins/MetadataEditor/components/_widgets/TextWidgetMultiLang.jsx
Outdated
Show resolved
Hide resolved
geonode_mapstore_client/client/js/plugins/MetadataEditor/containers/MetadataEditor.jsx
Outdated
Show resolved
Hide resolved
geonode_mapstore_client/client/js/plugins/MetadataEditor/containers/MetadataEditor.jsx
Outdated
Show resolved
Hide resolved
...mapstore_client/client/js/plugins/MetadataEditor/components/_widgets/TextWidgetMultiLang.jsx
Outdated
Show resolved
Hide resolved
...mapstore_client/client/js/plugins/MetadataEditor/components/_widgets/TextWidgetMultiLang.jsx
Outdated
Show resolved
Hide resolved
|
Screencast_20260115_200627.webm
|
05f0ac8 to
28e7964
Compare
@subashtiwari1010 Thank you for this observation, in last commit the form title is consistent with the previous single-language behavior, it uses the default language. Peek.2026-01-15.18-39.mp4 |
7d80fdc to
b98bc93
Compare
Screencast_20260116_125750.mp4@stefanocudini I noticed a bug here, check the video attached for more information.
|
|
subashtiwari1010
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and approved. Everything looks good to me.

Description
This PR enable support of multilanguages fields define by new json-schema in GeoNode/geonode#13643
New look and behavior for text fields that support multilingual support
A new
TextWidgetMultiLangwidget has been introduced for the rjsf library that supports both text fields and text areas.An overview here:
Peek.2026-01-15.10-34.mp4
UPDATE
In this version of the backend, we can't extract strings for language names; we'll show the code in the component.

However, logic is implemented so that if a 'geonode:multilang-lang-label' field is present.
Alternatively the name of the languages loaded from MS lang names list(but names is not localized to current language) and the code are shown together with the name