mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Close #6781: gettext Add confvals to customize headers of POT file
* gettext_last_translator * gettext_language_team
This commit is contained in:
parent
2ec6ce85ef
commit
3e10cdb3d9
2
CHANGES
2
CHANGES
@ -45,6 +45,8 @@ Features added
|
||||
authentication information when doing ``linkcheck`` builds
|
||||
* #6872: linkcheck: Handles HTTP 308 Permanent Redirect
|
||||
* #6613: html: Wrap section number in span tag
|
||||
* #6781: gettext: Add :confval:`gettext_last_translator' and
|
||||
:confval:`gettext_language_team` to customize headers of POT file
|
||||
|
||||
Bugs fixed
|
||||
----------
|
||||
|
@ -282,6 +282,8 @@ class MessageCatalogBuilder(I18nBuilder):
|
||||
'version': self.config.version,
|
||||
'copyright': self.config.copyright,
|
||||
'project': self.config.project,
|
||||
'last_translator': self.config.gettext_last_translator,
|
||||
'language_team': self.config.gettext_language_team,
|
||||
'ctime': datetime.fromtimestamp(timestamp, ltz).strftime('%Y-%m-%d %H:%M%z'),
|
||||
'display_location': self.config.gettext_location,
|
||||
'display_uuid': self.config.gettext_uuid,
|
||||
@ -311,6 +313,8 @@ def setup(app: Sphinx) -> Dict[str, Any]:
|
||||
app.add_config_value('gettext_uuid', False, 'gettext')
|
||||
app.add_config_value('gettext_auto_build', True, 'env')
|
||||
app.add_config_value('gettext_additional_targets', [], 'env')
|
||||
app.add_config_value('gettext_last_translator', 'FULL NAME <EMAIL@ADDRESS>', 'gettext')
|
||||
app.add_config_value('gettext_language_team', 'LANGUAGE <LL@li.org>', 'gettext')
|
||||
|
||||
return {
|
||||
'version': 'builtin',
|
||||
|
@ -10,8 +10,8 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: {{ ctime|e }}\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Last-Translator: {{ last_translator|e }}\n"
|
||||
"Language-Team: {{ language_team|e }}\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
Loading…
Reference in New Issue
Block a user