Skip to content

Update pl translations from Crowdin #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/list_languages
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/bin/env python3

import argparse
import json
import os
from pathlib import Path


def parse_langs(langs, include_beta):
for line in langs.readlines():
description = line[3:-7]
code = line[-5:-3]

if include_beta or 'beta' not in description:
yield code, description

def main():
parser = argparse.ArgumentParser()
parser.add_argument('--include-beta', help='Include beta languages', default='false',
choices=('true', 'false'))
parser.add_argument('--langs-file', help='LANGS.md to use',
type=argparse.FileType('r', encoding='UTF-8'),
default=(Path(__file__).absolute().parent.parent / 'LANGS.md').as_posix())
args = parser.parse_args()

languages = dict(parse_langs(args.langs_file, args.include_beta == 'true'))

if 'GITHUB_ACTION' in os.environ:
print(f'::set-output name=languages::{json.dumps(list(languages.keys()))}')
for code, language in languages.items():
print(f'{language} ({code})')


if __name__ == '__main__':
main()
54 changes: 54 additions & 0 deletions .github/workflows/translations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Update translations

on:
workflow_dispatch:
inputs:
include_beta:
type: boolean
default: false
description: Include beta languages

env:
GIT_AUTHOR_NAME: Django Girls Automation
GIT_AUTHOR_EMAIL: automation@djangogirls.org

jobs:
list_languages:
name: List languages
runs-on: ubuntu-latest
outputs:
languages: ${{ steps.set_list.outputs.languages }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set the language list
id: set_list
run: ./.github/list_languages --include-beta ${{ inputs.include_beta }}

update_language:
name: 'Update ${{ matrix.language }} translations from Crowdin'
needs: list_languages
if: ${{ needs.list_languages.outputs.languages != '[]' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language: ${{ fromJson(needs.list_languages.outputs.languages) }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Update language
run: |
wget https://crowdin.com/backend/download/project/django-girls-tutorial/${{ matrix.language }}.zip
unzip ${{ matrix.language }}.zip
find ${{ matrix.language }} -name '*.md' -delete
rsync -av master/${{ matrix.language }}*/* ${{ matrix.language }}/
rm -rf ${{ matrix.language }}.zip master
- name: Open a PR
uses: peter-evans/create-pull-request@v3
with:
commit-message: "Update ${{ matrix.language }} translations from Crowdin"
branch: "update_translations/${{ matrix.language }}"
title: "Update ${{ matrix.language }} translations from Crowdin"
body: ''
delete-branch: true
Empty file modified pl/GLOSSARY.md
100755 → 100644
Empty file.
4 changes: 2 additions & 2 deletions pl/README.md
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

## Witaj

Witaj w tutorialu Django Girls! Super Cię widzieć! :) W tym tutorialu odbędziemy podróż po technologiach internetowych, oferując Tobie podgląd na wszystkie części składowe, które połączone razem tworzą sieć taką, jaką ją znamy.
Witaj w tutorialu Django Girls! We are happy to see you here. :) In this tutorial, we will take you on a journey under the hood of web technologies, offering you a glimpse of all the bits and pieces that need to come together to make the web work as we know it.

Jak ze wszystkim, co jest nieznane, będzie to naprawdę niezła przygoda - ale nie przejmuj się! Skoro już się tutaj znalazłaś, to dalej już będzie tylko z górki! :)
As with all unknown things, this is going to be an adventure - but no worries, since you already worked up the courage to be here, you'll be just fine. :)

## Wprowadzenie

Expand Down
12 changes: 10 additions & 2 deletions pl/SUMMARY.md
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
# Podsumowanie

* [Wprowadzenie](README.md)
* [Instalacja](installation/README.md)
* [Instalacja](installation/README.md)
* [Wiersz poleceń](installation/README.md#command-line)
* [Python](installation/README.md#python)
* [Edytor kodu](installation/README.md#code-editor)
* [Środowisko wirtualne](installation/README.md#virtualenv)
* [Django](installation/README.md#django)
* [Git](installation/README.md#git)
* [GitHub](installation/README.md#github-account)
* [PythonAnywhere](installation/README.md#pythonanywhere-account)
* [Instalacja (chromebook)](chromebook_setup/README.md)
* [Jak działa internet?](how_the_internet_works/README.md)
* [Wprowadzenie do wiersza polecenia](intro_to_command_line/README.md)
Expand All @@ -14,7 +22,7 @@
* [Modele w Django](django_models/README.md)
* [Administracja Django (admin)](django_admin/README.md)
* [Wdrażanie!](deploy/README.md)
* [Adresy URL w Django](django_urls/README.md)
* [Django URLs](django_urls/README.md)
* [Widoki Django - czas zacząć tworzyć!](django_views/README.md)
* [Wprowadzenie do HTML-a](html/README.md)
* [Django ORM (QuerySet)](django_orm/README.md)
Expand Down
2 changes: 1 addition & 1 deletion pl/chromebook_setup/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Instalacja na Chromebooku

> **Uwaga**! Jeżeli wykonałaś już kroki instalacyjne, nie musisz tego robić ponownie - możesz przejść od razu do [Wprowadzenie do Pythona](../python_introduction/README.md).
> **Note** If you already worked through the [installation steps](../installation/README.md), no need to do this again – you can skip straight ahead to [Introduction to Python](../python_introduction/README.md).

{% include "/chromebook_setup/instructions.md" %}
121 changes: 102 additions & 19 deletions pl/chromebook_setup/instructions.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Możesz [pominąć tę sekcję](http://tutorial.djangogirls.org/en/installation/#install-python), jeżeli nie używasz Chromebooka. W przeciwnym wypadku, proces instalacji będzie wyglądał nieco inaczej. Możesz zignorować pozostałe elementy instrukcji dotyczące instalacji.

### Cloud IDE (PaizaCloud Cloud IDE, AWS Cloud9)
### Cloud IDE (PaizaCloud Cloud IDE, AWS Cloud9, Glitch.com)

Cloud IDE jest narzędziem, które pełni funkcję edytora kodu oraz umożliwia dostęp do komputera uruchomionego w internecie, gdzie możesz instalować, pisać oraz uruchamiać programy. Na czas trwania tutoriala Cloud IDE będzie działać jako *komputer lokalny*. Będziesz mogła uruchamiać komendy w terminalu, tak jak inne osoby korzystające z systemu OS X, Ubuntu czy Windows, z tym że Twój terminal będzie podłączony do komputera, który ustawi dla Ciebie Cloud IDE. Oto instrukcje dotyczące różnych Cloud IDE (PaizaCloud Cloud IDE, AWS Cloud9). Możesz wybrać jedno z poniższych Cloud IDE i postępować zgodnie z instrukcją.
Cloud IDE jest narzędziem, które pełni funkcję edytora kodu oraz umożliwia dostęp do komputera uruchomionego w internecie, gdzie możesz instalować, pisać oraz uruchamiać programy. Na czas trwania tutoriala Cloud IDE będzie działać jako *komputer lokalny*. Będziesz mogła uruchamiać komendy w terminalu, tak jak inne osoby korzystające z systemu OS X, Ubuntu czy Windows, z tym że Twój terminal będzie podłączony do komputera, który ustawi dla Ciebie Cloud IDE. Oto instrukcje dotyczące różnych Cloud IDE (PaizaCloud Cloud IDE, AWS Cloud9, Glitch.com). Możesz wybrać jedno z poniższych Cloud IDE i postępować zgodnie z instrukcją.

#### PaizaCloud Cloud IDE

1. Przejdź do [PaizaCloud Cloud IDE](https://paiza.cloud/)
2. Załóż konto
3. Kliknij przycisk *New Server*
3. Kliknij *Nowy serwer* i wybierz aplikację Django
4. Kliknij przycisk "Terminal" (po lewej stronie okna)

Teraz powinnaś zobaczyć interfejs z bocznym paskiem i przyciski po lewej stronie. Kliknij przycisk "Terminal", aby otworzyć okno terminala ze znakiem zachęty takim jak ten:
Expand All @@ -22,9 +22,17 @@ Terminal PaizaCloud Cloud ID jest gotowy na Twoje instrukcje. Możesz zmienić r

#### AWS Cloud9

1. Przejdź do [AWS Cloud9](https://aws.amazon.com/cloud9/)
2. Załóż konto
3. Kliknij *Create Environment*
Obecnie Cloud 9 wymaga rejestracji w AWS i wprowadzenia informacji o karcie kredytowej.

1. Zainstaluj Cloud 9 ze [ sklepu internetowego Chrome](https://chrome.google.com/webstore/detail/cloud9/nbdmccoknlfggadpfkmcpnamfnbkmkcp)
2. Przejdź do [c9.io](https://c9.io) i kliknij *Zacznij z AWS Cloud9*
3. Zarejestruj konto AWS (wymaga danych karty kredytowej, ale możesz używać go za darmo)
4. W Panelu AWS wpisz * Cloud9 * na pasku wyszukiwania i kliknij go
5. W panelu Cloud 9 kliknij * Utwórz środowisko *
6. Nazwij go * django-girls *
7. Podczas konfiguracji wybierz *Utwórz nową instancję dla środowiska (EC2)* dla "Typ Środowiska" i *t2.micro* dla "Typ instancji" (powinien powiedzieć "Kwalifikuje się na poziom darmowy"). Domyślne ustawienie oszczędzania kosztów jest dobre, a pozostałe wartości możesz zachować domyślne.
8. Kliknij *Next step*
9. Kliknij *Create Environment*

Teraz powinnaś zobaczyć interfejs z bocznym paskiem, duże główne okno z tekstem i małe okno na dole, które wygląda następująco:

Expand All @@ -35,41 +43,116 @@ Teraz powinnaś zobaczyć interfejs z bocznym paskiem, duże główne okno z tek

Dolny obszar jest Twoim terminalem. Możesz użyć go do wysyłania instrukcji do zdalnego komputera Cloud 9. Możesz zmienić rozmiar tego okna, aby je trochę powiększyć.

### Środowisko wirtualne
#### Glitch.com Cloud IDE

Środowisko wirtualne (Virtual Environment - zwane także virtualenv) jest jak skrzynka, do której możemy wstawić użyteczny program komputerowy dla projektu, nad którym pracujemy. Używamy go, aby oddzielić od siebie różne części kodu potrzebne nam w różnych projektach, przez co nie mieszają się one pomiędzy nimi.
1. Przejdź do [Glitch.com](https://glitch.com/)
2. Stwóż darmowe konto (https://glitch.com/signup) lub użyj swojego konta GitHub, jeśli je posiadasz. (Zobacz instrukcje GitHub poniżej)
3. Kliknij *New Project* i wybierz *hello-webpage*
4. Click on the Tools dropdown list (at the bottom left side of the window), then on Terminal button to open terminal tab with a prompt like this:

W swoim terminalu na dole ekranu Cloud 9 wykonaj następujące polecenie:
{% filename %}Terminal{% endfilename %}

{% filename %}Cloud 9{% endfilename %}
app@name-of-your-glitch-project:~


When using Glitch.com as your Cloud IDE, you don't have to create a virtual environment. Instead, create the following files manually:

{% filename %}glitch.json{% endfilename %}

```json
{
"install": "pip3 install -r requirements.txt --user",
"start": "bash start.sh",
"watch": {
"throttle": 1000
}
}
```

{% filename %}requirements.txt{% endfilename %}

Django~={{ book.django_version }}


{% filename %}.bash_profile{% endfilename %}

```bash
alias python=python3
alias pip=pip3
```

{% filename %}start.sh{% endfilename %}

```bash
chmod 600 .bash_profile
pip3 install -r requirements.txt --user
python3 manage.py makemigrations
python3 manage.py migrate
python3 manage.py runserver $PORT
```

Once these files are created, go to the Terminal and execute the following commands to create your first Django project:

sudo apt update
sudo apt install python3.6-venv
{% filename %}Terminal{% endfilename %}

django-admin.py startproject mysite .
refresh


Jeżeli polecenie cały czas nie chce zadziałać, poproś o pomoc swojego mentora.
In order to see detailed error messages, you can activate Django debug logs for your Glitch application. Simply add the following at the end of the `mysite/settings.py` file.

{% filename %}mysite/settings.py{% endfilename %}

```python
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'file': {
'level': 'DEBUG',
'class': 'logging.FileHandler',
'filename': 'debug.log',
},
},
'loggers': {
'django': {
'handlers': ['file'],
'level': 'DEBUG',
'propagate': True,
},
},
}
```

This will create a `debug.log` file detailing Django operations and any error messages that might come up, making it much easier to fix if your website does not work.

The initial restarting of the Glitch project should fail. (If you click on the top dropdown button `Show` then click on `In a New Window`, you will receive a `DisallowedHost` error message.) Do not worry about it at this stage, the tutorial will fix this as soon as you update the Django settings of your project in the `mysite/settings.py` file.

### Środowisko wirtualne

A virtual environment (also called a virtualenv) is like a private box we can stuff useful computer code into for a project we're working on. We use them to keep the various bits of code we want for our various projects separate so things don't get mixed up between projects.

Następnie uruchom:
Run:

{% filename %}Cloud 9{% endfilename %}

mkdir djangogirls
cd djangogirls
python3.6 -mvenv myvenv
python3 -m venv myvenv
source myvenv/bin/activate
pip install django~={{ book.django_version }}


(zauważ, że w ostatniej linii użyłyśmy tyldy, za którą następuje znak równości: ~=).
(note that on the last line we use a tilde followed by an equal sign: `~=`).

### GitHub

Załóż konto na [GitHubie](https://github.com).

### PythonAnywhere

Tutorial Django Girls zawiera sekcję dotycząca wdrożenia, tzn. procesu przenoszenia kodu programu, który odpowiada za działanie naszej nowej aplikacji internetowej na publicznie dostępny komputer (zwany serwerem) w taki sposób, by inne osoby były w stanie zobaczyć Twoje dzieło.
The Django Girls tutorial includes a section on what is called Deployment, which is the process of taking the code that powers your new web application and moving it to a publicly accessible computer (called a server) so other people can see your work.

Ta część może wydać się lekko niezrozumiała, gdy przechodzimy tutorial na Chromebooku, skoro w trakcie tutoriala używamy komputera, który już jest w internecie (w odróżnieniu od chociażby naszego laptopa). Jednak może ona być cały czas przydatna, byśmy traktowały nasze konto w Cloud9 jako miejsce, w którym postępuje nasza praca oraz PythonAnywhere jako miejsce, gdzie możemy pokazać światu nasze dzieło, gdy tylko będzie ono bardziej dokończone.
This part is a little odd when doing the tutorial on a Chromebook since we're already using a computer that is on the Internet (as opposed to, say, a laptop). However, it's still useful, as we can think of our Cloud 9 workspace as a place for our "in progress" work and Python Anywhere as a place to show off our stuff as it becomes more complete.

Dlatego właśnie załóż nowe konto w PythonAnywhere pod adresem [www.pythonanywhere.com](https://www.pythonanywhere.com).
Thus, sign up for a new Python Anywhere account at [www.pythonanywhere.com](https://www.pythonanywhere.com).
2 changes: 1 addition & 1 deletion pl/code_editor/README.md
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ Zaraz napiszesz swoją pierwszą linijkę kodu, więc najwyższy czas zainstalow

> **Uwaga** Jeśli używasz już Chromebooka, pomiń ten rozdział i upewnij się, że postąpiłaś zgodnie z instrukcją [Instalacja Chromebooka](../chromebook_setup/README.md). Cloud IDE, które wybrałaś (PaizaCloud Cloud IDE or AWS Cloud9) zawiera edytor kodu, więc kiedy otworzysz plik z menu w swoim IDE, automatycznie zostanie on otworzony w edytorze.
>
> **Uwaga** Jeśli zrobiłaś to już wcześniej w rozdziale 'Instalacja' - możesz przejść od razu do następnego rozdziału!
> **Note** You might have done this earlier in the [Installation chapter](../installation/README.md) – if so, you can skip right ahead to the next chapter!

{% include "/code_editor/instructions.md" %}
8 changes: 7 additions & 1 deletion pl/code_editor/instructions.md
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ Istnieje wiele programów tego typu, jednak który wybrać? To nie takie proste,

Nasze propozycje prezentujemy poniżej, ale w razie czego spytaj o sugestie swojego mentora - będzie on w stanie wybrać coś zgodnego z Twoimi preferencjami.

## Visual Studio Code

Visual Studio Code jest edytorem kodu źródłowego opracowanym przez Microsoft dla Windows, Linux i macOS. Obejmuje on wsparcie debugowania, kontrolę wbudowanego Git, podświetlanie składni, inteligentne uzupełnianie kodu, fragmenty i refaktoryzację kodu.

[Pobierz tutaj](https://code.visualstudio.com/)

## Gedit

Gedit to open source'owy i darmowy edytor dostępny dla wszystkich systemów operacyjnych. Czasami nie jest jednak zbyt prosty w zainstalowaniu.
Expand All @@ -28,4 +34,4 @@ Podstawowym powodem jest to, że kod musi być **zwykłym, niesformatowanym teks

Drugim powodem jest specjalizacja edytorów kodu - dzięki temu mogą one dostarczać bardzo użytecznych funkcjonalności, jak kolorowanie składni zgodnie z jej przeznaczeniem lub automatyczne zamykanie cudzysłowów zamiast Ciebie.

Za chwilę przetestujemy wybrany edytor w akcji. Nim się obejrzysz, będziesz uważać swój edytor tekstu jako jedno z ulubionych narzędzi. :)
Za chwilę przetestujemy wybrany edytor w akcji. Nim się obejrzysz, będziesz uważać swój edytor tekstu jako jedno z ulubionych narzędzi. :)
Loading