Mailinglist Archive: yast-devel (233 mails)

< Previous Next >
[yast-devel] WebYaST: fixed translation packaging in WebYaST clients
  • From: Ladislav Slezak <lslezak@xxxxxxx>
  • Date: Wed, 21 Oct 2009 17:57:53 +0200
  • Message-id: <4ADF2F81.3060303@xxxxxxx>

Hi all,

I have fixed translation packaging in all WebYaST client plugins.
Here I'll briefly describe the changes:

These lines have been added to %build section:
--------------------------------------------------------------------
# remove .po files (no longer needed)
rm -rf $RPM_BUILD_ROOT/srv/www/%{pkg_user}/vendor/plugins/%{plugin_name}/po
# search locale files
%find_lang <GETTEXT_DOMAIN>
--------------------------------------------------------------------

The first command removes all .po files from the build root, they are useless
in built RPM package (they have been converted to .mo files by 'rake makemo').

The second command (%find_lang macro) searches for translation files in the
buildroot
and saves the file list to GETTEXT_DOMAIN.lang file which is used later.

GETTEXT_DOMAIN defines which files will be added to the list.


The generated file is then added to the RPM file list by -f option:
--------------------------------------------------------------------
%files -f GETTEXT_DOMAIN.lang
--------------------------------------------------------------------

Because .mo files are included in .lang file locale/ subtree can be removed
from the file list (but the top level locale/ must be added using %dir macro).


BTW simply adding /locale subdirectory to the file list is not the correct
solution,
in this case rpmlint prints lots of warnings about not used %lang macro (for
each
.mo file).


--

Best Regards

Ladislav Slez√°k
Yast Developer
------------------------------------------------------------------------
SUSE LINUX, s.r.o. e-mail: lslezak@xxxxxxx
Lihovarsk√° 1060/12 tel: +420 284 028 960
190 00 Prague 9 fax: +420 284 028 951
Czech Republic http://www.suse.cz/
--
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-devel+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups