mirror of https://github.com/BOINC/boinc.git
LOC: Attempt to discard fuzzy matched strings.
It isn't clear to me right now if Pootle will attempt to read the newer po file before applying the template.
This commit is contained in:
parent
f438e7f297
commit
5f1182d36b
|
@ -9,6 +9,52 @@ projdir=/home/boincadm/pootle/po/$projname
|
|||
cd $projdir
|
||||
|
||||
|
||||
# Determine if we need to update the various languages using the templates.
|
||||
# This will be done by the use of a tag file which should have a matching
|
||||
# timestamp as the template files. If the timestamps do not match update all
|
||||
# languages.
|
||||
for file in `find -name '*.pot'` ; do
|
||||
template_rootname=`basename $file .pot`
|
||||
template_name=${projdir}/templates/${template_rootname}
|
||||
|
||||
# Check to see if the file exists, if not create it
|
||||
if test ! -e ${template_name}.flag
|
||||
then
|
||||
cp ${template_name}.pot ${template_name}.flag
|
||||
fi
|
||||
|
||||
# If the modification timestamps don't match then update all the languages
|
||||
if test ${template_name}.pot -nt ${template_name}.flag
|
||||
then
|
||||
execute_update=true
|
||||
fi
|
||||
done
|
||||
|
||||
if test "${execute_update}" = "true"
|
||||
then
|
||||
|
||||
for file in `find -name '*.po'` ; do
|
||||
dir=`dirname $file`
|
||||
locale=`basename $dir`
|
||||
po_name=`basename $file .po`
|
||||
|
||||
msgmerge --no-fuzzy-matching --update ${locale}/${po_name}.po templates/${po_name}.pot
|
||||
|
||||
done
|
||||
|
||||
fi
|
||||
|
||||
for file in `find -name '*.pot'` ; do
|
||||
template_rootname=`basename $file .pot`
|
||||
template_name=${projdir}/templates/${template_rootname}
|
||||
|
||||
# Touch each file to adjust timestamps
|
||||
touch ${template_name}.pot
|
||||
touch ${template_name}.flag
|
||||
|
||||
done
|
||||
|
||||
|
||||
# Iterrate through the various PO files looking for those that need to be compiled.
|
||||
#
|
||||
for file in `find -name 'BOINC-Manager.po'` ; do
|
||||
|
@ -41,7 +87,7 @@ for file in `find -name 'BOINC-Client.po'` ; do
|
|||
then
|
||||
|
||||
# Compile the PO file into an MO file.
|
||||
pocompile ${template_name}.po ${template_name}.mo > /dev/null 2> /dev/null
|
||||
pocompile ${template_name}.po ${template_name}.mo
|
||||
|
||||
# Touch each file to adjust timestamps
|
||||
touch ${template_name}.po
|
||||
|
@ -62,7 +108,7 @@ for file in `find -name 'BOINC-Web.po'` ; do
|
|||
then
|
||||
|
||||
# Compile the PO file into an MO file.
|
||||
pocompile ${template_name}.po ${template_name}.mo > /dev/null 2> /dev/null
|
||||
pocompile ${template_name}.po ${template_name}.mo
|
||||
|
||||
# Touch each file to adjust timestamps
|
||||
touch ${template_name}.po
|
||||
|
@ -83,7 +129,7 @@ for file in `find -name 'BOINC-Setup.po'` ; do
|
|||
then
|
||||
|
||||
# Compile the PO file into an MO file.
|
||||
pocompile ${template_name}.po ${template_name}.mo > /dev/null 2> /dev/null
|
||||
pocompile ${template_name}.po ${template_name}.mo
|
||||
|
||||
# Touch each file to adjust timestamps
|
||||
touch ${template_name}.po
|
||||
|
@ -93,50 +139,4 @@ for file in `find -name 'BOINC-Setup.po'` ; do
|
|||
done
|
||||
|
||||
|
||||
# Determine if we need to update the various languages using the templates.
|
||||
# This will be done by the use of a tag file which should have a matching
|
||||
# timestamp as the template files. If the timestamps do not match update all
|
||||
# languages.
|
||||
for file in `find -name '*.pot'` ; do
|
||||
template_rootname=`basename $file .pot`
|
||||
template_name=${projdir}/templates/${template_rootname}
|
||||
|
||||
# Check to see if the file exists, if not create it
|
||||
if test ! -e ${template_name}.flag
|
||||
then
|
||||
cp ${template_name}.pot ${template_name}.flag
|
||||
fi
|
||||
|
||||
# If the modification timestamps don't match then update all the languages
|
||||
if test ${template_name}.pot -nt ${template_name}.flag
|
||||
then
|
||||
execute_update=true
|
||||
fi
|
||||
done
|
||||
|
||||
if test "${execute_update}" = "true"
|
||||
then
|
||||
|
||||
for file in `find -name '*.po'` ; do
|
||||
dir=`dirname $file`
|
||||
locale=`basename $dir`
|
||||
po_name=`basename $file .po`
|
||||
|
||||
msgmerge --update ${locale}/${po_name}.po templates/${po_name}.pot
|
||||
|
||||
done
|
||||
|
||||
fi
|
||||
|
||||
for file in `find -name '*.pot'` ; do
|
||||
template_rootname=`basename $file .pot`
|
||||
template_name=${projdir}/templates/${template_rootname}
|
||||
|
||||
# Touch each file to adjust timestamps
|
||||
touch ${template_name}.pot
|
||||
touch ${template_name}.flag
|
||||
|
||||
done
|
||||
|
||||
|
||||
exit 0
|
||||
|
|
Loading…
Reference in New Issue