Skip to content

Commit

Permalink
Skip vendored gettext files that don't exists
Browse files Browse the repository at this point in the history
After adding support for tamil, the scripts fail to package for Windows
and macOS because some of the vendored gettext files that I have to pack
into the distribution lack a translation for tamil.

If the packages lacks a translation in a language, just skip the file
and continue.
  • Loading branch information
danirod committed Dec 12, 2024
1 parent c05c529 commit 24c8727
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion build-aux/macos-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ gtk4-update-icon-cache -q -t -f "$RESOURCES_ROOT/share/icons/Adwaita"

# Add extra locales
for lang in $(cat "po/LINGUAS" | grep -v '^#'); do
cp -f $(brew --prefix)/share/locale/$lang/LC_MESSAGES/{gdk-pixbuf,gettext-runtime,glib20,gtk40,gtksourceview-5,libadwaita,shared-mime-info}.mo "$RESOURCES_ROOT/share/locale/$lang/LC_MESSAGES"
for pkg in gdk-pixbuf gettext-runtime glib20 gtk40 gtksourceview-5 libadwaita shared-mime-info; do
if [ -f $MINGW_PREFIX/share/locale/$lang/LC_MESSAGES/$pkg.mo ]; then
cp -f $(brew --prefix)/share/locale/$lang/LC_MESSAGES/$pkg.mo "$RESOURCES_ROOT/share/locale/$lang/LC_MESSAGES"
fi
done
done

# Mangle bin directory
Expand Down
6 changes: 5 additions & 1 deletion build-aux/msys-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ cp -RTn $MINGW_PREFIX/share/icons/hicolor share/icons/hicolor
cp -RTn $MINGW_PREFIX/share/gtksourceview-5 share/gtksourceview-5

for lang in $(cat "$CARTERO_ROOT_DIR/po/LINGUAS" | grep -v '^#'); do
cp -f $MINGW_PREFIX/share/locale/$lang/LC_MESSAGES/{gdk-pixbuf,gettext-runtime,glib20,gtk40,gtksourceview-5,libadwaita,shared-mime-info}.mo share/locale/$lang/LC_MESSAGES
for pkg in gdk-pixbuf gettext-runtime glib20 gtk40 gtksourceview-5 libadwaita shared-mime-info; do
if [ -f $MINGW_PREFIX/share/locale/$lang/LC_MESSAGES/$pkg.mo ]; then
cp -f $MINGW_PREFIX/share/locale/$lang/LC_MESSAGES/$pkg.mo share/locale/$lang/LC_MESSAGES
fi
end
done

cp $(ldd lib/gdk-pixbuf-2.0/2.10.0/loaders/*.dll | grep "$MINGW_PREFIX" | awk '{ print $3 }' | sort | uniq) bin/
Expand Down

0 comments on commit 24c8727

Please sign in to comment.