runtime: add attribute formatting functionality in FluentLocalization by loudblow · Pull Request #212 · projectfluent/python-fluent
Extending format_value() like this would be rather misleading, as the added functionality is specifically about formatting a message attribute, not its value.
Instead, I think we should add a new method format_message(), which takes the same arguments as format_value(), but returns a tuple of the formatted value (or None, if there is no value), together with a dict of all of the formatted attributes, keyed by their names.
This connects with another Fluent design choice: attributes should not be used separately, but only as a part of the whole message.
Also, we do need to include tests and a documentation update when making an API change like this.