News for hackers. Stuff that matters.
Re:Fluent 1.0: a localization system for natural-sounding tr... by indentit on Wednesday April 17, 2019 @10:06PM (#19688166)
it'd be great to see syntax highlighting for FTL files in the popular text editors, but I guess they would have to be unofficial unless a member of Mozilla/Fluent team wants to maintain it...
Re:Fluent 1.0: a localization system for natural-sounding tr... by indentit on Thursday April 18, 2019 @12:56AM (#19688828)
I see that the playground has syntax highlighting and uses `ace`, whose syntax definitions are defined in JavaScript [0] and look fairly usable. I guess it could even be converted into a `.sublime-syntax` file without too much trouble :)

[0]: https://github.com/projectfluent/play/blob/a4f49a4a7eeb93535...

Re:Fluent 1.0: a localization system for natural-sounding tr... by stasm on Thursday April 18, 2019 @01:04PM (#19692701)
You can get decent highlighting for basic Fluent messages by setting the editor to a mode for Properties files. For instance, whenever I type Fluent examples in GitHub, I use the following markdown:

    ```properties
    # A comment
    hello = Hello, world!
    ```
This is in fact by design. Properties files are quite nice for simple things. Fluent builds on top of them, and provides modern features like multiline text blocks (as long as it's indented, it's considered text continuation) and the micro-syntax for expressions: {$var}, {$var -> ...} etc.

So far, I haven't had much time to invest in building proper highlighting modes for popular editors. There are ACE and Vim modes mentioned in other comments here, and also a slightly outdated https://atom.io/packages/language-ftl20n written by a contributor. I'd love to see more such contributions, and I'll be more than happy to help by reviewing code!

Re:Fluent 1.0: a localization system for natural-sounding tr... by zbraniecki on Thursday April 18, 2019 @02:49AM (#19689213)
I started https://github.com/projectfluent/fluent.vim but my vimscript is terrible and I will take all help I can get :)