facebook / fbt

A JavaScript Internationalization Framework
https://facebook.github.io/fbt
MIT License
3.88k stars 178 forks source link

Provide translation format interop #60

Open Hotell opened 5 years ago

Hotell commented 5 years ago

Hey folks!

I got 2 important questions to consider this in our next project:

Cheers

w1106c commented 5 years ago

Thanks for reaching out to us Hotell!

  1. Currently, we do not support exporting to .mo files but we will look into it and evaluate this option.
  2. We do not directly support any open source tooling at this point either. However, the output and input formats are not super complex, so I would imagine it to not be too hard to make these work with open source tools.
AndrewCraswell commented 4 years ago

@w1106c, @jrwats I'm getting ready to localize an application that we would like to use FBT for and this question is super relevant. I'm interested in your experience working with vendors to do the actual translations. Were FBT's JSON files designed to be compatible with some of the more popular translation file formats for tools used by translators, or is it a brand new standard? Or do you just give the raw JSON to translators and have them edit the same files inline?

jrwats commented 4 years ago

@AndrewCraswell, we actually have an internal tool to which vendors have access and through which they submit translations. They're shown the source string and description (as seen in the JSON output), and for any given parameter, they have the option to specify different strings depending on the variation of the parameter. These variations are determined on a per-locale basis.

We don't show them raw JSON

jrwats commented 4 years ago

I'll take today to look at how difficult it'd be to produce a POT file from FBT collection and similarly, ingest a PO file(s) for translation.

AndrewCraswell commented 4 years ago

That would be incredible. I think if something along those lines could become a feature than this library would be a perfect replacement for many existing localization libraries.

jrwats commented 4 years ago

Yeah it //appears// pretty straightforward from what I read so far. I'm hoping to get away with making POT and PO files in python brace format.

On Wed, Oct 9, 2019, 10:48 AM Andrew Craswell notifications@github.com wrote:

That would be incredible. I think if something along those lines could become a feature than this library would be a perfect replacement for many existing localization libraries.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/facebookincubator/fbt/issues/60?email_source=notifications&email_token=AAN4WFXGIGMZKLOUZBN5PSTQNYKNBA5CNFSM4HKTNLI2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAYXOFI#issuecomment-540112661, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAN4WFSI6ZQYQSNJQKT23ZLQNYKNBANCNFSM4HKTNLIQ .