This guide defines translation conventions for the Punjabi translation of Python documentation.
- Translate meaning, not individual words.
- Use clear and natural Punjabi (Gurmukhi).
- Maintain consistency across all files.
- Follow terminology defined in
GLOSSARY.md. - Preserve technical accuracy at all times.
if
else
elif
for
while
class
def
return
import
from
try
except
finally
raise
pass
with
yield
lambda
and
or
not
x
y
count
user_name
my_list
self
cls
Examples:
print
len
range
ValueError
TypeError
Exception
list
dict
tuple
set
os
sys
json
These names must remain unchanged.
Never modify Sphinx or reStructuredText markup.
Examples:
:func:`print`
:class:`list`
:mod:`os`
:ref:`section`
:meth:`append`
:attr:`name`
:exc:`ValueError`
:term:`iterator`Translate only surrounding explanatory text.
Preserve directives exactly as written.
Examples:
.. note::
.. warning::
.. code-block:: python
.. versionadded::
.. versionchanged::Translate the content inside notes and warnings, but never change the directive itself.
Translate:
- Comments
- User-facing explanatory text
Do not translate:
- Python keywords
- Variable names
- Function names
- Class names
- Module names
- Exception names
- Example code behavior
Example:
# Calculate the square of a number
x = 5
print(x * x)Only the comment may be translated.
Leave all URLs unchanged.
Examples:
https://docs.python.org/
https://devguide.python.org/
Always consult GLOSSARY.md before introducing new translations.
When a technical term already exists in the glossary, use the glossary version consistently throughout the project.
- Use the same translation for the same term everywhere.
- Preserve punctuation when possible.
- Preserve formatting and inline markup.
- Keep examples technically correct after translation.
Machine translation may be used only as a drafting aid.
Every translated string must be manually reviewed for:
- Accuracy
- Terminology consistency
- Natural Punjabi wording
- Correct markup preservation
Contributors are responsible for the final quality of submitted translations.
Run:
msgfmt --check tutorial/FILENAME.poCheck progress:
msgfmt --statistics tutorial/FILENAME.poReview untranslated entries:
msgattrib --untranslated tutorial/FILENAME.poAll files should pass validation before submission.
- Use formal Punjabi.
- Keep explanations clear and educational.
- Prefer consistency over stylistic variation.
- Follow Python documentation writing conventions whenever possible.