Skip to content

Fixed a localization fallback issue#926

Merged
david-poindexter merged 1 commit intoDNNCommunity:developfrom
valadas:localization-fallback
Feb 14, 2024
Merged

Fixed a localization fallback issue#926
david-poindexter merged 1 commit intoDNNCommunity:developfrom
valadas:localization-fallback

Conversation

@valadas
Copy link
Copy Markdown
Member

@valadas valadas commented Feb 14, 2024

Some components use localizable test. The idea implemented was to provide default and allow consumers to override them. The implementation before this PR was to merge a set of defaults with the resx prop. However this would only happen once (when the component loaded). So if the parent component would reload and reset the resx value, that new value would replace everything not re-runing the fallback logic.

This PR makes it so localized components now watch the resx prop and re-run the fallback logic to store it in a private localResx state instead.

Closes #924

Some components use localizable test. The idea implemented was to provide default and allow consumers to override them. The implementation before this PR was to merge a set of defaults with the `resx` prop. However this would only happen once (when the component loaded). So if the parent component would reload and reset the resx value, that new value would replace everything not re-runing the fallback logic.

This PR makes it so localized components now watch the `resx` prop and re-run the fallback logic to store it in a private `localResx` state instead.

Closes DNNCommunity#924
@valadas valadas added the bug Something isn't working label Feb 14, 2024
@valadas valadas added this to the 0.23.2 milestone Feb 14, 2024
Copy link
Copy Markdown
Contributor

@david-poindexter david-poindexter left a comment

Choose a reason for hiding this comment

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

Nice work there @valadas 🌮


/** A list of allowed file extensions.
* If not specified, any file is allowed.
* Ex: ["jpg", "jped", "gif", "png"]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Oops - nice catch!

@david-poindexter david-poindexter merged commit 6549e34 into DNNCommunity:develop Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Localization fallback issue

2 participants