You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
we're having an issue where using state in some way together with $localize doesn't do the proper translation
for example
<div>{$localize`translate {state.key}`}</div>
or
<div>{state.key
? $localize`translate one thing`
: $localize`translate another thing`}</div>
doesn't translate to any other language than the default on initial render, when updating the sate (and the component with the key it does do the translation)
if we "force" a component rerender by updating the key it does do the translation.
here's a repo with a reproduction
expected
$localize string is translated to language selected in the urlParam
actual result
$localize string is only translated after updating the state
The text was updated successfully, but these errors were encountered:
we're having an issue where using state in some way together with
$localize
doesn't do the proper translationfor example
or
doesn't translate to any other language than the default on initial render, when updating the sate (and the component with the
key
it does do the translation)if we "force" a component rerender by updating the
key
it does do the translation.here's a repo with a reproduction
expected
$localize string is translated to language selected in the urlParam
actual result
$localize string is only translated after updating the state
The text was updated successfully, but these errors were encountered: