Skip to content

Releases: projectfluent/python-fluent

fluent 0.9.0

23 Oct 12:18
Compare
Choose a tag to compare
fluent 0.9.0 Pre-release
Pre-release

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

  • Implement Fluent Syntax 0.7. (#287)

    The major new feature of Syntax 0.7 is the relaxation of the indentation requirement for all non-text elements of patterns. It's finally possible to leave the closing brace of select expressions unindented:

    emails = { $unread_email_count ->
        [one] You have one unread email.
       *[other] You have { $unread_email_count } unread emails.
    }

    Consult the changelog to learn about other changes in Syntax 0.7.

Backward-incompatible changes:

  • Variant keys can now be either NumberLiterals (as previously) or Identifiers. The VariantName node class has been removed. Variant keys with spaces in them produce syntax errors, e.g. [New York].
  • CR is not a valid EOL character anymore. Please use LF or CRLF.
  • Tab is not recognized as syntax whitespace. It can only be used in translation content.

fluent 0.8.0 (July 24, 2018)

24 Jul 16:56
Compare
Choose a tag to compare
Pre-release

fluent 0.7.0 (April 11, 2018)

11 Apr 12:34
Compare
Choose a tag to compare
Pre-release
  • Remove fluent.migrate.

    The migration code has been moved into its own repository:
    fluent-migration. See bug 1445881 for more information about the move.

  • Add the ref field to VariantExpression. (#62)

    The Identifier-typed id field has been removed. The new ref field contains the MessageReference node rigt now. The range of valid expressions for ref may be extended in the future.

  • Fix missing Spans on Function nodes.

fluent 0.6.4 (March 1, 2018)

01 Mar 09:20
Compare
Choose a tag to compare
Pre-release
  • use compare-locales for plurals ordering (bug 1415844)
  • create transforms when all dependencies have been met up to a changeset
  • support variant keys in BaseNode.equals
  • serialize select expressions on a new line

fluent 0.6.3 (February 13, 2018)

13 Feb 17:39
Compare
Choose a tag to compare
Pre-release
  • Fix merge code to handle Terms properly

fluent 0.6.2 (February 8, 2018)

08 Feb 16:39
Compare
Choose a tag to compare
Pre-release
  • Inline Patterns may start with any character. (#48)

    }, ., * and [ are only special when they appear at the beginning of indented Pattern lines. When a Pattern starts on the same line as id = or [variant key], its first character doesn't carry any special meaning and it may be one of those four ones as well.

    This also fixes a regression from 0.6.0 where a message at the EOF without value nor attributes was incorrectly parsed as a message with an empty Pattern rather than produce a syntax error.

  • Require compare-locales to run and test fluent.migrate. (#47)

fluent 0.6.1 (February 6, 2018)

06 Feb 18:46
Compare
Choose a tag to compare
Pre-release

Various fixes to fluent.migrate for bug 1424682.

  • Accept Patterns and PatternElements in REPLACE. (#41)

    REPLACE can now use Patterns, PatternElements and Expressions as
    replacement values. This makes REPLACE accept the same Transforms as
    CONCAT.

  • Never migrate partial translations. (#44)

    Partial translations may break the AST because they produce
    TextElements with None values. For now, we explicitly skip any
    transforms which depend on at least one missing legacy string to avoid
    serialization errors.

  • Warn about unknown FTL entries in transforms. (#40)

  • Fix how files are passed to hg annotate. (#39)

fluent 0.6.0 (January 31, 2018)

31 Jan 20:19
Compare
Choose a tag to compare
Pre-release
  • Implement Fluent Syntax 0.5.

    • Add support for terms.
    • Add support for #, ## and ### comments.
    • Remove support for tags.
    • Add support for = after the identifier in message and term defintions.
    • Forbid newlines in string expressions.
    • Allow trailing comma in call expression argument lists.

    In fluent-syntax 0.6.x the new Syntax 0.5 is supported alongside the old Syntax 0.4. This should make migrations easier.

    FluentParser will correctly parse Syntax 0.4 comments (prefixed with //), sections and message definitions without the = after the identifier. The one exception are tags which are no longer supported. Please use attributed defined on terms instead.

    FluentSerializer always serializes using the new Syntax 0.5.

  • Expose FluentSerializer.serializeExpression. (#134)

  • Fix Bug 1428000 - Migrate: only annotate affected files (#34)

fluent 0.4.4 (November 29, 2017)

29 Nov 14:13
Compare
Choose a tag to compare
Pre-release
  • Run Structure and Behavior tests in Python 3 (#22)

  • Bug 1411943 - Fix Blame for Mercurial 4.3+ (#23)

  • Bug 1412808 - Remove the LITERAL helper. (#25)

  • Bug 1321279 - Read target FTL files before migrations. (#24)

    The reference file for the transforms must now be passed as the second
    argument to add_transforms.

  • Bug 1318960 - Migrate files only when their messages change (#26)

  • Bug 1366298 - Skip SelectExpression in PLURALS for one plural category (#27)

  • Bug 1321290 - Migrate HTML entities to Unicode characters (#28)

  • Bug 1420225 - Read legacy files when scanning for Sources in transforms (#30)

    MergeContext.maybe_add_localization is now automatically called
    internally when the context encounters a transforms which is a subclass of
    Source.

fluent 0.4.3 (October 9, 2017)

29 Nov 14:08
Compare
Choose a tag to compare
Pre-release
  • Bug 1397234 - Allow blank lines before attributes, tags and multiline patterns
  • Bug 1406342 - Trim trailing newline in Comment and Section spans