New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unsure about where translation files come from #55
Comments
HI @mikedloss, This is my fault for not yet adding an overview section in our docs explaining the high-level architecture of FBT. I'll message our engineers internally about adding some overview documentation. These particular files were manually translated by our vendors and I did a query to fetch them from our internal DB. I then generated the JSON from the Object in the expected format which is described here: https://facebookincubator.github.io/fbt/docs/translating To get to the root of your question, those translation JSON files are not generated for "free". The translation "cloud" and "Storage" in the above diagram are NOT provided by the FBT framework. And that magical dotted arrow going from the "storage" to the "translation dictionaries" are basically what calling the "translate" script on those JSON translations input represents. |
Thanks @jrwats ! So from my understanding, we'd need to convert our translations over into a .json file that can be picked up and used by the "translate dictionaries" script, right? |
@jrwats @kayhadrin @w1106c Any updates to adding the architecture overview documentation? Or any plans for additional documentation on how to add additional languages? |
If anyone plans to just handle translations in the source code directly (not following @jrwats diagram above) I've created a script that take the output from You still need to translate the actual text yourself though... 😹 |
I'm building a crowdsourced translation tool / manager that would allow you to have a similar workflow demonstrated above by @jrwats. You can check it out here -> https://helptranslate.com While it's in early preview, I'm willing to help you integrate it with FBT and set all the things up. |
This is great, thanks! It was a bit hard to figure out how to use the "locales" parameter, though. It would be nice to put an example of the locales.js that you mention in the README. To make it work, I created a src/i18n/locales.js with the following sample content: module.exports = { en_US: {}, it_IT: {} } Update: found more info in your blog post: https://medium.com/@adamramberg/translate-your-react-app-with-ease-using-facebooks-own-framework-fbt-e8f6af04d3d9 :) |
I'm trying to understand the
fbt
demo app a little better. I think I understand what most scripts are doing, but I don't understand where any of the./translations/*.json
files come from. They seem to be auto generated due to there being base64 strings as keys.Are these json files auto generated? Or compiled by hand?
(to be clear - I'm not asking about the actual translated text, I'm asking about how these files get generated for me to fill in with my own translations for phrases 😊)
The text was updated successfully, but these errors were encountered: