forked from I2P_Developers/i2p.i2p
make windoz msg bundling suck less
This commit is contained in:
@@ -45,10 +45,8 @@
|
|||||||
<exec executable="sh" osfamily="mac" failifexecutionfails="true" >
|
<exec executable="sh" osfamily="mac" failifexecutionfails="true" >
|
||||||
<arg value="./bundle-messages.sh" />
|
<arg value="./bundle-messages.sh" />
|
||||||
</exec>
|
</exec>
|
||||||
<exec executable="cmd" osfamily="windows" failifexecutionfails="true" >
|
<exec executable="sh" osfamily="windows" failifexecutionfails="true" >
|
||||||
<arg value="/c" />
|
<arg value="./bundle-messages.sh" />
|
||||||
<!-- no leading ./ here, windoz complains about it. -->
|
|
||||||
<arg value="bundle-messages.bat" />
|
|
||||||
</exec>
|
</exec>
|
||||||
<jar basedir="${build}" destfile="${dist}/${jar}">
|
<jar basedir="${build}" destfile="${dist}/${jar}">
|
||||||
<manifest>
|
<manifest>
|
||||||
@@ -82,10 +80,8 @@
|
|||||||
<arg value="./bundle-messages.sh" />
|
<arg value="./bundle-messages.sh" />
|
||||||
<arg value="-p" />
|
<arg value="-p" />
|
||||||
</exec>
|
</exec>
|
||||||
<exec executable="cmd" osfamily="windows" failifexecutionfails="true" >
|
<exec executable="sh" osfamily="windows" failifexecutionfails="true" >
|
||||||
<arg value="/c" />
|
<arg value="./bundle-messages.sh" />
|
||||||
<!-- no leading ./ here, windoz complains about it. -->
|
|
||||||
<arg value="bundle-messages.bat" />
|
|
||||||
<arg value="-p" />
|
<arg value="-p" />
|
||||||
</exec>
|
</exec>
|
||||||
</target>
|
</target>
|
||||||
|
@@ -19,6 +19,17 @@ then
|
|||||||
POUPDATE=1
|
POUPDATE=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# on windows, one must specify the path of commnad find
|
||||||
|
# since windows has its own retarded version of find.
|
||||||
|
if which find|grep -q -i windows ; then
|
||||||
|
export PATH=.:/bin:/usr/local/bin:$PATH
|
||||||
|
fi
|
||||||
|
# Fast mode - update ondemond
|
||||||
|
echo Placing a file named messages_{LangCode}.only in locale folder,
|
||||||
|
echo will limit .po file update to the language specified by {LangCode}.
|
||||||
|
LG2=$(find locale -iname messages_*.only|tail -1)
|
||||||
|
[ LG2 ] && LG2=${LG2#locale/messages_} && LG2=${LG2%.only}
|
||||||
|
|
||||||
# add ../java/ so the refs will work in the po file
|
# add ../java/ so the refs will work in the po file
|
||||||
JPATHS="src"
|
JPATHS="src"
|
||||||
for i in locale/messages_*.po
|
for i in locale/messages_*.po
|
||||||
@@ -26,6 +37,11 @@ do
|
|||||||
# get language
|
# get language
|
||||||
LG=${i#locale/messages_}
|
LG=${i#locale/messages_}
|
||||||
LG=${LG%.po}
|
LG=${LG%.po}
|
||||||
|
|
||||||
|
# skip, if specified
|
||||||
|
if [ $LG2 ]; then
|
||||||
|
[ $LG != $LG2 ] && continue || echo INFO: Language update is set to [$LG2] only.
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$POUPDATE" = "1" ]
|
if [ "$POUPDATE" = "1" ]
|
||||||
then
|
then
|
||||||
@@ -33,7 +49,6 @@ do
|
|||||||
find $JPATHS -name *.java -newer $i > $TMPFILE
|
find $JPATHS -name *.java -newer $i > $TMPFILE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo $LG
|
|
||||||
if [ -s build/net/i2p/desktopgui/messages_$LG.class -a \
|
if [ -s build/net/i2p/desktopgui/messages_$LG.class -a \
|
||||||
build/net/i2p/desktopgui/messages_$LG.class -nt $i -a \
|
build/net/i2p/desktopgui/messages_$LG.class -nt $i -a \
|
||||||
! -s $TMPFILE ]
|
! -s $TMPFILE ]
|
||||||
|
@@ -1,17 +0,0 @@
|
|||||||
#
|
|
||||||
# Update messages_xx.po and messages_xx.class files,
|
|
||||||
# from both java and jsp sources.
|
|
||||||
# Requires installed programs xgettext, msgfmt, msgmerge, and find.
|
|
||||||
# zzz - public domain
|
|
||||||
#
|
|
||||||
|
|
||||||
## launching sh.exe with -login parameter will open a shell with the current path always pointing to \bin\
|
|
||||||
## need to cd into our orignal path - where we call sh.exe from.
|
|
||||||
|
|
||||||
cd $CALLFROM
|
|
||||||
## echo $PWD
|
|
||||||
|
|
||||||
## except this everything is the same with bundle-message.sh
|
|
||||||
## walking - public domain :-D
|
|
||||||
|
|
||||||
source bundle-messages.sh $PARAS
|
|
@@ -59,15 +59,14 @@
|
|||||||
<target name="bundle" depends="compile">
|
<target name="bundle" depends="compile">
|
||||||
<!-- Update the messages_*.po files.
|
<!-- Update the messages_*.po files.
|
||||||
We need to supply the bat file for windows, and then change the fail property to true -->
|
We need to supply the bat file for windows, and then change the fail property to true -->
|
||||||
<exec executable="sh" osfamily="unix" failifexecutionfails="false" >
|
<exec executable="sh" osfamily="unix" failifexecutionfails="true" >
|
||||||
<arg value="./bundle-messages.sh" />
|
<arg value="./bundle-messages.sh" />
|
||||||
</exec>
|
</exec>
|
||||||
<exec executable="sh" osfamily="mac" failifexecutionfails="false" >
|
<exec executable="sh" osfamily="mac" failifexecutionfails="true" >
|
||||||
<arg value="./bundle-messages.sh" />
|
<arg value="./bundle-messages.sh" />
|
||||||
</exec>
|
</exec>
|
||||||
<exec executable="cmd" osfamily="windows" failifexecutionfails="false" >
|
<exec executable="sh" osfamily="windows" failifexecutionfails="true" >
|
||||||
<arg value="/c" />
|
<arg value="./bundle-messages.sh" />
|
||||||
<arg value="bundle-messages.bat" />
|
|
||||||
</exec>
|
</exec>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
@@ -81,9 +80,8 @@
|
|||||||
<arg value="./bundle-messages.sh" />
|
<arg value="./bundle-messages.sh" />
|
||||||
<arg value="-p" />
|
<arg value="-p" />
|
||||||
</exec>
|
</exec>
|
||||||
<exec executable="cmd" osfamily="windows" failifexecutionfails="true" >
|
<exec executable="sh" osfamily="windows" failifexecutionfails="true" >
|
||||||
<arg value="/c" />
|
<arg value="./bundle-messages.sh" />
|
||||||
<arg value="bundle-messages.bat" />
|
|
||||||
<arg value="-p" />
|
<arg value="-p" />
|
||||||
</exec>
|
</exec>
|
||||||
</target>
|
</target>
|
||||||
|
@@ -1,28 +0,0 @@
|
|||||||
@echo off
|
|
||||||
set Callfrom=%cd%
|
|
||||||
set Paras=%1
|
|
||||||
|
|
||||||
rem before calling make sure you have msys and mingw 's "bin" path
|
|
||||||
rem in your current searching path
|
|
||||||
rem type "set path" to check
|
|
||||||
if not exist ..\locale\*.only goto updateALL
|
|
||||||
|
|
||||||
rem put a messages_xx.only(eg messages_zh.only) into locale folder
|
|
||||||
rem this script will only touch the po file(eg zh) you specified, leaving other po files untact.
|
|
||||||
echo [tip] Puting a messages_{LangCode}.only (eg messages_zh.only)
|
|
||||||
echo into locale folder will restrict the PO file update
|
|
||||||
echo process to your choosen language ONLY.
|
|
||||||
for %%i in (..\locale\*.only) do set PO=%%~ni
|
|
||||||
echo [info] %PO%.only found, will ONLY update file : %PO%.po
|
|
||||||
for %%i in (..\locale\*.po) do if not %%~ni==%PO% ren %%i %%~ni.po-
|
|
||||||
|
|
||||||
call sh --login %cd%\bmsg.sh
|
|
||||||
|
|
||||||
for %%i in (..\locale\*.po-) do if not %%~ni==%PO% ren %%i %%~ni.po
|
|
||||||
goto end
|
|
||||||
|
|
||||||
:updateALL
|
|
||||||
call sh --login %cd%\bmsg.sh
|
|
||||||
|
|
||||||
:end
|
|
||||||
echo End of Message Bundling
|
|
@@ -18,6 +18,17 @@ then
|
|||||||
POUPDATE=1
|
POUPDATE=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# on windows, one must specify the path of commnad find
|
||||||
|
# since windows has its own retarded version of find.
|
||||||
|
if which find|grep -q -i windows ; then
|
||||||
|
export PATH=.:/bin:/usr/local/bin:$PATH
|
||||||
|
fi
|
||||||
|
# Fast mode - update ondemond
|
||||||
|
echo Placing a file named messages_{LangCode}.only in locale folder,
|
||||||
|
echo will limit .po file update to the language specified by {LangCode}.
|
||||||
|
LG2=$(find ../locale -iname messages_*.only|tail -1)
|
||||||
|
[ LG2 ] && LG2=${LG2#../locale/messages_} && LG2=${LG2%.only}
|
||||||
|
|
||||||
# add ../java/ so the refs will work in the po file
|
# add ../java/ so the refs will work in the po file
|
||||||
JPATHS="../java/src"
|
JPATHS="../java/src"
|
||||||
for i in ../locale/messages_*.po
|
for i in ../locale/messages_*.po
|
||||||
@@ -26,6 +37,11 @@ do
|
|||||||
LG=${i#../locale/messages_}
|
LG=${i#../locale/messages_}
|
||||||
LG=${LG%.po}
|
LG=${LG%.po}
|
||||||
|
|
||||||
|
# skip, if specified
|
||||||
|
if [ $LG2 ]; then
|
||||||
|
[ $LG != $LG2 ] && continue || echo INFO: Language update is set to [$LG2] only.
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$POUPDATE" = "1" ]
|
if [ "$POUPDATE" = "1" ]
|
||||||
then
|
then
|
||||||
# make list of java files newer than the .po file
|
# make list of java files newer than the .po file
|
||||||
|
@@ -1,17 +0,0 @@
|
|||||||
#
|
|
||||||
# Update messages_xx.po and messages_xx.class files,
|
|
||||||
# from both java and jsp sources.
|
|
||||||
# Requires installed programs xgettext, msgfmt, msgmerge, and find.
|
|
||||||
# zzz - public domain
|
|
||||||
#
|
|
||||||
|
|
||||||
## launching sh.exe with -login parameter will open a shell with the current path always pointing to \bin\
|
|
||||||
## need to cd into our orignal path - where we call sh.exe from.
|
|
||||||
|
|
||||||
cd $CALLFROM
|
|
||||||
## echo $PWD
|
|
||||||
|
|
||||||
## except this everything is the same with bundle-message.sh
|
|
||||||
## walking - public domain :-D
|
|
||||||
|
|
||||||
source bundle-messages.sh $PARAS
|
|
@@ -48,15 +48,14 @@
|
|||||||
<target name="bundle" depends="compile, precompilejsp">
|
<target name="bundle" depends="compile, precompilejsp">
|
||||||
<!-- Update the messages_*.po files.
|
<!-- Update the messages_*.po files.
|
||||||
We need to supply the bat file for windows, and then change the fail property to true -->
|
We need to supply the bat file for windows, and then change the fail property to true -->
|
||||||
<exec executable="sh" osfamily="unix" failifexecutionfails="false" >
|
<exec executable="sh" osfamily="unix" failifexecutionfails="true" >
|
||||||
<arg value="./bundle-messages.sh" />
|
<arg value="./bundle-messages.sh" />
|
||||||
</exec>
|
</exec>
|
||||||
<exec executable="sh" osfamily="mac" failifexecutionfails="false" >
|
<exec executable="sh" osfamily="mac" failifexecutionfails="true" >
|
||||||
<arg value="./bundle-messages.sh" />
|
<arg value="./bundle-messages.sh" />
|
||||||
</exec>
|
</exec>
|
||||||
<exec executable="cmd" osfamily="windows" failifexecutionfails="false" >
|
<exec executable="sh" osfamily="windows" failifexecutionfails="true" >
|
||||||
<arg value="/c" />
|
<arg value="./bundle-messages.sh" />
|
||||||
<arg value="bundle-messages.bat" />
|
|
||||||
</exec>
|
</exec>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
@@ -70,9 +69,8 @@
|
|||||||
<arg value="./bundle-messages.sh" />
|
<arg value="./bundle-messages.sh" />
|
||||||
<arg value="-p" />
|
<arg value="-p" />
|
||||||
</exec>
|
</exec>
|
||||||
<exec executable="cmd" osfamily="windows" failifexecutionfails="true" >
|
<exec executable="sh" osfamily="windows" failifexecutionfails="true" >
|
||||||
<arg value="/c" />
|
<arg value="./bundle-messages.sh" />
|
||||||
<arg value="bundle-messages.bat" />
|
|
||||||
<arg value="-p" />
|
<arg value="-p" />
|
||||||
</exec>
|
</exec>
|
||||||
</target>
|
</target>
|
||||||
|
@@ -1,28 +0,0 @@
|
|||||||
@echo off
|
|
||||||
set Callfrom=%cd%
|
|
||||||
set Paras=%1
|
|
||||||
|
|
||||||
rem before calling make sure you have msys and mingw 's "bin" path
|
|
||||||
rem in your current searching path
|
|
||||||
rem type "set path" to check
|
|
||||||
if not exist ..\locale\*.only goto updateALL
|
|
||||||
|
|
||||||
rem put a messages_xx.only(eg messages_zh.only) into locale folder
|
|
||||||
rem this script will only touch the po file(eg zh) you specified, leaving other po files untact.
|
|
||||||
echo [tip] Puting a messages_{LangCode}.only (eg messages_zh.only)
|
|
||||||
echo into locale folder will restrict the PO file update
|
|
||||||
echo process to your choosen language ONLY.
|
|
||||||
for %%i in (..\locale\*.only) do set PO=%%~ni
|
|
||||||
echo [info] %PO%.po found, will ONLY update file : %PO%.po
|
|
||||||
for %%i in (..\locale\*.po) do if not %%~ni==%PO% ren %%i %%~ni.po-
|
|
||||||
|
|
||||||
call sh --login %cd%\bmsg.sh
|
|
||||||
|
|
||||||
for %%i in (..\locale\*.po-) do if not %%~ni==%PO% ren %%i %%~ni.po
|
|
||||||
goto end
|
|
||||||
|
|
||||||
:updateALL
|
|
||||||
call sh --login %cd%\bmsg.sh
|
|
||||||
|
|
||||||
:end
|
|
||||||
echo End of Message Bundling
|
|
@@ -18,6 +18,17 @@ then
|
|||||||
POUPDATE=1
|
POUPDATE=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# on windows, one must specify the path of commnad find
|
||||||
|
# since windows has its own retarded version of find.
|
||||||
|
if which find|grep -q -i windows ; then
|
||||||
|
export PATH=.:/bin:/usr/local/bin:$PATH
|
||||||
|
fi
|
||||||
|
# Fast mode - update ondemond
|
||||||
|
echo Placing a file named messages_{LangCode}.only in locale folder,
|
||||||
|
echo will limit .po file update to the language specified by {LangCode}.
|
||||||
|
LG2=$(find ../locale -iname messages_*.only|tail -1)
|
||||||
|
[ LG2 ] && LG2=${LG2#../locale/messages_} && LG2=${LG2%.only}
|
||||||
|
|
||||||
# add ../java/ so the refs will work in the po file
|
# add ../java/ so the refs will work in the po file
|
||||||
JPATHS="../java/src ../jsp/WEB-INF"
|
JPATHS="../java/src ../jsp/WEB-INF"
|
||||||
for i in ../locale/messages_*.po
|
for i in ../locale/messages_*.po
|
||||||
@@ -26,6 +37,11 @@ do
|
|||||||
LG=${i#../locale/messages_}
|
LG=${i#../locale/messages_}
|
||||||
LG=${LG%.po}
|
LG=${LG%.po}
|
||||||
|
|
||||||
|
# skip, if specified
|
||||||
|
if [ $LG2 ]; then
|
||||||
|
[ $LG != $LG2 ] && continue || echo INFO: Language update is set to [$LG2] only.
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$POUPDATE" = "1" ]
|
if [ "$POUPDATE" = "1" ]
|
||||||
then
|
then
|
||||||
# make list of java files newer than the .po file
|
# make list of java files newer than the .po file
|
||||||
|
@@ -1,17 +0,0 @@
|
|||||||
#
|
|
||||||
# Update messages_xx.po and messages_xx.class files,
|
|
||||||
# from both java and jsp sources.
|
|
||||||
# Requires installed programs xgettext, msgfmt, msgmerge, and find.
|
|
||||||
# zzz - public domain
|
|
||||||
#
|
|
||||||
|
|
||||||
## launching sh.exe with -login parameter will open a shell with the current path always pointing to \bin\
|
|
||||||
## need to cd into our orignal path - where we call sh.exe from.
|
|
||||||
|
|
||||||
cd $CALLFROM
|
|
||||||
## echo $PWD
|
|
||||||
|
|
||||||
## except this everything is the same with bundle-message.sh
|
|
||||||
## walking - public domain :-D
|
|
||||||
|
|
||||||
source bundle-messages.sh $PARAS
|
|
@@ -80,13 +80,13 @@
|
|||||||
|
|
||||||
<!-- Update the messages_*.po files.
|
<!-- Update the messages_*.po files.
|
||||||
We need to supply the bat file for windows, and then change the fail property to true -->
|
We need to supply the bat file for windows, and then change the fail property to true -->
|
||||||
<exec executable="sh" osfamily="unix" failifexecutionfails="false" >
|
<exec executable="sh" osfamily="unix" failifexecutionfails="true" >
|
||||||
<arg value="./bundle-messages.sh" />
|
<arg value="./bundle-messages.sh" />
|
||||||
</exec>
|
</exec>
|
||||||
<exec executable="sh" osfamily="mac" failifexecutionfails="false" >
|
<exec executable="sh" osfamily="mac" failifexecutionfails="true" >
|
||||||
<arg value="./bundle-messages.sh" />
|
<arg value="./bundle-messages.sh" />
|
||||||
</exec>
|
</exec>
|
||||||
<exec executable="sh" osfamily="windows" failifexecutionfails="false" >
|
<exec executable="sh" osfamily="windows" failifexecutionfails="true" >
|
||||||
<arg value="./bundle-messages.sh" />
|
<arg value="./bundle-messages.sh" />
|
||||||
</exec>
|
</exec>
|
||||||
<!-- jar again to get the latest messages_*.class files -->
|
<!-- jar again to get the latest messages_*.class files -->
|
||||||
|
@@ -1,28 +0,0 @@
|
|||||||
@echo off
|
|
||||||
set Callfrom=%cd%
|
|
||||||
set Paras=%1
|
|
||||||
|
|
||||||
rem before calling make sure you have msys and mingw 's "bin" path
|
|
||||||
rem in your current searching path
|
|
||||||
rem type "set path" to check
|
|
||||||
if not exist ..\locale\*.only goto updateALL
|
|
||||||
|
|
||||||
rem put a messages_xx.only(eg messages_zh.only) into locale folder
|
|
||||||
rem this script will only touch the po file(eg zh) you specified, leaving other po files untact.
|
|
||||||
echo [tip] Puting a messages_{LangCode}.only (eg messages_zh.only)
|
|
||||||
echo into locale folder will restrict the PO file update
|
|
||||||
echo process to your choosen language ONLY.
|
|
||||||
for %%i in (..\locale\*.only) do set PO=%%~ni
|
|
||||||
echo [info] %PO%.only found, will ONLY update file : %PO%.po
|
|
||||||
for %%i in (..\locale\*.po) do if not %%~ni==%PO% ren %%i %%~ni.po-
|
|
||||||
|
|
||||||
call sh --login %cd%\bmsg.sh
|
|
||||||
|
|
||||||
for %%i in (..\locale\*.po-) do if not %%~ni==%PO% ren %%i %%~ni.po
|
|
||||||
goto end
|
|
||||||
|
|
||||||
:updateALL
|
|
||||||
call sh --login %cd%\bmsg.sh
|
|
||||||
|
|
||||||
:end
|
|
||||||
echo End of Message Bundling
|
|
@@ -1,17 +0,0 @@
|
|||||||
#
|
|
||||||
# Update messages_xx.po and messages_xx.class files,
|
|
||||||
# from both java and jsp sources.
|
|
||||||
# Requires installed programs xgettext, msgfmt, msgmerge, and find.
|
|
||||||
# zzz - public domain
|
|
||||||
#
|
|
||||||
|
|
||||||
## launching sh.exe with -login parameter will open a shell with the current path always pointing to \bin\
|
|
||||||
## need to cd into our orignal path - where we call sh.exe from.
|
|
||||||
|
|
||||||
cd $CALLFROM
|
|
||||||
## echo $PWD
|
|
||||||
|
|
||||||
## except this everything is the same with bundle-message.sh
|
|
||||||
## walking - public domain :-D
|
|
||||||
|
|
||||||
source bundle-messages.sh $PARAS
|
|
@@ -80,15 +80,14 @@
|
|||||||
<target name="bundle" depends="compile, precompilejsp">
|
<target name="bundle" depends="compile, precompilejsp">
|
||||||
<!-- Update the messages_*.po files.
|
<!-- Update the messages_*.po files.
|
||||||
We need to supply the bat file for windows, and then change the fail property to true -->
|
We need to supply the bat file for windows, and then change the fail property to true -->
|
||||||
<exec executable="sh" osfamily="unix" failifexecutionfails="false" >
|
<exec executable="sh" osfamily="unix" failifexecutionfails="true" >
|
||||||
<arg value="./bundle-messages.sh" />
|
<arg value="./bundle-messages.sh" />
|
||||||
</exec>
|
</exec>
|
||||||
<exec executable="sh" osfamily="mac" failifexecutionfails="false" >
|
<exec executable="sh" osfamily="mac" failifexecutionfails="true" >
|
||||||
<arg value="./bundle-messages.sh" />
|
<arg value="./bundle-messages.sh" />
|
||||||
</exec>
|
</exec>
|
||||||
<exec executable="cmd" osfamily="windows" failifexecutionfails="false" >
|
<exec executable="sh" osfamily="windows" failifexecutionfails="true" >
|
||||||
<arg value="/c" />
|
<arg value="./bundle-messages.sh" />
|
||||||
<arg value="bundle-messages.bat" />
|
|
||||||
</exec>
|
</exec>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
@@ -102,9 +101,8 @@
|
|||||||
<arg value="./bundle-messages.sh" />
|
<arg value="./bundle-messages.sh" />
|
||||||
<arg value="-p" />
|
<arg value="-p" />
|
||||||
</exec>
|
</exec>
|
||||||
<exec executable="cmd" osfamily="windows" failifexecutionfails="true" >
|
<exec executable="sh" osfamily="windows" failifexecutionfails="true" >
|
||||||
<arg value="/c" />
|
<arg value="./bundle-messages.sh" />
|
||||||
<arg value="bundle-messages.bat" />
|
|
||||||
<arg value="-p" />
|
<arg value="-p" />
|
||||||
</exec>
|
</exec>
|
||||||
</target>
|
</target>
|
||||||
|
@@ -1,28 +0,0 @@
|
|||||||
@echo off
|
|
||||||
set Callfrom=%cd%
|
|
||||||
set Paras=%1
|
|
||||||
|
|
||||||
rem before calling make sure you have msys and mingw 's "bin" path
|
|
||||||
rem in your current searching path
|
|
||||||
rem type "set path" to check
|
|
||||||
if not exist ..\locale\*.only goto updateALL
|
|
||||||
|
|
||||||
rem put a messages_xx.only(eg messages_zh.only) into locale folder
|
|
||||||
rem this script will only touch the po file(eg zh) you specified, leaving other po files untact.
|
|
||||||
echo [tip] Puting a messages_{LangCode}.only (eg messages_zh.only)
|
|
||||||
echo into locale folder will restrict the PO file update
|
|
||||||
echo process to your choosen language ONLY.
|
|
||||||
for %%i in (..\locale\*.only) do set PO=%%~ni
|
|
||||||
echo [info] %PO%.only found, will ONLY update file : %PO%.po
|
|
||||||
for %%i in (..\locale\*.po) do if not %%~ni==%PO% ren %%i %%~ni.po-
|
|
||||||
|
|
||||||
call sh --login %cd%\bmsg.sh
|
|
||||||
|
|
||||||
for %%i in (..\locale\*.po-) do if not %%~ni==%PO% ren %%i %%~ni.po
|
|
||||||
goto end
|
|
||||||
|
|
||||||
:updateALL
|
|
||||||
call sh --login %cd%\bmsg.sh
|
|
||||||
|
|
||||||
:end
|
|
||||||
echo End of Message Bundling
|
|
@@ -18,6 +18,17 @@ then
|
|||||||
POUPDATE=1
|
POUPDATE=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# on windows, one must specify the path of commnad find
|
||||||
|
# since windows has its own retarded version of find.
|
||||||
|
if which find|grep -q -i windows ; then
|
||||||
|
export PATH=.:/bin:/usr/local/bin:$PATH
|
||||||
|
fi
|
||||||
|
# Fast mode - update ondemond
|
||||||
|
echo Placing a file named messages_{LangCode}.only in locale folder,
|
||||||
|
echo will limit .po file update to the language specified by {LangCode}.
|
||||||
|
LG2=$(find ../locale -iname messages_*.only|tail -1)
|
||||||
|
[ LG2 ] && LG2=${LG2#../locale/messages_} && LG2=${LG2%.only}
|
||||||
|
|
||||||
# add ../src/ so the refs will work in the po file
|
# add ../src/ so the refs will work in the po file
|
||||||
JPATHS="../src/java/ ../src/tmp/"
|
JPATHS="../src/java/ ../src/tmp/"
|
||||||
for i in ../locale/messages_*.po
|
for i in ../locale/messages_*.po
|
||||||
@@ -26,6 +37,11 @@ do
|
|||||||
LG=${i#../locale/messages_}
|
LG=${i#../locale/messages_}
|
||||||
LG=${LG%.po}
|
LG=${LG%.po}
|
||||||
|
|
||||||
|
# skip, if specified
|
||||||
|
if [ $LG2 ]; then
|
||||||
|
[ $LG != $LG2 ] && continue || echo INFO: Language update is set to [$LG2] only.
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$POUPDATE" = "1" ]
|
if [ "$POUPDATE" = "1" ]
|
||||||
then
|
then
|
||||||
# make list of java files newer than the .po file
|
# make list of java files newer than the .po file
|
||||||
|
Reference in New Issue
Block a user