You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c20947d
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+11-37Lines changed: 11 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,51 +1,25 @@
1
1
# Contributing
2
2
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.
4
4
5
-
## Ways to help
5
+
## Translating and reviewing
6
6
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).
10
8
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.
12
10
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
14
12
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.
24
14
25
15
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.
42
19
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.
47
21
48
-
## Getting help
22
+
## Questions and problems
49
23
50
24
Open an issue, or ask one of the coordinators listed in the [README](README.en.md).
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).
4
4
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.
6
6
7
-
## Keep unchanged
7
+
## Leave these as they are
8
8
9
-
Keep these exactly as in the English source:
9
+
Copy the following from the English source without changes:
10
10
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>`
17
17
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.
19
19
20
20
## Code
21
21
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.
26
25
27
26
## reStructuredText and Sphinx markup
28
27
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.
- 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.
34
31
35
32
```text
36
33
English: :ref:`function`
37
34
Wrong: :ref:`ਫੰਕਸ਼ਨ`
38
35
Right: :ref:`ਫੰਕਸ਼ਨ <function>`
39
36
```
40
37
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
+
41
40
## `.po` files
42
41
43
42
- 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.
48
47
49
48
## Checks
50
49
51
-
Before sending a change, run:
50
+
Before you send a change, run:
52
51
53
52
```bash
54
53
msgfmt --check FILE.po
@@ -57,6 +56,6 @@ git diff --check
57
56
git diff
58
57
```
59
58
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.
61
60
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/).
Copy file name to clipboardExpand all lines: STYLE_GUIDE.md
+24-29Lines changed: 24 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,53 +1,48 @@
1
1
# Style Guide
2
2
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 codeand markup are in [RULES.md](RULES.md), and the agreed terms are in [GLOSSARY.md](GLOSSARY.md).
4
4
5
-
## Principles
5
+
## The basics
6
6
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.
11
8
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.
13
10
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.
17
12
18
-
## Terminology
13
+
## Technical terms
19
14
20
-
For every technical term we follow this order:
15
+
For each term, go through these steps in order:
21
16
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.
26
21
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.
28
23
29
-
Please also:
24
+
A few more things to watch:
30
25
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 findandreplace 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.
34
29
35
30
## Machine translation
36
31
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.
38
33
39
34
## Review
40
35
41
-
Reviewers in Transifex check each string for:
36
+
Before you approve a string in Transifex, check that:
42
37
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 Punjabiis natural, with correct grammar and spelling,
41
+
- roles, links, placeholders and code are untouched (see [RULES.md](RULES.md)).
47
42
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.
0 commit comments