Bug 1187036 - RPM find_lang does not support ast (Asturian)
Summary: RPM find_lang does not support ast (Asturian)
Status: NEW
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Michael Schröder
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-08 11:06 UTC by Ferdinand Thiessen
Modified: 2021-06-09 10:19 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ferdinand Thiessen 2021-06-08 11:06:41 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
Comment 1 Ferdinand Thiessen 2021-06-08 12:52:34 UTC
Other languages where I encountered this one are:
ast, fil, kab, and pam
Comment 2 Michael Schröder 2021-06-09 08:47:02 UTC
It seems to only remove stuff in /usr/share/locale and /usr/share/help.

What exactly is the build error you get?
Comment 3 Ferdinand Thiessen 2021-06-09 09:26:30 UTC
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
Comment 4 Michael Schröder 2021-06-09 09:39:52 UTC
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.
Comment 5 Ferdinand Thiessen 2021-06-09 10:19:06 UTC
> 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 :)