Skip to content

Releases: projectfluent/python-fluent

fluent.syntax 0.16.0

06 Aug 12:34
Compare
Choose a tag to compare
fluent.syntax 0.16.0 Pre-release
Pre-release

fluent.syntax 0.15.1

01 Aug 14:24
Compare
Choose a tag to compare
fluent.syntax 0.15.1 Pre-release
Pre-release
  • Comment Serializer fix.

    The serializer had a bug when asked to serialize empty comments.

fluent.syntax 0.15.0

17 Apr 07:43
Compare
Choose a tag to compare
fluent.syntax 0.15.0 Pre-release
Pre-release
  • Support Fluent Syntax 1.0.

    Fluent Syntax 1.0 has been published today. There are no changes to the
    grammar nor the AST compared to the Syntax 0.9.

fluent.syntax 0.14.0

26 Mar 14:04
Compare
Choose a tag to compare
fluent.syntax 0.14.0 Pre-release
Pre-release

This release of fluent.syntax brings support for version 0.9 of the Fluent
Syntax spec. The API remains unchanged. Files written in valid Syntax 0.8 may
parse differently in this release. See the compatibility note below. Consult
the full Syntax 0.9 changelog for details.

  • Flatten complex reference expressions.

    Reference expressions which may take complex forms, such as a reference
    to a message's attribute, or a parameterized reference to an attribute of
    a term, are now stored in a simplified manner. Instead of nesting
    multiple expression nodes (e.g. CallExpression of an
    AttributeExpression of a TermReference), all information is available
    directly in the reference expression.

    This change affects the following AST nodes:

    • MessageReference now has an optional attribute field,
    • FunctionReference now has a required arguments field,
    • TermReference now has an optional attribute field and an optional
      arguments field.
  • Remove VariantLists.

    The VariantLists and the VariantExpression syntax and AST nodes were
    deprecated in Syntax 0.9 and have now been removed.

  • Rename StringLiteral.raw to value.

    StringLiteral.value contains the exact contents of the string literal,
    character-for-character. Escape sequences are stored verbatim without
    processing. A new method, Literal.parse, can be used to process the raw
    value of the literal into an unescaped form.

  • Rename args to arguments.

    The args field of MessageReference, TermReference,
    FunctionReference, and Annotation has been renamed to arguments.

Backward-incompatible changes:

  • VariantLists are no longer valid syntax. A syntax error is reported
    when a VariantList or a VariantExpression is found in the parsed file

fluent.syntax 0.13.0

25 Mar 16:49
Compare
Choose a tag to compare
fluent.syntax 0.13.0 Pre-release
Pre-release
  • Make BaseNode.equals stricter when comparing lists.

    Starting from this version, BaseNode.equals now takes the order of
    variants and attributes into account when comparing two nodes.

  • Remove FluentSerializer.serialize_expression.

    The stateless equivalent can still be imported from fluent.syntax.serializer:

    from fluent.syntax.serializer import serialize_expression

fluent.syntax 0.12.0

15 Feb 17:16
Compare
Choose a tag to compare
fluent.syntax 0.12.0 Pre-release
Pre-release
  • Fixes to the Visitor API

    The Visitor API introduced in 0.11 was changed to align more with
    what Python's ast.Visitor does. This also allows implementations
    to have code after descending into child nodes.

fluent.syntax 0.11.0

14 Feb 15:44
Compare
Choose a tag to compare
fluent.syntax 0.11.0 Pre-release
Pre-release
  • API enhancements

    There are two new APIs in fluent.syntax.ast, Visitor and Transformer.
    Use these APIs for read-only iteration over AST trees, and in-place mutation
    of AST trees, respectively. There's also a new method BaseNode.clone,
    which can be used to create a deep copy of an AST node.

  • DEPRECATIONS

    The API BaseNode.traverse is deprecated and will be removed in a future
    release. Please adjust your code to the Visitor or Transformer APIs.

fluent.runtime 0.1

21 Jan 18:10
Compare
Choose a tag to compare

First release to PyPI of fluent.runtime. This release contains a FluentBundle implementation that can generate transaltions from FTL spec. It targets the Fluent 0.6 spec.

fluent.syntax 0.10.0

15 Jan 18:41
Compare
Choose a tag to compare
fluent.syntax 0.10.0 Pre-release
Pre-release

The fluent package which used to provide the fluent.syntax module has been renamed to fluent.syntax on PyPI. The code is identical to fluent 0.10.

fluent 0.10.0

13 Dec 15:57
Compare
Choose a tag to compare
fluent 0.10.0 Pre-release
Pre-release

This release brings support for version 0.8 of the Fluent Syntax spec. The API remains unchanged. Files written in valid Syntax 0.7 may not parse correctly in this release. See the summary of backwards-incompatible changes below.

  • Implement Fluent Syntax 0.8. (#303)

    This is only a quick summary of the spec changes in Syntax 0.8. Consult the full changelog for details.

    In multiline Patterns, all common indent is now removed from each indented line in the final value of the pattern.

    multiline =
        This message has 2 spaces of indent
          on the second line of its value.

    Terms can now be parameterized via the call expression syntax.

    # A parametrized Term with a Pattern as a value.
    -thing = { $article ->
       *[definite] the thing
        [indefinite] a thing
    }
    
    this = This is { -thing(article: "indefinite") }.

    VariantLists are now deprecated and will be removed from the Syntax before version 1.0.

    All escapes sequences can only be used in StringLiterals now (see below). \UHHHHHH is a new escape sequence format suitable for codepoints above U+FFFF, e.g. {"\U01F602"}.

Backward-incompatible changes:

  • The backslash character (\) is now considered a regular character in TextElements. It's no longer possible to use escape sequences in TextElements. Please use StringLiterals instead, e.g. {"\u00A0"}.
  • The closing curly brace character (}) is not allowed in TextElements now. Please use StringLiterals instead: {"}"}.
  • StringLiteral.value was changed to store the unescaped ("cooked") value. StringLiteral.raw has been added to store the raw value.
  • The AST of CallExpressions was changed to better accommodate the introduction of parameterized Terms. The Function AST node has been replaced by the FunctionReference node.
  • The leading dash (-) is no longer part of the Identifier node in Terms and TermReferences.