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
lingui extract should support Trans component imported from other locations than hardcoded @lingui/react.
In addition to Trans from @lingui/react, lingui cli can pick up runtimeConfigModule.Trans or something similar from config file.
Describe alternatives you've considered
lingui extract could pick up any <Trans /> usage regardless of import path, like it does with i18n._(). It would break backward compatibility, however.
Is your feature request related to a problem? Please describe.
I have a customized
Trans
component.npx -- lingui extract
does not extract messages from their direct usage.Macro usage works fine.
runtimeConfigModule
is configured as follows:Describe proposed solution
lingui extract
should supportTrans
component imported from other locations than hardcoded@lingui/react
.In addition to
Trans
from@lingui/react
, lingui cli can pick upruntimeConfigModule.Trans
or something similar from config file.Describe alternatives you've considered
lingui extract
could pick up any<Trans />
usage regardless of import path, like it does withi18n._()
. It would break backward compatibility, however.Additional context
@lingui/react
is hardcoded here:js-lingui/packages/babel-plugin-extract-messages/src/index.ts
Line 205 in 20d8478
Is runtimeConfigModule ignored by lingui-macro plugin when ran from
lingui extract
cli?The text was updated successfully, but these errors were encountered: