Skip to content

sphinx-intl update adds python-format flag to messages containing % #58

@emlys

Description

@emlys

Given a POT file with a message that contains a %, sphinx-intl update will produce a PO file where that message has an added #, python-format flag. That flag indicates that the message is a python format string, but all sphinx-intl messages should come from RST.

Example POT file:

# pot_dir/test.pot

msgid ""
msgstr ""

msgid "the % of change in sediment"
msgstr ""

Produces this PO file:

msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2021-12-06 15:01-0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.9.1\n"

#, python-format
msgid "the % of change in sediment"
msgstr ""

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions