Skip to content

Commit c20947d

Browse files
committed
Make CONTRIBUTING, STYLE_GUIDE and RULES shorter and plainer
1 parent e501c0a commit c20947d

3 files changed

Lines changed: 62 additions & 94 deletions

File tree

‎CONTRIBUTING.md‎

Lines changed: 11 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,25 @@
11
# Contributing
22

3-
Thank you for helping translate the Python documentation into Punjabi. Typo fixes, new translations and reviews are all welcome.
3+
Thanks for helping with the Punjabi translation of the Python documentation. There are three ways to help: translate or review strings, improve something in this repository, or report a problem.
44

5-
## Ways to help
5+
## Translating and reviewing
66

7-
- **Translate or review** in [Transifex](https://explore.transifex.com/python-doc/python-newest/). Most of the work happens there, and you do not need a pull request. See [Transifex_Setup.md](Transifex_Setup.md).
8-
- **Improve this repository** (guides, workflows, templates) with a pull request. See "Pull requests" below.
9-
- **Report a problem** by opening an issue.
7+
This happens in [Transifex](https://explore.transifex.com/python-doc/python-newest/), and you don't need a pull request for it. [Transifex_Setup.md](Transifex_Setup.md) shows how to start. Please read the [style guide](STYLE_GUIDE.md) and the [glossary](GLOSSARY.md) first, and look at [RULES.md](RULES.md) for what has to stay unchanged. If you review, follow the [review checklist](STYLE_GUIDE.md#review).
108

11-
## Before you start
9+
Reviewed translations are copied into this repository every day (the [README](README.en.md) explains how). That's why you shouldn't edit translations in the `.po` files here: the next sync can overwrite your change. If a `.po` file needs a fix that can't be made in Transifex, ask a coordinator.
1210

13-
Read [STYLE_GUIDE.md](STYLE_GUIDE.md) and [GLOSSARY.md](GLOSSARY.md). [RULES.md](RULES.md) has the detailed rules for markup, placeholders and `.po` files. Use the glossary terms, and keep code, identifiers and reStructuredText markup unchanged.
11+
## Changing this repository
1412

15-
## Translations
16-
17-
Translate and review in Transifex. Reviewed translations are pulled into this repository every day (see the [README](README.en.md)).
18-
19-
Please do not edit translations in the `.po` files here. The daily sync takes them from Transifex, so direct edits can be overwritten. If a `.po` file needs a fix that cannot be made in Transifex, ask a coordinator.
20-
21-
## Pull requests
22-
23-
For changes to the guides, workflows or templates:
13+
Pull requests are for the guides, the workflows and the templates.
2414

2515
1. Fork the repository, clone your fork and create a branch from `3.15`.
26-
2. Make your change. Keep each pull request about one topic.
27-
3. If you touched a `.po` file, run `msgfmt --check FILE.po`.
28-
4. Push the branch and open a pull request against `3.15` with a clear description.
29-
30-
## Checks
31-
32-
CI runs `msgfmt --check` on every `.po` file for each push and pull request. It must pass.
33-
34-
```bash
35-
msgfmt --check FILE.po # required
36-
sphinx-lint FILE.po # optional, for larger changes
37-
```
38-
39-
## Reviewing
40-
41-
A good review checks that:
16+
2. Make your change. Keep each pull request to one topic.
17+
3. If you changed a `.po` file, run `msgfmt --check FILE.po`.
18+
4. Push the branch and open a pull request against `3.15`. Say what you changed and why.
4219

43-
- the meaning matches the English original,
44-
- glossary terms are used,
45-
- code, placeholders and markup are unchanged,
46-
- the Punjabi reads naturally.
20+
CI runs `msgfmt --check` on every `.po` file for each push and pull request, and it has to pass. For bigger changes, `sphinx-lint FILE.po` is a useful extra check.
4721

48-
## Getting help
22+
## Questions and problems
4923

5024
Open an issue, or ask one of the coordinators listed in the [README](README.en.md).
5125

‎RULES.md‎

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,53 @@
1-
# Rules for Markup, Code and `.po` Files
1+
# Rules for Code, Markup and `.po` Files
22

3-
These rules keep the translation valid and the documentation build working. For language and terminology, see [STYLE_GUIDE.md](STYLE_GUIDE.md) and [GLOSSARY.md](GLOSSARY.md).
3+
These rules keep the documentation build working. For wording and terms, see [STYLE_GUIDE.md](STYLE_GUIDE.md) and [GLOSSARY.md](GLOSSARY.md).
44

5-
We translate in Transifex (see [Transifex_Setup.md](Transifex_Setup.md)). The same rules apply to any `.po` file edited in this repository.
5+
We translate in Transifex ([Transifex_Setup.md](Transifex_Setup.md)). The same rules apply if you edit a `.po` file here.
66

7-
## Keep unchanged
7+
## Leave these as they are
88

9-
Keep these exactly as in the English source:
9+
Copy the following from the English source without changes:
1010

11-
- Python keywords, built-in names, and names of modules, packages, classes, functions, methods, attributes, exceptions and constants
12-
- Variable, argument and parameter names in code
13-
- C API names, command names, environment variables, file and directory names
14-
- PEP numbers and version numbers (`3.12`, `Python 3.15`)
15-
- URLs, anchors and reference identifiers
16-
- Placeholders such as `%s`, `%d`, `%(name)s`, `{}`, `{0}`, `{name}` and `<filename>`
11+
- Python keywords, built-in names, and the names of modules, packages, classes, functions, methods, attributes, exceptions and constants
12+
- variable, argument and parameter names in code
13+
- C API names, commands, environment variables, and file and folder names
14+
- PEP numbers and version numbers, like `3.12` or `Python 3.15`
15+
- URLs, anchors and reference names
16+
- placeholders like `%s`, `%d`, `%(name)s`, `{}`, `{0}`, `{name}` and `<filename>`
1717

18-
A name stays as it is even when a Punjabi spelling is possible. The words around a name are translated as usual.
18+
A name stays as it is even if it could be written in Gurmukhi. Translate the words around it as usual.
1919

2020
## Code
2121

22-
- Do not change Python code: indentation, names, operators, imports, arguments or syntax.
23-
- Do not change output, tracebacks or interactive sessions (the `>>>` and `...` prompts).
24-
- Comments inside code may be translated if the meaning stays the same.
25-
- Translate a string literal only when the English text clearly means the literal itself to be translated. It may also be data, output, an API value or an identifier.
22+
Don't change Python code. That includes indentation, names, operators, imports and arguments. Output, tracebacks and interactive sessions (the `>>>` and `...` prompts) stay as they are too.
23+
24+
You can translate comments inside code as long as the meaning stays the same. Translate a string literal only if the English text clearly means the literal itself to be translated. It may also be data, output, an API value or an identifier.
2625

2726
## reStructuredText and Sphinx markup
2827

29-
- Keep roles and their targets: `:func:`, `:class:`, `:meth:`, `:exc:`, `:mod:`, `:ref:`, `:pep:` and so on.
30-
- To show a Punjabi label, use the form with an explicit target and translate only the label. The target between `<` and `>` stays as in the English.
31-
- Keep directives and their arguments (`.. note::`, `.. warning::`, `.. versionadded:: 3.12`, `.. code-block:: python`). Translate only the text inside them.
32-
- Keep inline markup: `*italic*`, `**bold**`, ` ``code`` `, backticks, underscores and escaped characters.
33-
- Keep the structure of the text (line breaks, lists, tables) as in the source.
28+
Keep roles and their targets as they are: `:func:`, `:class:`, `:meth:`, `:exc:`, `:mod:`, `:ref:`, `:pep:` and so on.
29+
30+
If you want to show a Punjabi label, use the form with an explicit target and translate only the label. The target between `<` and `>` must stay as in the English.
3431

3532
```text
3633
English: :ref:`function`
3734
Wrong: :ref:`ਫੰਕਸ਼ਨ`
3835
Right: :ref:`ਫੰਕਸ਼ਨ <function>`
3936
```
4037

38+
Directives and their arguments also stay (`.. note::`, `.. warning::`, `.. versionadded:: 3.12`, `.. code-block:: python`). Translate only the text inside them. The same goes for inline markup such as `*italic*`, `**bold**` and ` ``code`` `. Keep the asterisks, backticks, underscores and escaped characters, and keep the structure of the text (line breaks, lists, tables).
39+
4140
## `.po` files
4241

4342
- Translate `msgstr` only. Never change `msgid`, the `#:` source references, the `#,` flags or the header. They come from the English source and are updated by the sync.
44-
- If the English looks wrong, report it upstream. Do not fix it in the `.po` file.
45-
- Keep the quoting, escapes and line breaks of multi-line strings valid.
46-
- Do not add or remove `fuzzy` to skip a review. Check an uncertain translation and fix it first.
47-
- Do not mix unrelated changes (formatting, metadata, other files) into a translation commit.
43+
- If the English looks wrong, report it upstream. Don't fix it in the `.po` file.
44+
- Keep the quotes, escapes and line breaks of multi-line strings valid.
45+
- Don't add or remove `fuzzy` just to skip a review. Check an uncertain translation and fix it first.
46+
- Don't mix unrelated changes (formatting, metadata, other files) into a translation commit.
4847

4948
## Checks
5049

51-
Before sending a change, run:
50+
Before you send a change, run:
5251

5352
```bash
5453
msgfmt --check FILE.po
@@ -57,6 +56,6 @@ git diff --check
5756
git diff
5857
```
5958

60-
The first two commands run `msgfmt` on one file and on all files. In `git diff`, confirm that no `msgid`, code, URL or placeholder changed and that there are no unrelated changes.
59+
The first two run `msgfmt` on one file and on all files. In `git diff`, make sure that no `msgid`, code, URL or placeholder changed and that there are no unrelated changes.
6160

62-
Optional: run `sphinx-lint FILE.po`, or build the HTML documentation locally as described in the [Developer's Guide](https://devguide.python.org/documentation/translations/translating/).
61+
You can also run `sphinx-lint FILE.po`, or build the HTML documentation locally as described in the [Developer's Guide](https://devguide.python.org/documentation/translations/translating/).

‎STYLE_GUIDE.md‎

Lines changed: 24 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,48 @@
11
# Style Guide
22

3-
This guide explains how we write the Punjabi (`pa`) translation of the Python documentation. Rules for markup, code, placeholders and `.po` files are in [RULES.md](RULES.md). Approved terms are in [GLOSSARY.md](GLOSSARY.md).
3+
This guide is about how we write the Punjabi. The rules for code and markup are in [RULES.md](RULES.md), and the agreed terms are in [GLOSSARY.md](GLOSSARY.md).
44

5-
## Principles
5+
## The basics
66

7-
- We translate the meaning, not the words. The Punjabi must say exactly what the English says.
8-
- Technical accuracy comes first, then consistency, then style.
9-
- We write clear, natural Punjabi (Gurmukhi) that a Punjabi-speaking programmer can read easily.
10-
- We never change the meaning of a technical term.
7+
Translate the meaning, not the words. The Punjabi should say what the English says, no more and no less. If two goals clash, accuracy wins over consistency, and consistency wins over style.
118

12-
## Tone
9+
Write simple, natural Gurmukhi that a Punjabi-speaking programmer can read without effort. Keep the formal, teaching tone of the English documentation. Avoid slang and regional dialect, and don't translate word for word when the result sounds odd.
1310

14-
- Formal, educational and clear, like the English documentation.
15-
- No slang, no regional dialect, and no word-for-word translation that sounds unnatural.
16-
- When in doubt: clarity over literal wording, consistency over personal preference, accuracy over style.
11+
Never change the meaning of a technical term to make a sentence read better.
1712

18-
## Terminology
13+
## Technical terms
1914

20-
For every technical term we follow this order:
15+
For each term, go through these steps in order:
2116

22-
1. Use the term from [GLOSSARY.md](GLOSSARY.md). Do not create an alternative, and do not switch wording between files.
23-
2. If the term is not listed, use a Punjabi word only when it has exactly the same technical meaning.
24-
3. If there is no such Punjabi word, write the English word in Gurmukhi (transliteration).
25-
4. Proper names, code and UI button labels stay in Latin script. So do the terms listed under "Terms Commonly Left Untranslated" in the glossary.
17+
1. Use the term from the [glossary](GLOSSARY.md). Don't make up another one, and don't use two wordings in different files.
18+
2. If the glossary doesn't have it, use a Punjabi word only if it means exactly the same thing.
19+
3. If there is no such word, write the English word in Gurmukhi, for example ਰਿਪੋਜ਼ਟਰੀ.
20+
4. Names, code and button labels stay in Latin script. So do the terms in the glossary's "Terms Commonly Left Untranslated" list.
2621

27-
Then add the new term to the glossary, as described under "Adding or Changing a Term" there.
22+
After that, add the new term to the glossary. The steps are under "Adding or Changing a Term" there.
2823

29-
Please also:
24+
A few more things to watch:
3025

31-
- Check the context. The same English word can be a technical term, an ordinary word or part of code. Never run a find-and-replace for a term over many files.
32-
- Look at other Python translations (for example Chinese, Japanese or Korean) to see how they handle a term, but do not copy their wording.
33-
- Do not rewrite an existing translation only because you prefer another wording. Change it only for a clear language, technical or consistency reason.
26+
- Look at the context first. The same English word can be a technical term, an everyday word or part of code. For the same reason, never run a find and replace for a term across many files.
27+
- Other Python translations (Chinese, Japanese, Korean and so on) show how they dealt with a term. Use them for ideas, but don't copy their wording.
28+
- An existing translation isn't wrong just because you would write it differently. Change it only when it is unclear, technically wrong or inconsistent.
3429

3530
## Machine translation
3631

37-
We use machine translation only as a first draft. A person must read and correct every string. Watch for unnatural word order, wrong technical meanings, inconsistent terms and unexplained switching between English and Punjabi.
32+
You can use it for a first draft, but a person has to read and fix every string. Typical problems are odd word order, wrong technical meaning, terms that don't match the glossary, and random jumps between English and Punjabi.
3833

3934
## Review
4035

41-
Reviewers in Transifex check each string for:
36+
Before you approve a string in Transifex, check that:
4237

43-
- **Meaning:** it says the same as the English.
44-
- **Terminology:** it uses the glossary term.
45-
- **Punjabi:** it is natural, with correct grammar and spelling.
46-
- **Markup:** roles, links, placeholders and code are intact (see [RULES.md](RULES.md)).
38+
- the meaning is the same as the English,
39+
- it uses the glossary term,
40+
- the Punjabi is natural, with correct grammar and spelling,
41+
- roles, links, placeholders and code are untouched (see [RULES.md](RULES.md)).
4742

48-
Only reviewed strings reach this repository, so approve a string only when it passes all four.
43+
Only reviewed strings reach this repository, so approve a string only when all four are true.
4944

50-
## References
45+
## Useful links
5146

5247
- [Python Developer's Guide: Translating](https://devguide.python.org/documentation/translations/translating/)
5348
- [Python Developer's Guide: Style guide](https://devguide.python.org/documentation/style-guide/)

0 commit comments

Comments
 (0)