3 ms·
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/Flue
by indentit 7y ago
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...
- indentit 7y agoI 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/a4f49a4a7eeb93535a6243be81c7c2a2b553c904/client/editor-mode-fluent.js#L19-L161 https://github.com/projectfluent/play/blob/a4f49a4a7eeb93535...
- zbraniecki 7y agoI started https://github.com/projectfluent/fluent.vim https://github.com/projectfluent/fluent.vim but my vimscript is terrible and I will take all help I can get :)
- stasm 7y agoYou 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 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!