Python implementation of Project Fluent

Overview

Project Fluent

This is a collection of Python packages to use the Fluent localization system.

python-fluent consists of these packages:

fluent.syntax

The syntax package includes the parser, serializer, and traversal utilities like Visitor and Transformer. You’re looking for this package if you work on tooling for Fluent in Python.

fluent.runtime

The runtime package includes the library required to use Fluent to localize your Python application. It comes with a Localization class to use, based on an implementation of FluentBundle. It uses the tooling parser above to read Fluent files.

fluent.pygments

A plugin for pygments to add syntax highlighting to Sphinx.

Discuss

We’d love to hear your thoughts on Project Fluent! Whether you’re a localizer looking for a better way to express yourself in your language, or a developer trying to make your app localizable and multilingual, or a hacker looking for a project to contribute to, please do get in touch on the mailing list and the IRC channel.

Get Involved

python-fluent is open-source, licensed under the Apache License, Version 2.0. We encourage everyone to take a look at our code and we’ll listen to your feedback.

Comments
  • Implement MessageContext.format

    Implement MessageContext.format

    Implementation of #65

    This is incomplete, but at a reviewable level - the remaining work to be done shouldn't influence the overall design that much.

    I'm unlikely to get back to this soon, but leaving this here so that others are aware that a start has been made, and if anyone wants to give feedback then they can.

    opened by spookylukey 31
  • AttributeError: 'FluentBundle' object has no attribute 'add_messages'

    AttributeError: 'FluentBundle' object has no attribute 'add_messages'

    I'm shopping around for gettext replacements. Is the python fluent client (and fluent more broadly) still being maintained?

    I mainly ask because even the happy path described in the docs does not work properly right now:

    pip install fluent.runtime
    python
    
    from fluent.runtime import FluentBundle
    bundle = FluentBundle(['en-US'])
    bundle.add_messages("""""")
    Traceback (most recent call last):
      File "/park/server/env/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 3331, in run_code
        exec(code_obj, self.user_global_ns, self.user_ns)
      File "<ipython-input-2-2a5756cb5134>", line 4, in <module>
        bundle.add_messages("""""")
    AttributeError: 'FluentBundle' object has no attribute 'add_messages'
    

    Looks like it was yanked out in the 0.3.0 "pre-release" and the docs weren't updated.

    Anyway, Fluent seems cool, but I'd rather not go through the heartache of using it only to learn in 6 months that Mozilla has abandoned it. Thanks for any insight you have!

    opened by plowman 13
  • Migrate empty translations

    Migrate empty translations

    Migrate empty translations as {""}. See https://bugzil.la/1441942.

    Empty plural variants are also kept as {""} to preserve as much of the original intent as possible. Dropping them could result in different behavior when the default variant is displayed instead.

    This doesn't address migrating leading and trailing whitespace in non-whitespace-only legacy translations. See https://bugzil.la/1374246.

    See https://github.com/projectfluent/python-fluent/pull/54#issuecomment-371536006.

    opened by stasm 10
  • Implement BaseNode.visit API

    Implement BaseNode.visit API

    BaseNode.traverse can be costly because it clones the entire tree under the node it ran on. We should add a new method just for non-destructive visiting. This will be useful for the equals methods, as well as for the compare-locales checks.

    fluent.syntax 
    opened by stasm 9
  • Docs and/or status of project

    Docs and/or status of project

    At first I was going to ask for docs on how to actually use this package. On further inspection it doesn't look like it has yet reached minimum functionality. If would be great if the README could be updated to indicate the project status.

    Thanks!

    opened by spookylukey 9
  • Compiling MessageContext

    Compiling MessageContext

    This is a second implementation of MessageContext using a compile-to-python strategy. The PR builds on top of #67 and should be reviewed after that has been merged.

    My idea is that both implementations will be available, with the compiler the default because it is much faster (some benchmarks included in the new benchmark script). The interpreter is much easier to add new things to (which could be important for other contributors) and has some features/behaviour that the compiler doesn't have (documented). In addition, the two implementations can help test each other to some extent, and if you have any planned extensions, having two implementations, although twice the work, can help to ensure that the new feature doesn't limit you to a specific implementation strategy.

    For example, I have an escapers feature that I need for django-ftl - see docs , which I've been able to implement for both the interpreter and compiler, but starting with the interpreter was easier. (That branch hasn't been updated for the 0.6 spec changes yet).

    This branch is mostly complete, but probably needs some final cleanup. I'm opening it now in order to make @stasm aware of its existence (especially as I'm away for a bit now). It doesn't change that much from the interpreter MessageContext already implemented, but does clean up and clarify a few things (e.g. the error handling strategy), and MessageContext gains a check_message method (currently undocumented).

    If you want to look at it, I imagine that starting with reading the tests/test_compiler.py tests will be the best way to go - it will illustrate the whole strategy, and the kind of optimizations that are implemented, which should explain a lot of the compiler.py and codegen.py code.

    opened by spookylukey 8
  • Attributes and tags and multiline patterns should allow blank lines before them

    Attributes and tags and multiline patterns should allow blank lines before them

    Currently, none of the following messages parses correctly:

    foo =
    
    
        Mutliline Foo Value
    
    
    bar1
    
    
        .attr = Attr
    
    
    bar2
    
    
        .attr1 = Attr1
    
    
        .attr2 = Attr2
    
    
    
    bar3 =
    
    
        Multiline Bar Value
    
    
        .attr = Attr
    
    
    bar4
    
    
        .attr =
    
    
            Multiline Attr Value
    
    
    qux1 = Qux
    
    
        #tag
    
    
    qux2 = Qux
    
    
        #tag1
    
    
        #tag2
    
    opened by stasm 8
  • Never migrate partial translations

    Never migrate partial translations

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

    In the future we might be able to allow partial migrations in some situations, like migrating a subset of attributes of a message. See https://bugzilla.mozilla.org/show_bug.cgi?id=1321271.

    opened by stasm 7
  • Documentation is out of date

    Documentation is out of date

    Edit: It appeared that the fluent.runtime I installed with pip install fluent.runtime was actually a lot older than what I expected.

    When adding messages to Fluent bundles, the documentation at https://fluent-runtime.readthedocs.io/en/latest/index.html states you can directly add the messages as a template string like so:

    >>> bundle.add_messages("""
    ... welcome = Welcome to this great app!
    ... greet-by-name = Hello, { $name }!
    ... """)
    

    In reality, you have to wrap the template string into a FluentResource and use bundle.add_resource instead of bundle.add_messages because it does not exist. The add_resource function checks if there is a body key in the resource function parameter, which is generated by the FluentResource class.

    from fluent.runtime import FluentBundle, FluentResource
    
    bundle = FluentBundle(['en-us'])
    bundle.add_resource(FluentResource("""
    welcome = Welcome!
    """))
    

    Also, bundle.format() does not exist.

    opened by alehuo 5
  • Add the Placeable node

    Add the Placeable node

    WIP. Implement https://github.com/projectfluent/fluent/pull/52.

    This doesn't pass structure tests because the AST changes, obviously. All but one behavior tests pass. I'm trying to find the bug.

    opened by stasm 5
  • Add Spans to all Nodes

    Add Spans to all Nodes

    Most AST nodes can now have a Span. Use FluentParser(with_spans=True) to enable this behavior. The with_annotations config option to FluentParser has been removed. The parser always produces Annotations if necessary now.

    opened by stasm 5
  • Bump certifi from 2020.12.5 to 2022.12.7 in /docs

    Bump certifi from 2020.12.5 to 2022.12.7 in /docs

    Bumps certifi from 2020.12.5 to 2022.12.7.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Incorrect handling of tabs in message value

    Incorrect handling of tabs in message value

    As identified in https://github.com/mozilla/pontoon/issues/2470#issuecomment-1107451952, this happens:

    from fluent.syntax import ast, FluentParser, FluentSerializer
    parser = FluentParser()
    serializer = FluentSerializer()
    
    string = """places-open-in-container-tab =
        .label = Բացել նոր ներդիրում
        .accesskey =	
    """
    
    string
    'places-open-in-container-tab =\n    .label = Բացել նոր ներդիրում\n    .accesskey = \t\n'
    
    serializer.serialize(parser.parse(string))
    'places-open-in-container-tab =\n    .label = Բացել նոր ներդիրում\n    .accesskey = \n'
    

    Tabs should not be lost; they count as valid inline_text characters according to the spec.

    opened by eemeli 2
  • Bump babel from 2.9.0 to 2.9.1 in /docs

    Bump babel from 2.9.0 to 2.9.1 in /docs

    Bumps babel from 2.9.0 to 2.9.1.

    Release notes

    Sourced from babel's releases.

    Version 2.9.1

    Bugfixes

    • The internal locale-data loading functions now validate the name of the locale file to be loaded and only allow files within Babel's data directory. Thank you to Chris Lyne of Tenable, Inc. for discovering the issue!
    Changelog

    Sourced from babel's changelog.

    Version 2.9.1

    Bugfixes

    
    * The internal locale-data loading functions now validate the name of the locale file to be loaded and only
      allow files within Babel's data directory.  Thank you to Chris Lyne of Tenable, Inc. for discovering the issue!
    
    Commits
    • a99fa24 Use 2.9.0's setup.py for 2.9.1
    • 60b33e0 Become 2.9.1
    • 412015e Merge pull request #782 from python-babel/locale-basename
    • 5caf717 Disallow special filenames on Windows
    • 3a700b5 Run locale identifiers through os.path.basename()
    • 5afe2b2 Merge pull request #754 from python-babel/github-ci
    • 58de834 Replace Travis + Appveyor with GitHub Actions (WIP)
    • d1bbc08 import_cldr: use logging; add -q option
    • 156b7fb Quiesce CLDR download progress bar if requested (or not a TTY)
    • 613dc17 Make the import warnings about unsupported number systems less verbose
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Cannot read string beyond 1000 characters

    Cannot read string beyond 1000 characters

    When trying to access a string with the format_value() method, it returns the string normally given it's a relatively short string. But if a string longer than 73 lines is entered, it returns {???} instead of said string. PFA test case which will help reproduce the bug here.

    bug help wanted fluent.runtime 
    opened by GetPsyched 1
  • FluentLocalization swallows errors

    FluentLocalization swallows errors

    fluent_value does not provide a way to retrieve errors produced out of bundle - https://github.com/projectfluent/python-fluent/blob/c58681f1e90c14dd36c2ff35d7d487235b685177/fluent.runtime/fluent/runtime/fallback.py#L37

    This makes it really hard to debug them for the user :)

    bug help wanted fluent.runtime 
    opened by zbraniecki 0
  • [email protected](Sep 15, 2020)

    • Fix serialization of multiline patterns starting with special characters. (#156)

      The built-in behavior of FluentSerializer is to serialize multiline patterns starting on a new line:

      key =
          Foo
          Bar
      

      This used to lead to syntax errors if the pattern started with one of the special characters in the Fluent Syntax: a curly brace, a period, an asterisk, or a square bracket, and if it was originally written with the first line on the same line as the identifier:

      key = *Foo
          Bar
      

      Such a pattern must not be serialized as following, because the asterisk has a special meaning if placed at the beginning of a line.

      # Syntax Error
      key =
          *Foo
          Bar
      

      The fix preserves the original layout of the pattern, i.e. it is now serialized starting inline with the identifier

    Source code(tar.gz)
    Source code(zip)
  • [email protected](May 20, 2020)

    • Documentation is now on https://projectfluent.org/python-fluent/fluent.syntax/.
    • Removal of deprecated BaseNode.traverse method.
    • Refactor Visitor and Transformer into fluent.syntax.visitor (from .ast)
    Source code(tar.gz)
    Source code(zip)
  • [email protected](May 20, 2020)

  • [email protected](May 20, 2020)

  • [email protected](Oct 23, 2019)

    • Added fluent.runtime.FluentResource and fluent.runtime.FluentBundle.add_resource.
    • Removed fluent.runtime.FluentBundle.add_messages.
    • Replaced bundle.format() with bundle.format_pattern(bundle.get_message().value).
    • Added fluent.runtime.FluentLocalization as main entrypoint for applications.
    Source code(tar.gz)
    Source code(zip)
  • [email protected](Sep 10, 2019)

  • [email protected](Sep 10, 2019)

    • Release a version with compatibility with the latest fluent.syntax 0.17.0.
    • First release with Fluent Syntax 1.0
    • Next release should revise APIs to be aligned with other implementations.
    Source code(tar.gz)
    Source code(zip)
  • [email protected](Aug 15, 2019)

    Initial release of fluent.pygments.

    Use this module to add syntax highlighting to documentation written in Sphinx and other tools that use pygments underneath.

    Source code(tar.gz)
    Source code(zip)
  • [email protected](Aug 6, 2019)

  • [email protected](Aug 1, 2019)

  • [email protected](Apr 17, 2019)

  • [email protected](Mar 26, 2019)

    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
    Source code(tar.gz)
    Source code(zip)
  • [email protected](Mar 25, 2019)

    • 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
      
    Source code(tar.gz)
    Source code(zip)
  • [email protected](Feb 15, 2019)

    • 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.

    Source code(tar.gz)
    Source code(zip)
  • [email protected](Feb 14, 2019)

    • 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.

    Source code(tar.gz)
    Source code(zip)
  • [email protected](Jan 21, 2019)

    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.

    Source code(tar.gz)
    Source code(zip)
  • [email protected](Jan 15, 2019)

    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.

    Source code(tar.gz)
    Source code(zip)
  • 0.10.0(Dec 13, 2018)

    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.
    Source code(tar.gz)
    Source code(zip)
  • 0.9.0(Oct 23, 2018)

    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.
    Source code(tar.gz)
    Source code(zip)
  • 0.8.0(Jul 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.

    Source code(tar.gz)
    Source code(zip)
  • 0.7.0(Apr 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 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.

    Source code(tar.gz)
    Source code(zip)
  • 0.6.4(Mar 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
    Source code(tar.gz)
    Source code(zip)
  • 0.6.3(Feb 13, 2018)

  • 0.6.2(Feb 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 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)

    Source code(tar.gz)
    Source code(zip)
  • 0.6.1(Feb 6, 2018)

    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)

    Source code(tar.gz)
    Source code(zip)
  • 0.6.0(Jan 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)

    Source code(tar.gz)
    Source code(zip)
  • 0.4.4(Nov 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 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.

    Source code(tar.gz)
    Source code(zip)
  • 0.4.3(Nov 29, 2017)

    • Bug 1397234 - Allow blank lines before attributes, tags and multiline patterns
    • Bug 1406342 - Trim trailing newline in Comment and Section spans
    Source code(tar.gz)
    Source code(zip)
  • 0.4.2(Nov 29, 2017)

    • Add an intermediate Placeable node for Expressions within Patterns.

      This allows storing more precise information about the whitespace around the placeable's braces.

      See https://github.com/projectfluent/fluent/pull/52.

    • Serializer: Add newlines around standalone comments.

    Source code(tar.gz)
    Source code(zip)
  • 0.4.1(Nov 29, 2017)

    • Add BaseNode.equals for deep-equality testing.

      Nodes are deeply compared on a field by field basis. If possible, False is returned early. When comparing attributes, tags and variants in SelectExpressions, the order doesn't matter. By default, spans are not taken into account. Other fields may also be ignored if necessary:

      message1.equals(message2, ignored_fields=['comment', 'span'])
      
    Source code(tar.gz)
    Source code(zip)
Owner
Project Fluent
A localization paradigm designed to unleash the entire expressive power of natural language translations.
Project Fluent
BC3407-Group-5-Project - BC3407 Group Project With Python

BC3407-Group-5-Project As the world struggles to contain the ever-changing varia

null 1 Jan 26, 2022
Project Aquarium is a SUSE-sponsored open source project aiming at becoming an easy to use, rock solid storage appliance based on Ceph.

Project Aquarium Project Aquarium is a SUSE-sponsored open source project aiming at becoming an easy to use, rock solid storage appliance based on Cep

Aquarist Labs 73 Jul 21, 2022
This project uses reinforcement learning on stock market and agent tries to learn trading. The goal is to check if the agent can learn to read tape. The project is dedicated to hero in life great Jesse Livermore.

Reinforcement-trading This project uses Reinforcement learning on stock market and agent tries to learn trading. The goal is to check if the agent can

Deepender Singla 1.4k Dec 22, 2022
It's final year project of Diploma Engineering. This project is based on Computer Vision.

Face-Recognition-Based-Attendance-System It's final year project of Diploma Engineering. This project is based on Computer Vision. Brief idea about ou

Neel 10 Nov 2, 2022
Erpnext app for make employee salary on payroll entry based on one or more project with percentage for all project equal 100 %

Project Payroll this app for make payroll for employee based on projects like project on 30 % and project 2 70 % as account dimension it makes genral

Ibrahim Morghim 8 Jan 2, 2023
UpChecker is a simple opensource project to host it fast on your server and check is server up, view statistic, get messages if it is down. UpChecker - just run file and use project easy

UpChecker UpChecker is a simple opensource project to host it fast on your server and check is server up, view statistic, get messages if it is down.

Yan 4 Apr 7, 2022
The project is an official implementation of our CVPR2019 paper "Deep High-Resolution Representation Learning for Human Pose Estimation"

Deep High-Resolution Representation Learning for Human Pose Estimation (CVPR 2019) News [2020/07/05] A very nice blog from Towards Data Science introd

Leo Xiao 3.9k Jan 5, 2023
This project is the official implementation of our accepted ICLR 2021 paper BiPointNet: Binary Neural Network for Point Clouds.

BiPointNet: Binary Neural Network for Point Clouds Created by Haotong Qin, Zhongang Cai, Mingyuan Zhang, Yifu Ding, Haiyu Zhao, Shuai Yi, Xianglong Li

Haotong Qin 59 Dec 17, 2022
This project is a loose implementation of paper "Algorithmic Financial Trading with Deep Convolutional Neural Networks: Time Series to Image Conversion Approach"

Stock Market Buy/Sell/Hold prediction Using convolutional Neural Network This repo is an attempt to implement the research paper titled "Algorithmic F

Asutosh Nayak 136 Dec 28, 2022
The project is an official implementation of our paper "3D Human Pose Estimation with Spatial and Temporal Transformers".

3D Human Pose Estimation with Spatial and Temporal Transformers This repo is the official implementation for 3D Human Pose Estimation with Spatial and

Ce Zheng 363 Dec 28, 2022
Implementation of experiments in the paper Clockwork Variational Autoencoders (project website) using JAX and Flax

Clockwork VAEs in JAX/Flax Implementation of experiments in the paper Clockwork Variational Autoencoders (project website) using JAX and Flax, ported

Julius Kunze 26 Oct 5, 2022
This project is a re-implementation of MASTER: Multi-Aspect Non-local Network for Scene Text Recognition by MMOCR

This project is a re-implementation of MASTER: Multi-Aspect Non-local Network for Scene Text Recognition by MMOCR,which is an open-source toolbox based on PyTorch. The overall architecture will be shown below.

Jianquan Ye 82 Nov 17, 2022
PyTorch Implementation of Realtime Multi-Person Pose Estimation project.

PyTorch Realtime Multi-Person Pose Estimation This is a pytorch version of Realtime_Multi-Person_Pose_Estimation, origin code is here Realtime_Multi-P

Dave Fang 157 Nov 12, 2022
This is project is the implementation of the DeepShift: Towards Multiplication-Less Neural Networks paper

DeepShift This is project is the implementation of the DeepShift: Towards Multiplication-Less Neural Networks paper, that aims to replace multiplicati

Mostafa Elhoushi 88 Dec 23, 2022
Implementation of the final project of the course DDA6309 Probabilistic Graphical Model

Task-aware Joint CWS and POS (TCwsPos) This is the implementation of the final project of the course DDA6309 Probabilistic Graphical Models, The Chine

Peng 1 Dec 26, 2021
This git repo contains the implementation of my ML project on Heart Disease Prediction

Introduction This git repo contains the implementation of my ML project on Heart Disease Prediction. This is a real-world machine learning model/proje

Aryan Dutta 1 Feb 2, 2022
This project is the PyTorch implementation of our CVPR 2022 paper:

Requirements and Dependency Install PyTorch with CUDA (for GPU). (Experiments are validated on python 3.8.11 and pytorch 1.7.0) (For visualization if

Lei Huang 23 Nov 29, 2022
Space-invaders - Simple Game created using Python & PyGame, as my Beginner Python Project

Space Invaders This is a simple SPACE INVADER game create using PYGAME whihc hav

Gaurav Pandey 2 Jan 8, 2022
A python-image-classification web application project, written in Python and served through the Flask Microframework

A python-image-classification web application project, written in Python and served through the Flask Microframework. This Project implements the VGG16 covolutional neural network, through Keras and Tensorflow wrappers, to make predictions on uploaded images.

Gerald Maduabuchi 19 Dec 12, 2022