Nidhal Baccouri commited on
Commit
edeaf5b
·
unverified ·
2 Parent(s): 3439a69 29cad5a

Merge pull request #84 from nidhaloff/docs

Browse files
.readthedocs.yaml ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ # File: .readthedocs.yaml
3
+
4
+ version: 2
5
+
6
+ # Build from the docs/ directory with Sphinx
7
+ sphinx:
8
+ configuration: docs/conf.py
9
+
10
+ # Explicitly set the version of Python and its requirements
11
+ python:
12
+ version: 3.7
13
+ install:
14
+ - requirements: docs/requirements_docs.txt
deep_translator/__init__.py CHANGED
@@ -17,13 +17,15 @@ __author__ = """Nidhal Baccouri"""
17
  __email__ = '[email protected]'
18
  __version__ = '1.5.0'
19
 
20
- __all__ = [GoogleTranslator,
21
- PonsTranslator,
22
- LingueeTranslator,
23
- MyMemoryTranslator,
24
- YandexTranslator,
25
- MicrosoftTranslator,
26
- QCRI,
27
- DeepL,
28
- single_detection,
29
- batch_detection]
 
 
 
17
  __email__ = '[email protected]'
18
  __version__ = '1.5.0'
19
 
20
+ __all__ = [
21
+ "GoogleTranslator",
22
+ "PonsTranslator",
23
+ "LingueeTranslator",
24
+ "MyMemoryTranslator",
25
+ "YandexTranslator",
26
+ "MicrosoftTranslator",
27
+ "QCRI",
28
+ "DeepL",
29
+ "single_detection",
30
+ "batch_detection"
31
+ ]
docs/conf.py CHANGED
@@ -58,7 +58,7 @@ author = "Nidhal Baccouri"
58
  # the built documents.
59
  #
60
  # The short X.Y version.
61
- with open("pyproject.toml", "r") as f:
62
  tom = toml.load(f)
63
  version = tom['tool']['poetry']['version']
64
  # The full version, including alpha/beta/rc tags.
 
58
  # the built documents.
59
  #
60
  # The short X.Y version.
61
+ with open("../pyproject.toml", "r") as f:
62
  tom = toml.load(f)
63
  version = tom['tool']['poetry']['version']
64
  # The full version, including alpha/beta/rc tags.
docs/deep_translator.rst CHANGED
@@ -1,54 +1,133 @@
1
  deep\_translator package
2
  ========================
3
 
4
- Submodules
5
- ----------
6
 
7
- deep\_translator.cli module
8
- ---------------------------
9
 
10
- .. automodule:: deep_translator.cli
11
- :members:
12
- :undoc-members:
13
- :show-inheritance:
14
 
15
  deep\_translator.constants module
16
  ---------------------------------
17
 
18
  .. automodule:: deep_translator.constants
19
- :members:
20
- :undoc-members:
21
- :show-inheritance:
 
 
 
 
 
 
 
 
22
 
23
- deep\_translator.deep\_translator module
24
- ----------------------------------------
25
 
26
- .. automodule:: deep_translator.deep_translator
27
- :members:
28
- :undoc-members:
29
- :show-inheritance:
30
 
31
  deep\_translator.exceptions module
32
  ----------------------------------
33
 
34
  .. automodule:: deep_translator.exceptions
35
- :members:
36
- :undoc-members:
37
- :show-inheritance:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
 
39
- deep\_translator.models module
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
  ------------------------------
41
 
42
- .. automodule:: deep_translator.models
43
- :members:
44
- :undoc-members:
45
- :show-inheritance:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
 
 
 
 
 
47
 
48
  Module contents
49
  ---------------
50
 
51
  .. automodule:: deep_translator
52
- :members:
53
- :undoc-members:
54
- :show-inheritance:
 
1
  deep\_translator package
2
  ========================
3
 
4
+ Subpackages
5
+ -----------
6
 
7
+ .. toctree::
8
+ :maxdepth: 4
9
 
10
+ deep_translator.tests
11
+
12
+ Submodules
13
+ ----------
14
 
15
  deep\_translator.constants module
16
  ---------------------------------
17
 
18
  .. automodule:: deep_translator.constants
19
+ :members:
20
+ :undoc-members:
21
+ :show-inheritance:
22
+
23
+ deep\_translator.deepl module
24
+ -----------------------------
25
+
26
+ .. automodule:: deep_translator.deepl
27
+ :members:
28
+ :undoc-members:
29
+ :show-inheritance:
30
 
31
+ deep\_translator.detection module
32
+ ---------------------------------
33
 
34
+ .. automodule:: deep_translator.detection
35
+ :members:
36
+ :undoc-members:
37
+ :show-inheritance:
38
 
39
  deep\_translator.exceptions module
40
  ----------------------------------
41
 
42
  .. automodule:: deep_translator.exceptions
43
+ :members:
44
+ :undoc-members:
45
+ :show-inheritance:
46
+
47
+ deep\_translator.google\_trans module
48
+ -------------------------------------
49
+
50
+ .. automodule:: deep_translator.google_trans
51
+ :members:
52
+ :undoc-members:
53
+ :show-inheritance:
54
+
55
+ deep\_translator.linguee module
56
+ -------------------------------
57
+
58
+ .. automodule:: deep_translator.linguee
59
+ :members:
60
+ :undoc-members:
61
+ :show-inheritance:
62
+
63
+ deep\_translator.main module
64
+ ----------------------------
65
+
66
+ .. automodule:: deep_translator.main
67
+ :members:
68
+ :undoc-members:
69
+ :show-inheritance:
70
 
71
+ deep\_translator.microsoft module
72
+ ---------------------------------
73
+
74
+ .. automodule:: deep_translator.microsoft
75
+ :members:
76
+ :undoc-members:
77
+ :show-inheritance:
78
+
79
+ deep\_translator.mymemory module
80
+ --------------------------------
81
+
82
+ .. automodule:: deep_translator.mymemory
83
+ :members:
84
+ :undoc-members:
85
+ :show-inheritance:
86
+
87
+ deep\_translator.papago module
88
+ ------------------------------
89
+
90
+ .. automodule:: deep_translator.papago
91
+ :members:
92
+ :undoc-members:
93
+ :show-inheritance:
94
+
95
+ deep\_translator.parent module
96
  ------------------------------
97
 
98
+ .. automodule:: deep_translator.parent
99
+ :members:
100
+ :undoc-members:
101
+ :show-inheritance:
102
+
103
+ deep\_translator.pons module
104
+ ----------------------------
105
+
106
+ .. automodule:: deep_translator.pons
107
+ :members:
108
+ :undoc-members:
109
+ :show-inheritance:
110
+
111
+ deep\_translator.qcri module
112
+ ----------------------------
113
+
114
+ .. automodule:: deep_translator.qcri
115
+ :members:
116
+ :undoc-members:
117
+ :show-inheritance:
118
+
119
+ deep\_translator.yandex module
120
+ ------------------------------
121
 
122
+ .. automodule:: deep_translator.yandex
123
+ :members:
124
+ :undoc-members:
125
+ :show-inheritance:
126
 
127
  Module contents
128
  ---------------
129
 
130
  .. automodule:: deep_translator
131
+ :members:
132
+ :undoc-members:
133
+ :show-inheritance:
docs/deep_translator.tests.rst ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ deep\_translator.tests package
2
+ ==============================
3
+
4
+ Submodules
5
+ ----------
6
+
7
+ deep\_translator.tests.test\_cli module
8
+ ---------------------------------------
9
+
10
+ .. automodule:: deep_translator.tests.test_cli
11
+ :members:
12
+ :undoc-members:
13
+ :show-inheritance:
14
+
15
+ deep\_translator.tests.test\_deepl module
16
+ -----------------------------------------
17
+
18
+ .. automodule:: deep_translator.tests.test_deepl
19
+ :members:
20
+ :undoc-members:
21
+ :show-inheritance:
22
+
23
+ deep\_translator.tests.test\_google\_trans module
24
+ -------------------------------------------------
25
+
26
+ .. automodule:: deep_translator.tests.test_google_trans
27
+ :members:
28
+ :undoc-members:
29
+ :show-inheritance:
30
+
31
+ deep\_translator.tests.test\_linguee module
32
+ -------------------------------------------
33
+
34
+ .. automodule:: deep_translator.tests.test_linguee
35
+ :members:
36
+ :undoc-members:
37
+ :show-inheritance:
38
+
39
+ deep\_translator.tests.test\_microsoft\_trans module
40
+ ----------------------------------------------------
41
+
42
+ .. automodule:: deep_translator.tests.test_microsoft_trans
43
+ :members:
44
+ :undoc-members:
45
+ :show-inheritance:
46
+
47
+ deep\_translator.tests.test\_mymemory module
48
+ --------------------------------------------
49
+
50
+ .. automodule:: deep_translator.tests.test_mymemory
51
+ :members:
52
+ :undoc-members:
53
+ :show-inheritance:
54
+
55
+ deep\_translator.tests.test\_pons module
56
+ ----------------------------------------
57
+
58
+ .. automodule:: deep_translator.tests.test_pons
59
+ :members:
60
+ :undoc-members:
61
+ :show-inheritance:
62
+
63
+ Module contents
64
+ ---------------
65
+
66
+ .. automodule:: deep_translator.tests
67
+ :members:
68
+ :undoc-members:
69
+ :show-inheritance:
{ja → docs/ja}/CONTRIBUTING.rst RENAMED
@@ -47,10 +47,10 @@ deep_translator は、deep_translator の公式ドキュメントの一部、doc
47
 
48
  新しい機能を提案するときには、以下の項目を留意してください:
49
 
50
- * 新しい機能の動作をできるだけ詳しく説明してください。
51
  * 実装しやすいように機能の規模は限定するようにしてください。
52
  * このプロジェクトがボランティアから成り立っていることと、コントリビュートを歓迎する精神を忘れないでください。
53
-
54
 
55
  開発環境の構築
56
  ------------
@@ -103,7 +103,7 @@ deep_translator は、deep_translator の公式ドキュメントの一部、doc
103
 
104
 
105
  ヒント
106
- ----
107
 
108
  テストのサブセットを実行するには以下のコマンドが利用できます::
109
 
@@ -111,7 +111,7 @@ $ pytest tests.test_deep_translator
111
 
112
 
113
  デプロイの方法
114
- ---------
115
 
116
  メンテナンス担当者のためにデプロイの方法を記しておきます。まず、全ての変更がコミットされていることを確認してください。(HISTORY.rstのエントリを含む).
117
  次に、以下のコマンドを実行します::
 
47
 
48
  新しい機能を提案するときには、以下の項目を留意してください:
49
 
50
+ * 新しい機能の動作をできるだけ詳しく説明してください。
51
  * 実装しやすいように機能の規模は限定するようにしてください。
52
  * このプロジェクトがボランティアから成り立っていることと、コントリビュートを歓迎する精神を忘れないでください。
53
+
54
 
55
  開発環境の構築
56
  ------------
 
103
 
104
 
105
  ヒント
106
+ ------
107
 
108
  テストのサブセットを実行するには以下のコマンドが利用できます::
109
 
 
111
 
112
 
113
  デプロイの方法
114
+ -------------
115
 
116
  メンテナンス担当者のためにデプロイの方法を記しておきます。まず、全ての変更がコミットされていることを確認してください。(HISTORY.rstのエントリを含む).
117
  次に、以下のコマンドを実行します::
{ja → docs/ja}/README.rst RENAMED
@@ -88,9 +88,9 @@ Pythonを使用してテキストを別の言語に翻訳するタスクがあ
88
  * 異なる言語の異なる段落の翻訳を自動化する
89
  * コマンドラインから直接翻訳する(バージョン1.1.0以上)
90
 
91
- =============
92
  インストール方法
93
- =============
94
 
95
  ツールの安定版をインストールする方法です:
96
 
@@ -100,14 +100,15 @@ Pythonを使用してテキストを別の言語に翻訳するタスクがあ
100
 
101
  ソースからインストールを行いたい場合、ドキュメントを参照してください。
102
 
103
- =====
104
  使い方
105
- =====
106
 
107
  このセクションでは、このツールで様々な統合トランスレータを利用するデモを行います。このデモでは、google、pons、linguee、mymemoryの翻訳サービスを扱います(現時点)。将来的には、より多くの翻訳サービスを統合する予定です。
108
 
 
109
  インポート
110
- ========
111
 
112
  .. code-block:: python
113
 
@@ -119,7 +120,7 @@ Pythonを使用してテキストを別の言語に翻訳するタスクがあ
119
 
120
 
121
  サポートされている言語を確認する
122
- ==========================
123
 
124
  ポイント
125
 
@@ -295,9 +296,9 @@ deep_translatorの使用目的やpythonで翻訳をする方法を確認する
295
 
296
  https://medium.com/@nidhalbacc/how-to-translate-text-with-python-9d203139dcf5
297
 
298
- ===========================
299
- スマートフォンアプリ Translator++
300
- ===========================
301
 
302
  .. image:: ../../assets/app-icon.png
303
  :width: 100
@@ -340,9 +341,9 @@ Translator++はdeep_translatorパッケージがベースになっています
340
  :height: 300
341
  :alt: screenshot3
342
 
343
- ==========
344
  次のステップに進むためには
345
- ==========
346
 
347
  詳細は examples フォルダを確認してください。
348
  コントリビュートはいつでも歓迎しています。このパッケージが便利だと感じた方や使っている方がいたら、遠慮なくプルリクエストをしてフィードバックをください!
 
88
  * 異なる言語の異なる段落の翻訳を自動化する
89
  * コマンドラインから直接翻訳する(バージョン1.1.0以上)
90
 
91
+ ===============
92
  インストール方法
93
+ ===============
94
 
95
  ツールの安定版をインストールする方法です:
96
 
 
100
 
101
  ソースからインストールを行いたい場合、ドキュメントを参照してください。
102
 
103
+ =======
104
  使い方
105
+ =======
106
 
107
  このセクションでは、このツールで様々な統合トランスレータを利用するデモを行います。このデモでは、google、pons、linguee、mymemoryの翻訳サービスを扱います(現時点)。将来的には、より多くの翻訳サービスを統合する予定です。
108
 
109
+ ==========
110
  インポート
111
+ ==========
112
 
113
  .. code-block:: python
114
 
 
120
 
121
 
122
  サポートされている言語を確認する
123
+ ============================
124
 
125
  ポイント
126
 
 
296
 
297
  https://medium.com/@nidhalbacc/how-to-translate-text-with-python-9d203139dcf5
298
 
299
+ ===============================
300
+ スマートフォンアプリ Translator++
301
+ ===============================
302
 
303
  .. image:: ../../assets/app-icon.png
304
  :width: 100
 
341
  :height: 300
342
  :alt: screenshot3
343
 
344
+ =======================
345
  次のステップに進むためには
346
+ =======================
347
 
348
  詳細は examples フォルダを確認してください。
349
  コントリビュートはいつでも歓迎しています。このパッケージが便利だと感じた方や使っている方がいたら、遠慮なくプルリクエストをしてフィードバックをください!
{ja → docs/ja}/history.rst RENAMED
File without changes
{ja → docs/ja}/index.rst RENAMED
File without changes
{ja → docs/ja}/installation.rst RENAMED
@@ -1,8 +1,8 @@
1
  .. highlight:: shell
2
 
3
- ============
4
  インストール方法
5
- ============
6
 
7
 
8
  安定版
 
1
  .. highlight:: shell
2
 
3
+ ===============
4
  インストール方法
5
+ ===============
6
 
7
 
8
  安定版
{ja → docs/ja}/modules.rst RENAMED
File without changes
{ja → docs/ja}/usage.rst RENAMED
@@ -1,6 +1,6 @@
1
- =====
2
  使い方
3
- =====
4
 
5
  .. code-block:: python
6
 
 
1
+ =======
2
  使い方
3
+ =======
4
 
5
  .. code-block:: python
6
 
docs/other_lang.rst CHANGED
@@ -1,5 +1,5 @@
1
  Choose Languages
2
- ===============
3
 
4
  English
5
  --------------
 
1
  Choose Languages
2
+ =================
3
 
4
  English
5
  --------------
docs/requirements_docs.txt ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ pip==20.2.2
2
+ bump2version==1.0.0
3
+ wheel==0.35.1
4
+ argh
5
+ toml
6
+ watchdog==0.10.3
7
+ flake8==3.8.3
8
+ coverage==5.2.1
9
+ Sphinx==3.2.1
10
+ twine==3.2.0
11
+ Click==7.1.2
12
+ pytest==6.0.1
13
+ pytest-runner==5.2
14
+ sphinx-copybutton==0.3.1
15
+ importlib-metadata==1.6.0