Skip to content

Commit

Permalink
t4
Browse files Browse the repository at this point in the history
  • Loading branch information
carlospolop committed Jan 9, 2025
1 parent a10cc0b commit 47483a8
Show file tree
Hide file tree
Showing 19 changed files with 114 additions and 99 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
# Build the mdBook
- name: Build mdBook
run: MDBOOK_BOOK__LANGUAGE=en mdbook build
run: MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)

# Cat hacktricks-preprocessor.log
#- name: Cat hacktricks-preprocessor.log
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/translate_af.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ jobs:
git config --global --add safe.directory /__w/hacktricks-cloud/hacktricks-cloud
git config --global user.name 'Translator'
git config --global user.email '[email protected]'
git checkout af
git config pull.rebase false
git checkout $BRANCH
git pull
git checkout master
Expand All @@ -58,18 +59,18 @@ jobs:
echo -n "$file , " >> /tmp/file_paths.txt
fi
done
python scripts/translator.py --language "Afrikaans" --branch "af" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
- name: Commit and push changes
run: |
git checkout af
git checkout $BRANCH
git add -A
git commit -m "Translated Afrikaans files" || true
git push --set-upstream origin af
git commit -m "Translated $LANGUAGE files" || true
git push --set-upstream origin $BRANCH
- name: Build mdBook
run: |
MDBOOK_BOOK__LANGUAGE=af mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
# Login in AWs
- name: Configure AWS credentials using OIDC
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/translate_de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ jobs:
git config --global --add safe.directory /__w/hacktricks-cloud/hacktricks-cloud
git config --global user.name 'Translator'
git config --global user.email '[email protected]'
git checkout af
git config pull.rebase false
git checkout $BRANCH
git pull
git checkout master
Expand All @@ -58,18 +59,18 @@ jobs:
echo -n "$file , " >> /tmp/file_paths.txt
fi
done
python scripts/translator.py --language "Afrikaans" --branch "af" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
- name: Commit and push changes
run: |
git checkout af
git checkout $BRANCH
git add -A
git commit -m "Translated Afrikaans files" || true
git push --set-upstream origin af
git commit -m "Translated $LANGUAGE files" || true
git push --set-upstream origin $BRANCH
- name: Build mdBook
run: |
MDBOOK_BOOK__LANGUAGE=af mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
# Login in AWs
- name: Configure AWS credentials using OIDC
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/translate_el.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ jobs:
git config --global --add safe.directory /__w/hacktricks-cloud/hacktricks-cloud
git config --global user.name 'Translator'
git config --global user.email '[email protected]'
git checkout af
git config pull.rebase false
git checkout $BRANCH
git pull
git checkout master
Expand All @@ -58,18 +59,18 @@ jobs:
echo -n "$file , " >> /tmp/file_paths.txt
fi
done
python scripts/translator.py --language "Afrikaans" --branch "af" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
- name: Commit and push changes
run: |
git checkout af
git checkout $BRANCH
git add -A
git commit -m "Translated Afrikaans files" || true
git push --set-upstream origin af
git commit -m "Translated $LANGUAGE files" || true
git push --set-upstream origin $BRANCH
- name: Build mdBook
run: |
MDBOOK_BOOK__LANGUAGE=af mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
# Login in AWs
- name: Configure AWS credentials using OIDC
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/translate_es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ jobs:
git config --global --add safe.directory /__w/hacktricks-cloud/hacktricks-cloud
git config --global user.name 'Translator'
git config --global user.email '[email protected]'
git checkout af
git config pull.rebase false
git checkout $BRANCH
git pull
git checkout master
Expand All @@ -58,18 +59,18 @@ jobs:
echo -n "$file , " >> /tmp/file_paths.txt
fi
done
python scripts/translator.py --language "Afrikaans" --branch "af" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
- name: Commit and push changes
run: |
git checkout af
git checkout $BRANCH
git add -A
git commit -m "Translated Afrikaans files" || true
git push --set-upstream origin af
git commit -m "Translated $LANGUAGE files" || true
git push --set-upstream origin $BRANCH
- name: Build mdBook
run: |
MDBOOK_BOOK__LANGUAGE=af mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
# Login in AWs
- name: Configure AWS credentials using OIDC
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/translate_fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ jobs:
git config --global --add safe.directory /__w/hacktricks-cloud/hacktricks-cloud
git config --global user.name 'Translator'
git config --global user.email '[email protected]'
git checkout af
git config pull.rebase false
git checkout $BRANCH
git pull
git checkout master
Expand All @@ -58,18 +59,18 @@ jobs:
echo -n "$file , " >> /tmp/file_paths.txt
fi
done
python scripts/translator.py --language "Afrikaans" --branch "af" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
- name: Commit and push changes
run: |
git checkout af
git checkout $BRANCH
git add -A
git commit -m "Translated Afrikaans files" || true
git push --set-upstream origin af
git commit -m "Translated $LANGUAGE files" || true
git push --set-upstream origin $BRANCH
- name: Build mdBook
run: |
MDBOOK_BOOK__LANGUAGE=af mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
# Login in AWs
- name: Configure AWS credentials using OIDC
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/translate_hi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ jobs:
git config --global --add safe.directory /__w/hacktricks-cloud/hacktricks-cloud
git config --global user.name 'Translator'
git config --global user.email '[email protected]'
git checkout af
git config pull.rebase false
git checkout $BRANCH
git pull
git checkout master
Expand All @@ -58,18 +59,18 @@ jobs:
echo -n "$file , " >> /tmp/file_paths.txt
fi
done
python scripts/translator.py --language "Afrikaans" --branch "af" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
- name: Commit and push changes
run: |
git checkout af
git checkout $BRANCH
git add -A
git commit -m "Translated Afrikaans files" || true
git push --set-upstream origin af
git commit -m "Translated $LANGUAGE files" || true
git push --set-upstream origin $BRANCH
- name: Build mdBook
run: |
MDBOOK_BOOK__LANGUAGE=af mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
# Login in AWs
- name: Configure AWS credentials using OIDC
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/translate_it.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ jobs:
git config --global --add safe.directory /__w/hacktricks-cloud/hacktricks-cloud
git config --global user.name 'Translator'
git config --global user.email '[email protected]'
git checkout af
git config pull.rebase false
git checkout $BRANCH
git pull
git checkout master
Expand All @@ -58,18 +59,18 @@ jobs:
echo -n "$file , " >> /tmp/file_paths.txt
fi
done
python scripts/translator.py --language "Afrikaans" --branch "af" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
- name: Commit and push changes
run: |
git checkout af
git checkout $BRANCH
git add -A
git commit -m "Translated Afrikaans files" || true
git push --set-upstream origin af
git commit -m "Translated $LANGUAGE files" || true
git push --set-upstream origin $BRANCH
- name: Build mdBook
run: |
MDBOOK_BOOK__LANGUAGE=af mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
# Login in AWs
- name: Configure AWS credentials using OIDC
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/translate_ja.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ jobs:
git config --global --add safe.directory /__w/hacktricks-cloud/hacktricks-cloud
git config --global user.name 'Translator'
git config --global user.email '[email protected]'
git checkout af
git config pull.rebase false
git checkout $BRANCH
git pull
git checkout master
Expand All @@ -58,18 +59,18 @@ jobs:
echo -n "$file , " >> /tmp/file_paths.txt
fi
done
python scripts/translator.py --language "Afrikaans" --branch "af" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
- name: Commit and push changes
run: |
git checkout af
git checkout $BRANCH
git add -A
git commit -m "Translated Afrikaans files" || true
git push --set-upstream origin af
git commit -m "Translated $LANGUAGE files" || true
git push --set-upstream origin $BRANCH
- name: Build mdBook
run: |
MDBOOK_BOOK__LANGUAGE=af mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
# Login in AWs
- name: Configure AWS credentials using OIDC
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/translate_ko.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ jobs:
git config --global --add safe.directory /__w/hacktricks-cloud/hacktricks-cloud
git config --global user.name 'Translator'
git config --global user.email '[email protected]'
git checkout af
git config pull.rebase false
git checkout $BRANCH
git pull
git checkout master
Expand All @@ -58,18 +59,18 @@ jobs:
echo -n "$file , " >> /tmp/file_paths.txt
fi
done
python scripts/translator.py --language "Afrikaans" --branch "af" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
- name: Commit and push changes
run: |
git checkout af
git checkout $BRANCH
git add -A
git commit -m "Translated Afrikaans files" || true
git push --set-upstream origin af
git commit -m "Translated $LANGUAGE files" || true
git push --set-upstream origin $BRANCH
- name: Build mdBook
run: |
MDBOOK_BOOK__LANGUAGE=af mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
# Login in AWs
- name: Configure AWS credentials using OIDC
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/translate_pl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ jobs:
git config --global --add safe.directory /__w/hacktricks-cloud/hacktricks-cloud
git config --global user.name 'Translator'
git config --global user.email '[email protected]'
git checkout af
git config pull.rebase false
git checkout $BRANCH
git pull
git checkout master
Expand All @@ -58,18 +59,18 @@ jobs:
echo -n "$file , " >> /tmp/file_paths.txt
fi
done
python scripts/translator.py --language "Afrikaans" --branch "af" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
- name: Commit and push changes
run: |
git checkout af
git checkout $BRANCH
git add -A
git commit -m "Translated Afrikaans files" || true
git push --set-upstream origin af
git commit -m "Translated $LANGUAGE files" || true
git push --set-upstream origin $BRANCH
- name: Build mdBook
run: |
MDBOOK_BOOK__LANGUAGE=af mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
# Login in AWs
- name: Configure AWS credentials using OIDC
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/translate_pt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ jobs:
git config --global --add safe.directory /__w/hacktricks-cloud/hacktricks-cloud
git config --global user.name 'Translator'
git config --global user.email '[email protected]'
git checkout af
git config pull.rebase false
git checkout $BRANCH
git pull
git checkout master
Expand All @@ -58,18 +59,18 @@ jobs:
echo -n "$file , " >> /tmp/file_paths.txt
fi
done
python scripts/translator.py --language "Afrikaans" --branch "af" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
python scripts/translator.py --language "$LANGUAGE" --branch "$BRANCH" --api-key "$OPENAI_API_KEY" -f "$(cat /tmp/file_paths.txt)" -t 3
- name: Commit and push changes
run: |
git checkout af
git checkout $BRANCH
git add -A
git commit -m "Translated Afrikaans files" || true
git push --set-upstream origin af
git commit -m "Translated $LANGUAGE files" || true
git push --set-upstream origin $BRANCH
- name: Build mdBook
run: |
MDBOOK_BOOK__LANGUAGE=af mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
MDBOOK_BOOK__LANGUAGE=$BRANCH mdbook build || (cat hacktricks-preprocessor-error.log && exit 1)
# Login in AWs
- name: Configure AWS credentials using OIDC
Expand Down
Loading

0 comments on commit 47483a8

Please sign in to comment.