@@ -11,6 +11,7 @@ including:
1111* Reviewing new contributions
1212* Revising existing content
1313* Writing new content
14+ * Translate the guide
1415
1516Most of the work on the |PyPUG | takes place on the
1617`project's GitHub repository `__. To get started, check out the list of
@@ -67,7 +68,54 @@ an agreed-upon interface for interoperability between packaging tools.
6768:doc: `example specification-style document <specifications/core-metadata >`.
6869
6970
71+ Translations
72+ ============
7073
74+ We use `Weblate `_ to manage translations of this project.
75+ Please visit the `packaging.python.org `_ project on Weblate to contribute.
76+
77+ If you are experiencing issues while you are working on translations,
78+ please open an issue on `Github `_.
79+
80+ .. tip ::
81+
82+ Any translations of this project should follow `reStructuredText syntax `_.
83+
84+ .. _Weblate : https://weblate.org/
85+ .. _packaging.python.org : https://hosted.weblate.org/projects/pypa/packaging-python-org/
86+ .. _Github : https://github.com/pypa/packaging.python.org/issues
87+ .. _reStructuredText syntax : https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html
88+
89+ Adding a language
90+ -----------------
91+
92+ If your language is not listed on `packaging.python.org `_, click the button
93+ :guilabel: `Start new translation ` at the bottom of the language list and add
94+ the language you want to translate.
95+
96+ Following reStructuredText syntax
97+ ---------------------------------
98+
99+ If you are not familiar with reStructuredText (RST) syntax, please read `this guide `_
100+ before translating on Weblate.
101+
102+ **Do not translate the text in reference directly **
103+
104+ When translating the text in reference, please do not translate them directly.
105+
106+ | Wrong: Translate the following text directly:
107+
108+ .. code-block :: rst
109+
110+ `some ref`_ -> `TRANSLATED TEXT HERE`_
111+
112+ | Right: Translate the following text with your own language and add the original reference:
113+
114+ .. code-block :: rst
115+
116+ `some ref`_ -> `TRANSLATED TEXT HERE <some ref>`_
117+
118+ .. _this guide : https://docutils.sourceforge.io/docs/user/rst/quickref.html
71119
72120Building the guide locally
73121==========================
@@ -77,7 +125,9 @@ in order to test your changes. In order to build this guide locally, you'll
77125need:
78126
791271. `Nox <https://nox.readthedocs.io/en/latest/ >`_. You can install or upgrade
80- nox using ``pip ``::
128+ nox using ``pip ``:
129+
130+ .. code-block :: bash
81131
82132 python -m pip install --user nox
83133
@@ -88,19 +138,23 @@ need:
88138.. _Hitchhiker's Guide to Python installation instructions :
89139 http://docs.python-guide.org/en/latest/starting/installation/
90140
91- To build the guide, run the following bash command in the source folder::
141+ To build the guide, run the following bash command in the source folder:
92142
93- nox -s build
143+ .. code-block :: bash
144+
145+ nox -s build
94146
95147 After the process has completed you can find the HTML output in the
96148``./build/html `` directory. You can open the ``index.html `` file to view the
97149guide in web browser, but it's recommended to serve the guide using an HTTP
98150server.
99151
100152You can build the guide and serve it via an HTTP server using the following
101- command::
153+ command:
154+
155+ .. code-block :: bash
102156
103- nox -s preview
157+ nox -s preview
104158
105159 The guide will be browsable via http://localhost:8000.
106160
0 commit comments