Files
wehub-resource-sync 2cab53bc94
Test Vector Database Adaptors / Test MCP Vector DB Tools (push) Has been cancelled
Tests / Code Quality (Ruff & Mypy) (push) Has been cancelled
Tests / Fast Unit Tests (parallel) (macos-latest, 3.11) (push) Has been cancelled
Tests / Fast Unit Tests (parallel) (macos-latest, 3.12) (push) Has been cancelled
Tests / Tests (push) Has been cancelled
Docker Publish / Build and Push Docker Images (map[description:Skill Seekers CLI - Convert documentation to AI skills dockerfile:Dockerfile name:skill-seekers]) (push) Has been cancelled
Docker Publish / Build and Push Docker Images (map[description:Skill Seekers MCP Server - 25 tools for AI assistants dockerfile:Dockerfile.mcp name:skill-seekers-mcp]) (push) Has been cancelled
Docker Publish / Test Docker Images (push) Has been cancelled
Tests / Fast Unit Tests (parallel) (ubuntu-latest, 3.10) (push) Has been cancelled
Tests / Fast Unit Tests (parallel) (ubuntu-latest, 3.11) (push) Has been cancelled
Tests / Fast Unit Tests (parallel) (ubuntu-latest, 3.12) (push) Has been cancelled
Tests / Serial / Integration / E2E Tests (push) Has been cancelled
Tests / MCP Server Tests (push) Has been cancelled
Test Vector Database Adaptors / Test chroma Adaptor (push) Has been cancelled
Test Vector Database Adaptors / Test faiss Adaptor (push) Has been cancelled
Test Vector Database Adaptors / Test qdrant Adaptor (push) Has been cancelled
Test Vector Database Adaptors / Test weaviate Adaptor (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:46:28 +08:00

64 lines
1.7 KiB
Bash
Executable File

#!/bin/bash
# Check if Chinese translations are in sync with English originals
# Usage: ./scripts/check_translation_sync.sh
set -e
echo "🔍 Checking translation sync..."
echo ""
MISSING=0
OUT_OF_SYNC=0
# Find all English docs (excluding zh-CN and archive)
find docs -name "*.md" -not -path "docs/zh-CN/*" -not -path "docs/archive/*" | while read -r en_file; do
# Calculate corresponding Chinese file path
rel_path="${en_file#docs/}"
zh_file="docs/zh-CN/$rel_path"
# Check if Chinese version exists
if [ ! -f "$zh_file" ]; then
echo "❌ Missing: $zh_file (source: $en_file)"
MISSING=$((MISSING + 1))
continue
fi
# Get last modification times
en_mtime=$(git log -1 --format=%ct "$en_file" 2>/dev/null || stat -c %Y "$en_file" 2>/dev/null || echo 0)
zh_mtime=$(git log -1 --format=%ct "$zh_file" 2>/dev/null || stat -c %Y "$zh_file" 2>/dev/null || echo 0)
# Check if English is newer
if [ "$en_mtime" -gt "$zh_mtime" ]; then
echo "⚠️ Out of sync: $zh_file (English updated more recently)"
OUT_OF_SYNC=$((OUT_OF_SYNC + 1))
fi
done
echo ""
# Summary
TOTAL_EN=$(find docs -name "*.md" -not -path "docs/zh-CN/*" -not -path "docs/archive/*" | wc -l)
TOTAL_ZH=$(find docs/zh-CN -name "*.md" 2>/dev/null | wc -l)
echo "📊 Summary:"
echo " English docs: $TOTAL_EN"
echo " Chinese docs: $TOTAL_ZH"
if [ "$MISSING" -gt 0 ]; then
echo " ❌ Missing translations: $MISSING"
fi
if [ "$OUT_OF_SYNC" -gt 0 ]; then
echo " ⚠️ Out of sync: $OUT_OF_SYNC"
fi
if [ "$MISSING" -eq 0 ] && [ "$OUT_OF_SYNC" -eq 0 ]; then
echo ""
echo "✅ All translations in sync!"
exit 0
else
echo ""
echo "❌ Translation sync issues found"
exit 1
fi