[compare-locales] Optionally yield Sections and Comments from FluentParser.walk

RESOLVED FIXED

Status

RESOLVED FIXED
11 months ago
11 months ago

People

(Reporter: stas, Assigned: stas)

Tracking

Details

MozReview Requests

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

(Assignee)

Description

11 months ago
When onlyEntities is False, FluentParser should yield non-Message entries too, such as Comments and Sections.
(Assignee)

Updated

11 months ago
Depends on: 1406342
Comment hidden (mozreview-request)
(Assignee)

Comment 2

11 months ago
This bug requires a new version of python-fluent due to bug 1406342.
Assignee: nobody → stas

Comment 3

11 months ago
mozreview-review
Comment on attachment 8915929 [details]
Bug 1399057 - Yield Sections and Comments from FluentParser.walk.

https://reviewboard.mozilla.org/r/187188/#review192246

This is basically good, but we'll need a way to require the fluent update. I think cutting another release of python-fluent is the best way for that. With that and the change to setup.py to require that update, r=me.
Attachment #8915929 - Flags: review?(l10n) → review+
(Assignee)

Comment 4

11 months ago
Thanks. I plan to release python-fluent 0.4.3 when bug 1397234 is fixed. it's already fixed in fluent.js so it's just a matter of porting it.
Comment hidden (obsolete)
Comment hidden (obsolete)
Comment hidden (mozreview-request)
(Assignee)

Comment 8

11 months ago
mozreview-review
Comment on attachment 8915929 [details]
Bug 1399057 - Yield Sections and Comments from FluentParser.walk.

https://reviewboard.mozilla.org/r/187188/#review192666

::: compare_locales/tests/test_ftl.py:106
(Diff revisions 1 - 2)
>      C
>  ''')
>  
>          [abc] = list(self.parser)
>          self.assertEqual(abc.key, 'abc')
> -        self.assertEqual(abc.val, '\n    A\n    B\n    C')
> +        self.assertEqual(abc.val, '    A\n    B\n    C')

This is a fallout from bug 1397234 and I filed bug 1406880 to decide if it should be changed. For now I don't think it affects compare-locales much; it shouldn't block us from moving forward.

::: setup.py:48
(Diff revision 2)
>        packages=['compare_locales', 'compare_locales.tests'],
>        package_data={
>            'compare_locales.tests': ['data/*.properties', 'data/*.dtd']
>        },
>        install_requires=[
> -          'fluent>=0.4.2',
> +          'fluent==0.4.3',

The development of python-fluent is tightly connected to the needs of compare-locales these days  and there might be small changes to the AST, the reported spans etc. between minor versions.  Let's pin point the exact version of the dependency for now; we can relax this later on once everything stabilizes.
(Assignee)

Comment 9

11 months ago
https://hg.mozilla.org/l10n/compare-locales/rev/72372d88d8fc3a83caf8dc24d7b50828b2f27d5b
Bug 1399057 - Yield Sections and Comments from FluentParser.walk. r=Pike
(Assignee)

Updated

11 months ago
Status: NEW → RESOLVED
Last Resolved: 11 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.