tr2en 0.1.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. tr2en-0.1.3/.github/ISSUE_TEMPLATE/config.yml +1 -0
  2. tr2en-0.1.3/.github/ISSUE_TEMPLATE/hata.yml +55 -0
  3. tr2en-0.1.3/.github/ISSUE_TEMPLATE/ozellik-istegi.md +14 -0
  4. tr2en-0.1.3/.github/dependabot.yml +20 -0
  5. tr2en-0.1.3/.github/pull_request_template.md +10 -0
  6. tr2en-0.1.3/.github/workflows/exe.yml +52 -0
  7. tr2en-0.1.3/.github/workflows/pypi.yml +52 -0
  8. tr2en-0.1.3/.github/workflows/test.yml +21 -0
  9. tr2en-0.1.3/.gitignore +20 -0
  10. tr2en-0.1.3/AGENTS.md +40 -0
  11. tr2en-0.1.3/CLAUDE.md +1 -0
  12. tr2en-0.1.3/CODE_OF_CONDUCT.md +128 -0
  13. tr2en-0.1.3/CONTRIBUTING.md +42 -0
  14. tr2en-0.1.3/LICENSE +21 -0
  15. tr2en-0.1.3/PKG-INFO +176 -0
  16. tr2en-0.1.3/README.en.md +142 -0
  17. tr2en-0.1.3/README.md +140 -0
  18. tr2en-0.1.3/SECURITY.md +29 -0
  19. tr2en-0.1.3/baslat-arkaplan.cmd +7 -0
  20. tr2en-0.1.3/baslat.cmd +5 -0
  21. tr2en-0.1.3/paketleme/derle.ps1 +65 -0
  22. tr2en-0.1.3/paketleme/giris.py +4 -0
  23. tr2en-0.1.3/paketleme/simge_olustur.py +8 -0
  24. tr2en-0.1.3/paketleme/tr2en.ico +0 -0
  25. tr2en-0.1.3/paketleme/tr2en.iss +118 -0
  26. tr2en-0.1.3/pyproject.toml +46 -0
  27. tr2en-0.1.3/src/ceviri_katmani/__init__.py +2 -0
  28. tr2en-0.1.3/src/ceviri_katmani/cekirdek/__init__.py +3 -0
  29. tr2en-0.1.3/src/ceviri_katmani/cekirdek/anahtar.py +21 -0
  30. tr2en-0.1.3/src/ceviri_katmani/cekirdek/bolme.py +139 -0
  31. tr2en-0.1.3/src/ceviri_katmani/cekirdek/cevirmen.py +41 -0
  32. tr2en-0.1.3/src/ceviri_katmani/cekirdek/cikti.py +116 -0
  33. tr2en-0.1.3/src/ceviri_katmani/cekirdek/dil.py +82 -0
  34. tr2en-0.1.3/src/ceviri_katmani/cekirdek/gemini.py +65 -0
  35. tr2en-0.1.3/src/ceviri_katmani/cekirdek/indir.py +147 -0
  36. tr2en-0.1.3/src/ceviri_katmani/cekirdek/korumalar.py +210 -0
  37. tr2en-0.1.3/src/ceviri_katmani/cekirdek/kurulum.py +57 -0
  38. tr2en-0.1.3/src/ceviri_katmani/cekirdek/sozluk.py +228 -0
  39. tr2en-0.1.3/src/ceviri_katmani/cekirdek/sozluk.tsv +107 -0
  40. tr2en-0.1.3/src/ceviri_katmani/cekirdek/uyumlu.py +97 -0
  41. tr2en-0.1.3/src/ceviri_katmani/cekirdek/yerel.py +99 -0
  42. tr2en-0.1.3/src/ceviri_katmani/cli.py +41 -0
  43. tr2en-0.1.3/src/ceviri_katmani/uygulama/__init__.py +0 -0
  44. tr2en-0.1.3/src/ceviri_katmani/uygulama/__main__.py +4 -0
  45. tr2en-0.1.3/src/ceviri_katmani/uygulama/ana.py +662 -0
  46. tr2en-0.1.3/src/ceviri_katmani/uygulama/arkaplan.py +36 -0
  47. tr2en-0.1.3/src/ceviri_katmani/uygulama/ayarlar.py +281 -0
  48. tr2en-0.1.3/src/ceviri_katmani/uygulama/bildirim.py +31 -0
  49. tr2en-0.1.3/src/ceviri_katmani/uygulama/gecmis.py +58 -0
  50. tr2en-0.1.3/src/ceviri_katmani/uygulama/gizlilik.py +47 -0
  51. tr2en-0.1.3/src/ceviri_katmani/uygulama/model_indirme.py +75 -0
  52. tr2en-0.1.3/src/ceviri_katmani/uygulama/otomatik_baslat.py +71 -0
  53. tr2en-0.1.3/src/ceviri_katmani/uygulama/pano.py +290 -0
  54. tr2en-0.1.3/src/ceviri_katmani/uygulama/pencere.py +117 -0
  55. tr2en-0.1.3/src/ceviri_katmani/uygulama/simge.py +108 -0
  56. tr2en-0.1.3/src/ceviri_katmani/uygulama/tek_ornek.py +51 -0
  57. tr2en-0.1.3/src/ceviri_katmani/uygulama/tepsi.py +251 -0
  58. tr2en-0.1.3/src/ceviri_katmani/uygulama/tetik.py +361 -0
  59. tr2en-0.1.3/tests/__init__.py +0 -0
  60. tr2en-0.1.3/tests/test_ana.py +314 -0
  61. tr2en-0.1.3/tests/test_ana_tepsi.py +272 -0
  62. tr2en-0.1.3/tests/test_arkaplan.py +42 -0
  63. tr2en-0.1.3/tests/test_ayarlar.py +243 -0
  64. tr2en-0.1.3/tests/test_bolme.py +189 -0
  65. tr2en-0.1.3/tests/test_cevirmen.py +81 -0
  66. tr2en-0.1.3/tests/test_cikti.py +128 -0
  67. tr2en-0.1.3/tests/test_dayaniklilik.py +811 -0
  68. tr2en-0.1.3/tests/test_denetim1_cekirdek.py +271 -0
  69. tr2en-0.1.3/tests/test_denetim1_uygulama.py +549 -0
  70. tr2en-0.1.3/tests/test_dil.py +53 -0
  71. tr2en-0.1.3/tests/test_gecmis.py +123 -0
  72. tr2en-0.1.3/tests/test_gemini.py +163 -0
  73. tr2en-0.1.3/tests/test_indir.py +187 -0
  74. tr2en-0.1.3/tests/test_korumalar.py +414 -0
  75. tr2en-0.1.3/tests/test_korumalar_gercek.py +161 -0
  76. tr2en-0.1.3/tests/test_model_indirme.py +152 -0
  77. tr2en-0.1.3/tests/test_otomatik_baslat.py +191 -0
  78. tr2en-0.1.3/tests/test_pano_pencere.py +224 -0
  79. tr2en-0.1.3/tests/test_simge.py +64 -0
  80. tr2en-0.1.3/tests/test_sozluk.py +178 -0
  81. tr2en-0.1.3/tests/test_tasima.py +102 -0
  82. tr2en-0.1.3/tests/test_tek_ornek_gizlilik.py +83 -0
  83. tr2en-0.1.3/tests/test_tepsi.py +264 -0
  84. tr2en-0.1.3/tests/test_terminal_tetigi_kapali.py +164 -0
  85. tr2en-0.1.3/tests/test_tetik.py +341 -0
  86. tr2en-0.1.3/tests/test_uyumlu.py +416 -0
  87. tr2en-0.1.3/tests/test_yerel.py +51 -0
  88. tr2en-0.1.3/uv.lock +762 -0
@@ -0,0 +1 @@
1
+ blank_issues_enabled: true
@@ -0,0 +1,55 @@
1
+ name: Hata bildirimi / Bug report
2
+ description: Bir şey çalışmıyor / Something doesn't work
3
+ labels: [bug]
4
+ body:
5
+ - type: markdown
6
+ attributes:
7
+ value: |
8
+ **Gizlilik:** Çevirdiğiniz özel ya da hassas metni buraya yapıştırmayın; benzer, uydurma bir örnek yazın. API anahtarınızı asla paylaşmayın.
9
+ **Privacy:** Don't paste private text you translated; write a similar made-up example. Never share your API key.
10
+ - type: textarea
11
+ id: ne-oldu
12
+ attributes:
13
+ label: Ne oldu? / What happened?
14
+ description: Ne bekliyordunuz, ne oldu? / What did you expect, what happened instead?
15
+ validations:
16
+ required: true
17
+ - type: textarea
18
+ id: adimlar
19
+ attributes:
20
+ label: Adımlar / Steps to reproduce
21
+ placeholder: |
22
+ 1. Not Defteri'nde şu metni seçtim: ...
23
+ 2. Ctrl+Shift+Space'e bastım
24
+ 3. ...
25
+ validations:
26
+ required: true
27
+ - type: dropdown
28
+ id: cevirmen
29
+ attributes:
30
+ label: Çevirmen / Translator
31
+ options:
32
+ - Gemini
33
+ - Kendi modelim / Own model (OpenAI-compatible)
34
+ - Yalnızca yerel / Local only
35
+ - Bilmiyorum / Not sure
36
+ validations:
37
+ required: true
38
+ - type: input
39
+ id: uygulama
40
+ attributes:
41
+ label: Hangi uygulamada? / In which app?
42
+ placeholder: Chrome, VS Code, Word, Claude masaüstü...
43
+ - type: input
44
+ id: surum
45
+ attributes:
46
+ label: tr2en ve Windows sürümü / tr2en and Windows version
47
+ placeholder: 0.1.0b1, Windows 11 23H2
48
+ validations:
49
+ required: true
50
+ - type: textarea
51
+ id: kayit
52
+ attributes:
53
+ label: Konsol çıktısı (varsa) / Console output (if any)
54
+ description: "`tr2en-konsol` ile çalıştırıp hatayı kopyalayın. / Run `tr2en-konsol` and copy the error."
55
+ render: text
@@ -0,0 +1,14 @@
1
+ ---
2
+ name: Özellik isteği / Feature request
3
+ about: Yeni bir fikir önerin / Suggest an idea
4
+ labels: enhancement
5
+ ---
6
+
7
+ **Ne istiyorsunuz? / What would you like?**
8
+
9
+
10
+ **Hangi sorunu çözer? / What problem does it solve?**
11
+
12
+
13
+ **Nerede kullanacaksınız? (uygulama, durum) / Where would you use it?**
14
+
@@ -0,0 +1,20 @@
1
+ version: 2
2
+ updates:
3
+ # GitHub Actions sürümleri (ör. checkout, setup-uv)
4
+ - package-ecosystem: github-actions
5
+ directory: /
6
+ schedule:
7
+ interval: monthly
8
+ groups:
9
+ actions:
10
+ patterns: ["*"]
11
+
12
+ # Python bağımlılıkları (uv.lock)
13
+ - package-ecosystem: uv
14
+ directory: /
15
+ schedule:
16
+ interval: monthly
17
+ open-pull-requests-limit: 3
18
+ groups:
19
+ python:
20
+ patterns: ["*"]
@@ -0,0 +1,10 @@
1
+ ## Ne değişti? / What changed?
2
+
3
+
4
+
5
+ ## Kontrol listesi / Checklist
6
+
7
+ - [ ] Testler geçiyor / Tests pass (`uv run --extra test --extra yerel --extra uygulama pytest -q`)
8
+ - [ ] Yeni davranış için test eklendi / Added tests for new behavior
9
+ - [ ] Korumalara (`korumalar.py`, `cikti.py`) dokunduysam önce başarısız test yazdım / If I touched the safety layer, I wrote a failing test first
10
+ - [ ] Kullanıcı metni ya da API anahtarı hiçbir yere yazılmıyor / No user text or API key is logged or stored
@@ -0,0 +1,52 @@
1
+ name: exe
2
+
3
+ # v* etiketi push edilince: test + tr2en.exe derle + sürüme (release) kurulum dosyası ve zip olarak ekle.
4
+ # Elle çalıştırma (Actions → exe → Run workflow): yalnızca derler ve indirilebilir
5
+ # "artifact" bırakır; sürüme dokunmaz (yayından önce elle denemek için).
6
+ on:
7
+ push:
8
+ tags: ["v*"]
9
+ workflow_dispatch:
10
+
11
+ permissions:
12
+ contents: write
13
+
14
+ jobs:
15
+ derle:
16
+ runs-on: windows-latest
17
+ timeout-minutes: 30
18
+ steps:
19
+ - uses: actions/checkout@v7
20
+ - uses: astral-sh/setup-uv@v10.3.3
21
+ with:
22
+ python-version: "3.12"
23
+ - name: Testler
24
+ run: uv run --extra test --extra yerel --extra uygulama pytest -q
25
+ - name: Sürüm adı
26
+ shell: pwsh
27
+ run: |
28
+ $ad = if ($env:GITHUB_REF_TYPE -eq "tag") { $env:GITHUB_REF_NAME } else { "dev-$($env:GITHUB_SHA.Substring(0,7))" }
29
+ "SURUM=$ad" >> $env:GITHUB_ENV
30
+ - name: Inno Setup
31
+ shell: pwsh
32
+ run: |
33
+ if (-not (Test-Path "${env:ProgramFiles(x86)}\Inno Setup 6\ISCC.exe")) { choco install innosetup -y --no-progress }
34
+ - name: Derle
35
+ shell: pwsh
36
+ run: ./paketleme/derle.ps1 -Cikti dist -Surum $env:SURUM -KurulumZorunlu
37
+ - uses: actions/upload-artifact@v7
38
+ with:
39
+ name: tr2en-${{ env.SURUM }}-windows-x64
40
+ path: |
41
+ dist/*.zip
42
+ dist/*.exe
43
+ dist/*.sha256
44
+ - name: Sürüme ekle
45
+ if: github.ref_type == 'tag'
46
+ shell: pwsh
47
+ env:
48
+ GH_TOKEN: ${{ github.token }}
49
+ run: |
50
+ gh release view $env:SURUM *> $null
51
+ if ($LASTEXITCODE -ne 0) { gh release create $env:SURUM --generate-notes --latest --title "tr2en $env:SURUM (Beta)" }
52
+ gh release upload $env:SURUM (Get-ChildItem dist/*.zip, dist/*.exe, dist/*.sha256).FullName --clobber
@@ -0,0 +1,52 @@
1
+ name: pypi
2
+
3
+ # v* etiketi push edilince: test + paketi derle + PyPI'ye yükle.
4
+ # Şifre/anahtar yok: PyPI "trusted publishing" (OIDC) ile yalnızca bu repo,
5
+ # bu dosya (pypi.yml) ve "pypi" ortamı yayın yapabilir.
6
+ # Elle çalıştırma (Actions → pypi → Run workflow) da yayınlar; PyPI aynı sürümü ikinci kez kabul etmez.
7
+ on:
8
+ push:
9
+ tags: ["v*"]
10
+ workflow_dispatch:
11
+
12
+ permissions:
13
+ contents: read
14
+
15
+ jobs:
16
+ derle:
17
+ runs-on: windows-latest
18
+ timeout-minutes: 20
19
+ steps:
20
+ - uses: actions/checkout@v7
21
+ - uses: astral-sh/setup-uv@v10.3.3
22
+ with:
23
+ python-version: "3.12"
24
+ - name: Testler
25
+ run: uv run --extra test --extra yerel --extra uygulama pytest -q
26
+ - name: Paket
27
+ run: uv build
28
+ - name: Sürüm etiketle uyumlu mu
29
+ if: github.ref_type == 'tag'
30
+ shell: pwsh
31
+ run: |
32
+ $beklenen = $env:GITHUB_REF_NAME.TrimStart("v")
33
+ if (-not (Test-Path "dist/tr2en-$beklenen.tar.gz")) { throw "pyproject sürümü etiketle ($env:GITHUB_REF_NAME) uyuşmuyor" }
34
+ - uses: actions/upload-artifact@v7
35
+ with:
36
+ name: paket
37
+ path: dist/
38
+
39
+ yayinla:
40
+ needs: derle
41
+ runs-on: ubuntu-latest
42
+ environment:
43
+ name: pypi
44
+ url: https://pypi.org/project/tr2en/
45
+ permissions:
46
+ id-token: write
47
+ steps:
48
+ - uses: actions/download-artifact@v8
49
+ with:
50
+ name: paket
51
+ path: dist/
52
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,21 @@
1
+ name: test
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ jobs:
12
+ pytest:
13
+ runs-on: windows-latest
14
+ timeout-minutes: 15
15
+ steps:
16
+ - uses: actions/checkout@v7
17
+ - uses: astral-sh/setup-uv@v10.3.3
18
+ with:
19
+ python-version: "3.12"
20
+ - name: Testler
21
+ run: uv run --extra test --extra yerel --extra uygulama pytest -q
tr2en-0.1.3/.gitignore ADDED
@@ -0,0 +1,20 @@
1
+ __pycache__/
2
+ .venv/
3
+ *.egg-info/
4
+ .pytest_cache/
5
+
6
+ # Günlükler ve gizli anahtarlar
7
+ *.log
8
+ .env
9
+ .env.*
10
+
11
+ # Veritabanı / yerel ayar dosyaları
12
+ *.db
13
+ *.sqlite
14
+ ayarlar.toml
15
+ *.bozuk.toml
16
+
17
+ # Derleme çıktıları
18
+ dist/
19
+ build/
20
+ *.spec
tr2en-0.1.3/AGENTS.md ADDED
@@ -0,0 +1,40 @@
1
+ # AGENTS.md — rules for AI coding agents
2
+
3
+ tr2en is a Windows tray app that replaces selected Turkish text with its English translation (hotkey Ctrl+Shift+Space). Read [README.en.md](README.en.md) (English) or [README.md](README.md) (Turkish, default) for what users see. This file is for agents changing the code.
4
+
5
+ ## Setup and tests
6
+
7
+ - Windows 10/11, Python ≥ 3.11, [uv](https://docs.astral.sh/uv/).
8
+ - Run all tests (must pass before any commit):
9
+
10
+ ```powershell
11
+ uv run --extra test --extra yerel --extra uygulama pytest -q
12
+ ```
13
+
14
+ - If the app is running from this checkout, `.venv` is locked. Use a separate environment: set `UV_PROJECT_ENVIRONMENT` to another folder (for example `..\venv-test`) before `uv run`.
15
+ - Run the app with a console for debugging: `baslat.cmd` (or `uv run --extra uygulama --extra yerel tr2en-konsol`). Command-line translator for quick checks: `tr2en-cli`.
16
+
17
+ ## Layout
18
+
19
+ - `src/ceviri_katmani/cekirdek/` — translation core, no UI: translators (`gemini.py`, `uyumlu.py` for OpenAI-compatible APIs, `yerel.py` offline CTranslate2 model), chain builder (`kurulum.py`), safety layer (`korumalar.py`, `cikti.py`), sentence splitting (`bolme.py`), language detection (`dil.py`), glossary (`sozluk.py`, `sozluk.tsv`), model download (`indir.py`).
20
+ - `src/ceviri_katmani/uygulama/` — Windows app: hotkey hook (`tetik.py`), clipboard (`pano.py`), tray (`tepsi.py`), settings (`ayarlar.py`, stored in `%APPDATA%\tr2en\ayarlar.toml`), entry points (`ana.py`, `arkaplan.py`).
21
+ - `tests/` — pytest, one file per module plus audit regression tests (`test_denetim1_*`, `test_dayaniklilik.py`).
22
+
23
+ ## Conventions
24
+
25
+ - **Identifiers, comments, commit messages and user-facing strings are Turkish.** Keep it that way; don't rename to English.
26
+ - Commit messages: short Turkish prefix — `ozellik:`, `duzeltme:`, `belge:`, `test:`, `surum:` — ASCII only.
27
+ - Every translator implements `.ad` and `cevir(metin, kaynak="tr", hedef="en") -> str` and raises `CeviriHatasi` on failure; `kurulum.zincir_kur` wraps each one in `KorumaliCevirmen`.
28
+ - No new dependencies without a clear reason; the core depends only on `httpx`.
29
+
30
+ ## Must not break
31
+
32
+ - **Safety layer** (`korumalar.py`, `cikti.py`): code/URL/path masking with `ZXQ{i}ZXQ` placeholders, negation check, output checks. Write a failing test first, then change. A translation that loses a negation must never be pasted.
33
+ - **Privacy:** never log, store or send the user's text anywhere except the selected translator. Never print or write API keys; refer to them by environment variable name (`GEMINI_API_KEY`, or the name in `uyumlu_anahtar_degiskeni`).
34
+ - `http://` is allowed only for localhost translators.
35
+ - Clipboard: the user's original clipboard (text, image, files) must be restored after every job, including on errors.
36
+ - Tests must not touch the network, the real `%APPDATA%`, the registry Run key or the real clipboard unless the test is explicitly a Windows integration test.
37
+
38
+ ## Model
39
+
40
+ The offline model (`PolatOz/tr2en-model` on Hugging Face, CC-BY-4.0) is downloaded at runtime with SHA256 checks; it is not in this repo. Don't commit model files.
tr2en-0.1.3/CLAUDE.md ADDED
@@ -0,0 +1 @@
1
+ @AGENTS.md
@@ -0,0 +1,128 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, religion, or sexual identity
10
+ and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ * Demonstrating empathy and kindness toward other people
21
+ * Being respectful of differing opinions, viewpoints, and experiences
22
+ * Giving and gracefully accepting constructive feedback
23
+ * Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ * Focusing on what is best not just for us as individuals, but for the
26
+ overall community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ * The use of sexualized language or imagery, and sexual attention or
31
+ advances of any kind
32
+ * Trolling, insulting or derogatory comments, and personal or political attacks
33
+ * Public or private harassment
34
+ * Publishing others' private information, such as a physical or email
35
+ address, without their explicit permission
36
+ * Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ Community leaders have the right and responsibility to remove, edit, or reject
47
+ comments, commits, code, wiki edits, issues, and other contributions that are
48
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
49
+ decisions when appropriate.
50
+
51
+ ## Scope
52
+
53
+ This Code of Conduct applies within all community spaces, and also applies when
54
+ an individual is officially representing the community in public spaces.
55
+ Examples of representing our community include using an official e-mail address,
56
+ posting via an official social media account, or acting as an appointed
57
+ representative at an online or offline event.
58
+
59
+ ## Enforcement
60
+
61
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
+ reported to the community leaders responsible for enforcement by contacting
63
+ the maintainer through GitHub ([@PolatOzaslan21](https://github.com/PolatOzaslan21)); for sensitive reports, use a private security advisory (see [SECURITY.md](SECURITY.md)).
64
+ All complaints will be reviewed and investigated promptly and fairly.
65
+
66
+ All community leaders are obligated to respect the privacy and security of the
67
+ reporter of any incident.
68
+
69
+ ## Enforcement Guidelines
70
+
71
+ Community leaders will follow these Community Impact Guidelines in determining
72
+ the consequences for any action they deem in violation of this Code of Conduct:
73
+
74
+ ### 1. Correction
75
+
76
+ **Community Impact**: Use of inappropriate language or other behavior deemed
77
+ unprofessional or unwelcome in the community.
78
+
79
+ **Consequence**: A private, written warning from community leaders, providing
80
+ clarity around the nature of the violation and an explanation of why the
81
+ behavior was inappropriate. A public apology may be requested.
82
+
83
+ ### 2. Warning
84
+
85
+ **Community Impact**: A violation through a single incident or series
86
+ of actions.
87
+
88
+ **Consequence**: A warning with consequences for continued behavior. No
89
+ interaction with the people involved, including unsolicited interaction with
90
+ those enforcing the Code of Conduct, for a specified period of time. This
91
+ includes avoiding interactions in community spaces as well as external channels
92
+ like social media. Violating these terms may lead to a temporary or
93
+ permanent ban.
94
+
95
+ ### 3. Temporary Ban
96
+
97
+ **Community Impact**: A serious violation of community standards, including
98
+ sustained inappropriate behavior.
99
+
100
+ **Consequence**: A temporary ban from any sort of interaction or public
101
+ communication with the community for a specified period of time. No public or
102
+ private interaction with the people involved, including unsolicited interaction
103
+ with those enforcing the Code of Conduct, is allowed during this period.
104
+ Violating these terms may lead to a permanent ban.
105
+
106
+ ### 4. Permanent Ban
107
+
108
+ **Community Impact**: Demonstrating a pattern of violation of community
109
+ standards, including sustained inappropriate behavior, harassment of an
110
+ individual, or aggression toward or disparagement of classes of individuals.
111
+
112
+ **Consequence**: A permanent ban from any sort of public interaction within
113
+ the community.
114
+
115
+ ## Attribution
116
+
117
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118
+ version 2.0, available at
119
+ https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120
+
121
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct
122
+ enforcement ladder](https://github.com/mozilla/diversity).
123
+
124
+ [homepage]: https://www.contributor-covenant.org
125
+
126
+ For answers to common questions about this code of conduct, see the FAQ at
127
+ https://www.contributor-covenant.org/faq. Translations are available at
128
+ https://www.contributor-covenant.org/translations.
@@ -0,0 +1,42 @@
1
+ # Contributing to tr2en
2
+
3
+ **English** | [Türkçe](#türkçe)
4
+
5
+ Thanks for helping! tr2en is a 0.1 beta, so bug reports from real use are the most valuable contribution.
6
+
7
+ ## Reporting bugs
8
+
9
+ Use the [bug report form](https://github.com/PolatOzaslan21/tr2en/issues/new/choose). **Don't paste private text you translated** — write a similar made-up example — and never share an API key. Security problems go through [SECURITY.md](SECURITY.md), not public issues.
10
+
11
+ ## Development setup
12
+
13
+ Windows 10/11, Python ≥ 3.11 and [uv](https://docs.astral.sh/uv/):
14
+
15
+ ```powershell
16
+ git clone https://github.com/PolatOzaslan21/tr2en
17
+ cd tr2en
18
+ uv run --extra test --extra yerel --extra uygulama pytest -q
19
+ baslat.cmd # run the app with a console
20
+ ```
21
+
22
+ Tests run on Windows in GitHub Actions for every push and pull request.
23
+
24
+ ## Pull requests
25
+
26
+ - Keep a PR to one change, and open an issue first for bigger features.
27
+ - Add or update tests; all tests must pass.
28
+ - Changing the safety layer (`korumalar.py`, `cikti.py`)? Write the failing test first. A translation that loses a negation must never be pasted.
29
+ - Never log or store the user's text, and never write API keys anywhere (refer to them by environment variable name).
30
+ - The code uses Turkish identifiers and comments; please keep that style. More rules: [AGENTS.md](AGENTS.md).
31
+ - By contributing you agree your code is released under the [MIT License](LICENSE) and you follow the [Code of Conduct](CODE_OF_CONDUCT.md).
32
+
33
+ ---
34
+
35
+ ## Türkçe
36
+
37
+ Katkınız için teşekkürler! tr2en 0.1 beta; gerçek kullanımdan gelen hata bildirimleri en değerli katkı.
38
+
39
+ - **Hata bildirimi:** [form](https://github.com/PolatOzaslan21/tr2en/issues/new/choose) ile. Çevirdiğiniz özel metni yapıştırmayın, benzer bir örnek yazın; API anahtarı paylaşmayın. Güvenlik sorunları için [SECURITY.md](SECURITY.md).
40
+ - **Kurulum ve test:** yukarıdaki komutlar (`uv run --extra test --extra yerel --extra uygulama pytest -q`).
41
+ - **PR:** tek konu; testler geçmeli; korumalara (`korumalar.py`, `cikti.py`) dokunmadan önce başarısız test yazın; kullanıcı metni kaydedilmez, anahtar yazılmaz. Kod adları Türkçe kalır. Ayrıntılar: [AGENTS.md](AGENTS.md).
42
+ - Katkınız [MIT lisansı](LICENSE) ile yayınlanır; [davranış kurallarına](CODE_OF_CONDUCT.md) uyulur.
tr2en-0.1.3/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 PolatOzaslan21
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.