From c20de003a1959371f2adcc682f6d0d277881f26e Mon Sep 17 00:00:00 2001 From: Animenosekai <40539549+Animenosekai@users.noreply.github.com> Date: Mon, 25 Oct 2021 19:23:22 +0200 Subject: [PATCH] [readme] updating plugin.md for _supported_languages --- README.md | 2 +- plugin.md | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c500cf38..d7bbcd37 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/plugin.md b/plugin.md index 8292677a..3fe2db1e 100644 --- a/plugin.md +++ b/plugin.md @@ -30,6 +30,8 @@ class TranslatorName(BaseTranslator): translatepy's implementation of """ + _supported_languages = {"set", "of", "supported", "language", "code"} + def __init__(self, request: Request = Request()): self.session = request @@ -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