#!/bin/bash # Test script - Check compilation set -e echo "๐Ÿงช Testing Personotes i18n implementation..." echo "" # Check Go files echo "โœ“ Checking Go syntax..." go fmt ./... echo " Go files formatted" # Check if locales exist echo "" echo "โœ“ Checking translation files..." if [ -f "locales/en.json" ]; then echo " โœ“ locales/en.json exists" else echo " โœ— locales/en.json missing" exit 1 fi if [ -f "locales/fr.json" ]; then echo " โœ“ locales/fr.json exists" else echo " โœ— locales/fr.json missing" exit 1 fi # Validate JSON files echo "" echo "โœ“ Validating JSON files..." if command -v jq &> /dev/null; then jq empty locales/en.json && echo " โœ“ en.json is valid JSON" jq empty locales/fr.json && echo " โœ“ fr.json is valid JSON" else echo " โš  jq not installed, skipping JSON validation" fi # Check JavaScript files echo "" echo "โœ“ Checking JavaScript files..." if [ -f "frontend/src/i18n.js" ]; then echo " โœ“ frontend/src/i18n.js exists" else echo " โœ— frontend/src/i18n.js missing" exit 1 fi if [ -f "frontend/src/language-manager.js" ]; then echo " โœ“ frontend/src/language-manager.js exists" else echo " โœ— frontend/src/language-manager.js missing" exit 1 fi echo "" echo "โœ… All checks passed!" echo "" echo "Next steps:" echo "1. cd frontend && npm run build" echo "2. go run ./cmd/server" echo "3. Open http://localhost:8080" echo "4. Click โš™๏ธ Settings > Autre tab > Select language"