mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-09-19 07:41:26 +00:00
New better update.sh script
Kenneth
This commit is contained in:
parent
0599c6bcdf
commit
cf90517f03
45
po/update.sh
45
po/update.sh
|
@ -1,12 +1,39 @@
|
|||
#!/bin/sh
|
||||
#######################################################################
|
||||
package=nautilus
|
||||
#######################################################################
|
||||
echo "Building the $package.pot ..."
|
||||
xgettext --default-domain=$package --directory=.. \
|
||||
|
||||
PACKAGE="nautilus"
|
||||
|
||||
if [ "x$1" = "x--help" ]; then
|
||||
|
||||
echo Usage: ./update.sh langcode
|
||||
echo --help display this help and exit
|
||||
echo
|
||||
echo Examples of use:
|
||||
echo ./update.sh ----- just creates a new pot file from the source
|
||||
echo ./update.sh da -- created new pot file and updated the da.po file
|
||||
|
||||
elif [ "x$1" = "x" ]; then
|
||||
|
||||
echo "Building the $PACKAGE.pot ..."
|
||||
|
||||
xgettext --default-domain=$PACKAGE --directory=.. \
|
||||
--add-comments --keyword=_ --keyword=N_ \
|
||||
--files-from=./POTFILES.in \
|
||||
&& test ! -f $package.po \
|
||||
|| ( rm -f ./$package.pot \
|
||||
&& mv $package.po ./$package.pot )
|
||||
#######################################################################
|
||||
&& test ! -f $PACKAGE.po \
|
||||
|| ( rm -f ./$PACKAGE.pot \
|
||||
&& mv $PACKAGE.po ./$PACKAGE.pot );
|
||||
|
||||
else
|
||||
|
||||
xgettext --default-domain=$PACKAGE --directory=.. \
|
||||
--add-comments --keyword=_ --keyword=N_ \
|
||||
--files-from=./POTFILES.in \
|
||||
&& test ! -f $PACKAGE.po \
|
||||
|| ( rm -f ./PACKAGE.pot \
|
||||
&& mv $PACKAGE.po ./$PACKAGE.pot );
|
||||
|
||||
echo Now merging $1.po with $PACKAGE.pot, and creating an updated $1.po
|
||||
|
||||
mv $1.po $1.po.old && msgmerge $1.po.old $PACKAGE.pot -o $1.po \
|
||||
&& rm $1.po.old;
|
||||
|
||||
fi;
|
||||
|
|
Loading…
Reference in a new issue