ultrabug / mkdocs-static-i18n

MkDocs i18n plugin using static translation markdown files
https://ultrabug.github.io/mkdocs-static-i18n/
MIT License
238 stars 38 forks source link

Removed theme._vars and accessed keys directly #315

Closed joapuiib closed 2 weeks ago

joapuiib commented 1 month ago

I've replaced all occurrences of theme._vars with theme in order to access theme variables directly.

Fixes: #314

I've run tests and tested it locally, and it seems to work.

ultrabug commented 1 month ago

@joapuiib thanks a lot for your proposal, plz check CI reports

joapuiib commented 1 month ago

It seems there's a problem with the styles check hatch run style:check.

I'm not familiar with style checking, but it seems the ruff is not set properly.

Creating environment: style
Checking dependencies
Syncing dependencies
cmd [1] | isort --check-only --diff mkdocs_static_i18n
cmd [2] | black -q --check --diff mkdocs_static_i18n
cmd [3] | ruff mkdocs_static_i18n
error: unrecognized subcommand 'mkdocs_static_i18n'

Usage: ruff [OPTIONS] <COMMAND>

For more information, try '--help'.

Updating pyproject.tml with the following changes seem to make it work.

diff --git a/pyproject.toml b/pyproject.toml
index 7cbeb84..8da3cf5 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -97,7 +97,7 @@ dependencies = [
 check = [
     "isort --check-only --diff mkdocs_static_i18n",
     "black -q --check --diff mkdocs_static_i18n",
-    "ruff mkdocs_static_i18n",
+    "ruff check mkdocs_static_i18n",
 ]
 format = [
     "isort -q mkdocs_static_i18n",

I can update this in this PR with those changes, but I don't want to break anything.

joapuiib commented 1 month ago

A commit with the changes has been made.

If those changes are not wanted, the commit can be reverted.

ultrabug commented 2 weeks ago

Thanks a lot @joapuiib !