Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rffontenelle/devguide-pt-br
Brazilian Portuguese translation for the Python developer's guide
https://github.com/rffontenelle/devguide-pt-br
l10n python
Last synced: about 1 month ago
JSON representation
Brazilian Portuguese translation for the Python developer's guide
- Host: GitHub
- URL: https://github.com/rffontenelle/devguide-pt-br
- Owner: rffontenelle
- Created: 2022-12-09T01:47:56.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-18T16:55:46.000Z (about 1 year ago)
- Last Synced: 2024-11-13T07:46:39.868Z (about 2 months ago)
- Topics: l10n, python
- Language: Python
- Homepage: https://devguide-pt-br.rtfd.io
- Size: 455 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
devguide-pt-br
==============|ReadTheDocs|
.. |ReadTheDocs| image:: https://readthedocs.org/projects/devguide-pt-br/badge/
:alt: ReadTheDocs Build Status
:scale: 100%
:target: https://devguide-pt-br.readthedocs.ioBrazilian Portuguese translation for `the Python developer's guide `_.
See `devguide at GitHub `_ for more info.How to set up the environment
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1. Clone this repository:
.. code-block:: sh
git clone github.com/rffontenelle/devguide-pt-br
2. Set up a virtual environment, and activate it:
.. code-block:: sh
python3 -mvenv venv
source venv/bin/activate3. Prepare the devguide repository, which is a submodule of this one:
.. code-block:: sh
git submodule init
git submodule update4. (optional) Update pip:
.. code-block:: sh
pip install -U pip
5. Install dependencies:
.. code-block:: sh
pip install -U -r requirements.txt -r devguide/requirements.txt
Updating translations
~~~~~~~~~~~~~~~~~~~~~With the environment ready, run:
.. code-block:: sh
python update.py --devguide_repo=devguide
Once the script is done, running ``git status`` should show the po files
that were updated, and ``git diff`` should show the changes.Build translations locally
~~~~~~~~~~~~~~~~~~~~~~~~~~The docs are already `available online `_, so are its `build logs `_.
With the environment ready, first copy po files into devguide locales directory:
.. code-block:: sh
find . -maxdepth 2 -name '*.po' -type f -exec install -Dm644 {} devguide/locales/pt_BR/LC_MESSAGES/{} \;
Then build the documentation:
.. code-block:: sh
sphinx-build -c devguide/ -Dlanguage=pt_BR -Dgettext_compact=0 devguide/ _build
See the directory *_built/* for the HTML documentation.
Maintenance
~~~~~~~~~~~Pages could have been deleted in the upstream, so translation files might be useless in this repo.
After updating translations, one can list the obsolete files using the following command from the repository root directory:
.. code-block:: sh
for file in $(ls *.po **/*.po); do [ ! -f "devguide/locales/pt_BR/LC_MESSAGES/$file" ] && echo "$file"; done
If no file is obsolete, no output is emitted.