|
Revision 385, 1.1 kB
(checked in by uncle_fungus, 3 years ago)
|
Fixed more language script problems
|
| Line | |
|---|
| 1 |
@echo off |
|---|
| 2 |
del langs |
|---|
| 3 |
echo Checking for lang directory: |
|---|
| 4 |
if exist lang ( |
|---|
| 5 |
echo Exists |
|---|
| 6 |
) else ( |
|---|
| 7 |
echo Doesn't exist, creating |
|---|
| 8 |
mkdir lang |
|---|
| 9 |
) |
|---|
| 10 |
echo Checking for translations: |
|---|
| 11 |
echo. |
|---|
| 12 |
For %%f in (po\*.po) do ( |
|---|
| 13 |
echo Found translation for %%~nf |
|---|
| 14 |
echo "%%~nf""" >> langs |
|---|
| 15 |
echo Checking for existing lang\%%~nf folder: |
|---|
| 16 |
if exist lang\%%~nf ( |
|---|
| 17 |
echo Exists |
|---|
| 18 |
) else ( |
|---|
| 19 |
echo Doesn't exist, creating |
|---|
| 20 |
mkdir lang\%%~nf |
|---|
| 21 |
) |
|---|
| 22 |
echo Copying translations... |
|---|
| 23 |
copy /y po\%%~nf.po .\lang\%%~nf\%%~nf.po |
|---|
| 24 |
copy /y po\%%~nf.gmo .\lang\%%~nf\fahmon.mo |
|---|
| 25 |
rem echo Checking for translation in NSI script |
|---|
| 26 |
rem find "%%~nf" < fahmon.nsi > lang_out |
|---|
| 27 |
rem for /f %%i in ('find /v /c "" ^< lang_out') do set /a lines=%%i |
|---|
| 28 |
rem if %lines% NEQ 3 ( |
|---|
| 29 |
rem echo Warning: %%~nf doesn't appear to be in the NSI script |
|---|
| 30 |
rem echo This language won't be included in the installer until you add it |
|---|
| 31 |
rem pause |
|---|
| 32 |
rem ) else ( |
|---|
| 33 |
rem echo Entry found. |
|---|
| 34 |
rem ) |
|---|
| 35 |
rem del lang_out |
|---|
| 36 |
echo ============ |
|---|
| 37 |
) |
|---|
| 38 |
echo Copying translation template |
|---|
| 39 |
copy /y .\po\fahmon.pot .\lang\fahmon.pot |
|---|
| 40 |
if exist .\Release\lang ( |
|---|
| 41 |
rd /s /q .\Release\lang |
|---|
| 42 |
) |
|---|
| 43 |
echo Moving translations into Release |
|---|
| 44 |
move /y .\lang .\Release\ |
|---|