fluent-lua

Lua implementation of Project Fluent https://projectfluent.org

MIT License

Stars
19

Bot releases are hidden (Show)

fluent-lua - v0.2.0 Latest Release

Published by alerque over 2 years ago

Bug Fixes

  • Inform Git about fixtures with special requirements
  • Correct access protocol to GitHub in dev rockspec
  • Correct logic errors revealed by new Luacheck release

Features

  • Add external access to file loader
fluent-lua -

Published by alerque over 2 years ago

Bug Fixes

  • Correct path in git checkout for LuaRocks installer
fluent-lua -

Published by alerque over 2 years ago

Bug Fixes

  • Use git+https URL scheme to pull rock data from GitHub
fluent-lua -

Published by alerque over 2 years ago

Complete a PEG grammar based parser for the entire 1.0 Fluent file format spec. All the pieces are there, but it's only partially tested. It at least parses a few basic types of entries. The AST it returns is straight out of luaebnf and probably needs massaging to match the reference ones (via capture groups?), then it needs testing against the upstream fixtures.

fluent-lua -

Published by alerque over 2 years ago

Initialize project with some boilerplate Lua apparatus.

fluent-lua -

Published by alerque over 2 years ago

Massage the AST returned by the PEG grammar so that about 1/3 of the possible types look like the reference Fluent spec. A basic Lua API is starting to take shape, modeled most closely to the Python implementation. It is possible to load and parse almost any FTL file, and possible to format any messages that are plain strings (no parameters, attributes, functions, or other jazz yet). Note there is no locale handling yet so it's only usable with separate instances per locale. Also add_messages() likely only works once, so cram your whole FTL resource in there for now.

fluent-lua -

Published by alerque over 2 years ago

Add support for more types including format support for TextElement, StringLiteral, NumberLiteral, and VariableReference. Variable substitutions can be done by passing a parameters table to format(). Internally manipulating nodes in the API is now easier with meta methods. For example merge comments with Comment + Comment, attach children with Message * Comment, etc.

fluent-lua -

Published by alerque over 2 years ago

Add support for attributes plus access to messages using idiomatic Lua (table properties).

fluent-lua -

Published by alerque over 2 years ago

Cut a safe-haven release for anybody (including myself) using this in production before I move on. Looking at Git history it looks like refinements include improved PEG grammars, saner namespacing for easier project integration, better use of Penlight classing, and more advanced handling of terms. Dependencies now include cldr-lua, and tests now use CLDR compatible locales. Lua 5.4 support was also officially added.

fluent-lua - v0.1.0

Published by alerque over 2 years ago

Completely overhaul the object handling using more robust Penlight class syntax variant. Property and attribute indexing now works in many more situations. The test coverage is greatly improved as well, so the things that work are provably functional. Many edge case bugs where resources leaked between locales have been fixed. Loading multiple locales into a bundle and updating existing messages works as expected.

fluent-lua -

Published by alerque over 2 years ago

Bug Fixes

  • Use rockspec syntax compatible with older LuaRocks
Badges
Extracted from project README
Luacheck Busted Coverage Status GitHub tag (latest SemVer) LuaRocks Join the chat at https://gitter.im/fluent-lua/community