AppImage / AppImageKit

Package desktop applications as AppImages that run on common Linux-based operating systems, such as RHEL, CentOS, openSUSE, SLED, Ubuntu, Fedora, debian and derivatives. Join #AppImage on irc.libera.chat
http://appimage.org
Other
8.67k stars 554 forks source link

Remove redundant desktop file entries on installation #833

Open TheAssassin opened 6 years ago

TheAssassin commented 6 years ago

Many desktop files ship with redundant localized entries (read: same value as default). This is highly annoying, and can lead to annoyances like https://github.com/TheAssassin/AppImageLauncher/issues/62.

As I recently learned, some translation tools that natively support desktop files (like Transifex) are to be blamed for this situation. Once a language is added to the project, it seems all entries are localized. There is apparently no way to prevent it from doing so.

In order to prevent such situations from happening again, I thought it might be a good idea to clean up those redundant entries. We can use the code from #820 to get a list of languages for every entry type, compare them to the default value and remove the unnecessary entries. That'll also compact the desktop files, making them easier to read.

probonopd commented 6 years ago

Firefox is Firefox is Firefox. OpenOffice is OpenOffice is OpenOffice. CocaCola is CocaCola is CocaCola,

No matter the language.

Or so you would think. Until you do a quick fact-check, as I just did:

TheAssassin commented 6 years ago

What's that got to do with a simple, technical redundancy? I mean, sure, it can be annoying that a Firefox desktop file might contain

Name=Firefox web browser
Name[de]=Firefox-Webbrowser

They could as well just use the term Firefox. But what I'm talking about is undo what's possible easily without breaking anything, or changing the meaning.

probonopd commented 6 years ago

They could as well just use the term Firefox

Indeed!

But then, there are the non-latin character set languages for which a different Name= might be a reasonable choice.

TheAssassin commented 6 years ago

Sure, but look at https://github.com/pencil2d/pencil/blob/master/app/data/pencil2d.desktop for instance. The Name is probably the last entry to look at. These Icon entries are entirely redundant. Just a waste of space. That's the kind of entries I want to remove.

probonopd commented 6 years ago

Yes, we can easily agree that this makes no sense whatsoever:

Name[ru]=Pencil2D
Name[it]=Pencil2D
Name[cs]=Pencil2D
Name[de]=Pencil2D
Name[sl]=Svinčnik2D # Sure that this is "on-brand"?
Name[ru]=Pencil2D
Name[it]=Pencil2D
Name[cs]=Pencil2D
Name[de]=Pencil2D
Name[sl]=Svinčnik2D # Sure that this is "on-brand"?
Name[es]=Pencil2D
Name[et]=Pencil2D
Name[vi]=Pencil 2D
Name[zh_CN]=Pencil2D
Name[fr]=Pencil2D
Name[zh_TW]=Pencil2D
Name[es]=Pencil2D
Name[et]=Pencil2D
Name[vi]=Pencil 2D
Name[zh_CN]=Pencil2D
Name[fr]=Pencil2D
Name[zh_TW]=Pencil2D

But how does it affect us? Sure, it is wasteful, but why are we hit worse than "Desktop Linux" overall?

probonopd commented 6 years ago

For Chinese, I would have expected at least 鉛筆2D...

TheAssassin commented 6 years ago

@probonopd I just want to avoid all annoyances redundancy brings with it. I mean, it's technically possible, and only brings advantages with it.

TheAssassin commented 6 years ago

But how does it affect us? Sure, it is wasteful, but why are we hit worse than "Desktop Linux" overall?

Have you read the issue I linked to? https://github.com/TheAssassin/AppImageLauncher/issues/62

probonopd commented 6 years ago

62 seems to work for him now

Lvaskz commented 6 years ago

Hi, appimaged has the same issue resolved here https://github.com/TheAssassin/AppImageLauncher/issues/62 will Appimaged resolve this soon?

TheAssassin commented 6 years ago

@Lvaskz wrong thread (this is about removal of some redundant entries in general, not just https://github.com/TheAssassin/AppImageLauncher/issues/62), and also wrong project. Please open an issue in https://github.com/AppImage/appimaged, thanks.

Hint: I suspect by updating libappimage/AppImageKit in appimaged, we should be able to resolve the issue, as in AppImageLauncher, the solution was implemented in libappimage directly.