-
Notifications
You must be signed in to change notification settings - Fork 178
Enable locale
override at callsite
#204
Comments
Use case (locale selector): #190 (comment) |
Hey , can i work over this issue ? |
Of course! We're not actively working on it internally. |
Hey, Can you direct me to the file I need to contribute ? |
NOTE: our Here's where we currently process options. That fbt/packages/babel-plugin-fbt/src/babel-processors/FbtFunctionCallProcessor.js Lines 433 to 456 in 743e2e5
You'll need to add it to the "allowed" list of options fbt/packages/babel-plugin-fbt/src/FbtConstants.js Lines 23 to 33 in 743e2e5
After that we need to decide on how we want this manifested at runtime. It can be a "reserved key" in the payload itself Line 136 in 743e2e5
but, I think cleanest would be to add it to the Line 96 in 743e2e5
Following that, you'll want to process that option to change the lookup of the translations. This should be pretty straightforward. Update the signature here to take an optional fbt/runtime/nonfb/FbtTranslations.js Line 29 in 76debd6
|
A potentially nice feature to add to the runtime and Babel parser would be to enable a
locale
override at the callsite.is a lot easier to reason about than updating
genTranslatedInput
to do what you want.Originally posted by @jrwats in #190 (reply in thread)
The text was updated successfully, but these errors were encountered: