From f64428c175460bfb5be88b58cdd7b853eadfa926 Mon Sep 17 00:00:00 2001 From: carlospolop Date: Tue, 20 May 2025 06:46:35 +0200 Subject: [PATCH] try fix translations --- .github/workflows/translate_af.yml | 4 +++- .github/workflows/translate_de.yml | 4 +++- .github/workflows/translate_el.yml | 4 +++- .github/workflows/translate_es.yml | 7 +++++-- .github/workflows/translate_fr.yml | 4 +++- .github/workflows/translate_hi.yml | 4 +++- .github/workflows/translate_it.yml | 4 +++- .github/workflows/translate_ja.yml | 4 +++- .github/workflows/translate_ko.yml | 4 +++- .github/workflows/translate_pl.yml | 4 +++- .github/workflows/translate_pt.yml | 4 +++- .github/workflows/translate_sr.yml | 4 +++- .github/workflows/translate_sw.yml | 4 +++- .github/workflows/translate_tr.yml | 4 +++- .github/workflows/translate_uk.yml | 4 +++- .github/workflows/translate_zh.yml | 4 +++- 16 files changed, 50 insertions(+), 17 deletions(-) diff --git a/.github/workflows/translate_af.yml b/.github/workflows/translate_af.yml index 9ed2388c7..d55b626d6 100644 --- a/.github/workflows/translate_af.yml +++ b/.github/workflows/translate_af.yml @@ -66,6 +66,8 @@ jobs: - name: Build mdBook run: | + git checkout "$BRANCH" + git pull MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && echo "" && echo "" && echo "Debug logs" && (cat hacktricks-preprocessor.log | tail -n 20) && exit 1) - name: Update searchindex.js in repo @@ -95,4 +97,4 @@ jobs: aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete echo "Sync completed" echo "Cat 3 files from the book" - find . -type f -name '*.md' -print | head -n 3 | xargs -r cat + find . -type f -name 'index.html' -print | head -n 3 | xargs -r cat diff --git a/.github/workflows/translate_de.yml b/.github/workflows/translate_de.yml index 783c11d4b..856c2025a 100644 --- a/.github/workflows/translate_de.yml +++ b/.github/workflows/translate_de.yml @@ -66,6 +66,8 @@ jobs: - name: Build mdBook run: | + git checkout "$BRANCH" + git pull MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && echo "" && echo "" && echo "Debug logs" && (cat hacktricks-preprocessor.log | tail -n 20) && exit 1) - name: Update searchindex.js in repo @@ -95,4 +97,4 @@ jobs: aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete echo "Sync completed" echo "Cat 3 files from the book" - find . -type f -name '*.md' -print | head -n 3 | xargs -r cat + find . -type f -name 'index.html' -print | head -n 3 | xargs -r cat diff --git a/.github/workflows/translate_el.yml b/.github/workflows/translate_el.yml index 60fa78ed8..08f04ec22 100644 --- a/.github/workflows/translate_el.yml +++ b/.github/workflows/translate_el.yml @@ -66,6 +66,8 @@ jobs: - name: Build mdBook run: | + git checkout "$BRANCH" + git pull MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && echo "" && echo "" && echo "Debug logs" && (cat hacktricks-preprocessor.log | tail -n 20) && exit 1) - name: Update searchindex.js in repo @@ -95,4 +97,4 @@ jobs: aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete echo "Sync completed" echo "Cat 3 files from the book" - find . -type f -name '*.md' -print | head -n 3 | xargs -r cat + find . -type f -name 'index.html' -print | head -n 3 | xargs -r cat diff --git a/.github/workflows/translate_es.yml b/.github/workflows/translate_es.yml index de316bd86..30c398a3d 100644 --- a/.github/workflows/translate_es.yml +++ b/.github/workflows/translate_es.yml @@ -1,4 +1,4 @@ -name: Translator to ES (Spanish) +name: Translator to ES (Spachins) on: push: @@ -53,6 +53,7 @@ jobs: wget https://raw.githubusercontent.com/carlospolop/hacktricks-cloud/master/scripts/translator.py cd .. + - name: Run translation script on changed files run: | export OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }} @@ -65,6 +66,8 @@ jobs: - name: Build mdBook run: | + git checkout "$BRANCH" + git pull MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && echo "" && echo "" && echo "Debug logs" && (cat hacktricks-preprocessor.log | tail -n 20) && exit 1) - name: Update searchindex.js in repo @@ -94,4 +97,4 @@ jobs: aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete echo "Sync completed" echo "Cat 3 files from the book" - find . -type f -name '*.md' -print | head -n 3 | xargs -r cat + find . -type f -name 'index.html' -print | head -n 3 | xargs -r cat diff --git a/.github/workflows/translate_fr.yml b/.github/workflows/translate_fr.yml index d60babb05..0076dc72a 100644 --- a/.github/workflows/translate_fr.yml +++ b/.github/workflows/translate_fr.yml @@ -66,6 +66,8 @@ jobs: - name: Build mdBook run: | + git checkout "$BRANCH" + git pull MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && echo "" && echo "" && echo "Debug logs" && (cat hacktricks-preprocessor.log | tail -n 20) && exit 1) - name: Update searchindex.js in repo @@ -95,4 +97,4 @@ jobs: aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete echo "Sync completed" echo "Cat 3 files from the book" - find . -type f -name '*.md' -print | head -n 3 | xargs -r cat + find . -type f -name 'index.html' -print | head -n 3 | xargs -r cat diff --git a/.github/workflows/translate_hi.yml b/.github/workflows/translate_hi.yml index 1e525de01..8a9020df7 100644 --- a/.github/workflows/translate_hi.yml +++ b/.github/workflows/translate_hi.yml @@ -66,6 +66,8 @@ jobs: - name: Build mdBook run: | + git checkout "$BRANCH" + git pull MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && echo "" && echo "" && echo "Debug logs" && (cat hacktricks-preprocessor.log | tail -n 20) && exit 1) - name: Update searchindex.js in repo @@ -95,4 +97,4 @@ jobs: aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete echo "Sync completed" echo "Cat 3 files from the book" - find . -type f -name '*.md' -print | head -n 3 | xargs -r cat + find . -type f -name 'index.html' -print | head -n 3 | xargs -r cat diff --git a/.github/workflows/translate_it.yml b/.github/workflows/translate_it.yml index b4d92eb89..21596320d 100644 --- a/.github/workflows/translate_it.yml +++ b/.github/workflows/translate_it.yml @@ -66,6 +66,8 @@ jobs: - name: Build mdBook run: | + git checkout "$BRANCH" + git pull MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && echo "" && echo "" && echo "Debug logs" && (cat hacktricks-preprocessor.log | tail -n 20) && exit 1) - name: Update searchindex.js in repo @@ -95,4 +97,4 @@ jobs: aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete echo "Sync completed" echo "Cat 3 files from the book" - find . -type f -name '*.md' -print | head -n 3 | xargs -r cat + find . -type f -name 'index.html' -print | head -n 3 | xargs -r cat diff --git a/.github/workflows/translate_ja.yml b/.github/workflows/translate_ja.yml index d043c2430..2ccf37621 100644 --- a/.github/workflows/translate_ja.yml +++ b/.github/workflows/translate_ja.yml @@ -66,6 +66,8 @@ jobs: - name: Build mdBook run: | + git checkout "$BRANCH" + git pull MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && echo "" && echo "" && echo "Debug logs" && (cat hacktricks-preprocessor.log | tail -n 20) && exit 1) - name: Update searchindex.js in repo @@ -95,4 +97,4 @@ jobs: aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete echo "Sync completed" echo "Cat 3 files from the book" - find . -type f -name '*.md' -print | head -n 3 | xargs -r cat + find . -type f -name 'index.html' -print | head -n 3 | xargs -r cat diff --git a/.github/workflows/translate_ko.yml b/.github/workflows/translate_ko.yml index 7f99df31d..201d832c3 100644 --- a/.github/workflows/translate_ko.yml +++ b/.github/workflows/translate_ko.yml @@ -66,6 +66,8 @@ jobs: - name: Build mdBook run: | + git checkout "$BRANCH" + git pull MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && echo "" && echo "" && echo "Debug logs" && (cat hacktricks-preprocessor.log | tail -n 20) && exit 1) - name: Update searchindex.js in repo @@ -95,4 +97,4 @@ jobs: aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete echo "Sync completed" echo "Cat 3 files from the book" - find . -type f -name '*.md' -print | head -n 3 | xargs -r cat + find . -type f -name 'index.html' -print | head -n 3 | xargs -r cat diff --git a/.github/workflows/translate_pl.yml b/.github/workflows/translate_pl.yml index 37e5fee34..18b027d1a 100644 --- a/.github/workflows/translate_pl.yml +++ b/.github/workflows/translate_pl.yml @@ -66,6 +66,8 @@ jobs: - name: Build mdBook run: | + git checkout "$BRANCH" + git pull MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && echo "" && echo "" && echo "Debug logs" && (cat hacktricks-preprocessor.log | tail -n 20) && exit 1) - name: Update searchindex.js in repo @@ -95,4 +97,4 @@ jobs: aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete echo "Sync completed" echo "Cat 3 files from the book" - find . -type f -name '*.md' -print | head -n 3 | xargs -r cat + find . -type f -name 'index.html' -print | head -n 3 | xargs -r cat diff --git a/.github/workflows/translate_pt.yml b/.github/workflows/translate_pt.yml index b84cd9525..a43662aa0 100644 --- a/.github/workflows/translate_pt.yml +++ b/.github/workflows/translate_pt.yml @@ -66,6 +66,8 @@ jobs: - name: Build mdBook run: | + git checkout "$BRANCH" + git pull MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && echo "" && echo "" && echo "Debug logs" && (cat hacktricks-preprocessor.log | tail -n 20) && exit 1) - name: Update searchindex.js in repo @@ -95,4 +97,4 @@ jobs: aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete echo "Sync completed" echo "Cat 3 files from the book" - find . -type f -name '*.md' -print | head -n 3 | xargs -r cat + find . -type f -name 'index.html' -print | head -n 3 | xargs -r cat diff --git a/.github/workflows/translate_sr.yml b/.github/workflows/translate_sr.yml index d80c25769..2d4028c2b 100644 --- a/.github/workflows/translate_sr.yml +++ b/.github/workflows/translate_sr.yml @@ -66,6 +66,8 @@ jobs: - name: Build mdBook run: | + git checkout "$BRANCH" + git pull MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && echo "" && echo "" && echo "Debug logs" && (cat hacktricks-preprocessor.log | tail -n 20) && exit 1) - name: Update searchindex.js in repo @@ -95,4 +97,4 @@ jobs: aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete echo "Sync completed" echo "Cat 3 files from the book" - find . -type f -name '*.md' -print | head -n 3 | xargs -r cat + find . -type f -name 'index.html' -print | head -n 3 | xargs -r cat diff --git a/.github/workflows/translate_sw.yml b/.github/workflows/translate_sw.yml index 9fd097fa0..3bf75184a 100644 --- a/.github/workflows/translate_sw.yml +++ b/.github/workflows/translate_sw.yml @@ -66,6 +66,8 @@ jobs: - name: Build mdBook run: | + git checkout "$BRANCH" + git pull MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && echo "" && echo "" && echo "Debug logs" && (cat hacktricks-preprocessor.log | tail -n 20) && exit 1) - name: Update searchindex.js in repo @@ -95,4 +97,4 @@ jobs: aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete echo "Sync completed" echo "Cat 3 files from the book" - find . -type f -name '*.md' -print | head -n 3 | xargs -r cat + find . -type f -name 'index.html' -print | head -n 3 | xargs -r cat diff --git a/.github/workflows/translate_tr.yml b/.github/workflows/translate_tr.yml index ac69ac07e..d2fed560e 100644 --- a/.github/workflows/translate_tr.yml +++ b/.github/workflows/translate_tr.yml @@ -66,6 +66,8 @@ jobs: - name: Build mdBook run: | + git checkout "$BRANCH" + git pull MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && echo "" && echo "" && echo "Debug logs" && (cat hacktricks-preprocessor.log | tail -n 20) && exit 1) - name: Update searchindex.js in repo @@ -95,4 +97,4 @@ jobs: aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete echo "Sync completed" echo "Cat 3 files from the book" - find . -type f -name '*.md' -print | head -n 3 | xargs -r cat + find . -type f -name 'index.html' -print | head -n 3 | xargs -r cat diff --git a/.github/workflows/translate_uk.yml b/.github/workflows/translate_uk.yml index ebd3558b1..5331a7ab9 100644 --- a/.github/workflows/translate_uk.yml +++ b/.github/workflows/translate_uk.yml @@ -66,6 +66,8 @@ jobs: - name: Build mdBook run: | + git checkout "$BRANCH" + git pull MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && echo "" && echo "" && echo "Debug logs" && (cat hacktricks-preprocessor.log | tail -n 20) && exit 1) - name: Update searchindex.js in repo @@ -95,4 +97,4 @@ jobs: aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete echo "Sync completed" echo "Cat 3 files from the book" - find . -type f -name '*.md' -print | head -n 3 | xargs -r cat + find . -type f -name 'index.html' -print | head -n 3 | xargs -r cat diff --git a/.github/workflows/translate_zh.yml b/.github/workflows/translate_zh.yml index fc1a1722b..4fe3f35ef 100644 --- a/.github/workflows/translate_zh.yml +++ b/.github/workflows/translate_zh.yml @@ -66,6 +66,8 @@ jobs: - name: Build mdBook run: | + git checkout "$BRANCH" + git pull MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (echo "Error logs" && cat hacktricks-preprocessor-error.log && echo "" && echo "" && echo "Debug logs" && (cat hacktricks-preprocessor.log | tail -n 20) && exit 1) - name: Update searchindex.js in repo @@ -95,4 +97,4 @@ jobs: aws s3 sync ./book s3://hacktricks-wiki/$BRANCH --delete echo "Sync completed" echo "Cat 3 files from the book" - find . -type f -name '*.md' -print | head -n 3 | xargs -r cat + find . -type f -name 'index.html' -print | head -n 3 | xargs -r cat