1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-02 08:39:46 +02:00
audacity/locale/update_po_files.sh
Emily Mabrey 2f316d5bc4
Rename project in many places; Replace Most Project Logos; Refactor About Tenacity... Dialog (#276)
Add `locale/en.po` file.
Add English to `locale/LINGUAS` list.
Partially duplicate `msgid`s to `msgstr`s in English locale enable eventual key `msgid` changes
Replace former project name with Tenacity in English locale.
Replace former project website with Tenacity compatible usages in English locale.
Modify `AboutDialog.h` by renaming variables.
Modify `AboutDialog.cpp` by replacing usage of pre-fork name in Strings.
Modify AddBuildInfoRow methods to be static in About dialog.
Make License text const in About dialog.
Make pre-fork credits different in About dialog.
Begin adding Tenacity specific credits
Macros starting with `__` are reserved, so I removed the `__` on the About Dialog guard macro.
Remove `AboutDialog::` from usage of `Role` in `AboutDialog.h`
Refactor overly long generator method into separate methods in `AboutDialog.(h|cpp)`
Begin adding Tenacity developer information
Cleanup layout of `AboutDialog.h` and `AboutDialog.cpp`
Add `safedelete` macro to compliment odd `safenew` macro
Add `enum` to `ShuttleGui.cpp` to make it more clear what `Prop` method is doing.
Remove a ton of pointless and/or redunant `#ifdef` usage
Remove pointless singleton in AboutDialog
Make AboutDialog modal on MacOS
Fix reference type use of `auto` in `AudacityApp` b/c it makes unintentional copy.
Update XPM and PNG images using Tenacity assets
Update ICO images using Tenacity assets.
Fix Windows resource script that improperly used `winuser.h` import.
Add `*.aps` to gitignore to prevent IDE RC pre-load file from being committed.
Add default values for pre-processor constants in `tenacity.rc`.
Make changes needed for `Tenacity.exe` binary
Add 8x8 PNG to Windows ICO files
Replace project name in various CMake and CPack file.
Replace project name in various directory structures.
Replace project name in various OS-specific build files.
Replace project name in various documentation files.
Update the PO and POT files using the script.
Fix places where a `.desktop` file was used on Linux.
Replace title of project windows.
Make splash screen click through to `tenacityaudio.org`.
Remove ® from `AboutDialog.cpp`
Modify copyright message in `AboutDialog.cpp`

Signed-off-by: Emily Mabrey <emilymabrey93@gmail.com>
2021-07-20 19:46:29 -04:00

56 lines
1.9 KiB
Bash
Executable File

#!/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-* ../libraries/lib-* ../include ../src ../crashreports ; do
find $path -name \*.h -o -name \*.cpp -o -name \*.mm
done | LANG=c sort | \
sed -E 's/\.\.\///g' |\
xargs xgettext \
--no-wrap \
--default-domain=tenacity \
--directory=.. \
--keyword=_ --keyword=XO --keyword=XC:1,2c --keyword=XXO --keyword=XXC:1,2c --keyword=XP:1,2 --keyword=XPC:1,2,4c \
--add-comments=" i18n" \
--add-location=file \
--copyright-holder='Tenacity Team' \
--package-name="tenacity" \
--package-version='3.0.3' \
--msgid-bugs-address="emabrey@tenacityaudio.org" \
--add-location=file -L C -o audacity.pot
echo ";; Adding nyquist files to audacity.pot"
for path in ../plug-ins ; do find $path -name \*.ny -not -name rms.ny; done | LANG=c sort | \
sed -E 's/\.\.\///g' |\
xargs xgettext \
--no-wrap \
--default-domain=audacity \
--directory=.. \
--keyword=_ --keyword=_C:1,2c --keyword=ngettext:1,2 --keyword=ngettextc:1,2,4c \
--add-comments=" i18n" \
--add-location=file \
--copyright-holder='Tenacity Team' \
--package-name="tenacity" \
--package-version='3.0.4' \
--msgid-bugs-address="emabrey@tenacityaudio.org" \
--add-location=file -L Lisp -j -o audacity.pot
if test "${AUDACITY_ONLY_POT:-}" = 'y'; then
return 0
fi
echo ";; Updating the .po files - Updating Project-Id-Version"
for i in *.po; do
sed -e '/^"Project-Id-Version:/c\
"Project-Id-Version: tenacity 3.0.4\\n"' $i > TEMP; mv TEMP $i
done
echo ";; Updating the .po files"
sed 's/.*/echo "msgmerge --lang=& &.po audacity.pot -o &.po";\
msgmerge --no-wrap --lang=& &.po audacity.pot -o &.po;/g' LINGUAS | bash
echo ";; Removing '#~|' (which confuse Windows version of msgcat)"
for i in *.po; do
sed '/^#~|/d' $i > TEMP; mv TEMP $i
done
echo ""
echo ";;Translation updated"
echo ""
head -n 11 audacity.pot | tail -n 3
wc -l audacity.pot