Browse Source

Fix init-po-files to work with new SVN versions.

master
Andrius Štikonas 8 years ago
parent
commit
2551f9f5a2
  1. 7
      init-po-files
  2. 1
      obsolete

7
init-po-files

@ -31,7 +31,7 @@ else
fi
wdir="`pwd`"
cd $pot
cd "$pot"
for dir in `ls`; do
cd "$dir"
podir="$wdir/$messages/$dir"
@ -44,7 +44,10 @@ for dir in `ls`; do
if [ ! -e "$podir/$po" ]; then
echo -e $RED"$dir/$po"$ENDCOLOR
msginit -i "$file" -o "$podir/$po" --no-translator
svn add "$podir/$po"
echo "Adding $podit/$po"
cd "$podir"
svn add "$po"
cd "$wdir/$pot/$dir"
sed -ie 's/\"Plural-Forms: nplurals=3; plural=(n%10==1 \&\& n%100!=11 ? 0 : n%10>=2 \&\& (n"/"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : n%10>=2 \&\& (n%100<10 || n"/
s/\"%100<10 || n%100>=20) ? 1 : 2);\\n\"/"%100>=20) ? 1 : n%10==0 || (n%100>10 \&\& n%100<20) ? 2 : 3);\\n"/
/\"Language: lt\\n\"/d' "$podir/$po"

1
obsolete

@ -27,6 +27,7 @@ else
folder="trunk"
fi
# posieve remove-obsolete $folder
for po in `find -L "$folder" -name "*.po"`; do
msgattrib --no-obsolete "$po" > "$po".temp
mv "$po".temp "$po"

Loading…
Cancel
Save