Fluent

Latest version: v0.10.0

Safety actively analyzes 623047 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

0.9.0

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:

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


Consult the [changelog](https://github.com/projectfluent/fluent/releases/tag/v0.7.0) 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.

0.8.0

- Implement support for Fluent Syntax 0.6. (69)

Syntax 0.6 keeps the syntax unchanged but makes many changes to the AST.
Consult https://github.com/projectfluent/fluent/releases/tag/v0.6.0
for the list of changes.

0.7.0

- Remove `fluent.migrate`.

The migration code has been moved into its own repository:
[fluent-migration](https://hg.mozilla.org/l10n/fluent-migration). See
[bug 1445881](https://bugzilla.mozilla.org/show_bug.cgi?id=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.

0.6.4

- use compare-locales for plurals ordering ([bug 1415844](https://bugzilla.mozilla.org/show_bug.cgi?id=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

0.6.3

- Fix merge code to handle Terms properly

0.6.2

- 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)

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.