Skip to content

Commit 2da7fe8

Browse files
committed
Update CONTRIBUTING.md for new repository structure
1 parent c80e5e7 commit 2da7fe8

1 file changed

Lines changed: 101 additions & 1 deletion

File tree

‎CONTRIBUTING.md‎

Lines changed: 101 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,116 @@
22

33
Thank you for contributing to the Punjabi translation of Python documentation.
44

5+
## Repository Structure
6+
7+
```text
8+
python-docs-pa-in/
9+
├── README.md
10+
├── CONTRIBUTING.md
11+
├── GLOSSARY.md
12+
├── STYLE_GUIDE.md
13+
├── tutorial/
14+
├── library/
15+
├── reference/
16+
├── using/
17+
└── whatsnew/
18+
```
19+
520
## Workflow
621

722
1. Fork the repository.
823
2. Create a feature branch.
924
3. Translate or review `.po` files.
1025
4. Validate before committing.
26+
5. Commit your changes.
27+
6. Open a Pull Request.
28+
29+
## Creating a New Translation File
30+
31+
Generate a new `.po` file from the latest CPython gettext template:
32+
33+
```bash
34+
msginit \
35+
--locale=pa_IN \
36+
--input=PATH_TO_TEMPLATE.pot \
37+
--output-file=tutorial/FILENAME.po
38+
```
39+
40+
Example:
41+
42+
```bash
43+
msginit \
44+
--locale=pa_IN \
45+
--input=stdlib.pot \
46+
--output-file=tutorial/stdlib.po
47+
```
1148

1249
## Validation
1350

1451
Run:
1552

1653
```bash
17-
msgfmt --check file.po
54+
msgfmt --check tutorial/FILENAME.po
55+
```
56+
57+
Check translation statistics:
58+
59+
```bash
60+
msgfmt --statistics tutorial/FILENAME.po
61+
```
62+
63+
View untranslated entries:
64+
65+
```bash
66+
msgattrib --untranslated tutorial/FILENAME.po
67+
```
68+
69+
## Translation Rules
70+
71+
### Do Not Translate
72+
73+
* Python keywords (`if`, `else`, `for`, `while`, `class`, `def`)
74+
* Function names (`print`, `len`, `range`)
75+
* Module names (`os`, `sys`, `json`)
76+
* Exception names (`ValueError`, `TypeError`)
77+
* URLs
78+
* RST roles (`:func:`, `:class:`, `:mod:`, `:ref:`)
79+
* Code blocks
80+
81+
### Translate
82+
83+
* Headings
84+
* Explanatory text
85+
* Notes and warnings
86+
* Comments inside code examples
87+
* User-facing descriptions
88+
89+
## Quality Checklist
90+
91+
Before submitting:
92+
93+
* [ ] All translations completed
94+
* [ ] `msgfmt --check` passes
95+
* [ ] No broken RST markup
96+
* [ ] Terminology follows `GLOSSARY.md`
97+
* [ ] Style follows `STYLE_GUIDE.md`
98+
* [ ] GitHub Actions passes
99+
100+
## Commit Message Examples
101+
102+
```text
103+
Translate tutorial/classes.po to Punjabi (pa)
104+
105+
Translate tutorial/stdlib.po to Punjabi (pa)
106+
107+
Update glossary and translation guidelines
108+
```
109+
110+
## Getting Help
111+
112+
Before translating technical terms, check:
113+
114+
* `GLOSSARY.md`
115+
* `STYLE_GUIDE.md`
116+
117+
For project discussions and coordination, use GitHub Issues or the Python documentation translation community channels.

0 commit comments

Comments
 (0)