-
-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: improve mime type definition #132
Conversation
This removes the counterproductive xml:lang attribute from <comment> and makes application/x-amgp a subclass of application/xml.
Hi, thanks for the PR, I tested it and works great. @pktiuk what about making profile open default to AntiMicroX? There is an |
@@ -1,7 +1,8 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info"> | |||
<mime-type type="application/x-amgp"> | |||
<comment xml:lang="en">AntiMicroX Profile</comment> | |||
<comment>AntiMicroX profile</comment> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to later add translations for other languages? Will it work?
For example:
<comment>AntiMicroX profile</comment>
<comment xml:lang="pl">profile programu AntiMicroX</comment>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is: https://specifications.freedesktop.org/shared-mime-info-spec/latest/ar01s02.html#idm44983870071680
comment
elements give a human-readable textual description of the MIME type, usually composed of an acronym of the file name extension and a short description, like "ODS spreadsheet". There may be many of these elements with different xml:lang attributes to provide the text in multiple languages.
With some translation magic like for the appdata file, it's doable, but I don't see this "comment" coming up anywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment element is used by desktop environments and other graphical programs. The Dolphin file manager for example will display Testfile.txt (plain text document, 0B)
when hovering over a text file, instead of Testfile.txt (text/plain, 0B)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have checked this way of adding translations. It works in my case. (Ubuntu 20.04 Gnome, Nautilus)
This is great idea ❤️ |
Thanks @Janfel for your contribution. |
@Janfel |
Proposed changes
xml:lang
attribute from the<comment>
element, as it causes systems to not display any comment in locales other than “en”, which is worse that displaying a generic english comment in such locales.application/x-amgp
a subclass ofapplication/xml
so it is automatically associated with XML editors and theapplication-xml
icon.