Skip to content

Remove powrap checks #120

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

Merged
merged 50 commits into from
Mar 1, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
038f6ff
Remove line-length from checks, new pre-commit checks instead
egeakman Feb 9, 2023
a1cbac2
Cross platform gettext installation, some wiki
egeakman Feb 10, 2023
f0136d7
revert pre-commit ci's commit
egeakman Feb 10, 2023
f44091f
try pre-commit on multiple platforms
egeakman Feb 10, 2023
e64d07a
try pre-commit on multiple platforms
egeakman Feb 10, 2023
1eafaaf
try pre-commit on multiple platforms
egeakman Feb 10, 2023
80c4cc7
try pre-commit on multiple platforms
egeakman Feb 10, 2023
49e0c50
try pre-commit on multiple platforms
egeakman Feb 10, 2023
b20ee69
uyku önemli
egeakman Feb 10, 2023
ed3390b
try pre-commit on multiple platforms
egeakman Feb 10, 2023
4133dfc
try pre-commit on multiple platforms
egeakman Feb 10, 2023
744a4a2
try pre-commit on multiple platforms
egeakman Feb 10, 2023
cd9b83f
try pre-commit on multiple platforms
egeakman Feb 10, 2023
cd3c398
let's try this
egeakman Feb 11, 2023
d63633c
try pre-commit on multiple platforms
egeakman Feb 11, 2023
7c51999
Merge branch '3.11' into line-length
egeakman Feb 11, 2023
1aaec6b
update
egeakman Feb 11, 2023
889c277
Merge branch 'line-length' of https://github.com/python/python-docs-t…
egeakman Feb 11, 2023
2e5ed72
macos
egeakman Feb 11, 2023
e92562e
trigger
egeakman Feb 11, 2023
800879d
force
egeakman Feb 11, 2023
77230f3
Merge branch '3.11' into line-length
egeakman Feb 11, 2023
0c2409d
switch to ubuntu
egeakman Feb 11, 2023
45ffeff
Merge branch 'line-length' of https://github.com/python/python-docs-t…
egeakman Feb 11, 2023
b4bbd5b
this seems better
egeakman Feb 11, 2023
6b4f752
update
egeakman Feb 11, 2023
08b99e0
update
egeakman Feb 11, 2023
989bebd
How did I miss that
egeakman Feb 11, 2023
ba0ea41
[pre-commit.ci lite] apply automatic fixes
pre-commit-ci-lite[bot] Feb 11, 2023
5542660
style-print notice
egeakman Feb 11, 2023
0361365
test on different OSs
egeakman Feb 11, 2023
0e72cd6
Everything looks fine, let's test it.
egeakman Feb 11, 2023
6cb2121
[pre-commit.ci lite] apply automatic fixes
pre-commit-ci-lite[bot] Feb 11, 2023
b551bbc
Update gettext.md
egeakman Feb 11, 2023
2b2d37e
Update README.md
egeakman Feb 11, 2023
69f8756
update
egeakman Feb 17, 2023
31c6beb
[pre-commit.ci lite] apply automatic fixes
pre-commit-ci-lite[bot] Feb 17, 2023
50dde37
Let's see how this'll do
egeakman Feb 19, 2023
a51316e
update
egeakman Feb 19, 2023
9ce2eea
test
egeakman Feb 19, 2023
4a01035
revert to 9ce2eea626b429680b72feb4e2fb24e9b04f25ce and make changes
egeakman Feb 21, 2023
f7d22a4
test
egeakman Feb 22, 2023
59d46d2
test
egeakman Feb 22, 2023
52c8bf3
Will be good to go after tests
egeakman Feb 22, 2023
8470e94
[pre-commit.ci lite] apply automatic fixes
pre-commit-ci-lite[bot] Feb 22, 2023
add8291
Merge branch '3.11' into line-length
egeakman Feb 22, 2023
272c577
ok
egeakman Feb 22, 2023
6bb9143
Update README.md
egeakman Mar 1, 2023
30ddb75
remove powrap from pre-commit since it is very problematic
egeakman Mar 1, 2023
d534571
Merge branch '3.11' into line-length
egeakman Mar 1, 2023
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
Prev Previous commit
Next Next commit
Cross platform gettext installation, some wiki
  • Loading branch information
egeakman committed Feb 10, 2023
commit a1cbac2348fbc0c45cc09f69241ed6b4217073f1
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
repos:
- repo: local
hooks:
- id: gettext
name: Install gettext
entry: python .pre-commit-scripts/install_gettext.py
language: system
verbose: true

- id: lint
name: Run sphinx-lint on .po files
entry: sphinx-lint
Expand Down
29 changes: 29 additions & 0 deletions .pre-commit-scripts/install_gettext.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env python3
import sys
import shutil
import subprocess


def main():
if sys.platform == "win32":
try:
cmd = "Set-ExecutionPolicy RemoteSigned -Scope CurrentUser;irm get.scoop.sh | iex;scoop install gettext"
return subprocess.run(cmd, shell=True, check=True, executable=shutil.which("powershell"))
exit(0)
except Exception:
print(
NotImplementedError(
"WARNING: Use scoop to install gettext on Windows!!! Otherwise powrap will fail.\nRefer to \
https://github.com/python/python-docs-tr/blob/HEAD/wiki/gettext.md for instructions."
)
)
exit(0)
elif sys.platform in ["linux", "linux2"]:
cmd = "sudo apt --upgrade && sudo apt install -y gettext"
else: # macOS
cmd = "brew update && brew install gettext"
return subprocess.run(cmd, shell=True, check=True)


if __name__ == "__main__":
exit(main())
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ Bu proje gönüllü çevirmenler ve python-docs-tr ekibi iş birliğinde sürdü
- Yüklü bir [Git](https://git-scm.com/) istemcisi
- ``.po`` dosyalarını düzenlemek için [poedit](https://poedit.net/) gibi bir program
- Yüklü bir Python ve ``pip`` versiyonu (en son stabil olan versiyon önerilir)
- ``gettext`` araçları ([yükleme adımları](https://github.com/python/python-docs-tr/blob/HEAD/wiki/gettext.md))

### Adımlar

#### Rezervasyon

Çeviri yapmak istediğiniz bir dosyaya rezervasyon oluşturmak için şu adımları izleyin:

1. `Issues > New Issue > Get started` düğmelerini takip ederek rezervasyon formunu açın.
2. foo/bar.po taslağını, çalışmak istediğiniz dosyanın yolu ile değiştirin.
- Örnegin, "library/functions.po üzerinde çalışmak istiyorum".
Expand Down
31 changes: 31 additions & 0 deletions wiki/gettext.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Gettext Araçları

Bu belgede, ``gettext`` araçlarının nasıl kurulacağı açıklanmaktadır.

## Windows

Scoop, GNU araçlarını Windows'ta kullanmaya yarayan bir paket yöneticisidir. Scoop'u kullanarak ``gettext`` araçlarını yükleyebilirsiniz. Aşağıdaki komutları PowerShell'de çalıştırmanız gerekmektedir:

```powershell
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
irm get.scoop.sh | iex
scoop install gettext
```

## Linux

``apt`` paket yöneticisi kullanıyorsanız, gettext araçlarını şu komutla yükleyebilirsiniz:

```bash
sudo apt update
sudo apt install gettext
```

## macOS

``brew`` paket yöneticisi kullanıyorsanız, gettext araçlarını şu komutla yükleyebilirsiniz:

```zsh
brew update
brew install gettext
```