Releases: projectfluent/python-fluent
fluent 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:
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) orIdentifiers
. TheVariantName
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 useLF
orCRLF
.Tab
is not recognized as syntax whitespace. It can only be used in translation content.
fluent 0.8.0 (July 24, 2018)
-
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.
fluent 0.7.0 (April 11, 2018)
-
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 toVariantExpression
. (#62)The
Identifier
-typedid
field has been removed. The newref
field contains theMessageReference
node rigt now. The range of valid expressions forref
may be extended in the future. -
Fix missing
Spans
onFunction
nodes.
fluent 0.6.4 (March 1, 2018)
- 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)
- Fix merge code to handle Terms properly
fluent 0.6.2 (February 8, 2018)
-
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 asid =
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)
Various fixes to fluent.migrate
for bug 1424682.
-
Accept
Patterns
andPatternElements
inREPLACE
. (#41)REPLACE
can now usePatterns
,PatternElements
andExpressions
as
replacement values. This makesREPLACE
accept the same Transforms as
CONCAT
. -
Never migrate partial translations. (#44)
Partial translations may break the AST because they produce
TextElements
withNone
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)
-
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)
-
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 toadd_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)
- Bug 1397234 - Allow blank lines before attributes, tags and multiline patterns
- Bug 1406342 - Trim trailing newline in Comment and Section spans