Skip to content

[Feat]: Support i18n placeholder input in Storybook | Fix [object Object] translations #21405

@digiwand

Description

@digiwand

Describe the bug

i18n placeholder input is not supported in Storybook which results in translations outputting "[Object object]" when placeholder inputs are provided. Supporting this feature will help us have a more accurate representation of the rendered components.

Expected behavior

Current behavior:
Storybook TokenAllowance page displays "Spending cap behavior for [object Object]"

Expected behavior:
Storybook TokenAllowance page displays "Spending cap behavior for TST"

Screenshots

Screenshot 2023-10-17 at 2 36 32 PM Screenshot 2023-10-17 at 2 55 52 PM Screenshot 2023-10-17 at 2 55 55 PM

Steps to reproduce

  1. run storybook yarn storybook
  2. open a page that passes a second parameter to the t, translation function (placeholder input)
  3. observe "[object Object]" displays instead of expected content

Error messages or log output

No response

Version

11.2.0

Build type

None

Browser

Chrome

Operating system

MacOS

Hardware wallet

No response

Additional context

No response

Severity

No response

Metadata

Metadata

Assignees

Labels

Sev3-lowLow severity; minimal to no impact upon usersregression-prod-11.2.0Regression bug that was found in production in release 11.2.0team-design-systemAll issues relating to design system in Extension

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions