mirror of
https://github.com/btouchard/ackify-ce.git
synced 2026-02-09 23:38:46 -06:00
Add comprehensive internationalization support: - Browser language detection via Accept-Language header - Cookie-based language preference persistence (1 year) - Language switcher with flag emojis (🇫🇷 🇬🇧) - 71 translation keys covering all UI elements - Context-based translation injection via middleware Replace Tailwind CDN with production build: - Tailwind CLI v3.4.16 for CSS compilation - Minified CSS output (5.9KB from several MB) - Docker build integration - Custom color palette configuration Update all templates with i18n support: - Main pages: home, sign, signatures, error - Admin dashboard and document details - Embed iframe widget (English only for international use) - Language switcher preserves current page URL Technical implementation: - golang.org/x/text for language matching - Middleware pattern for consistent i18n injection - Fallback chain: Cookie → Accept-Language → English - Separate translation files (locales/fr.json, locales/en.json)
30 lines
860 B
Bash
Executable File
30 lines
860 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
# Colors for output
|
|
GREEN='\033[0;32m'
|
|
YELLOW='\033[1;33m'
|
|
NC='\033[0m' # No Color
|
|
|
|
echo -e "${YELLOW}Building Tailwind CSS...${NC}"
|
|
|
|
# Check if tailwindcss binary exists, if not download it
|
|
if [ ! -f "bin/tailwindcss" ]; then
|
|
echo "Downloading Tailwind CSS CLI v3.4.16..."
|
|
mkdir -p bin
|
|
curl -sL https://github.com/tailwindlabs/tailwindcss/releases/download/v3.4.16/tailwindcss-linux-x64 -o bin/tailwindcss
|
|
chmod +x bin/tailwindcss
|
|
fi
|
|
|
|
# Build CSS
|
|
mkdir -p ./static
|
|
|
|
if [ "$1" = "--watch" ]; then
|
|
echo -e "${YELLOW}Watching for changes...${NC}"
|
|
./bin/tailwindcss -i ./assets/input.css -o ./static/output.css --watch
|
|
else
|
|
# Production build with minification
|
|
./bin/tailwindcss -i ./assets/input.css -o ./static/output.css --minify
|
|
echo -e "${GREEN}✓ CSS built successfully at static/output.css${NC}"
|
|
fi
|