sailfishos-chum / sailfishos-chum-gui

GUI application for utilising the SailfishOS:Chum community repository
https://openrepos.net/content/olf/sailfishoschum-gui-installer
MIT License
13 stars 17 forks source link

Create a place to submit translations of package descriptions. #108

Open dikonov opened 2 years ago

dikonov commented 2 years ago

A non-English speaker will face a major trouble using the chum repo and chum-gui, even if the GUI itself is translated. One has to read descriptions of packages to understand their functions and choose what to install, but all of these are available only in English.

There should be a way to submit translated package descriptions, that would be shown to all users with matching locale in the GUI and cli. A generated rpm spec may include translated Summary and %description fields for different locales too.

rinigus commented 2 years ago

Do you know whether SPEC itself supports translations? Which is surely a rather tricky situation - would be better to have some kind of separate repo with all the strings instead of bugging each package developer to include a translation.

Are you aware of any Linux distro which does translate packages description? How do they do it?

In principle, we can have some separate location where we add all strings for translation and then pull those by GUI from online. Tricky, but possible. So, I wonder what is the current state with such support overall. I don't see it in Jolla Store either, for example. Which is, again, not to discourage you with trying to make it possible for Chum.

dikonov commented 2 years ago

The RPM SPEC file format allows alternative localised %description and Summary fields. I agree that a central db of all rpm descriptions is a better place. It could be just another .po or .ts file somewhere in the Chum repository. However, the OBS should automatically synchronize it when developers add packages or change descriptions of already existing ones. It could create the localized spec fields from the central file while rebuilding packages.

It is probably better to keep older translation than disable it in case of changes. Package descriptions tend to be fairly stable and small changes of the source wording do not change the gist of the info.

dikonov commented 2 years ago

avidemux.spec.txt Here is an example of a SPEC with additional translated info fields. It is from the ALTLinux distro. Note, that there are many forks of the RPM package manager and spec files from different distros are not 100% compatible.

Summary(ru_RU.UTF-8):  ...
%description -l ru_RU.UTF-8
Olf0 commented 1 year ago

SailfishOS uses the mainstream RPM (v4.14 since SailfishOS 2.2.1), as Fedora, RHEL, OpenSUSE, SLES etc. do. Still the set of provided macros differs, though the common macros from RPM proper (e.g., %description) should be the same (i.e., unaltered).

PRs are welcome!