This is an automated email from the ASF dual-hosted git repository. chaokunyang pushed a commit to branch fix_zh_benchmark in repository https://gitbox.apache.org/repos/asf/fory-site.git
commit 4caf5924d396a8319236ed4e8c2d8aa48c46cdb6 Author: chaokunyang <[email protected]> AuthorDate: Fri Feb 6 18:15:40 2026 +0800 fix zh benchmark build --- scripts/copy-i18n-fallback.sh | 51 +++++++++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 21 deletions(-) diff --git a/scripts/copy-i18n-fallback.sh b/scripts/copy-i18n-fallback.sh index f7d201c016..d8cb63b5aa 100755 --- a/scripts/copy-i18n-fallback.sh +++ b/scripts/copy-i18n-fallback.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copy specification folders from English docs to Chinese i18n as fallback -# This ensures links to specification files work in Chinese docs +# Copy fallback folders from English docs to Chinese i18n. +# This ensures links to shared docs files work in Chinese docs. set -e @@ -8,24 +8,33 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" ROOT_DIR="$(dirname "$SCRIPT_DIR")" ZH_CN_DOCS="$ROOT_DIR/i18n/zh-CN/docusaurus-plugin-content-docs" -echo "Copying specification folders to Chinese i18n..." - -# Copy current docs specification -if [ -d "$ROOT_DIR/docs/specification" ]; then - mkdir -p "$ZH_CN_DOCS/current/specification" - cp -r "$ROOT_DIR/docs/specification/"* "$ZH_CN_DOCS/current/specification/" - echo " Copied docs/specification -> current/specification" -fi - -# Copy versioned docs specification -for version_dir in "$ROOT_DIR/versioned_docs"/version-*; do - if [ -d "$version_dir/specification" ]; then - version=$(basename "$version_dir") - target_dir="$ZH_CN_DOCS/$version/specification" - mkdir -p "$target_dir" - cp -r "$version_dir/specification/"* "$target_dir/" - echo " Copied versioned_docs/$version/specification -> $version/specification" +copy_folder_to_zh() { + local folder_name="$1" + + echo "Copying $folder_name folders to Chinese i18n..." + + # Copy current docs folder + if [ -d "$ROOT_DIR/docs/$folder_name" ]; then + local current_target="$ZH_CN_DOCS/current/$folder_name" + mkdir -p "$current_target" + cp -r "$ROOT_DIR/docs/$folder_name/." "$current_target/" + echo " Copied docs/$folder_name -> current/$folder_name" fi -done -echo "Done copying specification folders." + # Copy versioned docs folder + for version_dir in "$ROOT_DIR/versioned_docs"/version-*; do + if [ -d "$version_dir/$folder_name" ]; then + local version + version=$(basename "$version_dir") + local version_target="$ZH_CN_DOCS/$version/$folder_name" + mkdir -p "$version_target" + cp -r "$version_dir/$folder_name/." "$version_target/" + echo " Copied versioned_docs/$version/$folder_name -> $version/$folder_name" + fi + done +} + +copy_folder_to_zh "specification" +copy_folder_to_zh "benchmarks" + +echo "Done copying fallback folders." --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
