diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0c6861a..1fc4e72 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,13 +11,13 @@ repos: - id: trailing-whitespace - repo: https://github.com/timothycrosley/isort - rev: 5.7.0 + rev: 5.12.0 hooks: - id: isort additional_dependencies: [toml] - repo: https://github.com/psf/black - rev: 2d0c14989dca41676fc83fb36f2d652cf93fad58 + rev: 23.3.0 hooks: - id: black diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 0000000..06c9472 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,16 @@ +version: 2 +build: + os: ubuntu-22.04 + tools: + python: "3.10" + # You can also specify other tool versions: + # nodejs: "16" + +# Build documentation in the docs/ directory with Sphinx +sphinx: + configuration: docs/conf.py + +# Dependencies required to build your docs +python: + install: + - requirements: docs/requirements.txt diff --git a/docs/conf.py b/docs/conf.py index b042e1e..0c78b22 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -118,6 +118,7 @@ todo_include_todos = False # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # html_theme = 'sphinx_rtd_theme' +html_theme = "sphinx_book_theme" # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 0000000..31c781b --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1 @@ +sphinx-book-theme diff --git a/rosetta/views.py b/rosetta/views.py index 93cbd4f..04d650d 100644 --- a/rosetta/views.py +++ b/rosetta/views.py @@ -683,7 +683,6 @@ class TranslationFileDownload(RosettaFileLevelMixin, View): @user_passes_test(lambda user: can_translate(user), LoginURL()) def translate_text(request): - language_from = request.GET.get("from", None) language_to = request.GET.get("to", None) text = request.GET.get("text", None)