Skip to content

Trailing comma gives wrong warning: msgid already exists with a different default #97

@mauritsvanrees

Description

@mauritsvanrees

Add a Python file test.py with this:

one = _('Hello')
two = _(
    'Hello',
)

Rebuild/create a pot file and you get a warning:

$ i18ndude rebuild-pot -p test.pot -c test test.py 
Warning: msgid 'Hello' in test.py:2 already exists with a different default (bad: , should be: None)
The references for the existent value are:
test.py:1

It is only a warning, the resulting pot file is okay:

#: test.py:1
msgid "Hello"
msgstr ""

But the warning is wrong: the trailing comma does not mean we have a default value of , instead of None.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions