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

feat: dashboard i18n #7847

Merged
merged 5 commits into from
Sep 24, 2024
Merged

feat: dashboard i18n #7847

merged 5 commits into from
Sep 24, 2024

Conversation

tomivirkki
Copy link
Member

Description

Add dashboard i18n object

Fixes https://github.com/orgs/vaadin/projects/70/views/1?pane=issue&itemId=80724405

Added API:

dashboard.i18n: {
  selectWidgetTitleForEditing: string;
  selectSectionTitleForEditing: string;
  remove: string;
  move: string;
  moveApply: string;
  moveForward: string;
  moveBackward: string;
  resize: string;
  resizeApply: string;
  resizeShrinkWidth: string;
  resizeGrowWidth: string;
  resizeShrinkHeight: string;
  resizeGrowHeight: string;
}

Type of change

Feature


const widget = getElementFromCell(dashboard, 0, 0) as DashboardWidget;
expect(widget.i18n.selectWidgetTitleForEditing).to.equal('foo');
expect(widget.i18n).to.eql({
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Can be simplified to expect(section.i18n).to.eql(dashboard.i18n);

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

const widget = getElementFromCell(dashboard, 1, 0) as DashboardWidget;
const section = widget.closest('vaadin-dashboard-section') as DashboardSection;
expect(section.i18n.selectSectionTitleForEditing).to.equal('foo');
expect(section.i18n).to.eql({
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Can be simplified to expect(section.i18n).to.eql(dashboard.i18n);

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

Copy link
Contributor

@ugur-vaadin ugur-vaadin left a comment

Choose a reason for hiding this comment

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

Added two small comments.

Copy link

sonarcloud bot commented Sep 24, 2024

@tomivirkki tomivirkki merged commit 0498e54 into feat/dashboard Sep 24, 2024
9 checks passed
@tomivirkki tomivirkki deleted the feat/dashboard-i18n branch September 24, 2024 07:10
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 24.6.0.beta1 and is also targeting the upcoming stable 24.6.0 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants