-
Notifications
You must be signed in to change notification settings - Fork 86
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
feat: support partial i18n in dashboard #8660
Conversation
|
const i18n = getDefaultI18n(); | ||
return { | ||
selectSection: i18n.selectSection, | ||
remove: i18n.remove, | ||
move: i18n.move, | ||
moveApply: i18n.moveApply, | ||
moveForward: i18n.moveForward, | ||
moveBackward: i18n.moveBackward, | ||
}; | ||
return getDefaultI18n(); |
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.
Filtering for properties that the component uses doesn't bring much benefit, and is overridden when the dashboard element sets the i18n object on its children.
@@ -217,7 +218,7 @@ export interface DashboardI18n { | |||
* @fires {CustomEvent} dashboard-item-resize-mode-changed - Fired when an item resize mode changed | |||
*/ | |||
declare class Dashboard<TItem extends DashboardItem = DashboardItem> extends DashboardLayoutMixin( | |||
ElementMixin(ThemableMixin(HTMLElement)), | |||
I18nMixin({} as DashboardI18n, ElementMixin(ThemableMixin(HTMLElement))), |
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.
With the way the Dashboard
class is defined, applying the I18nMixin required some creativity.
This ticket/PR has been released with Vaadin 24.7.0.alpha10 and is also targeting the upcoming stable 24.7.0 version. |
Description
Adds support for partial I18N objects to dashboard. This allows setting an I18N object that only overrides some of the translations and uses default translations as fallback.
Type of change