Skip to content

pygettext generates output even when there should be none #133049

Open
@StanFromIreland

Description

@StanFromIreland

Bug report

Bug description:

This occurs in two cases:

  • Output is still generated when there is no input. Whereas xgettext:
    $ xgettext
    xgettext: no input file given
    Try 'xgettext --help' for more information.
    
    And the second case follows on from this (but can also occur with input files)
  • In xgettext, no output is generated if there are no messages. In pygettext output is still generate even if no messages are found, the header is still sent.
    We should fix it to work like xgettext and not produce "empty" output.

I will send a pr soon, once other tests are merged.

cc @tomasr8

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    triagedThe issue has been accepted as valid by a triager.type-bugAn unexpected behavior, bug, or error

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions