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

Re: %find_lang appending to file instead overwriting



On 2003-09-04(Thu) 03:07:02 +0200, Dag Wieers wrote:
> Hi,
> 
> Would there be an objection to change find_lang.sh so that it appends to a 
> file instead of overwriting ?
> 
> This specific case (and I've had some others in the past) has got 
> locale-files for several different programs. But the %files section can 
> only be used once per package.

Yes, I would second that too. GIMP, for example, uses several
translation domains at once, and it's pretty cumbersome to create
several file lists containing translations and then cat it into a big
list afterwards.

Or alternatively, we can add a --all-name switch to find_lang, so that
it can search for ALL locale files in $datadir/locale/ , instead of just
finding translation files with some particular name.

Abel




> So it is impossible to only use the macros in this case. The find-lang.sh 
> allows for using another file but it replaces an existing one.
> 
> The following example (%define name childsplay) explains it better:
> 
> 	%find_lang %{name}
> 	%find_lang letters %{name}.lang
> 	%find_lang memory %{name}.lang
> 
> now adds the locale files from childsplay, letters and memory to 
> childsplay.lang, but whereas I would have it append, it is now 
> overwritten. (Only the memory locale files are in childsplay.lang).
> 
> It would be nice if the following patch could be applied:
> 
> 	--- find-lang.sh.orig   2003-02-27 22:23:59.000000000 +0100
> 	+++ find-lang.sh        2003-09-04 03:05:46.000000000 +0200
> 	@@ -84,7 +84,7 @@
> 	 '"$GNOME"'s:\(.*/gnome/help/'"$NAME"'/\)\([^/_]\+\):%lang(\2) \1\2:
> 	 s:^\([^%].*\)::
> 	 s:%lang(C) ::
> 	-' > $MO_NAME
> 	+' >> $MO_NAME
> 	 
> 	 find $TOP_DIR -type d|sed '
> 	 s:'"$TOP_DIR"'::
> 
> Kind regards,
> --   dag wieers,  dag@wieers.com,  http://dag.wieers.com/   --
> [Any errors in spelling, tact or fact are transmission errors]
> 
> 
> _______________________________________________
> Rpm-list mailing list
> Rpm-list@redhat.com
> https://www.redhat.com/mailman/listinfo/rpm-list

-- 
Abel Cheung
Linux counter #256983   | http://counter.li.org
GPG Key: (0xC67186FF)   | http://deaddog.org/gpg.asc
Key fingerprint: 671C C7AE EFB5 110C D6D1  41EE 4152 E1F1 C671 86FF

Attachment: pgp00001.pgp
Description: PGP signature


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