liquid icon indicating copy to clipboard operation
liquid copied to clipboard

bug: Translations break LdTabs

Open mkilp opened this issue 1 year ago • 3 comments

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

mkilp avatar May 21 '24 14:05 mkilp

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

renet avatar May 22 '24 11:05 renet

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

mkilp avatar May 22 '24 12:05 mkilp

@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

renet avatar May 22 '24 14:05 renet