Opened 3 weeks ago

Last modified 3 weeks ago

#37133 assigned Bug

TranslationCatalog always prepends the plural version rather than merge when the same

Reported by: Aryaz Eghbali Owned by: Aryaz Eghbali
Component: Utilities Version: 6.0
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

In django/utils/translation/trans_real.py line 108 compares the __code__ of a function to the top item in the catalog, which is always a function. This comparison always evaluates to False, even if both functions are the same.

Change History (5)

comment:1 by Aryaz Eghbali, 3 weeks ago

Has patch: set

comment:2 by Sarah Boyce, 3 weeks ago

Summary: Bug in TranslationCatalogTranslationCatalog always prepends the plural version rather than merge when the same

Refs #34221
Might want to add to the test i18n.tests.TranslationTests.test_multiple_plurals_merge with asserts to french._catalog._catalogs

comment:3 by Sarah Boyce, 3 weeks ago

Triage Stage: UnreviewedAccepted

comment:4 by Aryaz Eghbali, 3 weeks ago

I have added tests to assert the length of _catalogs.

comment:5 by Jacob Walls, 3 weeks ago

Owner: set to Aryaz Eghbali
Status: newassigned
Note: See TracTickets for help on using tickets.
Back to Top