Skip to content

Commit

Permalink
[readme] updating plugin.md for _supported_languages
Browse files Browse the repository at this point in the history
  • Loading branch information
Animenosekai committed Oct 25, 2021
1 parent 87c6d7e commit c20de00
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ All of the `translatepy` errors are inherited from `translatepy.exceptions.Trans

You can make your own `Translator` using the `translatepy.translators.base.BaseTranslator` class.

Make sure that you inherit from this class when creating your translator and to **follow the instruction from [plugin.md](plugin.md)**
Make sure that you inherit from this class when creating your translator and to **follow the instruction from [plugin.md](https://github.com/Animenosekai/translate/blob/main/plugin.md)**

## Caching

Expand Down
4 changes: 3 additions & 1 deletion plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ class TranslatorName(BaseTranslator):
translatepy's implementation of <TranslatorName>
"""

_supported_languages = {"set", "of", "supported", "language", "code"}

def __init__(self, request: Request = Request()):
self.session = request

Expand Down Expand Up @@ -139,7 +141,7 @@ Responses will be cached in the Base class if successful

### Supported Languages

We might be needing the "_supported_languages" method in the future so it is best to add it.
The `_supported_languages` set is optional but highly recommended to avoid making unneeded requests.

### Recursion

Expand Down

0 comments on commit c20de00

Please sign in to comment.