Skip to content
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

Support localised screenshots #81

Open
aral opened this issue Dec 15, 2021 · 1 comment
Open

Support localised screenshots #81

aral opened this issue Dec 15, 2021 · 1 comment

Comments

@aral
Copy link

aral commented Dec 15, 2021

Problem

If localised screenshots exist in the Flatpak metadata, they should be supported.

Currently, the first <image/> of the last <screenshot/> in the <screenshots> section is displayed.

e.g., see https://appcenter.elementary.io/org.small_tech.comet/ where the Dutch screenshot is shown on the English page.

The relevant metadata markup is:

<screenshots>
    <screenshot type="default">
      <image xml:lang="nl">https://raw.githubusercontent.com/small-tech/comet-screenshots/main/nl/comet-basic-usage.png</image>
      <image xml:lang="tr">https://raw.githubusercontent.com/small-tech/comet-screenshots/main/tr/comet-basic-usage.png</image>
      <image>https://raw.githubusercontent.com/small-tech/comet-screenshots/main/en/comet-basic-usage.png</image>
    </screenshot>
    <screenshot>
      <image xml:lang="nl">https://raw.githubusercontent.com/small-tech/comet-screenshots/main/nl/comet-spell-check.png</image>
      <image xml:lang="tr">https://raw.githubusercontent.com/small-tech/comet-screenshots/main/tr/comet-spell-check.png</image>
      <image>https://raw.githubusercontent.com/small-tech/comet-screenshots/main/en/comet-spell-check.png</image>
    </screenshot>
    <screenshot>
      <image xml:lang="nl">https://raw.githubusercontent.com/small-tech/comet-screenshots/main/nl/comet-emoji.png</image>
      <image xml:lang="tr">https://raw.githubusercontent.com/small-tech/comet-screenshots/main/tr/comet-emoji.png</image>
      <image>https://raw.githubusercontent.com/small-tech/comet-screenshots/main/en/comet-emoji.png</image>
    </screenshot>
    <screenshot>
      <image xml:lang="nl">https://raw.githubusercontent.com/small-tech/comet-screenshots/main/nl/comet-settings.png</image>
      <image xml:lang="tr">https://raw.githubusercontent.com/small-tech/comet-screenshots/main/tr/comet-settings.png</image>
      <image>https://raw.githubusercontent.com/small-tech/comet-screenshots/main/en/comet-settings.png</image>
    </screenshot>
    <screenshot>
      <image xml:lang="nl">https://raw.githubusercontent.com/small-tech/comet-screenshots/main/nl/comet-welcome.png</image>
      <image xml:lang="tr">https://raw.githubusercontent.com/small-tech/comet-screenshots/main/tr/comet-welcome.png</image>
      <image>https://raw.githubusercontent.com/small-tech/comet-screenshots/main/en/comet-welcome.png</image>
    </screenshot>
  </screenshots>

Proposal

Initial workaround (easy)

Grab the first <image/> from the <screenshot type="default" /> in the <screenshots> section if it exists. If it doesn’t take the first image from the first screenshot (not the last), in the assumption that the author would likely have put the default first even if they didn’t mark it.

Full implementation (hard)

Actually create localised pages and serve them.

Prior Art (Optional)

The elementary OS AppCenter itself correctly displays localised pages and screenshots.

@aral
Copy link
Author

aral commented Dec 15, 2021

Related: #60

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant