Bugzilla – Bug 1187036
RPM find_lang does not support ast (Asturian)
Last modified: 2021-06-09 10:19:06 UTC
When using %find_lang macro I noticed that Asturian is not detected by find-lang.sh If I understand the macro correctly (comments in find-lang.sh) not supported languages should be deleted? Maybe I am work, but I would expect that no build error occurs when using %find_lang with valid languages like ast, e.g. /usr/share/foobar/translations/foobar_ast.qm
Other languages where I encountered this one are: ast, fil, kab, and pam
It seems to only remove stuff in /usr/share/locale and /usr/share/help. What exactly is the build error you get?
The files are simply unpacked: > [ 166s] error: Installed (but unpackaged) file(s) found: > [ 166s] /usr/share/dde-launcher/translations/dde-launcher_ast.qm > [ 166s] /usr/share/dde-launcher/translations/dde-launcher_fil.qm > [ 166s] /usr/share/dde-launcher/translations/dde-launcher_kab.qm > [ 166s] /usr/share/dde-launcher/translations/dde-launcher_pam.qm So you have to manually delete or package them like this: > %files lang -f %{_name}.lang > # unusual languages not autodetected by find_lang (boo#1187036) > %lang(ast) %{_datadir}/%{_name}/translations/dde-launcher_ast.qm > %lang(fil) %{_datadir}/%{_name}/translations/dde-launcher_fil.qm > %lang(kab) %{_datadir}/%{_name}/translations/dde-launcher_kab.qm > %lang(pam) %{_datadir}/%{_name}/translations/dde-launcher_pam.qm
Thanks. Digging into this I found that rpm upstream has already fixed this int commit 35739c2a2298e61caacb45157706bf342ffcd20e: find-lang.sh: Support long languages names for QT Most language abbreviations are just two characters but some are longer. Allow an arbiraty number of character instead of exactly two in the names of .qm files (QT translations). This brings the handling of .qm files in line with all other file types. Resolves: #1642 I'll backport this to Factory.
> commit 35739c2a2298e61caacb45157706bf342ffcd20e: > > Allow an arbiraty number of character instead of exactly two in the names > of .qm files (QT translations). Then someone from upstream did not read ISO 639-3, it is not an arbitrary number it is 2 (for ISO 639-1) or 3 for ISO 639-2 and ISO 639-3... But thank you for back porting :)