Re: Image files do not honour ALL_LINGUAS during installation.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello.

Thank you all for feedback. Roman, Sven I've fixed patch. The following
modifications were done:

 * Always install pictures in listed in IMAGE_DIRS (images for en)
 * find does not use -wholename option. Axel, I hope grep exist on
darwin / Mac OS (?) Could you, please, test this patch?
 * As Martin (in our bugzilla) suggested process of copying should abort
on error

With this changes I'd like to point your attention at two things:
1. Now it's possible to create "en" directory for images which are
required only for English language. Build process will not install this
images if "en" it not in ALL_LINGUAS
2. If you ever create new base images subdirectory (in other words
subdirectory which is *not* $lang subdirectory) it's necessary to list
that directory in IMAGE_DIRS inside Makefile.am. This change I've
documented in README (another patch in attachment).

Kolbjørn, if this patch does not work for you, please, give me a little
bit more details. At least I need to know what do you have in
ALL_LINGUAS.

> Btw. a good place to paste a new patch would be bugzilla.

Ok. It's not clear what does website component means either this is
default for all languages or does it affects www site only, but in any
case, here it is:
http://bugzilla.gnome.org/401263

BTW. I found that version 0.12 for gimp-help exist in bugzilla but I
have not found this release on download page. Could anybody clarify on
that? I'm new to list. Is there supposed to be any announce on this
list?

Peter.
--- README.orig	2007-01-27 10:42:41.000000000 +0300
+++ README	2007-01-27 10:55:28.000000000 +0300
@@ -70,7 +70,10 @@
   * use default fonts like Bitstream Vera Sans
   * crop the window manager borders
   * provide your source images (eg. for making new screenshots in other
-    languages) 
+    languages)
+  * any time you create new base subdirectory below images directory (that is
+    *not* language specific directory) do not forgive to add it into IMAGE_DIRS
+    inside Makefile.am
 
 
 OMF Files
--- Makefile.am.orig	2006-12-02 14:23:01.000000000 +0300
+++ Makefile.am	2007-01-27 10:34:19.000000000 +0300
@@ -3,17 +3,19 @@
 STAMP_DIR = stamps
 
 IMAGE_DIRS = \
+	.		\
+	callouts	\
 	dialogs		\
 	dialogs/examples\
 	filters		\
 	filters/examples\
 	glossary	\
+	math		\
+	menus		\
+	preferences	\
 	tool-options	\
 	toolbox		\
-	callouts	\
-	preferences	\
-	using           \
-	menus
+	using
 
 IMAGE_FILES = \
 	$(wildcard $(top_srcdir)/images/*.png)		\
@@ -93,9 +95,20 @@
 	@echo '*** Creating directories ***'
 
     # we care only for HTML here
-	@for name in `find $(top_srcdir)/images/ -name "*.png" -o -name "*.jpg"`;\
-		do $(mkinstalldirs) `dirname html/$$name`; \
+    # I suppose IMAGE_DIRS to be updated each time whenever you add new image directory
+    # and it should not list empty directories
+	@echo 'Creating base image dirrectories.'; \
+	for dir in $(IMAGE_DIRS); do \
+	  $(mkinstalldirs) html/images/$$dir; \
+	done
+
+	@for lang in $(ALL_LINGUAS); do \
+	  echo 'Creating image dirrectories for language: '$$lang; \
+	  for file in `find images/ -name "*.png" -o -name "*.jpg" | grep "/$$lang/"`; do \
+	    $(mkinstalldirs) `dirname html/$$file`; \
+	  done; \
 	done;
+
   # only create a link in the PDF directory, because image files are
   # included in the PDF anyways
 	@echo '*** Creating link in PDF directory to images ***'
@@ -133,8 +146,20 @@
 	@echo '*** Copying images ***'
 
   # copy the image files to html directory
-	@for name in `find $(top_srcdir)/images/ -name "*.png" -o -name "*.jpg"`;\
-    do cp $$name html/$$name; \
+	@echo 'Copying common images.'; \
+	for dir in $(IMAGE_DIRS); do \
+	  for file in `echo $(top_srcdir)/images/$$dir/*.png` `echo $(top_srcdir)/images/$$dir/*.jpg`; do \
+	    if test -f $$file ; then \
+	      cp $$file html/$$file || exit $$?; \
+	    fi; \
+	  done; \
+	done;
+
+	@for lang in $(ALL_LINGUAS); do \
+	  echo 'Copying images for '$$lang ; \
+	  for file in `find images/ -name "*.png" -o -name "*.jpg" | grep "/$$lang/"`; do \
+	    cp $$file html/$$file || exit $$?; \
+	  done; \
 	done;
 
 	@touch $@

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Gimp-docs mailing list
Gimp-docs@xxxxxxxxxxxxxxxxxxxxxx
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-docs

[Index of Archives]     [Video For Linux]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [Scanners]     [GEGL]     [Gimp's Home]     [Gimp on Windows]     [Steve's Art]     [Webcams]

  Powered by Linux