Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita1cbac2

Browse files
committed
Cross platform gettext installation, some wiki
1 parent038f6ff commita1cbac2

File tree

4 files changed

+68
-1
lines changed

4 files changed

+68
-1
lines changed

‎.pre-commit-config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
repos:
22
-repo:local
33
hooks:
4+
-id:gettext
5+
name:Install gettext
6+
entry:python .pre-commit-scripts/install_gettext.py
7+
language:system
8+
verbose:true
9+
410
-id:lint
511
name:Run sphinx-lint on .po files
612
entry:sphinx-lint
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/usr/bin/env python3
2+
importsys
3+
importshutil
4+
importsubprocess
5+
6+
7+
defmain():
8+
ifsys.platform=="win32":
9+
try:
10+
cmd="Set-ExecutionPolicy RemoteSigned -Scope CurrentUser;irm get.scoop.sh | iex;scoop install gettext"
11+
returnsubprocess.run(cmd,shell=True,check=True,executable=shutil.which("powershell"))
12+
exit(0)
13+
exceptException:
14+
print(
15+
NotImplementedError(
16+
"WARNING: Use scoop to install gettext on Windows!!! Otherwise powrap will fail.\nRefer to\
17+
https://github.com/python/python-docs-tr/blob/HEAD/wiki/gettext.md for instructions."
18+
)
19+
)
20+
exit(0)
21+
elifsys.platformin ["linux","linux2"]:
22+
cmd="sudo apt --upgrade && sudo apt install -y gettext"
23+
else:# macOS
24+
cmd="brew update && brew install gettext"
25+
returnsubprocess.run(cmd,shell=True,check=True)
26+
27+
28+
if__name__=="__main__":
29+
exit(main())

‎README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,14 @@ Bu proje gönüllü çevirmenler ve python-docs-tr ekibi iş birliğinde sürdü
1414
- Yüklü bir[Git](https://git-scm.com/) istemcisi
1515
-``.po`` dosyalarını düzenlemek için[poedit](https://poedit.net/) gibi bir program
1616
- Yüklü bir Python ve``pip`` versiyonu (en son stabil olan versiyon önerilir)
17+
-``gettext`` araçları ([yükleme adımları](https://github.com/python/python-docs-tr/blob/HEAD/wiki/gettext.md))
1718

1819
###Adımlar
1920

2021
####Rezervasyon
2122

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

‎wiki/gettext.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#Gettext Araçları
2+
3+
Bu belgede,``gettext`` araçlarının nasıl kurulacağı açıklanmaktadır.
4+
5+
##Windows
6+
7+
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:
8+
9+
```powershell
10+
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
11+
irm get.scoop.sh | iex
12+
scoop install gettext
13+
```
14+
15+
##Linux
16+
17+
``apt`` paket yöneticisi kullanıyorsanız, gettext araçlarını şu komutla yükleyebilirsiniz:
18+
19+
```bash
20+
sudo apt update
21+
sudo apt install gettext
22+
```
23+
24+
##macOS
25+
26+
``brew`` paket yöneticisi kullanıyorsanız, gettext araçlarını şu komutla yükleyebilirsiniz:
27+
28+
```zsh
29+
brew update
30+
brew install gettext
31+
```

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp