1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-05 02:39:23 +02:00

updated resources checking scripts

This commit is contained in:
Nikolay Pultsin 2012-04-12 14:57:29 +02:00
parent 13190d2788
commit 7e8bd11ea9
4 changed files with 4 additions and 2 deletions

View file

@ -0,0 +1,18 @@
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>
<xsl:strip-space elements="*"/>
<xsl:template match="comment()"/>
<xsl:template match="node">
<xsl:if test="@name != ''">
<node name="{@name}">
<xsl:apply-templates/>
</node>
</xsl:if>
</xsl:template>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>

10
scripts/resources/stats.sh Executable file
View file

@ -0,0 +1,10 @@
#!/bin/sh
for file in ../assets/resources/application/*.xml; do
lfile=`echo $file | sed "s/application/zlibrary/"`
lang=`basename $file .xml;`
all_count=`fgrep 'value="' $file | wc | awk '{ print $1 }'`
all_lcount=`fgrep 'value="' $lfile | wc | awk '{ print $1 }'`
neg_count=`fgrep toBeTranslated $file | wc | awk '{ print $1 }'`
neg_lcount=`fgrep toBeTranslated $lfile | wc | awk '{ print $1 }'`
echo $lang $(($neg_count+$neg_lcount)) of $(($all_count+$all_lcount))
done

15
scripts/resources/update.sh Executable file
View file

@ -0,0 +1,15 @@
#!/bin/sh
if [ "$1" == "" ]; then
part=application
else
part=$1
fi
for file in ../../assets/resources/$part/*.xml; do
xsltproc clean.xslt $file > `basename $file`;
done
for file in *.xml; do
diff $file en.xml > `basename $file .xml`.diff;
done
rm *.xml