Closed SilentImp closed 4 years ago
It looks like if I write it this way it works properly: Looks like if I write it in this manner it's works:
<Trans
id="{gender, select, female {Find {professionPluralName} near you} other {Find {professionPluralName} near you}}"
defaults="{gender, select, female {Find {professionPluralName} near you} other {Find {professionPluralName} near you}}"
values={{ professionPluralName, gender }}
/>
But looks really sad.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I have a gender-dependent translation for Italian. A string that I want to translate also includes the variable. I tried:
generated:
"{gender, select, female {Find {professionPluralName} near you} other {Find {professionPluralName} near you}}": "{gender, select, female {Find {professionPluralName} near you} other {Find {professionPluralName} near you}}",
ButprofessionPluralName
was replaced with empty string, despite being present in same scope.generated:
"{gender, select, female {} other {}}": "{gender, select, female {} other {}}"
which was obviously broken.generated: "{gender, select, female {Find {professionPluralName} near you} other {Find {professionPluralName} near you}}" same problem us without Trans
What I need to do to pass
professionPluralName
, and what is the correct way to do it?Expected behavior To be able to pass multiple variables to the Select component.
.babelrc
) or framework you use (Create React App, Meteor, etc.)module.exports = { presets: [ [ "next/babel", { "preset-env": { corejs: 3, modules: isTestEnvironment ? "commonjs" : false, debug: false, useBuiltIns: "entry", targets: { browsers: [">0.2%", "not dead", "not ie < 11", "not op_mini all"], }, }, }, ], ], plugins: [ "macros", "ramda", [ "emotion", { labelFormat: "[local]", }, ], [ "module-resolver", { alias: { infrastructure: "./src/infrastructure", pages: "./src/ui/pages", sharedKernel: "./src/ui/sharedKernel", designSystem: "./lib/designSystem", }, }, ], ], };