From 444d209cce1c65b2b0d166990d4ec1bcd7632202 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Tue, 5 Apr 2022 12:20:30 -0400 Subject: [PATCH] _klipper3d: Remove translation stubs Support for language translations on the klipper3d.org site was disabled in commit c067d4df. Fully remove the support in this commit. This is in preparation for an alternate implementation. Signed-off-by: Kevin O'Connor --- docs/_klipper3d/fetch-translations.sh | 29 ------------------------- docs/_klipper3d/mkdocs-requirements.txt | 1 - docs/_klipper3d/mkdocs.yml | 1 - docs/_klipper3d/translations.yml | 7 ------ 4 files changed, 38 deletions(-) delete mode 100755 docs/_klipper3d/fetch-translations.sh delete mode 100644 docs/_klipper3d/translations.yml diff --git a/docs/_klipper3d/fetch-translations.sh b/docs/_klipper3d/fetch-translations.sh deleted file mode 100755 index e7e36580..00000000 --- a/docs/_klipper3d/fetch-translations.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -# Modify the file structure before running mkdocs -# This is a make shift script before the current structure of -# Klipper-translations can be directly utilized by mkdocs - -git clone --depth 1 https://github.com/Klipper3d/klipper-translations - -while IFS="," read dirname langname langdesc note; do - # move and rename markdown files - local_dir="klipper-translations/docs/locales/$dirname" - echo "Moving $dirname to $langname" - for file in "$local_dir"/*.md; do - mdfilename="${file/$local_dir\//}" - mv "$file" "./docs/${mdfilename//.md/.${langname}.md}" - done - - # manually replace index.md if a manual-index.md exist - manual_index="./docs/manual-index.$langname.md" - - if [[ -f "$manual_index" ]];then - mv "$manual_index" "./docs/index.${langname}.md" - echo "replaced index.${langname}.md with $manual_index" - else - echo "Manually translated index file for $dirname not found!" - fi - - # add to translations.yml - echo " ${langname}: ${langdesc}" >> ./docs/_klipper3d/translations.yml -done < <(egrep -v '^ *(#|$)' ./klipper-translations/active_translations) diff --git a/docs/_klipper3d/mkdocs-requirements.txt b/docs/_klipper3d/mkdocs-requirements.txt index cbc625a3..7dc01993 100644 --- a/docs/_klipper3d/mkdocs-requirements.txt +++ b/docs/_klipper3d/mkdocs-requirements.txt @@ -7,4 +7,3 @@ mkdocs-exclude==1.0.2 mdx-truly-sane-lists==1.2 mdx-breakless-lists==1.0.1 py-gfm==1.0.2 -mkdocs-static-i18n==0.30 diff --git a/docs/_klipper3d/mkdocs.yml b/docs/_klipper3d/mkdocs.yml index 539e3264..e6bbe1bf 100644 --- a/docs/_klipper3d/mkdocs.yml +++ b/docs/_klipper3d/mkdocs.yml @@ -8,7 +8,6 @@ edit_uri: blob/master/docs/ use_directory_urls: False docs_dir: '../' site_dir: '../../site/' -INHERIT: translations.yml # Markdown document translation settings markdown_extensions: diff --git a/docs/_klipper3d/translations.yml b/docs/_klipper3d/translations.yml deleted file mode 100644 index 1b2f71e9..00000000 --- a/docs/_klipper3d/translations.yml +++ /dev/null @@ -1,7 +0,0 @@ -# Klipper3d.org language translation template file. -# Actual language definitions are appended by the fetch-translations.sh script. -plugins: - i18n: - default_language: en - languages: - en: English