Overview
Request 856696 superseded
- Add subpackages: common, libeiskaltdcpp2_4, daemon, cli.
- Add separete lang subpackeges: common-lang, qt-lang.
- Change all descriptions.
- Created by 13ilya
- In state superseded
- Supersedes 856588
- Superseded by 856708
- Open review for factory-staging
- Open review for opensuse-review-team
Please check if I have created the language subpackages correctly. Especially the qt-lang subpackage.
%find_lang %{name} %{name}-qt.lang --with-qt --without-mo --all-name
Without --all-name, it does not find localization files, no matter which first parameter I specify for the find_lang macro. With --all-name, it always finds localization files, no matter what the first parameter I specify for the find_lang macro. I'm not sure if it's okay. This should work without --all-name.
Also, the qt-lang subpackage is not automatically loaded when installing qt.
Request History
13ilya created request
- Add subpackages: common, libeiskaltdcpp2_4, daemon, cli.
- Add separete lang subpackeges: common-lang, qt-lang.
- Change all descriptions.
factory-auto added opensuse-review-team as a reviewer
Please review sources
factory-auto accepted review
Check script succeeded
licensedigger accepted review
ok
Please check if I have created the language subpackages correctly. Especially the qt-lang subpackage.
%find_lang %{name} %{name}-qt.lang --with-qt --without-mo --all-name
Without --all-name, it does not find localization files, no matter which first parameter I specify for the find_lang macro. With --all-name, it always finds localization files, no matter what the first parameter I specify for the find_lang macro. I'm not sure if it's okay. This should work without --all-name.
Also, the qt-lang subpackage is not automatically loaded when installing qt.
It seems like it installs the files in a way which doesn't follow any of the patterns recognized by
/usr/lib/rpm/find-lang.sh
. With--all-name
it basically accepts everything ending in.qm
:As you only have a single lang package for that, using
--all-name
is fine here.The automatic provides handling for translation packages only works in certain circumstances (right package name and file format): https://github.com/openSUSE/rpm-config-SUSE/blob/9001ae42ea1dcdf2205ecb15d5994a41a55d0f0a/scripts/locale.prov
Here you could add
Recommends: %{name}-qt-lang
to theqt
subpackage or just put them into theqt
package directly.Thank you for your reply. It's just not clear why it works in transmission, but I don't.
https://build.opensuse.org/package/view_file/GNOME:Apps/transmission/transmission.spec?expand=1
%lang_package -n %{name}-qt
%find_lang transmission transmission-qt.lang --with-qt --without-mo %{?no_lang_C}
%files -n %{name}-qt-lang -f %{name}-qt.lang %dir %{_datadir}/%{name}/translations
I see the difference only in the last line, my localization files are in
%dir %{_datadir}/%{name}/qt/translations
but even if I specify
%find_lang %{name}/qt %{name}-qt.lang --with-qt --without-mo
This still does not work, and the find_lang macro does not write any useful information to the build log.
l="${line%%/LC_MESSAGES/*}"
If I understand correctly, this will only work with /usr/share/locale//LC_MESSAGES/.mo
> Thank you for your reply. It's just not clear why it works in transmission, but I don't.
The files in transmission are called e.g.
transmission_de.qm
, while here it's justde.qm
without the name.> If I understand correctly, this will only work with /usr/share/locale//LC_MESSAGES/.mo
Yup.
Thank you, now it's clear. :-)