Repository navigation
Donates - #359
Merged
Merged
Donates#359
Conversation
Deploying organicmaps with
|
| Latest commit: |
5c706d6
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://ed70ee3f.organicmaps.pages.dev |
| Branch Preview URL: | https://mollie-subscribe.organicmaps.pages.dev |
/donate/subscribe/ is a self-hosted donation form that posts to donate-api and hands the donor to Mollie's hosted checkout; /donate/manage/ lets someone who lost the management link from their email ask for a new one. Card details never reach either repo. The form works with JavaScript disabled — a plain POST that donate-api answers with a redirect. donate-subscribe.js only improves it: presets that scale and reformat per currency and interval, a default currency guessed from the browser's region, inline validation mirroring the server's, and prefill from ?amount=&interval=¤cy= so the app can link straight to a filled-in form. All 27 Mollie currencies are offered (RUB stays on the Telegram Tribute rail). JPY and ISK are zero-decimal; HUF and TWD are restricted to whole units as well, because PayPal has no sub-unit for either and Mollie rounds such an amount *up* — a fraction would charge more than the form promised, on every renewal of a subscription. Amounts may be typed in the donor's own digits: the presets are Intl-formatted, so the Persian page prints €۲۵ and the Marathi one €२५, and those are now accepted. The currency table, the amount grammar and the honeypot field name all mirror donate-api and must change with it. _headers gives both pages a strict CSP. The rules are deliberately narrow rather than one /donate/* rule: /donate/ itself posts to PayPal, which this form-action would block. Signed-off-by: Alexander Borsuk <me@alex.bio>
…guage
Both pages in all 33 translations, so every reader reaches a donation form
in their own language and donate-api can return them to it afterwards.
Each page keeps its user-visible strings in `extra.form`, which nothing
translates automatically — translate_md.py rewrites only title and
description — so these were done by hand and proofread. The single-brace
placeholders `{amount}`, `{min}` and `{max}` are substituted at runtime by
literal string replace and had to survive character for character;
translate_review.py now says so explicitly, since an inflected or
quote-wrapped placeholder would silently print itself on the button.
Adding a language here is not enough on its own: SITE_LANGS in donate-api
must list it too, or the donor is returned to the English thank-you page
after paying, with no error anywhere.
Signed-off-by: Alexander Borsuk <me@alex.bio>
translate_md.py rewrites `title:` and `description:` and copies `extra:`
verbatim, and translate_check.py compared only those same two fields — so
user-visible text kept under `extra` was never translated and never
reported. The donation pages keep twenty-odd form labels there, which means
a language added with this repo's own pipeline would ship English buttons
and still be called clean.
The check now walks `extra` recursively, skipping the keys that are the same
in every language by design. Over the corpus it found seven, five of them
real: the Italian top menu said "Donate" and the Occitan one "News" and
"Privacy". Each is fixed here with a word the page's own translation already
uses — "Fai una donazione" from its <h1>, "Novèlas" and "Privadesa" from
their prose and title.
The other two are loanwords that really are the translation, and no textual
test can tell those from a field nobody touched: Occitan "Privacy" and Dutch
"Privacy" looked identical. So a page declares the ones it means, the way
the Ukrainian donation page declares its missing RUB reference:
extra:
translation_keeps_source: ["extra.menu_title"]
It is verified rather than obeyed — naming a field the English source lacks,
or one that is no longer identical, is an ERROR — so the declaration cannot
outlive the situation it describes.
CLAUDE.md also documented finding translations with the Tera v1 `filter`
filter, removed in Tera v2 and the source of a build break on this branch;
that, the real scope of translate_md.py, and the two couplings a new
donation-page language needs are now written down.
Signed-off-by: Alexander Borsuk <me@alex.bio>
biodranik
force-pushed
the
mollie-subscribe
branch
from
September 22, 2026 22:11
384d036 to
f039eba
Compare
biodranik
force-pushed
the
mollie-subscribe
branch
from
September 28, 2026 16:52
f039eba to
5c706d6
Compare
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.