Skip to content

[LLM] feat: Add Wikipedia donation link to About screen - #169

Merged
menny merged 2 commits into
mainfrom
feat/wikipedia-donation-link
Sep 10, 2026
Merged

menny merged 2 commits into
mainfrom
feat/wikipedia-donation-link

Conversation

@menny

@menny menny commented Sep 10, 2026 •

Copy link
Copy Markdown
Member

What

  • Added a "Thank Wikipedia by donating" reference link in AboutScreen.kt directly after the "How this works" methodology section.
  • Integrated attribution tracking parameters on the official Wikimedia donate URL: https://donate.wikimedia.org/?utm_source=JanusGlossa&utm_medium=AndroidApp&utm_campaign=JanusGlossa, which automatically maps through Wikimedia's Special:FundraiserRedirector to wmf_source and wmf_campaign on Special:LandingPage.
  • Introduced Context.openUrlSafely(url: String) in IntentUtils.kt to protect against ActivityNotFoundException on devices without browsers or with locked profiles.
  • Integrated openUrlSafely across both AboutScreen (ReferenceLinkRow) and ActionButtons (WikipediaLinkButton). On failure, the URL is automatically copied to the clipboard and a localized Toast is displayed.
  • Localized all new strings (about_link_donate_wikipedia and error_no_browser) across all supported languages (Arabic, German, Spanish, French, Hebrew, Russian, and default English).
  • Added comprehensive unit tests in AboutScreenTest, IntentUtilsTest, and ActionButtonsTest.

Why

  • Enables users to directly support Wikimedia with referral attribution for Janus Glossa.
  • Eliminates fatal crash risk on devices without installed/enabled browsers or with restricted user/kiosk profiles.

Add a link in the About screen after the 'How this works' methodology section to allow users to donate to Wikipedia.

What:
- Added 'Thank Wikipedia by donating' link row in the About screen references section.
- Attributed donation traffic using official UTM tracking parameters (utm_source=JanusGlossa, utm_medium=AndroidApp, utm_campaign=JanusGlossa).
- Localized the link string across all supported languages (English, Arabic, German, Spanish, French, Hebrew, Russian).
- Added unit tests in AboutScreenTest verifying display and ACTION_VIEW intent resolution.

Why:
Janus Glossa's core functionality is powered by Wikipedia's inter-language graph. Adding an attributed donation link enables users to support the Wikimedia Foundation while giving Janus Glossa visibility in Wikimedia campaign analytics.

Committed by Antigravity AI Agent.
@anysoftkeyboard-bot

anysoftkeyboard-bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Member

Great work! The PR cleanly adds the Wikipedia donation link to the About screen, safe URL launch handling with clipboard fallback, complete localization across all 7 supported languages, and thorough unit tests.

@anysoftkeyboard-bot anysoftkeyboard-bot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR cleanly adds the Wikipedia donation link across localized string files, removes inline package qualifiers, and includes thorough unit tests verifying link rendering and intent creation.

Safely launch web URLs with fallback for devices without browsers or with locked profiles.

What:
- Introduced `Context.openUrlSafely(url: String)` extension function.
- Handled `ActivityNotFoundException` and general launch errors by logging a warning, copying the link to the clipboard, and displaying a user-facing Toast.
- Replaced direct `startActivity` calls in both `AboutScreen` (`ReferenceLinkRow`) and `ActionButtons` (`WikipediaLinkButton`).
- Added `error_no_browser` localized strings across all 7 supported languages.
- Added unit tests in `IntentUtilsTest` and updated `ActionButtonsTest`.

Why:
Some devices (kiosk mode, restricted/work profiles, headless, or devices without a default browser) throw `ActivityNotFoundException` when resolving implicit web `ACTION_VIEW` intents, causing fatal app crashes.

Committed by Antigravity AI Agent.

@anysoftkeyboard-bot anysoftkeyboard-bot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR cleanly adds the Wikipedia donation link to the About screen, handles safe URL launches with clipboard fallback, includes full localization across all 7 supported languages, and adds thorough unit tests.

@menny
menny merged commit 649f146 into main Sep 10, 2026
2 checks passed
@menny
menny deleted the feat/wikipedia-donation-link branch September 10, 2026 17:50
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

Successfully merging this pull request may close these issues.

2 participants