python-babel / babel

The official repository for Babel, the Python Internationalization Library
http://babel.pocoo.org/
BSD 3-Clause "New" or "Revised" License
1.29k stars 433 forks source link

is it possible to set PROJECT, VERSION and other header information in the babel.cfg file #1000

Open 12rambau opened 1 year ago

12rambau commented 1 year ago

Overview Description

When running the following command:

pybabel extract ...

It's generating the following header in my po files:

# Spanish translations for PROJECT.
# Copyright (C) 2023 ORGANIZATION
# This file is distributed under the same license as the PROJECT project.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2023.
#
msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2023-04-14 09:38+0200\n"
"PO-Revision-Date: 2023-02-16 13:23-0500\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: es\n"
"Language-Team: es <LL@li.org>\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.12.1\n"

I would like to customize the header for my lib but I cannot ask the user to set up environmmental variable for this specific build. I checked the documentation and it's unclear to me if it's possible or not to add the parameter in the babel.cfg file.

Any guidance would be much appreciated.