K R S Nandhan commited on
Commit
1aab85c
·
unverified ·
1 Parent(s): 482855e

Updated Importing syntax in code-blocks README.rst

Browse files

some code blocks in README.rst such as "Quick Start", "Imports", "Usage from Terminal" are not updated.
"from deep-translator import GoogleTranslator" results "SyntaxError: invalid syntax". Using "from deep_translator import GoogleTranslator" will fix this.

Files changed (1) hide show
  1. docs/README.rst +7 -7
docs/README.rst CHANGED
@@ -135,14 +135,14 @@ Quick Start
135
 
136
  .. code-block:: python
137
 
138
- from deep-translator import GoogleTranslator
139
  translated = GoogleTranslator(source='auto', target='de').translate("keep it up, you are awesome") # output -> Weiter so, du bist großartig
140
 
141
  or using proxies:
142
 
143
  .. code-block:: python
144
 
145
- from deep-translator import GoogleTranslator
146
 
147
  proxies_example = {
148
  "https": "34.195.196.27:8080",
@@ -155,7 +155,7 @@ or even directly from terminal:
155
 
156
  .. code-block:: console
157
 
158
- $ deep-translator -trans "google" -src "en" -tg "de" -txt "keep it up, you are awesome"
159
 
160
 
161
  =====
@@ -175,7 +175,7 @@ Imports
175
 
176
  .. code-block:: python
177
 
178
- from deep-translator import (GoogleTranslator,
179
  MicrosoftTranslator,
180
  PonsTranslator,
181
  LingueeTranslator,
@@ -536,7 +536,7 @@ can be used with all supported translators.
536
 
537
  .. code-block:: python
538
 
539
- from deep-translator import GoogleTranslator
540
 
541
  # define your proxy configs:
542
  proxies_example = {
@@ -567,13 +567,13 @@ To translate a string or line of text:
567
 
568
  .. code-block:: console
569
 
570
- $ deep-translator google --source "english" --target "german" --text "happy coding"
571
 
572
  Alternate short option names, along with using language abbreviations:
573
 
574
  .. code-block:: console
575
 
576
- $ deep-translator google -src "en" -tgt "de" -txt "happy coding"
577
 
578
 
579
  Finally, to retrieve a list of available languages for a given translator:
 
135
 
136
  .. code-block:: python
137
 
138
+ from deep_translator import GoogleTranslator
139
  translated = GoogleTranslator(source='auto', target='de').translate("keep it up, you are awesome") # output -> Weiter so, du bist großartig
140
 
141
  or using proxies:
142
 
143
  .. code-block:: python
144
 
145
+ from deep_translator import GoogleTranslator
146
 
147
  proxies_example = {
148
  "https": "34.195.196.27:8080",
 
155
 
156
  .. code-block:: console
157
 
158
+ $ deep_translator -trans "google" -src "en" -tg "de" -txt "keep it up, you are awesome"
159
 
160
 
161
  =====
 
175
 
176
  .. code-block:: python
177
 
178
+ from deep_translator import (GoogleTranslator,
179
  MicrosoftTranslator,
180
  PonsTranslator,
181
  LingueeTranslator,
 
536
 
537
  .. code-block:: python
538
 
539
+ from deep_translator import GoogleTranslator
540
 
541
  # define your proxy configs:
542
  proxies_example = {
 
567
 
568
  .. code-block:: console
569
 
570
+ $ deep_translator google --source "english" --target "german" --text "happy coding"
571
 
572
  Alternate short option names, along with using language abbreviations:
573
 
574
  .. code-block:: console
575
 
576
+ $ deep_translator google -src "en" -tgt "de" -txt "happy coding"
577
 
578
 
579
  Finally, to retrieve a list of available languages for a given translator: