mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-14 19:45:11 +00:00
2e1f6bc56d
* replace exit with assert in test_single_page * improve save_raw_single_page docs option * More grammar fixes * "Built from" link in new tab * fix mistype * Example of include in docs * add anchor to meeting form * Draft of translation helper * WIP on translation helper * Replace some fa docs content with machine translation * add normalize-en-markdown.sh * normalize some en markdown * normalize some en markdown * admonition support * normalize * normalize * normalize * support wide tables * normalize * normalize * normalize * normalize * normalize * normalize * normalize * normalize * normalize * normalize * normalize * normalize * normalize * lightly edited machine translation of introdpection.md * lightly edited machhine translation of lazy.md * WIP on translation utils * Normalize ru docs * Normalize other languages * some fixes * WIP on normalize/translate tools * add requirements.txt * [experimental] add es docs language as machine translated draft * remove duplicate script * Back to wider tab-stop (narrow renders not so well)
18 lines
489 B
Bash
Executable File
18 lines
489 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Usage: replace-with-translation.sh <target_language> <path>
|
|
set -e
|
|
BASE_DIR=$(dirname $(readlink -f $0))
|
|
TEMP_FILE=$(mktemp)
|
|
trap 'rm -f -- "${TEMP_FILE}"' INT TERM HUP EXIT
|
|
TARGET_LANGUAGE="$1"
|
|
INPUT="$2"
|
|
cat "${INPUT}" > "${TEMP_FILE}"
|
|
if [[ ! -z $SLEEP ]]
|
|
then
|
|
sleep $[ ( $RANDOM % 20 ) + 1 ]s
|
|
fi
|
|
git rm -f "${INPUT}"
|
|
mkdir -p $(dirname "${INPUT}") || true
|
|
YANDEX=1 "${BASE_DIR}/translate.sh" "${TARGET_LANGUAGE}" "${TEMP_FILE}" "${INPUT}"
|
|
git add "${INPUT}"
|