From 2fb651304d0a80fa9d6a8c77c16b3004bda22972 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Mazzucotelli?= Date: Tue, 21 Nov 2023 14:46:38 +0100 Subject: [PATCH] fix: Add missing translations (fallback theme) for ReadTheDocs Issue #115: https://github.com/mkdocstrings/python/issues/115 --- .../templates/readthedocs/languages/en.html | 45 ++++++++++++++----- .../templates/readthedocs/languages/ja.html | 45 ++++++++++++++----- .../templates/readthedocs/languages/zh.html | 45 ++++++++++++++----- 3 files changed, 105 insertions(+), 30 deletions(-) diff --git a/src/mkdocstrings_handlers/python/templates/readthedocs/languages/en.html b/src/mkdocstrings_handlers/python/templates/readthedocs/languages/en.html index 9c59b43..1f76e05 100644 --- a/src/mkdocstrings_handlers/python/templates/readthedocs/languages/en.html +++ b/src/mkdocstrings_handlers/python/templates/readthedocs/languages/en.html @@ -1,12 +1,37 @@ {% macro t(key) %}{{ { - "Attributes:": "Attributes:", - "Other parameters:": "Other parameters:", - "Parameters:": "Parameters:", - "default:": "default:", - "Raises:" : "Raises:", - "Receives:": "Receives:", - "Returns:": "Returns:", - "Warns:": "Warns:", - "Yields:": "Yields:", - }[key] }}{% endmacro %} \ No newline at end of file + "ATTRIBUTE": "ATTRIBUTE", + "Attributes:": "Attributes:", + "Classes:": "Classes:", + "CLASS": "CLASS", + "DEFAULT:": "DEFAULT:", + "Default": "Default", + "default:": "default:", + "DESCRIPTION": "DESCRIPTION", + "Description": "Description", + "Examples:": "Examples:", + "Functions:": "Functions:", + "FUNCTION": "FUNCTION", + "Methods:": "Methods:", + "METHOD": "METHOD", + "Modules:": "Modules:", + "MODULE": "MODULE", + "Name": "Name", + "Other Parameters:": "Other Parameters:", + "PARAMETER": "PARAMETER", + "Parameters:": "Parameters:", + "RAISES": "RAISES", + "Raises:" : "Raises:", + "RECEIVES": "RECEIVES", + "Receives:": "Receives:", + "required": "required", + "RETURNS": "RETURNS", + "Returns:": "Returns:", + "Source code in": "Source code in", + "TYPE:": "TYPE:", + "Type": "Type", + "WARNS": "WARNS", + "Warns:": "Warns:", + "YIELDS": "YIELDS", + "Yields:": "Yields:", +}[key] }}{% endmacro %} \ No newline at end of file diff --git a/src/mkdocstrings_handlers/python/templates/readthedocs/languages/ja.html b/src/mkdocstrings_handlers/python/templates/readthedocs/languages/ja.html index 41b079d..456e117 100644 --- a/src/mkdocstrings_handlers/python/templates/readthedocs/languages/ja.html +++ b/src/mkdocstrings_handlers/python/templates/readthedocs/languages/ja.html @@ -1,12 +1,37 @@ {% macro t(key) %}{{ { - "Attributes:": "属性:", - "Other Parameters:": "他の引数:", - "Parameters:": "引数:", - "default:": "デフォルト:", - "Raises:" : "発生:", - "Receives:": "取得:", - "Returns:": "戻り値:", - "Warns:": "警告:", - "Yields:": "返す:", - }[key] }}{% endmacro %} \ No newline at end of file + "ATTRIBUTE": "属性", + "Attributes:": "属性:", + "Classes:": "", + "CLASS": "", + "DEFAULT:": "デフォルト:", + "Default": "デフォルト", + "default:": "デフォルト:", + "DESCRIPTION": "デスクリプション", + "Description": "デスクリプション", + "Examples:": "例:", + "Functions:": "", + "FUNCTION": "", + "Methods:": "", + "METHOD": "", + "Modules:": "", + "MODULE": "", + "Name": "名前", + "Other Parameters:": "他の引数:", + "PARAMETER": "引数", + "Parameters:": "引数:", + "RAISES": "発生", + "Raises:" : "発生:", + "RECEIVES": "取得", + "Receives:": "取得:", + "required": "必須", + "RETURNS": "戻り値", + "Returns:": "戻り値:", + "Source code in": "ソースコード位置:", + "TYPE:": "タイプ:", + "Type": "タイプ", + "WARNS": "警告", + "Warns:": "警告:", + "YIELDS": "返す", + "Yields:": "返す:", +}[key] }}{% endmacro %} \ No newline at end of file diff --git a/src/mkdocstrings_handlers/python/templates/readthedocs/languages/zh.html b/src/mkdocstrings_handlers/python/templates/readthedocs/languages/zh.html index 3cd7b9d..9c018f2 100644 --- a/src/mkdocstrings_handlers/python/templates/readthedocs/languages/zh.html +++ b/src/mkdocstrings_handlers/python/templates/readthedocs/languages/zh.html @@ -1,12 +1,37 @@ {% macro t(key) %}{{ { - "Attributes:": "属性:", - "Other Parameters:": "其他参数:", - "Parameters:": "参数:", - "default:": "默认:", - "Raises:" : "引发:", - "Receives:": "接收:", - "Returns:": "返回:", - "Warns:": "警告:", - "Yields:": "产生:", - }[key] }}{% endmacro %} \ No newline at end of file + "ATTRIBUTE": "属性", + "Attributes:": "属性:", + "Classes:": "", + "CLASS": "", + "DEFAULT:": "默认:", + "Default": "默认", + "default:": "默认:", + "DESCRIPTION": "描述", + "Description": "描述", + "Examples:": "示例:", + "Functions:": "", + "FUNCTION": "", + "Methods:": "", + "METHOD": "", + "Modules:": "", + "MODULE": "", + "Name": "名称", + "Other Parameters:": "其他参数:", + "PARAMETER": "参数", + "Parameters:": "参数:", + "RAISES": "引发", + "Raises:" : "引发:", + "Receives:": "接收:", + "RECEIVES": "接收", + "required": "必需", + "RETURNS": "返回", + "Returns:": "返回:", + "Source code in": "源代码位于:", + "TYPE:": "类型:", + "Type": "类型", + "Warns:": "警告:", + "WARNS": "警告", + "YIELDS": "产生", + "Yields:": "产生:", +}[key] }}{% endmacro %} \ No newline at end of file