mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-10 14:25:50 -05:00
Updated Windows Installer
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7505 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
f164287c09
commit
9f319426fd
27 changed files with 2459 additions and 328 deletions
50
build_scripts/Windows/lang/ts/convert_to_ts.bat
Normal file
50
build_scripts/Windows/lang/ts/convert_to_ts.bat
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
@echo off
|
||||
|
||||
:: Very simple conversion from *.nsh to *.ts
|
||||
|
||||
setlocal
|
||||
|
||||
set Language=en
|
||||
if "%1" NEQ "" set Language=%1
|
||||
|
||||
set InputFile=%~dp0..\%Language%.nsh
|
||||
set OutputFile=%~dp0%Language%.ts
|
||||
|
||||
if not exist "%InputFile%" (
|
||||
echo File %InputFile% not found.
|
||||
goto :exit
|
||||
)
|
||||
|
||||
echo ^<?xml version="1.0" encoding="utf-8"?^> >"%OutputFile%"
|
||||
echo ^<!DOCTYPE TS^> >>"%OutputFile%"
|
||||
echo ^<TS version="2.0" language="en_US"^> >>"%OutputFile%"
|
||||
|
||||
for /F "tokens=1,2,3,*" %%A in (%InputFile%) do if "%%A"=="!insertmacro" call :context %%C %%D
|
||||
|
||||
echo ^</TS^> >>"%OutputFile%"
|
||||
|
||||
:exit
|
||||
endlocal
|
||||
goto :EOF
|
||||
|
||||
:context
|
||||
|
||||
setlocal EnableDelayedExpansion
|
||||
|
||||
:: Simple replace of & to &
|
||||
set Text=%2
|
||||
set Text=%Text:&=^&%
|
||||
set Text=%Text:~1,-1%
|
||||
|
||||
echo !Text!
|
||||
|
||||
echo ^<context^> >>"%OutputFile%"
|
||||
echo ^<name^>%~1^</name^> >>"%OutputFile%"
|
||||
echo ^<message^> >>"%OutputFile%"
|
||||
echo ^<source^>!Text!^</source^> >>"%OutputFile%"
|
||||
echo ^<translation type="unfinished"^>^</translation^> >>"%OutputFile%"
|
||||
echo ^</message^> >>"%OutputFile%"
|
||||
echo ^</context^> >>"%OutputFile%"
|
||||
|
||||
endlocal
|
||||
goto :EOF
|
||||
Loading…
Add table
Add a link
Reference in a new issue