Changes to keep locale/update_po_files.sh running correctly

This commit is contained in:
Paul Licameli 2021-05-21 21:39:30 -04:00
commit 945d3d1a8f
2 changed files with 8 additions and 4 deletions

View File

@ -1,7 +1,10 @@
#!/bin/sh
# Run this script with locale as the current directory
set -o errexit
echo ";; Recreating audacity.pot using .h, .cpp and .mm files"
for path in ../modules/mod-script* ../modules/mod-nyq* ../include ../src ; do find $path -name \*.h -o -name \*.cpp -o -name \*.mm ; done | LANG=c sort | \
for path in ../modules/mod-* ../libraries/lib-* ../include ../src ; do
find $path -name \*.h -o -name \*.cpp -o -name \*.mm
done | LANG=c sort | \
sed -E 's/\.\.\///g' |\
xargs xgettext \
--default-domain=audacity \
@ -33,14 +36,15 @@ if test "${AUDACITY_ONLY_POT:-}" = 'y'; then
fi
echo ";; Updating the .po files - Updating Project-Id-Version"
for i in *.po; do
sed -i '/^"Project-Id-Version:/c\"Project-Id-Version: audacity 3.0.3\\n"' $i
sed -e '/^"Project-Id-Version:/c\
"Project-Id-Version: audacity 3.0.3\\n"' $i > TEMP; mv TEMP $i
done
echo ";; Updating the .po files"
sed 's/.*/echo "msgmerge --lang=& &.po audacity.pot -o &.po";\
msgmerge --lang=& &.po audacity.pot -o &.po;/g' LINGUAS | bash
echo ";; Removing '#~|' (which confuse Windows version of msgcat)"
for i in *.po; do
sed -i '/^#~|/d' $i
sed '/^#~|/d' $i > TEMP; mv TEMP $i
done
echo ""
echo ";;Translation updated"

View File

@ -1213,7 +1213,7 @@ bool CommandManager::HandleCommandEntry(AudacityProject &project,
mNiceName = NiceName;
}
else {
mNiceName = XO("");
mNiceName = {};
}
const CommandContext context{ project, evt, entry->index, entry->parameter };