37 lines
1.0 KiB
Python
37 lines
1.0 KiB
Python
#!/usr/bin/env python3
|
|
"""
|
|
Simple test script to debug Flask app issues
|
|
"""
|
|
|
|
import os
|
|
import sys
|
|
|
|
# Add current directory to Python path
|
|
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
|
|
|
try:
|
|
print("Testing imports...")
|
|
from flask import Flask
|
|
print("✓ Flask imported successfully")
|
|
|
|
from translation_manager import load_translations, translate, get_current_language
|
|
print("✓ Translation manager imported successfully")
|
|
|
|
print("\nTesting translation loading...")
|
|
load_translations()
|
|
print("✓ Translations loaded successfully")
|
|
|
|
print("\nTesting translation function...")
|
|
result = translate("Home")
|
|
print(f"✓ Translation test: 'Home' -> '{result}'")
|
|
|
|
print("\nTesting current language...")
|
|
lang = get_current_language()
|
|
print(f"✓ Current language: {lang}")
|
|
|
|
print("\nAll tests passed! The issue might be elsewhere.")
|
|
|
|
except Exception as e:
|
|
print(f"❌ Error: {e}")
|
|
import traceback
|
|
traceback.print_exc() |