mirror of
https://github.com/readthedocs/sphinx_rtd_theme.git
synced 2025-02-25 18:55:21 -06:00
Add commands into setup.py and regenerate translations
More fixes for docs
This commit is contained in:
@@ -83,7 +83,7 @@ the following:
|
||||
|
||||
.. code:: console
|
||||
|
||||
npm run i18n
|
||||
python setup.py i18n
|
||||
|
||||
This will extract new messages, upload the messages to Transifex, and will
|
||||
update our local translation files. Changes can be checked in to a branch and
|
||||
@@ -100,7 +100,7 @@ To release a new version of the theme, core team will take the following steps:
|
||||
we try to follow `semver <http://semver.org/>`_, so be careful with breaking changes.
|
||||
#. Update the changelog (``docs/changelog.rst``) with the version information.
|
||||
#. Run ``grunt build`` to rebuild all the theme assets.
|
||||
#. Run ``npm run i18n`` to compile new translation files and update Transifex
|
||||
#. Run ``python setup.py i18n`` to compile new translation files and update Transifex
|
||||
#. Commit that change.
|
||||
#. Tag the release in git: ``git tag $NEW_VERSION``.
|
||||
#. Push the tag to GitHub: ``git push --tags origin``.
|
||||
|
||||
@@ -3,12 +3,6 @@
|
||||
"main": "js/theme.js",
|
||||
"version": "0.4.3",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"i18n-extract": "python setup.py extract_messages && python setup.py update_catalog",
|
||||
"i18n-update": "tx pull && tx push --source",
|
||||
"i18n-compile": "python setup.py compile_catalog",
|
||||
"i18n": "npm run i18n-extract && npm run i18n-update && npm run i18n-compile"
|
||||
},
|
||||
"devDependencies": {
|
||||
"bower": "^1.8.4",
|
||||
"browserify": "^13.0.0",
|
||||
|
||||
49
setup.py
49
setup.py
@@ -4,11 +4,55 @@
|
||||
.. _github: https://github.com/rtfd/sphinx_rtd_theme
|
||||
|
||||
"""
|
||||
|
||||
import subprocess
|
||||
import distutils.cmd
|
||||
from io import open
|
||||
from setuptools import setup
|
||||
|
||||
from sphinx_rtd_theme import __version__
|
||||
|
||||
|
||||
class LocalizeCommand(distutils.cmd.Command):
|
||||
|
||||
description = "Run all localization commands"
|
||||
|
||||
user_options = []
|
||||
sub_commands = [
|
||||
('extract_messages', None),
|
||||
('update_catalog', None),
|
||||
('transifex', None),
|
||||
('compile_catalog', None),
|
||||
]
|
||||
|
||||
def initialize_options(self):
|
||||
pass
|
||||
|
||||
def finalize_options(self):
|
||||
pass
|
||||
|
||||
def run(self):
|
||||
for cmd_name in self.get_sub_commands():
|
||||
self.run_command(cmd_name)
|
||||
|
||||
|
||||
class TransifexCommand(distutils.cmd.Command):
|
||||
|
||||
description = "Update translation files through Transifex"
|
||||
|
||||
user_options = []
|
||||
|
||||
def initialize_options(self):
|
||||
pass
|
||||
|
||||
def finalize_options(self):
|
||||
pass
|
||||
|
||||
def run(self):
|
||||
subprocess.run(['tx', 'push', '--source'])
|
||||
subprocess.run(['tx', 'pull'])
|
||||
|
||||
|
||||
setup(
|
||||
name='sphinx_rtd_theme',
|
||||
version=__version__,
|
||||
@@ -18,6 +62,10 @@ setup(
|
||||
author_email='dev@readthedocs.org',
|
||||
description='Read the Docs theme for Sphinx',
|
||||
long_description=open('README.rst', encoding='utf-8').read(),
|
||||
cmdclass={
|
||||
'i18n': LocalizeCommand,
|
||||
'transifex': TransifexCommand,
|
||||
},
|
||||
zip_safe=False,
|
||||
packages=['sphinx_rtd_theme'],
|
||||
package_data={'sphinx_rtd_theme': [
|
||||
@@ -44,6 +92,7 @@ setup(
|
||||
],
|
||||
'docs': [
|
||||
'sphinxcontrib-httpdomain',
|
||||
'sphinx_rtd_theme==0.4.3',
|
||||
]
|
||||
},
|
||||
classifiers=[
|
||||
|
||||
@@ -26,7 +26,8 @@
|
||||
{%- endif %}
|
||||
|
||||
{%- if build_id and build_url %}
|
||||
<span class="build">
|
||||
<span class="build">z
|
||||
{# Translators: Build is a noun, not a verb #}
|
||||
{% trans %}Build{% endtrans %}
|
||||
<a href="{{ build_url }}">{{ build_id }}</a>.
|
||||
</span>
|
||||
|
||||
Binary file not shown.
@@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: sphinx_rtd_theme 0.4.3.dev0\n"
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2019-07-19 12:53-0600\n"
|
||||
"POT-Creation-Date: 2019-07-24 17:44-0600\n"
|
||||
"PO-Revision-Date: 2019-07-16 15:43-0600\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language: en\n"
|
||||
|
||||
Binary file not shown.
@@ -6,7 +6,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: sphinx_rtd_theme 0.4.3.dev0\n"
|
||||
"Report-Msgid-Bugs-To: support@readthedocs.org\n"
|
||||
"POT-Creation-Date: 2019-07-19 12:53-0600\n"
|
||||
"POT-Creation-Date: 2019-07-24 17:44-0600\n"
|
||||
"PO-Revision-Date: 2019-07-16 21:44+0000\n"
|
||||
"Last-Translator: Anthony <aj@ohess.org>, 2019\n"
|
||||
"Language: es\n"
|
||||
|
||||
Binary file not shown.
@@ -1,18 +1,21 @@
|
||||
# Dutch translations for sphinx_rtd_theme.
|
||||
# English translations for sphinx_rtd_theme.
|
||||
# Copyright (C) 2019 ORGANIZATION
|
||||
# This file is distributed under the same license as the sphinx_rtd_theme
|
||||
# project.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2019.
|
||||
#
|
||||
# Translators:
|
||||
# Jesse Tan, 2019
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: sphinx_rtd_theme 0.4.3.dev0\n"
|
||||
"Report-Msgid-Bugs-To: support@readthedocs.org\n"
|
||||
"POT-Creation-Date: 2019-07-19 12:53-0600\n"
|
||||
"PO-Revision-Date: 2019-07-19 12:50-0600\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2019-07-24 17:44-0600\n"
|
||||
"PO-Revision-Date: 2019-07-16 21:44+0000\n"
|
||||
"Last-Translator: Jesse Tan, 2019\n"
|
||||
"Language: nl\n"
|
||||
"Language-Team: nl <LL@li.org>\n"
|
||||
"Language-Team: Dutch "
|
||||
"(https://www.transifex.com/readthedocs/teams/101354/nl/)\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
@@ -21,125 +24,127 @@ msgstr ""
|
||||
|
||||
#: sphinx_rtd_theme/breadcrumbs.html:31
|
||||
msgid "Docs"
|
||||
msgstr ""
|
||||
msgstr "Documentatie"
|
||||
|
||||
#: sphinx_rtd_theme/breadcrumbs.html:43 sphinx_rtd_theme/breadcrumbs.html:45
|
||||
msgid "Edit on GitHub"
|
||||
msgstr ""
|
||||
msgstr "Bewerk op GitHub"
|
||||
|
||||
#: sphinx_rtd_theme/breadcrumbs.html:50 sphinx_rtd_theme/breadcrumbs.html:52
|
||||
msgid "Edit on Bitbucket"
|
||||
msgstr ""
|
||||
msgstr "Bewerk op BitBucket"
|
||||
|
||||
#: sphinx_rtd_theme/breadcrumbs.html:57 sphinx_rtd_theme/breadcrumbs.html:59
|
||||
msgid "Edit on GitLab"
|
||||
msgstr ""
|
||||
msgstr "Bewerk op GitLab"
|
||||
|
||||
#: sphinx_rtd_theme/breadcrumbs.html:62 sphinx_rtd_theme/breadcrumbs.html:64
|
||||
msgid "View page source"
|
||||
msgstr ""
|
||||
msgstr "Bekijk paginabron"
|
||||
|
||||
#: sphinx_rtd_theme/breadcrumbs.html:74 sphinx_rtd_theme/footer.html:5
|
||||
msgid "Next"
|
||||
msgstr ""
|
||||
msgstr "Volgende"
|
||||
|
||||
#: sphinx_rtd_theme/breadcrumbs.html:77 sphinx_rtd_theme/footer.html:8
|
||||
msgid "Previous"
|
||||
msgstr ""
|
||||
msgstr "Vorige"
|
||||
|
||||
#: sphinx_rtd_theme/footer.html:21 sphinx_rtd_theme/footer.html:24
|
||||
#: sphinx_rtd_theme/layout.html:92
|
||||
msgid "Copyright"
|
||||
msgstr ""
|
||||
msgstr "Copyright"
|
||||
|
||||
#: sphinx_rtd_theme/footer.html:30
|
||||
msgid "Build"
|
||||
msgstr ""
|
||||
msgstr "Bouwsel"
|
||||
|
||||
#: sphinx_rtd_theme/footer.html:35
|
||||
msgid "Revision"
|
||||
msgstr ""
|
||||
msgstr "Revisie"
|
||||
|
||||
#: sphinx_rtd_theme/footer.html:39
|
||||
#, python-format
|
||||
msgid "Last updated on %(last_updated)s."
|
||||
msgstr ""
|
||||
msgstr "Laatste update op %(last_updated)s."
|
||||
|
||||
#: sphinx_rtd_theme/footer.html:49
|
||||
#, python-format
|
||||
msgid "Built with %(sphinx_web)s using a"
|
||||
msgstr ""
|
||||
msgstr "Gebouwd met %(sphinx_web)s met een"
|
||||
|
||||
#: sphinx_rtd_theme/footer.html:49
|
||||
msgid "theme"
|
||||
msgstr ""
|
||||
msgstr "thema"
|
||||
|
||||
#: sphinx_rtd_theme/footer.html:49
|
||||
#, python-format
|
||||
msgid "provided by %(readthedocs_web)s"
|
||||
msgstr ""
|
||||
msgstr "geleverd door %(readthedocs_web)s"
|
||||
|
||||
#: sphinx_rtd_theme/layout.html:61
|
||||
#, python-format
|
||||
msgid "Search within %(docstitle)s"
|
||||
msgstr ""
|
||||
msgstr "Zoek binnen %(docstitle)s"
|
||||
|
||||
#: sphinx_rtd_theme/layout.html:83
|
||||
msgid "About these documents"
|
||||
msgstr ""
|
||||
msgstr "Over deze documenten"
|
||||
|
||||
#: sphinx_rtd_theme/layout.html:86
|
||||
msgid "Index"
|
||||
msgstr ""
|
||||
msgstr "Index"
|
||||
|
||||
#: sphinx_rtd_theme/layout.html:89 sphinx_rtd_theme/search.html:11
|
||||
msgid "Search"
|
||||
msgstr ""
|
||||
msgstr "Zoek"
|
||||
|
||||
#: sphinx_rtd_theme/layout.html:124
|
||||
msgid "Logo"
|
||||
msgstr ""
|
||||
msgstr "Logo"
|
||||
|
||||
#: sphinx_rtd_theme/search.html:26
|
||||
msgid "Please activate JavaScript to enable the search functionality."
|
||||
msgstr ""
|
||||
msgstr "Zet JavaScript aan om de zoekfunctie mogelijk te maken."
|
||||
|
||||
#: sphinx_rtd_theme/search.html:33
|
||||
msgid "Search Results"
|
||||
msgstr ""
|
||||
msgstr "Zoekresultaten"
|
||||
|
||||
#: sphinx_rtd_theme/search.html:35
|
||||
msgid ""
|
||||
"Your search did not match any documents. Please make sure that all words "
|
||||
"are spelled correctly and that you've selected enough categories."
|
||||
msgstr ""
|
||||
"Zoekpoging vond geen documenten. Zorg ervoor dat alle woorden correct "
|
||||
"zijn gespeld en dat voldoende categorieën zijn geselecteerd."
|
||||
|
||||
#: sphinx_rtd_theme/searchbox.html:4
|
||||
msgid "Search docs"
|
||||
msgstr ""
|
||||
msgstr "Zoek in documentatie"
|
||||
|
||||
#: sphinx_rtd_theme/versions.html:11
|
||||
msgid "Versions"
|
||||
msgstr ""
|
||||
msgstr "Versies"
|
||||
|
||||
#: sphinx_rtd_theme/versions.html:17
|
||||
msgid "Downloads"
|
||||
msgstr ""
|
||||
msgstr "Downloads"
|
||||
|
||||
#. The phrase "Read the Docs" is not translated
|
||||
#: sphinx_rtd_theme/versions.html:24
|
||||
msgid "On Read the Docs"
|
||||
msgstr ""
|
||||
msgstr "Op Read the Docs"
|
||||
|
||||
#: sphinx_rtd_theme/versions.html:26
|
||||
msgid "Project Home"
|
||||
msgstr ""
|
||||
msgstr "Project Home"
|
||||
|
||||
#: sphinx_rtd_theme/versions.html:29
|
||||
msgid "Builds"
|
||||
msgstr ""
|
||||
msgstr "Bouwsels"
|
||||
|
||||
#: sphinx_rtd_theme/versions.html:33
|
||||
msgid "Free document hosting provided by"
|
||||
msgstr ""
|
||||
msgstr "Gratis hosting voor documentatie verzorgd door"
|
||||
|
||||
|
||||
Binary file not shown.
@@ -6,7 +6,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: sphinx_rtd_theme 0.4.3.dev0\n"
|
||||
"Report-Msgid-Bugs-To: support@readthedocs.org\n"
|
||||
"POT-Creation-Date: 2019-07-19 12:53-0600\n"
|
||||
"POT-Creation-Date: 2019-07-24 17:44-0600\n"
|
||||
"PO-Revision-Date: 2019-07-16 21:44+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language: ru\n"
|
||||
|
||||
@@ -9,7 +9,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: sphinx_rtd_theme 0.4.3.dev0\n"
|
||||
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
|
||||
"POT-Creation-Date: 2019-07-19 12:53-0600\n"
|
||||
"POT-Creation-Date: 2019-07-24 17:44-0600\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"
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
</noscript>
|
||||
|
||||
{% if search_performed %}
|
||||
{# Translators: Search is a noun, not a verb #}
|
||||
<h2>{{ _('Search Results') }}</h2>
|
||||
{% if not search_results %}
|
||||
<p>{{ _('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.') }}</p>
|
||||
|
||||
Reference in New Issue
Block a user