Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit db05304

Browse files
Merge branch '3.11' into library-math
2 parents bd34e04 + e656340 commit db05304

File tree

512 files changed

+5540
-4094
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

512 files changed

+5540
-4094
lines changed

.gitattributes

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
*.po diff=podiff
2-
*.pot diff=podiff
2+
*.po text eol=lf
3+
*.pot diff=podiff
4+
*.pot text eol=lf

.github/workflows/build.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,22 @@
11
name: Tests
2-
32
on:
43
workflow_dispatch:
54
push:
65
branches:
7-
- '**'
6+
- "**"
87
pull_request:
98
branches:
10-
- '**'
9+
- "**"
1110

1211
jobs:
1312
checks:
13+
# Using matrix-tool strategy in case we want to add more tools in the future
1414
strategy:
1515
matrix:
1616
tool:
1717
- name: sphinx-lint
1818
package: sphinx-lint
19-
command: 'sphinx-lint --enable default-role --ignore .git'
20-
- name: Line length
21-
command: 'awk ''{if (length($0) > 80 && length(gensub(/[^ ]/, "", "g")) > 1) {print FILENAME ":" FNR, "line too long:", $0; ERRORS+=1}} END {if (ERRORS>0) {exit 1}}'' $CHANGED_PO_FILES'
19+
command: "sphinx-lint --enable default-role --ignore .git"
2220

2321
name: ${{ matrix.tool.name }} (${{ matrix.tool.package }})
2422
runs-on: ubuntu-latest
@@ -30,7 +28,7 @@ jobs:
3028
token: ${{ secrets.GITHUB_TOKEN }}
3129
- uses: actions/setup-python@v4
3230
with:
33-
python-version: '3.11'
31+
python-version: "3.11"
3432
- name: Install ${{ matrix.tool.package }}
3533
run: |
3634
if [ -n "${{ matrix.tool.apt_dependencies }}" ]; then
@@ -57,14 +55,14 @@ jobs:
5755
fi
5856
5957
sphinx:
60-
name: 'Generate docs (sphinx)'
58+
name: "Generate docs (sphinx)"
6159
runs-on: ubuntu-latest
6260
timeout-minutes: 30
6361
steps:
6462
- uses: actions/checkout@v3
6563
- uses: actions/setup-python@v4
6664
with:
67-
python-version: '3.11'
65+
python-version: "3.11"
6866
- name: Prepare environment
6967
run: |
7068
pwd

.github/workflows/gh-pages.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
name: Build and Deploy to GitHub Pages
2-
32
on:
43
push:
54
branches:
6-
- '3.11'
5+
- "3.11"
76

87
jobs:
98
sphinx-lint:
@@ -15,22 +14,22 @@ jobs:
1514
token: ${{ secrets.GITHUB_TOKEN }}
1615
- uses: actions/setup-python@v4
1716
with:
18-
python-version: '3.11'
17+
python-version: "3.11"
1918
- name: Install sphinx-lint
2019
run: python -m pip install --upgrade sphinx-lint
2120
- name: Run sphinx-lint
22-
run: 'sphinx-lint --enable default-role --ignore .git'
21+
run: "sphinx-lint --enable default-role --ignore .git"
2322

2423
deploy:
25-
name: 'Generate docs and deploy to GitHub Pages'
24+
name: "Generate docs and deploy to GitHub Pages"
2625
runs-on: ubuntu-latest
2726
needs: sphinx-lint
2827
timeout-minutes: 30
2928
steps:
3029
- uses: actions/checkout@v3
3130
- uses: actions/setup-python@v4
3231
with:
33-
python-version: '3.11'
32+
python-version: "3.11"
3433
- name: Prepare environment
3534
run: |
3635
git clone https://github.com/python/cpython.git venv/cpython/
@@ -45,5 +44,5 @@ jobs:
4544
publish_dir: ./venv/cpython/Doc/build/html
4645
publish_branch: gh-pages
4746
allow_empty_commit: true
48-
user_name: 'github-actions[bot]'
49-
user_email: 'github-actions[bot]@users.noreply.github.com'
47+
user_name: "github-actions[bot]"
48+
user_email: "github-actions[bot]@users.noreply.github.com"

.github/workflows/pre-commit-ci.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: pre-commit-ci
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches:
6+
- "**"
7+
pull_request:
8+
branches:
9+
- "**"
10+
11+
jobs:
12+
pre-commit:
13+
name: "Pre-commit checks"
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v3
17+
- uses: actions/setup-python@v4
18+
id: setup_python
19+
with:
20+
python-version: "3.11"
21+
cache: pip
22+
23+
- name: Install pre-commit
24+
run: pip install --upgrade -r requirements.txt
25+
26+
- name: Cache pre-commit tools
27+
uses: actions/cache@v3
28+
with:
29+
key: pre-commit-${{ runner.os }}-${{ steps.setup_python.outputs.python-version}}-${{ hashFiles('.pre-commit-config.yaml') }}
30+
path: ~/.cache/pre-commit
31+
32+
- name: Run pre-commit
33+
run: pre-commit run --all-files --show-diff-on-failure
34+
35+
- name: Run pre-commit-ci-lite
36+
uses: pre-commit-ci/[email protected]
37+
if: always()

.github/workflows/update_doc.yml

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2,47 +2,47 @@ name: Update Doc
22
on:
33
workflow_dispatch:
44
schedule:
5-
- cron: '0 0 1 * *'
5+
- cron: "0 0 1 * *"
66

77
jobs:
88
create_pr:
99
runs-on: ubuntu-latest
1010

1111
steps:
12-
- uses: actions/checkout@v3
13-
14-
- name: Clone CPython Repo
15-
run: git clone https://github.com/python/cpython venv/cpython
16-
17-
- name: Set Up Python 3.11
18-
uses: actions/setup-python@v4
19-
with:
20-
python-version: "3.11"
21-
22-
- name: Install dependencies
23-
run: pip install -r requirements.txt && sudo apt install gettext -y
24-
25-
- name: Run merge.py
26-
run: python merge.py ${GITHUB_REF##*/}
27-
28-
- name: Commit changes
29-
run: |
30-
git config --local user.email "[email protected]"
31-
git config --local user.name "python-docs-turkish"
32-
git commit -m "Get changes from CPython Doc for ${{ github.ref_name }}"
33-
34-
- name: Create Pull Request
35-
uses: peter-evans/[email protected].3
36-
with:
37-
token: ${{ secrets.BOT_PAT }}
38-
commit-message: Get changes from CPython Doc for ${{ github.ref_name }}
39-
author: python-docs-turkish <[email protected]>
40-
committer: python-docs-turkish <[email protected]>
41-
branch: translation-update-${{ github.ref_name }}
42-
delete-branch: true
43-
title: Translation Update ${{ github.ref_name }}
44-
body: There are some changes, don't forget to translate them!
45-
labels: update
46-
reviewers: |
47-
egeakman
48-
ardasak
12+
- uses: actions/checkout@v3
13+
14+
- name: Clone CPython Repo
15+
run: git clone https://github.com/python/cpython venv/cpython
16+
17+
- name: Set Up Python 3.11
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: "3.11"
21+
22+
- name: Install dependencies
23+
run: pip install -r requirements.txt && sudo apt install gettext -y
24+
25+
- name: Run merge.py
26+
run: python merge.py ${GITHUB_REF##*/}
27+
28+
- name: Commit changes
29+
run: |
30+
git config --local user.email "[email protected]"
31+
git config --local user.name "python-docs-turkish"
32+
git commit -m "Get changes from CPython Doc for ${{ github.ref_name }}"
33+
34+
- name: Create Pull Request
35+
uses: peter-evans/[email protected].4
36+
with:
37+
token: ${{ secrets.BOT_PAT }}
38+
commit-message: Get changes from CPython Doc for ${{ github.ref_name }}
39+
author: python-docs-turkish <[email protected]>
40+
committer: python-docs-turkish <[email protected]>
41+
branch: translation-update-${{ github.ref_name }}
42+
delete-branch: true
43+
title: Translation Update ${{ github.ref_name }}
44+
body: There are some changes, don't forget to translate them!
45+
labels: update
46+
reviewers: |
47+
egeakman
48+
ardasak

.github/workflows/wrap_branch.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
name: "Wrap All"
2-
32
on:
43
workflow_dispatch:
54
schedule:
6-
- cron: '0 0 15 * *'
5+
- cron: "0 0 15 * *"
76

8-
jobs:
7+
jobs:
98
wrap:
109
runs-on: ubuntu-latest
1110
steps:
@@ -31,16 +30,16 @@ jobs:
3130

3231
# Create pull request
3332
- name: Create Pull Request
34-
uses: peter-evans/[email protected].3
33+
uses: peter-evans/[email protected].4
3534
with:
3635
token: ${{ secrets.BOT_PAT }}
37-
commit-message: 'Wrap all files on: ${{ github.ref_name }}'
36+
commit-message: "Wrap all files on: ${{ github.ref_name }}"
3837
branch: ${{ github.ref_name }}-wrapped
3938
delete-branch: true
4039
committer: python-docs-turkish <[email protected]>
4140
author: python-docs-turkish <[email protected]>
42-
title: 'Wrap branch: ${{ github.ref_name }}'
43-
body: 'Wrapped all files on branch: ${{ github.ref_name }}.'
41+
title: "Wrap branch: ${{ github.ref_name }}"
42+
body: "Wrapped all files on branch: ${{ github.ref_name }}."
4443
labels: wrap
4544
reviewers: |
4645
egeakman

.pre-commit-config.yaml

Lines changed: 40 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,44 @@
11
repos:
2-
- repo: local
2+
- repo: local
33
hooks:
4-
- id: lint
5-
name: Run sphinx linting
4+
- id: style-print
5+
name: ""
6+
entry: "style-print 'Please report any issues at: https://github.com/python/python-docs-tr/issues' 'rUBI{y}'"
7+
language: python
8+
additional_dependencies: ["style-print"]
9+
pass_filenames: false
10+
verbose: true
11+
12+
- id: lint
13+
name: Run sphinx-lint on .po files
614
entry: sphinx-lint
715
language: python
8-
additional_dependencies: ['sphinx-lint==0.6.7']
9-
files: \.po$
16+
additional_dependencies: ["sphinx-lint"]
17+
files: \.po$
18+
19+
- repo: https://github.com/pycqa/isort
20+
rev: 5.12.0
21+
hooks:
22+
- id: isort
23+
name: isort (python)
24+
25+
- repo: https://github.com/psf/black
26+
rev: 23.1.0
27+
hooks:
28+
- id: black
29+
name: Run black on Python files
30+
args: ["--line-length=140", "--target-version=py311"]
31+
files: \.py$
32+
33+
- repo: https://github.com/pre-commit/pre-commit-hooks
34+
rev: v4.4.0
35+
hooks:
36+
- id: end-of-file-fixer
37+
- id: trailing-whitespace
38+
39+
- repo: https://github.com/pre-commit/mirrors-prettier
40+
rev: v2.7.1
41+
hooks:
42+
- id: prettier
43+
name: Run prettier on .yml and .yaml files
44+
types: [yaml]

Makefile

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
# from which we generated our po files. We use it here so when we
2121
# test build, we're building with the .rst files that generated our
2222
# .po files.
23-
CPYTHON_CURRENT_COMMIT := e98fa7121dd80496c60f07bb51101b648fe27cda
23+
24+
CPYTHON_CURRENT_COMMIT := d01cf5072be5511595b6d0c35ace6c1b07716f8d
2425
LANGUAGE := tr
2526
BRANCH := 3.11
2627

@@ -65,7 +66,8 @@ PYTHON := $(shell which python3)
6566
MODE := html
6667
POSPELL_TMP_DIR := .pospell/
6768
JOBS := auto
68-
SERVE_PORT :=
69+
ADDITIONAL_ARGS := --keep-going --color
70+
SPHINXERRORHANDLING = -W
6971

7072
# Detect OS
7173

@@ -90,13 +92,15 @@ all: ensure_prerequisites
9092
mkdir -p locales/$(LANGUAGE)/LC_MESSAGES/
9193
$(CP_CMD) -u --parents *.po */*.po locales/$(LANGUAGE)/LC_MESSAGES/
9294
$(MAKE) -C venv/cpython/Doc/ \
93-
SPHINXOPTS='-j$(JOBS) \
94-
-D locale_dirs=$(abspath locales) \
95+
JOBS='$(JOBS)' \
96+
SPHINXOPTS='-D locale_dirs=$(abspath locales) \
9597
-D language=$(LANGUAGE) \
9698
-D gettext_compact=0 \
9799
-D latex_engine=xelatex \
98100
-D latex_elements.inputenc= \
99-
-D latex_elements.fontenc=' \
101+
-D latex_elements.fontenc= \
102+
$(ADDITIONAL_ARGS)' \
103+
SPHINXERRORHANDLING=$(SPHINXERRORHANDLING) \
100104
$(MODE)
101105
@echo "Build success, open file://$(abspath venv/cpython/)/Doc/build/html/index.html or run 'make htmlview' to see them."
102106

@@ -162,7 +166,7 @@ verifs: spell line-length sphinx-lint
162166
.PHONY: clean
163167
clean:
164168
@echo "Cleaning *.mo and $(POSPELL_TMP_DIR)"
165-
rm -rf $(POSPELL_TMP_DIR)
169+
rm -rf $(POSPELL_TMP_DIR) locales/$(LANGUAGE)/LC_MESSAGES/
166170
find -name '*.mo' -delete
167171
@echo "Cleaning build directory"
168-
$(MAKE) -C venv/cpython/Doc/ clean
172+
$(MAKE) -C venv/cpython/Doc/ clean

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Bu proje gönüllü çevirmenler ve python-docs-tr ekibi iş birliğinde sürdü
2020
#### Rezervasyon
2121

2222
Çeviri yapmak istediğiniz bir dosyaya rezervasyon oluşturmak için şu adımları izleyin:
23-
23+
2424
1. `Issues > New Issue > Get started` düğmelerini takip ederek rezervasyon formunu açın.
2525
2. foo/bar.po taslağını, çalışmak istediğiniz dosyanın yolu ile değiştirin.
2626
- Örnegin, "library/functions.po üzerinde çalışmak istiyorum".

TRANSLATORS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,10 @@ Eylül Ateş
88
Ceren Vuranok
99
Sami Koçak
1010
Ali Ege Özcan
11+
Kerem Sevgin
12+
Yener Ulusoy
13+
Deniz Karan
14+
Ahmet Burak
15+
Mert Şişmanoğlu
16+
Serkan Bayram
1117
Berkcan Gümüşışık

about.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Python Documentation Turkish Translation
2-
# Copyright (C) 2001-2022, Python Software Foundation
2+
# Copyright (C) 2001-2023, Python Software Foundation
33
# This file is distributed under the same license as the Python package.
44
#
55
msgid ""

0 commit comments

Comments
 (0)