Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,9 @@
<url type="homepage">https://jumplink.eu/Learn6502/</url>
<url type="bugtracker">https://github.com/JumpLink/Learn6502/issues</url>
<url type="vcs-browser">https://github.com/JumpLink/Learn6502</url>
<url type="contribute">https://github.com/JumpLink/Learn6502</url>
<url type="contact">https://github.com/JumpLink/Learn6502/issues</url>
<url type="donation">https://jumplink.eu/Learn6502/#support</url>
<url type="translate">https://hosted.weblate.org/projects/eu-jumplink-learn6502/app/</url>
<content_rating type="oars-1.1">
<content_attribute id="social-info">mild</content_attribute>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@
<url type="homepage">https://flathub.org/apps/eu.jumplink.Learn6502</url>
<url type="bugtracker">https://github.com/JumpLink/Learn6502/issues</url>
<url type="vcs-browser">https://github.com/JumpLink/Learn6502</url>
<url type="contribute">https://github.com/JumpLink/Learn6502</url>
<url type="contact">https://github.com/JumpLink/Learn6502/issues</url>
<url type="donation">https://jumplink.eu/Learn6502/#support</url>
<url type="translate">https://hosted.weblate.org/projects/eu-jumplink-learn6502/app/</url>
<content_rating type="oars-1.1">
<content_attribute id="social-info">mild</content_attribute>
Expand Down
10 changes: 10 additions & 0 deletions packages/app-gnome/src/about-dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import Gio from "@girs/gio-2.0";
import GLib from "@girs/glib-2.0";
import Gtk from "@girs/gtk-4.0";

import { getAboutInfo } from "@learn6502/ui";

import { APPLICATION_ID, RESOURCES_PATH, PACKAGE_VERSION } from "./constants.ts";
import { parseAppdata } from "./appdata.ts";

Expand Down Expand Up @@ -78,6 +80,14 @@ const buildFromAppdata = (): Adw.AboutDialog => {
* fallback deliberately does not.
*/
export const createAboutDialog = (): Adw.AboutDialog => {
const dialog = createFromAppdata();
// new_from_appdata() does not map <url type="donation">, so the link is added by hand.
const { title, url } = getAboutInfo().supportLink;
dialog.add_link(title, url);
return dialog;
};

const createFromAppdata = (): Adw.AboutDialog => {
try {
return Adw.AboutDialog.new_from_appdata(APPDATA_RESOURCE, PACKAGE_VERSION) as Adw.AboutDialog;
} catch (error) {
Expand Down
4 changes: 4 additions & 0 deletions packages/translations/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -1548,6 +1548,10 @@ msgstr "Stil"
msgid "Submit"
msgstr "Einreichen"

#. TRANSLATORS: Link in the About dialog to the project's page about supporting it. Not "Donate".
msgid "Support"
msgstr "Unterstützen"

#. TRANSLATORS: Assembly syntax error with line number and offending line
#, javascript-format
msgid "Syntax error line %d: %s"
Expand Down
4 changes: 4 additions & 0 deletions packages/translations/eu.jumplink.Learn6502.pot
Original file line number Diff line number Diff line change
Expand Up @@ -1537,6 +1537,10 @@ msgstr ""
msgid "Submit"
msgstr ""

#. TRANSLATORS: Link in the About dialog to the project's page about supporting it. Not "Donate".
msgid "Support"
msgstr ""

#. TRANSLATORS: Assembly syntax error with line number and offending line
#, javascript-format
msgid "Syntax error line %d: %s"
Expand Down
6 changes: 6 additions & 0 deletions packages/ui/src/main-window/about.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,13 @@ export interface AboutInfo {
issueUrl: string;
/** SPDX identifier */
license: string;
/** Link to the landing page's support section; labelled "Support", never "Donate" (business income, no deduction). */
supportLink: { title: string; url: string };
}

/** Same URL as `<url type="donation">` in the metainfo. */
const SUPPORT_URL = "https://jumplink.eu/Learn6502/#support";

export function getAboutInfo(): AboutInfo {
return {
applicationName: _("Learn 6502 Assembly"),
Expand All @@ -24,5 +29,6 @@ export function getAboutInfo(): AboutInfo {
website: "https://flathub.org/apps/eu.jumplink.Learn6502",
issueUrl: "https://github.com/JumpLink/Learn6502/issues",
license: "GPL-3.0-or-later",
supportLink: { title: _("Support"), url: SUPPORT_URL },
};
}
Loading