emdgroup-liquid / liquid

UI component library for the Liquid Design System of Merck KGaA, Darmstadt, Germany
https://liquid.emd.design/liquid/
Other
73 stars 10 forks source link

bug: Translations break LdTabs #1093

Open mkilp opened 4 months ago

mkilp commented 4 months ago

Prerequisites

Liquid version

5.14.0

Framework bindings

React

Current behavior

Using translations with Tabs causes the component to break on language change.

Expected behavior

Tabs still work even when language of tabs change.

Steps to reproduce

See Sandbox. https://codesandbox.io/p/devbox/tabbed-bug-gjpsx5?file=%2Fsrc%2FApp.js%3A15%2C1

Code reproduction URL

https://codesandbox.io/p/devbox/tabbed-bug-gjpsx5?file=%2Fsrc%2FApp.js%3A15%2C1

Additional information

No response

renet commented 4 months ago

@mkilp It says "devbox not found". Can you please update the link or make it public, if that's the issue? =)

mkilp commented 4 months ago

@renet sorry about that! I forgot to move it out of my drafts. Should be all set now.

renet commented 4 months ago

@mkilp To me it looks like you're using the actual translation value (e.g. "Blank Label" or "Leeres Etikett") instead of the translation key (i.e. "new-label-modal.tabs.tab-1-title") as "labelType", that's why the current value does no longer match, when you change language. I changed the code so that it works, hope this helps: https://codesandbox.io/p/devbox/tabbed-bug-forked-zfphmc