mirror of
https://github.com/formbricks/formbricks.git
synced 2026-01-06 05:40:02 -06:00
Co-authored-by: Piyush Gupta <piyushguptaa2z123@gmail.com> Co-authored-by: Piyush Gupta <56182734+gupta-piyush19@users.noreply.github.com> Co-authored-by: Victor Hugo dos Santos <115753265+victorvhs017@users.noreply.github.com> Co-authored-by: pandeymangg <anshuman.pandey9999@gmail.com> Co-authored-by: Matti Nannt <matti@formbricks.com> Co-authored-by: Matti Nannt <mail@matthiasnannt.com> Co-authored-by: Johannes <johannes@formbricks.com> Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
43 lines
1.0 KiB
Bash
Executable File
43 lines
1.0 KiB
Bash
Executable File
#!/bin/sh
|
|
. "$(dirname "$0")/_/husky.sh"
|
|
|
|
# Load environment variables from .env files
|
|
if [ -f .env ]; then
|
|
set -a
|
|
. .env
|
|
set +a
|
|
fi
|
|
|
|
pnpm lint-staged
|
|
|
|
# Run Lingo.dev i18n workflow if LINGODOTDEV_API_KEY is set
|
|
if [ -n "$LINGODOTDEV_API_KEY" ]; then
|
|
echo ""
|
|
echo "🌍 Running Lingo.dev translation workflow..."
|
|
echo ""
|
|
|
|
# Run translation generation and validation
|
|
if pnpm run i18n; then
|
|
echo ""
|
|
echo "✅ Translation validation passed"
|
|
echo ""
|
|
# Add updated locale files to git
|
|
git add apps/web/locales/*.json
|
|
else
|
|
echo ""
|
|
echo "❌ Translation validation failed!"
|
|
echo ""
|
|
echo "Please fix the translation issues above before committing:"
|
|
echo " • Add missing translation keys to your locale files"
|
|
echo " • Remove unused translation keys"
|
|
echo ""
|
|
echo "Or run 'pnpm i18n' to see the detailed report"
|
|
echo ""
|
|
exit 1
|
|
fi
|
|
else
|
|
echo ""
|
|
echo "⚠️ Skipping translation validation: LINGODOTDEV_API_KEY is not set"
|
|
echo " (This is expected for community contributors)"
|
|
echo ""
|
|
fi |