Closed Bug 1366298 Opened 8 years ago Closed 7 years ago

fluent.migrate.transforms.PLURAL should have tests with more than one output variant

Categories

(Localization Infrastructure and Tools :: Fluent Migration, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Pike, Assigned: stas)

Details

Attachments

(1 file)

54 bytes, text/x-github-pull-request
Details | Review
Right now, all the tests in https://github.com/projectfluent/python-fluent/blob/master/tests/migrate/test_plural.py create at most two plural forms in the generated FTL. We should test the other code paths, too.
Attached file Pull Request
I added tests for languages with a single plural category (e.g. Turkish) as well as those with many more than English (e.g. Polish). I introduced a special case for languages with one plural category: they can have their translations migrated directly to a single Pattern rather than a SelectExpression with one variant.
Assignee: nobody → stas
Status: NEW → ASSIGNED
Attachment #8926344 - Flags: review?(l10n)
Axel approved this PR in GitHub and I landed it in https://github.com/projectfluent/python-fluent/commit/3d7b8384a423f9a28ac816855c4ee7455f139b58. Axel also filed bug 1415555 to refactor test_plural at large and make it easier to understand. Let's continue the discussion there.
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Attachment #8926344 - Flags: review?(l10n)
No longer blocks: fluent.migrate
Component: Python Library → Fluent Migration
Product: L20n → Localization Infrastructure and Tools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: