././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1731221264.800138 sphinx_intl-2.3.0/0000777000175000017500000000000014714053421013450 5ustar00vscodevscode././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1730878885.0 sphinx_intl-2.3.0/AUTHORS.rst0000666000175000017500000000046114712616645015343 0ustar00vscodevscode======= AUTHORS ======= * Takayuki Shimizukawa * Takeshi Komiya Original -------- This utility derived from these projects. * ``https://bitbucket.org/tk0miya/sphinx-gettext-helper`` * ``https://bitbucket.org/shimizukawa/sphinx-transifex`` ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1731220848.0 sphinx_intl-2.3.0/CHANGES.rst0000666000175000017500000002306314714052560015261 0ustar00vscodevscode======= CHANGES ======= 2.3.0 (2024/11/10) ================== Environments ------------ * Drop python-3.7 support by @kloczek in https://github.com/sphinx-doc/sphinx-intl/pull/101 * Drop Python-3.8 support by @shimizukawa in https://github.com/sphinx-doc/sphinx-intl/pull/111 * Avoid unrelated CI test for doc changes, and cache using setup-python action by @rffontenelle in https://github.com/sphinx-doc/sphinx-intl/pull/106 Incompatibility --------------- Features -------- * Perform update in parallel by @rtobar in https://github.com/sphinx-doc/sphinx-intl/pull/110 Bug Fixes --------- Documentation ------------- Internals --------- * Modernize release procedures by @shimizukawa in https://github.com/sphinx-doc/sphinx-intl/pull/102 * Modernize formatter: use ruff instead of flake8 by @shimizukawa in https://github.com/sphinx-doc/sphinx-intl/pull/103 * add devcontainer and related dependabot config by @shimizukawa in https://github.com/sphinx-doc/sphinx-intl/pull/104 * Add CI test for sphinx-intl's doc by @rffontenelle in https://github.com/sphinx-doc/sphinx-intl/pull/107 * fix for lint by @shimizukawa in https://github.com/sphinx-doc/sphinx-intl/pull/108 2.2.0 (2024/04/20) ================== Environments ------------ * Support for Python 3.13. Update version in workflow actions and enable 3.13 by @rffontenelle in https://github.com/sphinx-doc/sphinx-intl/pull/97 Incompatibility --------------- Features -------- * Set resource_name in .tx/config files to preserve resource naming behavior prior to 2.1.0 by @jpmckinney in https://github.com/sphinx-doc/sphinx-intl/pull/90 * Support no obsolete option by @jdknight in https://github.com/sphinx-doc/sphinx-intl/pull/65 Bug Fixes --------- * Correctly format hyperlink by @DelazJ in https://github.com/sphinx-doc/sphinx-intl/pull/82 * Fixed errors in the `~/.transifexrc` file generated by the `create-transifexrc` command by @shimizukawa in https://github.com/sphinx-doc/sphinx-intl/pull/83 Note: ``create-transifexrc`` command and ``SPHINXINTL_TRANSIFEX_TOKEN`` have been deprecated. They will be removed after six months. Please use the TX_TOKEN environment variable instead. Documentation ------------- * refs #93 documentation for sphinx-intl comman-line options by @shimizukawa in https://github.com/sphinx-doc/sphinx-intl/pull/94 Internals --------- * drop six usage by @jdknight in https://github.com/sphinx-doc/sphinx-intl/pull/87 * Add pyproject.toml, remove setup.py by @rffontenelle in https://github.com/sphinx-doc/sphinx-intl/pull/86 * Drop six from pyproject.toml by @rffontenelle in https://github.com/sphinx-doc/sphinx-intl/pull/92 * add readthedocs conf by @shimizukawa in https://github.com/sphinx-doc/sphinx-intl/pull/95 * test: Update expectations for tx > 1.6.7 by @jpmckinney in https://github.com/sphinx-doc/sphinx-intl/pull/96 * Cache using hash from pyproject.toml instead of setup.py by @rffontenelle in https://github.com/sphinx-doc/sphinx-intl/pull/99 2.1.0 (2023/02/05) ================== Environments ------------ - #71: Drop Python 3.5 support. Thanks to @rffontenelle. - #81: Drop Python 3.6 support. - #72 and #77: Support for Python 3.11 and Python 3.12. Thanks to @rffontenelle. Incompatibility --------------- Features -------- - #62: Migrate from transifex-client to transifex cli. Thanks to @TheTripleV. Documentation ------------- - #74 Update documentation. Thanks to @rffontenelle. - Update CI status badge in README and doc/index.rst, as CI changed from Travis to GitHub Actions. - Replace info regarding old Python transifex-client library with the new implementation of Transifex CLI tool. Bug Fixes --------- - #53: Set locale of created po files. Thanks to @igo95862. - #55: FileNotFoundError on update-txconfig-resources in the subdirectory. Thanks to @tkoyama010. 2.0.1 (2020/04/11) ================== Environments ------------ Incompatibility --------------- Features -------- Documentation ------------- Bug Fixes --------- - #38: transifex: Sort dirs and files alphabetically 2.0.0 (2019/06/01) ================== Environments ------------ - #31 Drop supporting Python-2.7 Incompatibility --------------- Features -------- Documentation ------------- Bug Fixes --------- 1.0.0 (2019/05/12) =================== Environments ------------ * Adopt to semver_ .. _semver: https://semver.org/spec/v2.0.0.html Incompatibility --------------- Features -------- Documentation ------------- * #6: http://sphinx-intl.rtfd.io/ * #23: Add working example for generating pot/po files Bug Fixes --------- 0.9.12 (2019/05/12) =================== Environments ------------ - Drop supporting Python-3.4 - Add supporting Python-3.7. #25: Python-3.7 introduce ``__dir__`` module function by :pep:`562`, so the attribute must not override for another purpose. Thanks to Julien Enselme. Incompatibility --------------- * #27: `settings` resource name will be renamed to `settings_` on Transifex. Thanks to Anthony. Features -------- * #28,#29: Add option `'-w', '--line-width'` for the maximum line width of PO files. Thanks to Armand Ciejak. Documentation ------------- - #22: ```_build/locale`` (for old sphinx) -> ``_build/gettext`` (for current sphinx) Bug Fixes --------- 0.9.11 (2018/02/12) =================== Environments ------------ * Support transifex-client~=0.13 Incompatibility --------------- Features -------- * #17,#18: Adding --tag -t option, to pass tags from arguments to conf.py. to Claudio Alarcon-Reyes. Documentation ------------- Bug Fixes --------- 0.9.10 (2017/09/13) =================== Environments ------------ * Drop supporting Python-3.3 and 2.6 * Add supporting Python-3.6 Bug Fixes --------- * Unit tests overwrite real .transifexrc file in HOME directory. * #7, #8: Added `tags` variable for conf.py. Thanks to Dongping Xie. * #15: default value of ``locale_dirs`` must be ``['locales']`` instead of ``['locale']``. Thanks to cocoatomo. 0.9.9 (2016/01/17) ================== Bug Fixes --------- * On Python-3 environment, 'update' command breaks po files. * #4: 'fuzzy' cause crush on 'update' command. 0.9.8 (2015/12/28) ================== Environments ------------ * Add supporting Python-3.5 * Drop supporting Python-2.5 * Use transifex-client>=0.11 for all environments * Switch test runner to py.test * BB#11 Switch to babel that is used with Sphinx. Incompatibility --------------- * `glossary` resource name will be renamed to `glossary_` on Transifex. Since Aug 2015, Transifex reject 'glossary' resource name because the slug is reserved. Features -------- * #2,#3: Add option to create MO files in a separate directory. Thanks to Campbell Barton. Bug Fixes --------- * #1: update_txconfig_resources command on Python 3.4/3.5 causes KeyError. 0.9.7 (2015/11/07) ================== Environments ------------ * BB#8 Drop supporting Python-3.1 and 3.2 * BB#10 Depends to click for command-line feature. 0.9.6 (2015/09/22) ================== Features -------- * BB-PR#9: Support ``fuzzy`` translations. Thanks to Guilherme Brondani Torri. * BB-PR#8: Detects pot_dir automatically if sphinx has generated. Thanks to Takeshi Komiya. Bug Fixes --------- * BB-PR#6: update_txconfig_resources command raise errors with pot filename including symbols and spaces. Thanks to Takeshi Komiya. * BB-PR#7: sphinx-intl could not find conf.py in projects separating build and source directories. Thanks to Takeshi Komiya. * BB-PR#10: Add __file__ to conf.py's namespace. * On Windows environment, now using "transifex<0.9" because "transifex>=0.9" requires unnecessary py2exe installation. 0.9.5 (2014/07/10) ================== Environments ------------ * Add supporting Python-3.4 Features -------- * BB-PR#3: Skip building process if mo file is newer than po file. Thanks to Nozomu Kaneko. Bug Fixes --------- * BB-PR#2, BB-PR#4: ``update-txconfig-resources`` disregarded ``--pot-dir`` option. Thanks to Giacomo Spettoli, Takeshi Komiya. * BB-PR#5: ``update-txconfig-resources`` command raise errors when project name includes spaces and dots. Thanks to Takeshi Komiya. 0.9.4 (2013/12/10) =================== Environments ------------ * Now using setuptools instead of distribute. Features -------- * BB#3: ``update-txconfig-resources`` command now detect project-name from ``.tx/config`` that already exists. Bug Fixes --------- * sphinx-intl didn't use SPHINXINTL_CONFIG environment value. * tox test raises a error with transifex-client-0.10 0.9.3 (2013/04/20) =================== Bug Fixes --------- * because ``--config`` option did not consider directory path, locale_dir did not contain directory path to ``conf.py`` file. 0.9.2 (2013/4/11) =================== Features -------- * Add ``stat`` command for displaying statistics like 'msgfmt --statistics'. * Documentation and error messages are improved. Bug Fixes --------- * update command did not detect pot/po difference when translated count and untranslated count are not difference. 0.9.1 (2013/4/10) =================== Environments ------------ * Add flake8 test and fix some errors. Incompatibility --------------- * Drop multiple ``locale directories`` feature. Now use only first directory of ``locale_dirs`` in conf.py. Features -------- * Add --pot-dir option. default is ``pot`` directory under ``locale_dir``. If you using Sphinx default settings, ``-p _build/locale`` is useful. * Add append/deprecated msgid count information for ``update`` command. Bug Fixes --------- * Fix: ``-c`` option is not working. Thanks @tk0miya! 0.9.0 (2013/4/7) ================= * First release that provides these commands: * update * build * create-transifexrc * create-txconfig * update-txconfig-resources ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1730868599.0 sphinx_intl-2.3.0/CODE_OF_CONDUCT.rst0000666000175000017500000000025614712572567016501 0ustar00vscodevscodeBy contributing you agree to abide by the `Contributor Code of Conduct`_. .. _Contributor Code of Conduct: https://www.contributor-covenant.org/version/1/4/code-of-conduct ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1730868599.0 sphinx_intl-2.3.0/CONTRIBUTING.rst0000666000175000017500000000030314712572567016124 0ustar00vscodevscodeReport Issue ------------ **To Be Written** * https://github.com/sphinx-doc/sphinx-intl/issues Pull Request ------------ **To Be Written** * https://github.com/sphinx-doc/sphinx-intl/pulls ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1730868599.0 sphinx_intl-2.3.0/LICENSE0000666000175000017500000000245114712572567014476 0ustar00vscodevscodeBSD 2-Clause License Copyright (c) 2019, Sphinx team All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1730868599.0 sphinx_intl-2.3.0/MANIFEST.in0000666000175000017500000000017114712572567015224 0ustar00vscodevscodeinclude *.rst include requirements-*.txt include tox.ini recursive-include doc * prune doc/locale prune doc/_build ././@PaxHeader0000000000000000000000000000003300000000000010211 xustar0027 mtime=1731221264.800138 sphinx_intl-2.3.0/PKG-INFO0000644000175000017500000001054414714053421014545 0ustar00vscodevscodeMetadata-Version: 2.1 Name: sphinx-intl Version: 2.3.0 Summary: Sphinx utility that make it easy to translate and to apply translation. Author-email: Takayuki SHIMIZUKAWA License: BSD 2-Clause License Copyright (c) 2019, Sphinx team All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Project-URL: Homepage, https://github.com/sphinx-doc/sphinx-intl Project-URL: Documentation, https://sphinx-intl.readthedocs.io Classifier: Development Status :: 5 - Production/Stable Classifier: Environment :: Console Classifier: License :: OSI Approved :: BSD License Classifier: Topic :: Documentation Classifier: Topic :: Documentation :: Sphinx Classifier: Topic :: Software Development Classifier: Topic :: Software Development :: Documentation Classifier: Topic :: Text Processing Classifier: Topic :: Text Processing :: General Classifier: Topic :: Utilities Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: 3.11 Classifier: Programming Language :: Python :: 3.12 Classifier: Programming Language :: Python :: 3.13 Classifier: Framework :: Sphinx Requires-Python: >=3.9 Description-Content-Type: text/x-rst License-File: LICENSE License-File: AUTHORS.rst Requires-Dist: setuptools Requires-Dist: click Requires-Dist: babel Requires-Dist: sphinx Provides-Extra: test Requires-Dist: pytest; extra == "test" =================================================== sphinx-intl: translation support utility for Sphinx =================================================== ``sphinx-intl`` is a utility tool that provides several features that make it easy to translate and to apply translation to Sphinx_ generated document. Optional: support the Transifex service for translation with Sphinx_ . .. _Sphinx: http://sphinx-doc.org .. image:: https://img.shields.io/readthedocs/sphinx-intl/master.svg :alt: Read the Docs (master) :target: http://sphinx-intl.rtfd.io/ .. image:: https://img.shields.io/pypi/v/sphinx-intl.svg :alt: PyPI :target: http://pypi.org/p/sphinx-intl .. image:: https://img.shields.io/pypi/pyversions/sphinx-intl.svg :alt: PyPI - Python Version :target: http://pypi.org/p/sphinx-intl .. image:: https://img.shields.io/github/license/sphinx-doc/sphinx-intl.svg :alt: License :target: https://github.com/sphinx-doc/sphinx-intl/blob/master/LICENSE .. image:: https://github.com/sphinx-doc/sphinx-intl/actions/workflows/test.yml/badge.svg?branch=master :alt: GitHub Actions CI status :target: https://github.com/sphinx-doc/sphinx-intl/actions/workflows/test.yml .. image:: https://img.shields.io/github/stars/sphinx-doc/sphinx-intl.svg?style=social&label=Stars :alt: GitHub stars :target: https://github.com/sphinx-doc/sphinx-intl Documentation ============= - http://sphinx-intl.rtfd.io/ License ======= Licensed under the BSD license. CHANGES ======= See: https://sphinx-intl.readthedocs.io/en/master/changes.html ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1730868599.0 sphinx_intl-2.3.0/README.rst0000666000175000017500000000312014712572567015152 0ustar00vscodevscode=================================================== sphinx-intl: translation support utility for Sphinx =================================================== ``sphinx-intl`` is a utility tool that provides several features that make it easy to translate and to apply translation to Sphinx_ generated document. Optional: support the Transifex service for translation with Sphinx_ . .. _Sphinx: http://sphinx-doc.org .. image:: https://img.shields.io/readthedocs/sphinx-intl/master.svg :alt: Read the Docs (master) :target: http://sphinx-intl.rtfd.io/ .. image:: https://img.shields.io/pypi/v/sphinx-intl.svg :alt: PyPI :target: http://pypi.org/p/sphinx-intl .. image:: https://img.shields.io/pypi/pyversions/sphinx-intl.svg :alt: PyPI - Python Version :target: http://pypi.org/p/sphinx-intl .. image:: https://img.shields.io/github/license/sphinx-doc/sphinx-intl.svg :alt: License :target: https://github.com/sphinx-doc/sphinx-intl/blob/master/LICENSE .. image:: https://github.com/sphinx-doc/sphinx-intl/actions/workflows/test.yml/badge.svg?branch=master :alt: GitHub Actions CI status :target: https://github.com/sphinx-doc/sphinx-intl/actions/workflows/test.yml .. image:: https://img.shields.io/github/stars/sphinx-doc/sphinx-intl.svg?style=social&label=Stars :alt: GitHub stars :target: https://github.com/sphinx-doc/sphinx-intl Documentation ============= - http://sphinx-intl.rtfd.io/ License ======= Licensed under the BSD license. CHANGES ======= See: https://sphinx-intl.readthedocs.io/en/master/changes.html ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1730878087.0 sphinx_intl-2.3.0/checklist.rst0000666000175000017500000000103114712615207016152 0ustar00vscodevscode.. release procedure Procedure: 1. check GitHub Actions test results: https://github.com/sphinx-doc/sphinx-intl/actions 2. update release version/date in ``CHANGES.rst`` 3. ``python -m build``, see details: setup.cfg 4. ``twine upload dist/`` 5. check PyPI page: https://pypi.org/p/sphinx-intl 6. tagging with version name that MUST following semver. e.g.: ``git tag 1.0.1`` 7. ``git push --tags`` to push tag 8. bump version in ``sphinx_intl/__init__.py`` and ``CHANGES.rst`` then commit/push them onto GitHub ././@PaxHeader0000000000000000000000000000003400000000000010212 xustar0028 mtime=1731221264.7921379 sphinx_intl-2.3.0/doc/0000777000175000017500000000000014714053421014215 5ustar00vscodevscode././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1730868599.0 sphinx_intl-2.3.0/doc/.gitignore0000666000175000017500000000000714712572567016221 0ustar00vscodevscode_build ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1730868599.0 sphinx_intl-2.3.0/doc/Makefile0000666000175000017500000000114014712572567015670 0ustar00vscodevscode# Minimal makefile for Sphinx documentation # # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = sphinx-build SPHINXPROJ = sphinx-intl SOURCEDIR = . BUILDDIR = _build # Put it first so that "make" without argument is like "make help". help: @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) .PHONY: help Makefile # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). %: Makefile @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1730868599.0 sphinx_intl-2.3.0/doc/authors.rst0000666000175000017500000000003514712572567016451 0ustar00vscodevscode.. include:: ../AUTHORS.rst ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1730878885.0 sphinx_intl-2.3.0/doc/basic.rst0000666000175000017500000000210714712616645016043 0ustar00vscodevscode===== Basic ===== .. contents:: :local: Basic Features =============== * create or update po files from pot files. * build mo files from po files. Optional features ================== These features depends on the `Transifex Client`_ tool. Please refer Installation_ section to install it. * create ``.transifexrc`` file from environment variable, without interactive input. * create ``.tx/config`` file without interactive input. * update ``.tx/config`` file from locale/pot files automatically. * build mo files from po files in the locale directory. You need to use `tx` command for below features: * ``tx push -s`` : push pot (translation catalogs) to transifex. * ``tx pull -l ja`` : pull po (translated catalogs) from transifex. .. _Transifex Client: https://github.com/transifex/cli Installation ============= It is strongly recommended to use virtualenv/venv for this procedure:: $ pip install sphinx-intl If you want to use `Optional Features`_, you need install Transifex CLI tool. Please refer to `Installation instructions `_. ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1730868599.0 sphinx_intl-2.3.0/doc/changes.rst0000666000175000017500000000003514712572567016374 0ustar00vscodevscode.. include:: ../CHANGES.rst ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1730868599.0 sphinx_intl-2.3.0/doc/conf.py0000666000175000017500000000146414712572567015540 0ustar00vscodevscode# -*- coding: utf-8 -*- from sphinx_intl import __version__ # -- Project information ----------------------------------------------------- project = 'sphinx-intl' copyright = 'Sphinx team' author = 'Sphinx team' version = release = __version__ # -- General configuration --------------------------------------------------- extensions = [ "sphinx_click", ] source_suffix = '.rst' master_doc = 'index' language = 'en' exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] pygments_style = 'sphinx' # -- Options for HTML output ------------------------------------------------- html_theme = 'sphinx_rtd_theme' # -- Options for sphinx-intl example locale_dirs = ['locale/'] # po files will be created in this directory gettext_compact = False # optional: avoid file concatenation in sub directories. ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1730878885.0 sphinx_intl-2.3.0/doc/dev.rst0000666000175000017500000000261014712616645015537 0ustar00vscodevscode=========== Development =========== Code of Conduct =============== .. include:: ../CODE_OF_CONDUCT.rst Contribution Guideline ====================== .. include:: ../CONTRIBUTING.rst Setup development environment ============================= * Requires supported Python version * Do setup under sphinx-intl.git repository root as:: $ pip install -U pip setuptools wheel setuptools_scm $ pip install -r requirements-dev.txt * Install Transifex CLI tool (refer to `Installation instructions `_):: $ curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash Testing ======= Tests with supported python version that are in: * ``tox.ini`` * ``.github/workflow/test.yml`` Run test -------- Just run tox:: $ tox tox have several sections for testing. CI (Continuous Integration) ---------------------------- All tests will be run on GitHub Actions. * https://github.com/sphinx-doc/sphinx-intl/tree/master/.github/workflows/ Releasing ========= New package version ------------------- The sphinx-intl package will be uploaded to PyPI: https://pypi.org/project/sphinx-intl/. Here is a release procedure: .. include:: ../checklist.rst Updated documentation --------------------- Sphinx documentation under ``doc/`` directory on the master branch will be automatically uploaded into ReadTheDocs: http://sphinx-intl.rtfd.io/. ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1730868599.0 sphinx_intl-2.3.0/doc/index.rst0000666000175000017500000000304114712572567016073 0ustar00vscodevscode=================================================== sphinx-intl: translation support utility for Sphinx =================================================== ``sphinx-intl`` is a utility tool that provides several features that make it easy to translate and to apply translation to Sphinx_ generated document. Optional: support the Transifex service for translation with Sphinx_ . .. _Sphinx: http://sphinx-doc.org .. image:: https://img.shields.io/readthedocs/sphinx-intl/master.svg :alt: Read the Docs (master) :target: http://sphinx-intl.rtfd.io/ .. image:: https://img.shields.io/pypi/v/sphinx-intl.svg :alt: PyPI :target: http://pypi.org/p/sphinx-intl .. image:: https://img.shields.io/pypi/pyversions/sphinx-intl.svg :alt: PyPI - Python Version .. image:: https://img.shields.io/github/license/sphinx-doc/sphinx-intl.svg :alt: License :target: https://github.com/sphinx-doc/sphinx-intl/blob/master/LICENSE .. image:: https://github.com/sphinx-doc/sphinx-intl/actions/workflows/test.yml/badge.svg?branch=master :alt: GitHub Actions CI status :target: https://github.com/sphinx-doc/sphinx-intl/actions/workflows/test.yml .. image:: https://img.shields.io/github/stars/sphinx-doc/sphinx-intl.svg?style=social&label=Stars :alt: GitHub stars :target: https://github.com/sphinx-doc/sphinx-intl Documentation ============= - http://sphinx-intl.rtfd.io/ License ======= Licensed under the BSD license. Contents ======== .. toctree:: quickstart basic refs dev authors .. toctree:: :maxdepth: 2 changes ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1730868599.0 sphinx_intl-2.3.0/doc/make.bat0000666000175000017500000000141314712572567015640 0ustar00vscodevscode@ECHO OFF pushd %~dp0 REM Command file for Sphinx documentation if "%SPHINXBUILD%" == "" ( set SPHINXBUILD=sphinx-build ) set SOURCEDIR=. set BUILDDIR=_build set SPHINXPROJ=sphinx-intl if "%1" == "" goto help %SPHINXBUILD% >NUL 2>NUL if errorlevel 9009 ( echo. echo.The 'sphinx-build' command was not found. Make sure you have Sphinx echo.installed, then set the SPHINXBUILD environment variable to point echo.to the full path of the 'sphinx-build' executable. Alternatively you echo.may add the Sphinx directory to PATH. echo. echo.If you don't have Sphinx installed, grab it from echo.http://sphinx-doc.org/ exit /b 1 ) %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% goto end :help %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% :end popd ././@PaxHeader0000000000000000000000000000002600000000000010213 xustar0022 mtime=1730878885.0 sphinx_intl-2.3.0/doc/quickstart.rst0000666000175000017500000001715314712616645017163 0ustar00vscodevscode=========== Quick Start =========== Installation ============ Please install sphinx-intl using pip (8.1.1 or later). .. code-block:: bash $ pip install sphinx-intl QuickStart for sphinx translation =================================== This section describe how to translate with Sphinx_ and `sphinx-intl` command. 1. Create your document by using Sphinx. * working-example project is here: https://github.com/sphinx-doc/sphinx-intl/tree/master/doc 2. Add configurations to your `conf.py`:: locale_dirs = ['locale/'] # path is example but recommended. gettext_compact = False # optional. `locale_dirs` is required and `gettext_compact` is optional. refs `example `__. 3. Extract document's translatable messages into pot files:: $ make gettext This invokes the sphinx gettext builder that generates ``*.pot`` files under ``_build/gettext`` directory. 4. Setup/Update your po files under ``locale_dir``:: $ sphinx-intl update -p _build/gettext -l de -l ja After this, you get these directories that contain po files: * `./locale/de/LC_MESSAGES/` * `./locale/ja/LC_MESSAGES/` 5. Translate your ``po`` files under `./locale//LC_MESSAGES/`. 6. Make translated document. On Linux/BSD:: $ make -e SPHINXOPTS="-Dlanguage='ja'" html On Windows:: $ set SPHINXOPTS=-Dlanguage=ja $ make html That's all! For more information, please refer to :doc:`refs`. .. _Sphinx: http://sphinx-doc.org QuickStart console log ---------------------- :: (.venv) C:/sphinx-intl/doc> pip install -r requirements.txt sphinx-intl ... (.venv) C:/sphinx-intl/doc> tree /f C:. authors.rst basic.rst changes.rst conf.py dev.rst index.rst make.bat Makefile quickstart.rst refs.rst requirements.txt (.venv) C:/sphinx-intl/doc> make gettext Running Sphinx v2.0.1 making output directory... done building [gettext]: targets for 0 template files building [gettext]: targets for 7 source files that are out of date updating environment: 7 added, 0 changed, 0 removed reading sources... [100%] refs looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [100%] refs writing message catalogs... [100%] refs build succeeded. The message catalogs are in _build/gettext. (.venv) C:/sphinx-intl/doc> tree /f C:. │ authors.rst │ basic.rst │ changes.rst │ conf.py │ dev.rst │ index.rst │ make.bat │ Makefile │ quickstart.rst │ refs.rst │ requirements.txt │ └─_build └─gettext │ authors.pot │ basic.pot │ changes.pot │ dev.pot │ index.pot │ quickstart.pot │ refs.pot │ └─.doctrees (.venv) C:/sphinx-intl/doc> sphinx-intl update -p _build/gettext -l de -l ja Create: locale/de/LC_MESSAGES/authors.po Create: locale/ja/LC_MESSAGES/authors.po Create: locale/de/LC_MESSAGES/basic.po Create: locale/ja/LC_MESSAGES/basic.po Create: locale/de/LC_MESSAGES/changes.po Create: locale/ja/LC_MESSAGES/changes.po Create: locale/de/LC_MESSAGES/dev.po Create: locale/ja/LC_MESSAGES/dev.po Create: locale/de/LC_MESSAGES/index.po Create: locale/ja/LC_MESSAGES/index.po Create: locale/de/LC_MESSAGES/quickstart.po Create: locale/ja/LC_MESSAGES/quickstart.po Create: locale/de/LC_MESSAGES/refs.po Create: locale/ja/LC_MESSAGES/refs.po (.venv) C:/sphinx-intl/doc> tree /f C:. │ authors.rst │ basic.rst │ changes.rst │ conf.py │ dev.rst │ index.rst │ make.bat │ Makefile │ quickstart.rst │ refs.rst │ requirements.txt │ ├─locale │ ├─de │ │ └─LC_MESSAGES │ │ authors.po │ │ basic.po │ │ changes.po │ │ dev.po │ │ index.po │ │ quickstart.po │ │ refs.po │ │ │ └─ja │ └─LC_MESSAGES │ authors.po │ basic.po │ changes.po │ dev.po │ index.po │ quickstart.po │ refs.po │ └─_build └─gettext │ authors.pot │ basic.pot │ changes.pot │ dev.pot │ index.pot │ quickstart.pot │ refs.pot │ └─.doctrees (.venv) C:/sphinx-intl/doc> # ================================ (.venv) C:/sphinx-intl/doc> # Edit po files for each languages (.venv) C:/sphinx-intl/doc> # ================================ (.venv) C:/sphinx-intl/doc> set SPHINXOPTS=-Dlanguage=ja (.venv) C:/sphinx-intl/doc> make html Running Sphinx v2.0.1 loading translations [ja]... done making output directory... done building [mo]: targets for 7 po files that are out of date writing output... [100%] locale/ja/LC_MESSAGES/refs.mo building [html]: targets for 7 source files that are out of date updating environment: 7 added, 0 changed, 0 removed reading sources... [100%] refs looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [100%] refs generating indices... genindex writing additional pages... searchc:/project/sphinx-dev/sphinx-intl/.venv/lib/site-packages/sphinx_rtd_theme/search.html:20: RemovedInSphinx30Warning: To modify script_fil es in the theme is deprecated. Please insert a