Re: [Rpm-maint] [rpm-software-management/rpm] RPM Translation subpackage(s) (#1276)

2023-01-17 Thread Florian Festi
Closed #1276 as completed via 4c814f88d515aecf358128f6400d0ece55ff1499.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1276#event-8244084312
You are receiving this because you are subscribed to this thread.

Message ID: 
___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] RPM Translation subpackage(s) (#1276)

2020-07-22 Thread Sundeep Anand
great thanks; following https://github.com/rpm-software-management/rpm/pull/1239

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1276#issuecomment-662401107___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] RPM Translation subpackage(s) (#1276)

2020-06-22 Thread Florian Festi
> FWIW in openSUSE many packages have a "-lang" subpackage to contain all 
> translations. Those packages in turn have automated provides that translate 
> into a locale namespace for libsolv, eg. `rpm -q --provides bash-lang`:
> 
> ```
> locale(bash:es)
> ```
The (compared the to locale name space) new boolean dependencies were designed 
to be able to also cover this use case. They are not quite as sleek but a more 
general solution. So yes, we are kinda copying the SuSE solution here.



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1276#issuecomment-647546081___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] RPM Translation subpackage(s) (#1276)

2020-06-22 Thread Florian Festi
> What are the main benefits over `%lang(zh)` besides making the downloaded 
> binary RPM smaller? Is the increase in rpm-md repo metadata size worth it?

Well, there is a trade off depending on the situation. But the more different 
languages are supported and the bigger the number of translated strings is the 
more it is worth packaging translation separately.

Having this process automated we could even pick the right style of packaging 
depending on translation sizes. Or different distributions could choose their 
own policy.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1276#issuecomment-647543340___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] RPM Translation subpackage(s) (#1276)

2020-06-22 Thread Ludwig Nussel
> How do you detect a binary that will want to load some specific translations? 
> Is it just some guess or should be up to packager to fill in or?

FWIW in openSUSE many packages have a "-lang" subpackage to contain all 
translations. Those packages in turn have automated provides that translate 
into a locale namespace for libsolv, eg. `rpm -q --provides bash-lang`:
```[...]
locale(bash:es)
```

That basically instructs libsolv to install `bash-lang` if `bash` is installed 
and the system is in Spanish.
https://github.com/openSUSE/rpm-config-SUSE/blob/master/fileattrs/locale.attr
https://github.com/openSUSE/rpm-config-SUSE/blob/master/scripts/locale.prov

That mechanism would still work if splitting would be fine grained to the level 
of one locale per package.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1276#issuecomment-647512303___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] RPM Translation subpackage(s) (#1276)

2020-06-22 Thread Igor Raits
Generally you should try out #1239 , but for that you need to find out few 
things.

How do you detect a binary that will want to load some specific translations? 
Is it just some guess or should be up to packager to fill in or?


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1276#issuecomment-647477780___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] RPM Translation subpackage(s) (#1276)

2020-06-22 Thread James Cassell
What are the main benefits over `%lang(zh)` besides making the downloaded 
binary RPM smaller?  Is the increase in rpm-md repo metadata size worth it?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1276#issuecomment-647477529___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


Re: [Rpm-maint] [rpm-software-management/rpm] RPM Translation subpackage(s) (#1276)

2020-06-22 Thread Sundeep Anand
@ffesti @ignatenkobrain how do you feel about next steps?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1276#issuecomment-647321513___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint


[Rpm-maint] [rpm-software-management/rpm] RPM Translation subpackage(s) (#1276)

2020-06-18 Thread Sundeep Anand
Actually, this is subset of [Automatic (sub)package 
generators](https://github.com/rpm-software-management/rpm/issues/329) and an 
extension to https://github.com/rpm-software-management/rpm/issues/310.
However, creating this to have contained discussions.

Currently most of the RPM packaged applications ship translations with them.
And, translations take up more space (_even than fonts_) in workstations, 
fedora silverblue, and others.
Hence there could be a need to limit this considering minimization 
initiative(s).
After some investigations it seems feasible to go step by step.

1. To separate translations from main `PKG` and create a sub-package, for 
example - something like, `%{name}-translations` as a weak dependency 
(`Supplements: %{name} = %{version}-%{release}` not sure about `arch`). 
Certainly we may leverage on `find_lang.sh` and improve over the time. In 
`fedora` almost 1800+ spec files use `%find_lang` and we always can have 
opt-out option. Roughly 
[something](https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/94)
 how `debuginfo subpackages` works. Furthermore, this feature should work only 
when we have translations in `%{buildroot}`.

2. Next step could be to create translation sub-package(s) grouped by 
`language_id`. For example, suppose a package has mo files for `ja`, `pt`, 
`pt_BR`, `zh_CN`, `zh_TW`, `zh_HK`, `it_IT`, and `de` locales, then 5 
sub-packages would be created namely `%{name}-translations-ja`, 
`%{name}-translations-pt`, `%{name}-translations-zh`, `%{name}-translations-it` 
and `%{name}-translations-de`. Here `%{name}-translations-zh` shall contain 3 
mo files. With this approach we may limit number of sub-packages (_lesser RPM 
metadata_) and need not to implement locale-mapping/fallback. Moreover, this 
may enable us to tie up these sub-packages to langpacks meta-package 
installation. (_and may 
[help](https://teams.fedoraproject.org/project/silverblue/us/116) in flatpak 
locales creation too_) Here, we did not call them `langpacks` because, 
`langpacks` may also contain fonts, IMEs, dictionaries etc. These may live as a 
weak dependency? I am not sure but there could be a role of `system active 
locale` to suggest sub-package(s) to users while installation - may be a 
[dnf](https://github.com/rpm-software-management/dnf) thing though! Base locale 
would be "C".

This is an attempt to kick off discussions around this and move towards 
appropriate approach doing it in `rpm`. 

thanks!

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1276___
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint