8000 Fix mrpack manual import in languages that don't use dots by flowln · Pull Request #780 · PolyMC/PolyMC · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix mrpack manual import in languages that don't use dots #780

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

Merged
merged 2 commits into from
Jun 11, 2022

Conversation

flowln
Copy link
Contributor
@flowln flowln commented Jun 11, 2022

Closes #777

I tried going directly with the specified mimetype (application/x-modrinth-modpack+zip), but it didn't work :c

@flowln flowln added the bug Something isn't working label Jun 11, 2022
@flowln flowln added this to the 1.3.2 milestone Jun 11, 2022
@Scrumplex
Copy link
Contributor

We could also ship our own mime-type definition. I prepared one as per FreeDesktop spec:

<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
  <mime-type type="application/x-modrinth-modpack+zip">
    <sub-class-of type="application/zip"/>
    <comment>Modrinth modpack</comment>
    <glob pattern="*.mrpack"/>
  </mime-type>
</mime-info>

Though I couldn't find any information on how to ship this properly except for installing it into the system (where I do not know how to do for our bundles). A hint about doing this is here: https://doc.qt.io/qt-5/qmimedatabase.html#details

@flowln
Copy link
Contributor Author
flowln commented Jun 11, 2022

:o seems too much trouble for just this though lol
the spec says that the file extension must be mrpack anyways, it won't change with locale from what I understood from the spec. So we just need to be aware of the dot problem and we should be good

@Scrumplex
Copy link
Contributor

I wonder how other projects deal with this issue. Are we just using it wrong?

@Scrumplex
Copy link
Contributor

(updated comments, added an actual translator comment)

@flowln
Copy link
Contributor Author
flowln commented Jun 11, 2022

(updated comments, added an actual translator comment)

We should probably be using more the Weblate built-in glossary for this kind of stuff

@Scrumplex
Copy link
Contributor

(updated comments, added an actual translator comment)

We should probably be using more the Weblate built-in glossary for this kind of stuff

These translator comments (//: and /*: */) are more for context on what this translation is actually about. Often times you would need to read the code to actually understand what the translation is about. These comments should help avoid that

@flowln
Copy link
Contributor Author
flowln commented Jun 11, 2022

These translator comments (//: and /*: */) are more for context on what this translation is actually about. Often times you would need to read the code to actually understand what the translation is about. These comments should help avoid that

Yea, but stuff like "What's an mrpack?" and how it's generally used in a translation context are good info to have in the glossary :)

@Scrumplex
Copy link
Contributor

These translator comments (//: and /*: */) are more for context on what this translation is actually about. Often times you would need to read the code to actually understand what the translation is about. These comments should help avoid that

Yea, but stuff like "What's an mrpack?" and how it's generally used in a translation context are good info to have in the glossary :)

Oh yes. Totally agree. In this case // mrpack is a modrinth pack isn't treated as a translator comment, as it lacks the colon symbol (//:) to make it one. Qt's i18n tooling actually takes these comments and makes them available in your translation tool of choice.

@d-513 d-513 merged commit 2bd8e7d into PolyMC:develop Jun 11, 2022
Scrumplex pushed a commit that referenced this pull request Jun 11, 2022
Scrumplex pushed a commit that referenced this pull request Jun 12, 2022
Scrumplex pushed a commit that referenced this pull request Jun 12, 2022
@flowln flowln deleted the guo_ext_2 branch July 22, 2022 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Add Instance -> Import from Zip" does not show *.mrpack files when the locale is 繁體中文
4 participants
0