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
--------------------------------------------------------------------
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@suse.cz
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@opensuse.org
For additional commands, e-mail: yast-devel+help@opensuse.org