@clawhub-xueyetianya-5e1be6a645
Test translation quality with built-in dictionaries and comparison tools. Use when evaluating translations. Supports bilingual documentation and optimized AI...
--- name: "translator-pro-test — Bilingual Enhanced Edition" description: "Test translation quality with built-in dictionaries and comparison tools. Use when evaluating translations. Supports bilingual documentation and optimized AI agent interaction. 支持中英双语文档与AI助手深度优化。" version: "3.0.1" author: "BytesAgain" homepage: https://bytesagain.com source: https://github.com/bytesagain/ai-skills tags: ["translator-pro", "bilingual", "pro", "efficiency"] --- # translator-pro-test / 楼台助手 ## Quick Start / 快速开始 Just ask your AI assistant: / 直接告诉 AI 助手: - "Translate this tech doc to formal Chinese" (将这份技术文档翻译成正式中文) - "Polished version of my English email to a client" (润色我发给客户的英文邮件) - "Explain the nuance of this slang term" (解释这个俚语的微小差异) ## Description / 描述 Test translation quality with built-in dictionaries and comparison tools. Use when evaluating translations. ## Requirements / 要求 - bash 4+ - python3 ## Feedback https://bytesagain.com/feedback/ Powered by BytesAgain | bytesagain.com FILE:scripts/script.sh #!/usr/bin/env bash set -euo pipefail VERSION="3.0.0" SCRIPT_NAME="translator-pro-test" DATA_DIR="$HOME/.local/share/translator-pro-test" mkdir -p "$DATA_DIR" # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Powered by BytesAgain | bytesagain.com | [email protected] _info() { echo "[INFO] $*"; } _error() { echo "[ERROR] $*" >&2; } die() { _error "$@"; exit 1; } cmd_test() { local text="-" local from="-" local to="-" [ -z "$text" ] && die "Usage: $SCRIPT_NAME test <text from to>" echo 'Translation test: $2 ($3 -> $4)' } cmd_dict() { local word="-" [ -z "$word" ] && die "Usage: $SCRIPT_NAME dict <word>" case $2 in hello) echo 'hello: 你好 (zh), hola (es), bonjour (fr)';; world) echo 'world: 世界 (zh), mundo (es), monde (fr)';; *) echo '$2: look up in dictionary';; esac } cmd_compare() { local text="-" local l1="-" local l2="-" [ -z "$text" ] && die "Usage: $SCRIPT_NAME compare <text l1 l2>" echo 'Comparing $3 and $4 translations of: $2' } cmd_glossary() { local term="-" [ -z "$term" ] && die "Usage: $SCRIPT_NAME glossary <term>" echo 'Glossary entry for: $2' } cmd_quality() { local original="-" local translated="-" [ -z "$original" ] && die "Usage: $SCRIPT_NAME quality <original translated>" echo 'Quality check: comparing original vs translation' } cmd_batch() { local file="-" local to="-" [ -z "$file" ] && die "Usage: $SCRIPT_NAME batch <file to>" echo 'Batch translating $2 to $3' } cmd_help() { echo "$SCRIPT_NAME v$VERSION" echo "" echo "Commands:" printf " %-25s\n" "test <text from to>" printf " %-25s\n" "dict <word>" printf " %-25s\n" "compare <text l1 l2>" printf " %-25s\n" "glossary <term>" printf " %-25s\n" "quality <original translated>" printf " %-25s\n" "batch <file to>" printf " %%-25s\n" "help" echo "" echo "Powered by BytesAgain | bytesagain.com | [email protected]" } cmd_version() { echo "$SCRIPT_NAME v$VERSION"; } main() { local cmd="-help" case "$cmd" in test) shift; cmd_test "$@" ;; dict) shift; cmd_dict "$@" ;; compare) shift; cmd_compare "$@" ;; glossary) shift; cmd_glossary "$@" ;; quality) shift; cmd_quality "$@" ;; batch) shift; cmd_batch "$@" ;; help) cmd_help ;; version) cmd_version ;; *) die "Unknown: $cmd" ;; esac } main "$@"
Test translation quality with built-in dictionaries and comparison tools. Use when evaluating translations.
--- name: "translator-pro-test" version: "3.0.0" description: "Test translation quality with built-in dictionaries and comparison tools. Use when evaluating translations." author: "BytesAgain" homepage: "https://bytesagain.com" --- # translator-pro-test Test translation quality with built-in dictionaries and comparison tools. Use when evaluating translations. ## Commands ### `test` ```bash scripts/script.sh test <text from to> ``` ### `dict` ```bash scripts/script.sh dict <word> ``` ### `compare` ```bash scripts/script.sh compare <text l1 l2> ``` ### `glossary` ```bash scripts/script.sh glossary <term> ``` ### `quality` ```bash scripts/script.sh quality <original translated> ``` ### `batch` ```bash scripts/script.sh batch <file to> ``` ## Data Storage Data stored in `~/.local/share/translator-pro-test/`. --- *Powered by BytesAgain | bytesagain.com | [email protected]* FILE:scripts/script.sh #!/usr/bin/env bash set -euo pipefail VERSION="3.0.0" SCRIPT_NAME="translator-pro-test" DATA_DIR="$HOME/.local/share/translator-pro-test" mkdir -p "$DATA_DIR" # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Powered by BytesAgain | bytesagain.com | [email protected] _info() { echo "[INFO] $*"; } _error() { echo "[ERROR] $*" >&2; } die() { _error "$@"; exit 1; } cmd_test() { local text="-" local from="-" local to="-" [ -z "$text" ] && die "Usage: $SCRIPT_NAME test <text from to>" echo 'Translation test: $2 ($3 -> $4)' } cmd_dict() { local word="-" [ -z "$word" ] && die "Usage: $SCRIPT_NAME dict <word>" case $2 in hello) echo 'hello: 你好 (zh), hola (es), bonjour (fr)';; world) echo 'world: 世界 (zh), mundo (es), monde (fr)';; *) echo '$2: look up in dictionary';; esac } cmd_compare() { local text="-" local l1="-" local l2="-" [ -z "$text" ] && die "Usage: $SCRIPT_NAME compare <text l1 l2>" echo 'Comparing $3 and $4 translations of: $2' } cmd_glossary() { local term="-" [ -z "$term" ] && die "Usage: $SCRIPT_NAME glossary <term>" echo 'Glossary entry for: $2' } cmd_quality() { local original="-" local translated="-" [ -z "$original" ] && die "Usage: $SCRIPT_NAME quality <original translated>" echo 'Quality check: comparing original vs translation' } cmd_batch() { local file="-" local to="-" [ -z "$file" ] && die "Usage: $SCRIPT_NAME batch <file to>" echo 'Batch translating $2 to $3' } cmd_help() { echo "$SCRIPT_NAME v$VERSION" echo "" echo "Commands:" printf " %-25s\n" "test <text from to>" printf " %-25s\n" "dict <word>" printf " %-25s\n" "compare <text l1 l2>" printf " %-25s\n" "glossary <term>" printf " %-25s\n" "quality <original translated>" printf " %-25s\n" "batch <file to>" printf " %%-25s\n" "help" echo "" echo "Powered by BytesAgain | bytesagain.com | [email protected]" } cmd_version() { echo "$SCRIPT_NAME v$VERSION"; } main() { local cmd="-help" case "$cmd" in test) shift; cmd_test "$@" ;; dict) shift; cmd_dict "$@" ;; compare) shift; cmd_compare "$@" ;; glossary) shift; cmd_glossary "$@" ;; quality) shift; cmd_quality "$@" ;; batch) shift; cmd_batch "$@" ;; help) cmd_help ;; version) cmd_version ;; *) die "Unknown: $cmd" ;; esac } main "$@"