chore: remove unused Docker and localization files
- Deleted Dockerfiles for backend and frontend, along with the associated Nginx configuration and localization debugging script, to streamline the project structure and eliminate unnecessary files.
This commit is contained in:
@@ -1,33 +0,0 @@
|
||||
import sys
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
# Add src to sys.path
|
||||
sys.path.append(os.getcwd())
|
||||
|
||||
from src.classes.language import language_manager
|
||||
from src.i18n import t, reload_translations, _get_translation, _get_current_lang
|
||||
|
||||
print(f"Initial Language: {_get_current_lang()}")
|
||||
|
||||
# Try translating without setting language (should be zh-CN by default per LanguageManager)
|
||||
print(f"Default 'History' translation: {t('History')}")
|
||||
|
||||
# Explicitly set to zh-CN
|
||||
print("Setting language to zh-CN...")
|
||||
language_manager.set_language("zh-CN")
|
||||
print(f"Current Language: {_get_current_lang()}")
|
||||
print(f"Translated 'History': {t('History')}")
|
||||
print(f"Translated 'Killed by {{killer}}': {t('Killed by {killer}', killer='张三')}")
|
||||
|
||||
# Check internal translation object
|
||||
trans = _get_translation()
|
||||
print(f"Translation Object: {trans}")
|
||||
if trans:
|
||||
print(f"Info: {trans.info()}")
|
||||
|
||||
# Check file paths
|
||||
locale_dir = Path("src/i18n/locales")
|
||||
mo_path = locale_dir / "zh_CN" / "LC_MESSAGES" / "messages.mo"
|
||||
print(f"MO file exists: {mo_path.exists()}")
|
||||
print(f"MO file absolute path: {mo_path.absolute()}")
|
||||
@@ -22,7 +22,7 @@ FROM nginx:alpine
|
||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||
|
||||
# 复制 Nginx 配置
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
COPY deploy/nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
# 暴露端口
|
||||
EXPOSE 80
|
||||
@@ -5,7 +5,7 @@ services:
|
||||
backend:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.backend
|
||||
dockerfile: deploy/Dockerfile.backend
|
||||
container_name: cultivation-backend
|
||||
ports:
|
||||
- "8002:8002"
|
||||
@@ -25,7 +25,7 @@ services:
|
||||
frontend:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.frontend
|
||||
dockerfile: deploy/Dockerfile.frontend
|
||||
container_name: cultivation-frontend
|
||||
ports:
|
||||
- "8123:80"
|
||||
|
||||
Reference in New Issue
Block a user