python-fluent icon indicating copy to clipboard operation
python-fluent copied to clipboard

Undocumented, maybe unused and maybe inconsistent parameter `use_isolating`

Open studyingegret opened this issue 11 months ago • 1 comments

(API Page) Present in constructors of FluentLocalization and FluentBundle, the use_isolating parameter is not explained. It does not seem to be used either: FluentLocalization delegates it to FluentBundle, and FluentBundle doesn't use it for anything (except that FluentBundle passes self to ResolverEnvironment, which may expose self.use_isolating, but I did not check further).

In addition, the default value of use_isolating in FluentLocalization constructor is False, while in FluentBundle's it is True.

studyingegret avatar Jan 20 '25 11:01 studyingegret

It determines whether to wrap placeholders with FSI/PDI bidirectional isolation marks, here: https://github.com/projectfluent/python-fluent/blob/df5ef402be3cf61f4a16e54e490e37e9cf276c05/fluent.runtime/fluent/runtime/resolver.py#L193-L195

The option is documented at the very bottom of the Internals of fluent.runtime document.

eemeli avatar Jan 20 '25 18:01 eemeli