Transcoding Fluent.js to Java for L10n tools


There are too many FTL files for Thunderbird L10n now, so I’m going to try to write Java code to deal with them in MozillaTranslator or its successor. I don’t plan to write a full Java transcodification of Fluent libraries, just the strictly needed code to parsing (including comments and spaces, not just meaningful elements) and writing FTL files.

I plan to use fluent.js as the reference model (I think it is the closer syntax to Java, apart from C#, but I’m hesitant to use a non-official implementation as model). Of all JS Fluent packages, I’d say the one I need is fluent/syntax. Am I right? Will I need something else besides it?


The syntax package stuff is what you’d be looking at. There is as well, which already has parsing and serializing.

The quickest way to get Fluent support would probably be Pontoon, though. Reaching out to @kewisch should be all that’s needed. Just sayin’ :wink:

1 Like