projectfluent / python-fluent

Python implementation of Project Fluent
https://projectfluent.org/python-fluent/
Other
210 stars 26 forks source link

Cannot read string beyond 1000 characters #170

Open GetPsyched opened 3 years ago

GetPsyched commented 3 years ago

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.

zbraniecki commented 3 years ago

Python resolver has a hard limit on number of characters in a pattern part:

That limit results in any pattern part that is longer than 1000 characters to be rejected.

This behavior is unique to Python implementation of Fluent and has no equivalent in Rust or JS versions.