feat: Enhance Multilingual Support and System Language Detection

- Add automatic system language detection for Windows and Unix-like systems
- Update localization files with new translation keys
- Improve language handling in various modules
- Translate more UI messages to English
- Add GitHub link to logo display
- Bump version to 1.4.04
This commit is contained in:
yeongpin
2025-02-25 10:46:36 +08:00
parent 4c91525082
commit d852bcff50
17 changed files with 240 additions and 148 deletions

View File

@@ -2,28 +2,28 @@
chcp 65001 > nul
cls
:: 檢查是否以管理員權限運行
:: Check if running with administrator privileges
net session >nul 2>&1
if %errorLevel% == 0 (
:: 如果是管理員權限,只創建虛擬環境後就降權運行
:: If running with administrator privileges, create virtual environment and then run with normal user privileges
if not exist venv (
echo 正在創建虛擬環境...
python -m venv venv
)
:: 降權運行剩餘的步驟
:: Run remaining steps with normal user privileges
echo 以普通用戶權限繼續...
powershell -Command "Start-Process -FilePath '%comspec%' -ArgumentList '/c cd /d %cd% && %~f0 run' -Verb RunAs:NO"
exit /b
) else (
:: 檢查是否是第二階段運行
:: Check if running in second stage
if "%1"=="run" (
goto RUN_BUILD
) else (
:: 如果是普通權限且需要創建虛擬環境,請求管理員權限
:: If running with normal privileges and creating virtual environment is required, request administrator privileges
if not exist venv (
echo ⚠️ 需要管理員權限來創建虛擬環境
echo 正在請求管理員權限...
echo ⚠️ Requires administrator privileges to create virtual environment
echo Requesting administrator privileges...
powershell -Command "Start-Process -Verb RunAs -FilePath '%comspec%' -ArgumentList '/c cd /d %cd% && %~f0'"
exit /b
) else (
@@ -33,30 +33,30 @@ if %errorLevel% == 0 (
)
:RUN_BUILD
echo 啟動虛擬環境...
echo Starting virtual environment...
call venv\Scripts\activate.bat
if errorlevel 1 (
echo啟動虛擬環境失敗
echoFailed to start virtual environment
pause
exit /b 1
)
:: 檢查並安裝缺失的依賴
echo 檢查依賴...
:: Check and install missing dependencies
echo Checking dependencies...
for /f "tokens=1" %%i in (requirements.txt) do (
pip show %%i >nul 2>&1 || (
echo 安裝 %%i...
echo Installing %%i...
pip install %%i
)
)
echo 開始構建...
echo Starting build...
python build.py
if errorlevel 1 (
echo構建失敗
echoBuild failed
pause
exit /b 1
)
echo完成!
echoCompleted!
pause