Closed wqerrewetw closed 5 months ago
@echo off
if exist "lib\windows-x86_64\python.exe" (
if not "%PROCESSOR_ARCHITECTURE%"=="x86" (
set "pyPath=%cd%\lib\windows-x86_64\"
) else if exist "lib\windows-i686\python.exe" (
set "pyPath=%cd%\lib\windows-i686\"
)
) else if exist "lib\windows-i686\python.exe" (
set "pyPath=%cd%\lib\windows-i686\"
)
if exist "lib\py2-windows-x86_64\python.exe" (
if not "%PROCESSOR_ARCHITECTURE%"=="x86" (
set "pyPath=%cd%\lib\py2-windows-x86_64\"
) else if exist "lib\py2-windows-i686\python.exe" (
set "pyPath=%cd%\lib\py2-windows-i686\"
)
) else if exist "lib\py2-windows-i686\python.exe" (
set "pyPath=%cd%\lib\py2-windows-i686\"
)
if exist "lib\py3-windows-x86_64\python.exe" (
if not "%PROCESSOR_ARCHITECTURE%"=="x86" (
set "pyPath=%cd%\lib\py3-windows-x86_64\"
) else if exist "lib\py3-windows-i686\python.exe" (
set "pyPath=%cd%\lib\py3-windows-i686\"
)
) else if exist "lib\py3-windows-i686\python.exe" (
set "pyPath=%cd%\lib\py3-windows-i686\"
)
set pyFile=""
for %%s in ("*.exe") do (
if exist "%%~ns%.py" (
set "pyFile=%%~ns%.py"
)
)
if not exist "%pyFile%" (
echo "python file not found"
pause>nul|set/p=.Press any key to exit...
exit
)
set /p tl=Enter the target language(default:english):
IF [%tl%] == [] (set "tl=english")
"%pyPath%python.exe" "%pyFile%" "%cd%" translate %tl%
pause
Thanks for your suggestion. I will try to import this in feature version
Thanks for your suggestion , already supported in v2.0.9
Use the game's built-in export translation to resolve version compatibility issues
https://www.renpy.org/doc/html/cli.html
[basedir]\\lib\\py3-windows-x86_64\\python.exe xxx.py "[basedir]" translate targetLanguage