Files
topgrade/translate.sh
Stuart Reilly 99892359c7 feat: add damp run type (#1217)
Co-authored-by: Stuart Reilly <sreilly@scottlogic.com>
2025-11-02 15:06:35 +01:00

11 lines
343 B
Bash
Executable File

#!/usr/bin/env bash
## Translate the given string into $langs using translate-shell, outputting to the yaml structure expected for locales/app.yml
langs="en lt es fr zh_CN zh_TW de"
printf "\"%s\":\n" "$@"
for lang in $langs; do
result=$(trans -brief -no-auto -s en -t "${lang/_/-/}" "$@")
printf " %s: \"%s\"\n" "$lang" "$result"
done