Skip to content

Commit 6741fb2

Browse files
authored
Merge pull request BlackPythonDevs#65 from oleksis/oleksis/issue59
Add section for translating site in Contributing.md
2 parents 73bc0eb + a295614 commit 6741fb2

File tree

3 files changed

+108
-61
lines changed

3 files changed

+108
-61
lines changed

CONTRIBUTING.md

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
---
2+
layout: default
3+
lang: en
4+
title: Contributing
5+
---
6+
7+
# Contributing to Black Python Devs
8+
9+
First off, thank you for considering contributing to Black Python Devs website. It's people like you that make Black Python Devs such a great community.
10+
11+
## Code of Conduct
12+
13+
Help us keep this project open and inclusive. Please read and follow our [Code of Conduct](https://github.com/BlackPythonDevs/.github/blob/main/CODE_OF_CONDUCT.md).
14+
15+
## How Can I Contribute?
16+
17+
### 1. Create an Issue (and wait to be assigned)
18+
19+
- Click on the Issues tab in the repository.
20+
21+
![Issues tab](/assets/images/issues_tab.png)
22+
23+
- Click on the green button with the label **"New issue"** and you should see the image below:
24+
25+
![New issue button](/assets/images/new_issue.png)
26+
27+
- Type in the issue title in the title textbox and type in a clear explanation of the issue in the textarea. You can add images, code snippets, etc to explain your issue.
28+
29+
- Once you are done, you can preview your issue by selecting the Preview tab. If you are satisfied with the issue presentation, you can click on the green "Submit new issue" button to create ypur issue.
30+
31+
- Now you wait for your issue to be assigned to you by a maintainer. You should get an email notification of the issue being assigned to you or you can view the issue assignment in the issue page. It should look similar to this:
32+
33+
![Issue assignment](/assets/images/issue_assignment.png)
34+
35+
### 2. Fork the Code
36+
37+
- To fork the repository so you have a copy of the codebase, you will click on the **"Fork"** button from the repository main page
38+
39+
![Fork button](/assets/images/fork_button_page.png)
40+
41+
- Clicking on the Fork button takes you to the **"Create New Fork"** page where you select the owner (your personal github account) and click on the Create fork button.
42+
43+
![Create new fork page](/assets/images/create_new_fork_page.png)
44+
45+
### 3. Make the changes
46+
47+
- The easiest way to make changes and and test them is by using [![GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/BlackPythonDevs/blackpythondevs.github.io)
48+
49+
- You can also access the Codespaces from the repository main page:
50+
51+
![Codespaces tab](/assets/images/codespaces_tab.png)
52+
53+
- The web version of VSCode should open in a new tab in your browser:
54+
55+
![BlackPythonDevs Codespace](/assets/images/blackpythondevs_codespace.png)
56+
57+
- Now that you have the code editor set up, you need to install the dependencies. To do this, you have to open the code editor's terminal and run the command `bundle install`.
58+
59+
- The easiest way to open the terminal is to click on the 3 horizontal lines (also known as hamburger) at the top left of the code editor > Terminal > New Terminal:
60+
61+
![Terminal starter](/assets/images/terminal_starter3.png)
62+
63+
- In the terminal run the command `bundle install`.
64+
65+
![Bundle install terminal](/assets/images/bundle_install_terminal.png)
66+
67+
- After installing the dependencies, its time to run the application. We do this by running the command `bundle exec jekyll serve` or run the default **Build Task** <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>B</kbd>:
68+
69+
![Jekyll serve terminal](/assets/images/jekyll_serve_terminal.png)
70+
71+
- The server address shows `http://127.0.0.1:4000`. This is the address for any local computer so this server will be wrong since the application is running on a remote computer so we have to get the address of that computer. We can get the address by clicking on the Ports tab next to the Terminal:
72+
73+
![Codespace ports](/assets/images/codespace_ports2.png)
74+
75+
- <kbd>Ctrl</kbd> + Click on the Forwarded Address assigned to Port 4000. This will open the running application in a new tab:
76+
77+
![Running page](/assets/images/running_page.png)
78+
79+
- Test your changes (create new tests as needed)
80+
81+
- Submit a Pull Request
82+
83+
🥳
84+
85+
## Translations
86+
87+
We welcome translations for the Black Python Devs website in all languages! Here's how you can contribute:
88+
89+
The language code being used should be in the format [<ISO 639-1>](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)
90+
91+
1. [**Fork the repository**](#2-fork-the-code): Make a copy of this project on your account.
92+
93+
2. **Create a new branch**: Make a new branch for your translation work to keep it separate from the main project: e.g. `es` .
94+
95+
3. **Translate**: Translate all the content in your preferred language. Please ensure that the translation is accurate and professional.
96+
97+
- Copy `_data/locales/en.yml` to your target language file e.g. `_data/locales/es.yml` and translate all the strings.
98+
99+
- Create a new directory in `_articles/` for your language e.g. `_articles/es/`, copy each guide from `_articles/` into that folder and translate the content in each guide.
100+
101+
- Copy `index.html` to your target language index file e.g. [`_articles/es/index.html`](https://github.com/BlackPythonDevs/blackpythondevs.github.io/blob/HEAD/_articles/es/index.html) and update the `lang:` and add the `permalink:` fields. Example: `lang: es` and `permalink: /es/`.
102+
103+
4. **Submit a Pull Request**: You may send a pull request before all steps above are complete: e.g., you may want to ask for help with translations, or getting tests to pass. However, your pull request will not be merged until all steps above are complete.
104+
105+
Our maintainers will review your pull request and merge it if everything is in order. We appreciate your contribution to making Black Python Devs accessible to more people around the world!

README.md

Lines changed: 3 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -8,65 +8,8 @@ This repo is the [GitHub Pages](https://pages.github.com/) website, built in Jek
88

99
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/BlackPythonDevs/blackpythondevs.github.io)
1010

11-
You can deploy your project locally but the fastest way to contribute is to use our [Codespace](<(https://github.com/features/codespaces/)https://github.com/features/codespaces/>).
11+
You can deploy your project locally but the fastest way to contribute is to use our [Codespace](https://github.com/features/codespaces/).
1212

13-
### 1. Create an Issue (and wait to be assigned)
13+
## Contributing
1414

15-
- Click on the Issues tab in the repository.
16-
17-
![Issues tab](/assets/images/issues_tab.png)
18-
19-
- Click on the green button with the label "New issue" and you should see the image below:
20-
21-
![New issue button](/assets/images/new_issue.png)
22-
23-
- Type in the issue title in the title textbox and type in a clear explanation of the issue in the textarea. You can add images, code snippets, etc to explain your issue.
24-
- Once you are done, you can preview your issue by selecting the Preview tab. If you are satisfied with the issue presentation, you can click on the green "Submit new issue" button to create ypur issue.
25-
- Now you wait for your issue to be assigned to you by an admin. You should get an email notification of the issue being assigned to you or you can view the issue assignment in the issue page. It should look similar to this:
26-
27-
![Issue assignment](/assets/images/issue_assignment.png)
28-
29-
### 2. Fork the Code
30-
31-
- To fork the repository so you have a copy of the codebase, you will click on the "Fork" button from the repository main page
32-
33-
![Fork button](/assets/images/fork_button_page.png)
34-
35-
- Clicking on the Fork button takes you to the "Create New Fork" page where you select the owner (your personal github account) and click on the Create fork button.
36-
37-
![Create new fork page](/assets/images/create_new_fork_page.png)
38-
39-
### 3. Make the changes
40-
41-
- The easiest way to make changes and and test them is by using [![GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/BlackPythonDevs/blackpythondevs.github.io)
42-
- You can also access the Codespaces from the repository main page:
43-
![Codespaces tab](/assets/images/codespaces_tab.png)
44-
45-
- The web version of VSCode should open in a new tab in your browser:
46-
![BlackPythonDevs Codespace](/assets/images/blackpythondevs_codespace.png)
47-
48-
- Now that you have the code editor set up, you need to install the dependencies. To do this, you have to open the code editor's terminal and run the command `bundle install`.
49-
- The easiest way to open the terminal is to click on the 3 horizontal lines (also known as hamburger) at the top left of the code editor > Terminal > New Terminal:
50-
51-
![Terminal starter](/assets/images/terminal_starter3.png)
52-
53-
- In the terminal run the command `bundle install`.
54-
55-
![Bundle install terminal](/assets/images/bundle_install_terminal.png)
56-
57-
- After installing the dependencies, its time to run the application. We do this by running the command `bundle exec jekyll serve`:
58-
59-
![Jekyll serve terminal](/assets/images/jekyll_serve_terminal.png)
60-
61-
- The server address shows `http:127.0.0.0.1:4000`. This is the address for any local computer so this server will be wrong since the application is running on a remote computer so we have to get the address of that computer. We can get the address by clicking on the Ports tab next to the Terminal:
62-
63-
![Codespace ports](/assets/images/codespace_ports2.png)
64-
65-
- Ctrl + Click on the Forwarded Address assigned to Port 4000. This will open the running application in a new tab:
66-
67-
![Running page](/assets/images/running_page.png)
68-
69-
- Test your changes (create new tests as needed)
70-
- Submit a PR
71-
72-
🥳
15+
Please read [Contributing to Black Python Devs](CONTRIBUTING.md)

_config.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ exclude:
5757
- bin
5858
- CNAME
5959
- CODE_OF_CONDUCT.md
60-
- CONTRIBUTING.md
6160
- README.md
6261
- Gemfile*
6362
- node_modules

0 commit comments

Comments
 (0)