copy any required MO (i18n) files from the ardour stack into the bundle
authorPaul Davis <paul@linuxaudiosystems.com>
Mon, 18 Jun 2012 20:30:11 +0000 (20:30 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Mon, 18 Jun 2012 20:30:11 +0000 (20:30 +0000)
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@12765 d708f5d6-7413-0410-9779-e7cbd77b26cf

tools/linux_packaging/build

index a8e2d6a35cc6be9cf0468057fb70db735028d19b..1466e78418ac7658217db649e96a8b80eb79f1ee 100755 (executable)
@@ -284,6 +284,10 @@ if test x$WITH_NLS != x ; then
                cp $file $Locale/$lang/LC_MESSAGES/libardour.mo
        done
 
+        #
+        # copy any translations from the GTK stack
+        # 
+
        GTK_MESSAGES="atk10.mo gdk-pixbuf.mo gtk20-properties.mo gtk20.mo atk10.mo glib20.mo"
        GTKLOCALEROOT=$GTKSTACK_ROOT/share/locale
 
@@ -301,6 +305,28 @@ if test x$WITH_NLS != x ; then
                        fi
                done
        done
+
+        #
+        # now any translations from the Ardour stack
+        # 
+
+        ARDOURSTACK_MESSAGES="libgnomecanvas-2.0.mo"
+        ARDOURSTACK_LOCALEROOT=$ARDOURSTACK_ROOT/share/local
+
+       for l in $LINGUAS ; do
+            for MO in $ARDOURSTACK_MESSAGES  ; do 
+                if [ -f $ARDOURSTACK_LOCALEROOT/$l/LC_MESSAGES/$MO ] ; then 
+                    cp $ARDOURSTACK_LOCALEROOT/$l/LC_MESSAGES/$MO $Locale/$l/LC_MESSAGES
+                else
+               # try with just the language spec
+                   just_lang=`echo $l | sed 's/_[A-Z][A-Z]$//'`
+                   if [ -f $ARDOURSTACK_LOCALEROOT/$just_lang/LC_MESSAGES/$MO ] ; then
+                       cp $ARDOURSTACK_LOCALEROOT/$just_lang/LC_MESSAGES/$MO $Locale/$just_lang/LC_MESSAGES
+                   fi
+               fi
+            done
+        done
+
 else
        echo "Skipping NLS support"
 fi