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

🌐fix untranslatable donation field string #22175

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
2 changes: 1 addition & 1 deletion apps/portal/src/components/pages/SupportPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const SupportPage = () => {
const api = setupGhostApi({siteUrl});

try {
const response = await api.member.checkoutDonation({successUrl, cancelUrl});
const response = await api.member.checkoutDonation({successUrl, cancelUrl, personalNoteText: t('Add a personal note')});

if (response.url) {
window.location.replace(response.url);
Expand Down
5 changes: 3 additions & 2 deletions apps/portal/src/utils/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ function setupGhostApi({siteUrl = window.location.origin, apiUrl, apiKey}) {
});
},

async checkoutDonation({successUrl, cancelUrl, metadata = {}} = {}) {
async checkoutDonation({successUrl, cancelUrl, metadata = {}, personalNoteText = 'Add a personal note'} = {}) {
const identity = await api.member.identity();
const url = endpointFor({type: 'members', resource: 'create-stripe-checkout-session'});

Expand All @@ -471,7 +471,8 @@ function setupGhostApi({siteUrl = window.location.origin, apiUrl, apiKey}) {
metadata: metadataObj,
successUrl,
cancelUrl,
type: 'donation'
type: 'donation',
personalNoteText
};

const response = await makeRequest({
Expand Down
1 change: 1 addition & 0 deletions ghost/i18n/locales/af/portal.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"Account": "Rekening",
"Account details updated successfully": "",
"Account settings": "Rekening instellings",
"Add a personal note": "",
"After a free trial ends, you will be charged the regular price for the tier you've chosen. You can always cancel before then.": "Na afloop van die gratis proeftydperk sal u die vasgestelde pry vir die vlak wat u gekies het, betaal. U kan altyd voor die tyd kanselleer.",
"Already a member?": "Is u reeds 'n lid?",
"An error occurred": "",
Expand Down
1 change: 1 addition & 0 deletions ghost/i18n/locales/ar/portal.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"Account": "الحساب",
"Account details updated successfully": ".تم تحديث تفاصيل الحساب بنجاح",
"Account settings": "إعدادات الحساب",
"Add a personal note": "",
"After a free trial ends, you will be charged the regular price for the tier you've chosen. You can always cancel before then.": ".بعد انتهاء فترة التجربة المجانية، سيتم خصم السعر العادي للفئة التي اخترتها. يمكنك دائمًا إلغاء الاشتراك قبل ذلك",
"Already a member?": "هل أنت عضو بالفعل؟",
"An error occurred": "حدث خطأ",
Expand Down
1 change: 1 addition & 0 deletions ghost/i18n/locales/bg/portal.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"Account": "Профил",
"Account details updated successfully": "Настройките бяха успешно обновени",
"Account settings": "Настройки",
"Add a personal note": "",
"After a free trial ends, you will be charged the regular price for the tier you've chosen. You can always cancel before then.": "След приключване на безплатния период ще бъдете таксувани според обявените цени. Можете да се откажете преди изтичането на безплатния период.",
"Already a member?": "Абонат ли сте вече?",
"An error occurred": "Възникна грешка",
Expand Down
1 change: 1 addition & 0 deletions ghost/i18n/locales/bn/portal.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"Account": "অ্যাকাউন্ট",
"Account details updated successfully": "",
"Account settings": "অ্যাকাউন্ট সেটিংস",
"Add a personal note": "",
"After a free trial ends, you will be charged the regular price for the tier you've chosen. You can always cancel before then.": "একটি ফ্রি ট্রায়াল শেষ হওয়ার পরে, আপনি যেই টিয়ারটি বেছে নিয়েছেন তার নিয়মিত মূল্য চার্জ করা হবে। আপনি যে কোনো সময় বাতিল করতে পারেন।",
"Already a member?": "ইতিমধ্যেই সদস্য?",
"An error occurred": "",
Expand Down
1 change: 1 addition & 0 deletions ghost/i18n/locales/bs/portal.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"Account": "Račun",
"Account details updated successfully": "",
"Account settings": "Postavke računa",
"Add a personal note": "",
"After a free trial ends, you will be charged the regular price for the tier you've chosen. You can always cancel before then.": "Nakon isteka besplatnog probnog perioda, bit će ti naplaćena redovna cijena za plan koji si odabrao. Možeš otkazati članarinu prije toga.",
"Already a member?": "Već si član?",
"An error occurred": "",
Expand Down
1 change: 1 addition & 0 deletions ghost/i18n/locales/ca/portal.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"Account": "Compte",
"Account details updated successfully": "Detalls del compte actualitzats correctament",
"Account settings": "Configuració del compte",
"Add a personal note": "",
"After a free trial ends, you will be charged the regular price for the tier you've chosen. You can always cancel before then.": "Després que finalitzi el període de prova gratuït, se't cobrarà el preu estipulat del nivell que hagis triat. Sempre pots cancel·lar abans que això passi.",
"Already a member?": "Ja n'ets membre?",
"An error occurred": "Ha succeït un error",
Expand Down
1 change: 1 addition & 0 deletions ghost/i18n/locales/context.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"Account": "A label in Portal for your account area",
"Account details updated successfully": "",
"Account settings": "A label in Portal for your account settings",
"Add a personal note": "Becomes the field label for donations in Stripe",
"Add comment": "Button text to post a comment",
"Add context to your comment, share your name and expertise to foster a healthy discussion.": "Invitation to include additional info when commenting",
"Add reply": "Button text to post your reply",
Expand Down
1 change: 1 addition & 0 deletions ghost/i18n/locales/cs/portal.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"Account": "Účet",
"Account details updated successfully": "",
"Account settings": "Nastavení účtu",
"Add a personal note": "",
"After a free trial ends, you will be charged the regular price for the tier you've chosen. You can always cancel before then.": "Po skončení zkušební doby vám bude účtována běžná cena pro vybranou úroveň. Vždy můžete předtím zrušit odběr.",
"Already a member?": "Již jste členem?",
"An error occurred": "",
Expand Down
1 change: 1 addition & 0 deletions ghost/i18n/locales/da/portal.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"Account": "Konto",
"Account details updated successfully": "Kontooplysningerne blev opdateret",
"Account settings": "Kontoindstillinger",
"Add a personal note": "",
"After a free trial ends, you will be charged the regular price for the tier you've chosen. You can always cancel before then.": "Når din gratis prøveperiode udløber, vil du blive opkrævet den normale pris for det abonnement du har valgt. Du kan selvfølgelig altid annullere dit abonnement inden.",
"Already a member?": "Er du allerede medlem?",
"An error occurred": "Der opstod en fejl",
Expand Down
1 change: 1 addition & 0 deletions ghost/i18n/locales/de-CH/portal.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"Account": "Konto",
"Account details updated successfully": "",
"Account settings": "Konto-Einstellungen",
"Add a personal note": "",
"After a free trial ends, you will be charged the regular price for the tier you've chosen. You can always cancel before then.": "Wenn das kostenlose Testabo endet, bezahlen Sie den regulären Preis für den gewählten Tarif. Sie können Ihr Abonnement jederzeit kündigen.",
"Already a member?": "Bereits Mitglied?",
"An error occurred": "",
Expand Down
1 change: 1 addition & 0 deletions ghost/i18n/locales/de/portal.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"Account": "Konto",
"Account details updated successfully": "Kontodaten erfolgreich aktualisiert",
"Account settings": "Konto-Einstellungen",
"Add a personal note": "",
"After a free trial ends, you will be charged the regular price for the tier you've chosen. You can always cancel before then.": "Wenn das kostenlose Testabo endet, bezahlst du den regulären Preis für den gewählten Tarif. Du kannst dein Abonnement jederzeit kündigen.",
"Already a member?": "Bereits Mitglied?",
"An error occurred": "Ein Fehler ist aufgetreten",
Expand Down
1 change: 1 addition & 0 deletions ghost/i18n/locales/el/portal.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"Account": "Λογαριασμός",
"Account details updated successfully": "",
"Account settings": "Ρυθμίσεις λογαριασμού",
"Add a personal note": "",
"After a free trial ends, you will be charged the regular price for the tier you've chosen. You can always cancel before then.": "Μετά το τέλος της δωρεάν δοκιμής, θα χρεωθείτε την κανονική τιμή για το επίπεδο που έχετε επιλέξει. Μπορείτε πάντα να ακυρώσετε πριν από τότε.",
"Already a member?": "Ήδη μέλος;",
"An error occurred": "",
Expand Down
1 change: 1 addition & 0 deletions ghost/i18n/locales/en/portal.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"Account": "",
"Account details updated successfully": "",
"Account settings": "",
"Add a personal note": "",
"After a free trial ends, you will be charged the regular price for the tier you've chosen. You can always cancel before then.": "",
"Already a member?": "",
"An error occurred": "",
Expand Down
1 change: 1 addition & 0 deletions ghost/i18n/locales/eo/portal.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"Account": "Konto",
"Account details updated successfully": "",
"Account settings": "Kontagordoj",
"Add a personal note": "",
"After a free trial ends, you will be charged the regular price for the tier you've chosen. You can always cancel before then.": "Post senpaga provo finiĝos, vi pagos la regulan prezon por la nivelo, kiun vi elektis. Vi ĉiam povas nuligi antaŭ tiam.",
"Already a member?": "Ĉu membro jam?",
"An error occurred": "",
Expand Down
3 changes: 2 additions & 1 deletion ghost/i18n/locales/es/portal.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"Account": "Cuenta",
"Account details updated successfully": "Los detalles de la cuenta se actualizaron con éxito",
"Account settings": "Configuración de la cuenta",
"Add a personal note": "",
"After a free trial ends, you will be charged the regular price for the tier you've chosen. You can always cancel before then.": "Después de que finalice el período de prueba gratuito, se te cobrará el precio regular del nivel que hayas elegido. Siempre puedes cancelar antes de eso.",
"Already a member?": "¿Ya eres miembro?",
"An error occurred": "Ocurrió un error",
Expand Down Expand Up @@ -138,8 +139,8 @@
"Sign out": "Cerrar sesión",
"Sign up": "Registrarse",
"Signup error: Invalid link": "Error de registro: Enlace inválido",
"Something went wrong, please try again later.": "Algo salió mál, intenga de nuevo mas tarde.",
"Signups from this email domain are currently restricted.": "",
"Something went wrong, please try again later.": "Algo salió mál, intenga de nuevo mas tarde.",
"Sorry, no recommendations are available right now.": "Lo sentimos, no tenemos recomendaciones en este momento",
"Sorry, that didn’t work.": "Lo siento, eso no funcionó.",
"Spam complaints": "Quejas de spam",
Expand Down
1 change: 1 addition & 0 deletions ghost/i18n/locales/et/portal.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"Account": "Konto",
"Account details updated successfully": "",
"Account settings": "Konto seaded",
"Add a personal note": "",
"After a free trial ends, you will be charged the regular price for the tier you've chosen. You can always cancel before then.": "Pärast tasuta prooviversiooni lõppu võetakse teilt tasu valitud taseme tavahinna eest. Saate alati enne seda tühistada.",
"Already a member?": "Juba liige?",
"An error occurred": "",
Expand Down
1 change: 1 addition & 0 deletions ghost/i18n/locales/fa/portal.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"Account": "حساب کاربری",
"Account details updated successfully": "",
"Account settings": "تنظیمات حساب کاربری",
"Add a personal note": "",
"After a free trial ends, you will be charged the regular price for the tier you've chosen. You can always cancel before then.": "پس از این\u200cکه دوره رایکان شما پایان یابد، براساس بسته\u200cی انتخابی شما مبلغی از حساب شما برداشت می\u200cشود. شما همیشه می\u200cتوانید قبل از آن تاریخ، بسته\u200cی خود را تغییر و یا لغو کنید.",
"Already a member?": "عضو هستید؟",
"An error occurred": "",
Expand Down
1 change: 1 addition & 0 deletions ghost/i18n/locales/fi/portal.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"Account": "Oma tili",
"Account details updated successfully": "",
"Account settings": "Tilin asetukset",
"Add a personal note": "",
"After a free trial ends, you will be charged the regular price for the tier you've chosen. You can always cancel before then.": "Kun ilmainen kokeilusi loppuu, sinulta veloitetaan valitsemasi tilauksen kuukausimaksu. Voit aina peruuttaa tilauksesi ennen tätä.",
"Already a member?": "Oletko jo jäsen?",
"An error occurred": "",
Expand Down
1 change: 1 addition & 0 deletions ghost/i18n/locales/fr/portal.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"Account": "Compte",
"Account details updated successfully": "Mise à jour réussie des données du compte",
"Account settings": "Paramètres de compte",
"Add a personal note": "Ajouter une note personnelle",
"After a free trial ends, you will be charged the regular price for the tier you've chosen. You can always cancel before then.": "À la fin de la période d’essai gratuite, le prix normal de l’abonnement choisi sera facturé. Vous pourrez toujours l'annuler d’ici là.",
"Already a member?": "Déjà abonné ?",
"An error occurred": "Une erreur s'est produite",
Expand Down
3 changes: 2 additions & 1 deletion ghost/i18n/locales/gd/portal.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"Account": "Cunntas",
"Account details updated successfully": "Chaidh roghainnean a' chunntais ùrachadh gu soirbheachail",
"Account settings": "Roghainnean",
"Add a personal note": "",
"After a free trial ends, you will be charged the regular price for the tier you've chosen. You can always cancel before then.": "Bidh agad ri pàigheadh nuair a dh’fhalbhachas an ùine air an tionndadh triail agad. Faodaidh tu ga sguir dheth ron a shin ge-tà.",
"Already a member?": "’Eil thu nad bhall mar-thà?",
"An error occurred": "Thachair mearachd",
Expand Down Expand Up @@ -67,7 +68,7 @@
"Enter your name": "Cuir a-steach d' ainm",
"Error": "Mearachd",
"Expires {{expiryDate}}": "Falbhaidh an ùine air: {{expiryDate}}",
"Failed to cancel subscription, please try again": "Dh’fhàillig dùbhadh às an fho-sgrìobhaidh, feuch a-rithist",
"Failed to cancel subscription, please try again": "Dh’fhàillig dùbhadh às an fho-sgrìobhaidh, feuch a-rithist",
"Failed to log in, please try again": "Dh’fhàillig clàradh a-steach, feuch a-rithist",
"Failed to log out, please try again": "Dh’fhàillig clàradh a-mach, feuch a-rithist",
"Failed to process checkout, please try again": "Dh'fhàillig a' cheannachd",
Expand Down
1 change: 1 addition & 0 deletions ghost/i18n/locales/he/portal.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"Account": "חשבון",
"Account details updated successfully": "פרטי החשבון עודכנו בהצלחה",
"Account settings": "הגדרות חשבון",
"Add a personal note": "",
"After a free trial ends, you will be charged the regular price for the tier you've chosen. You can always cancel before then.": "לאחר תום תקופת הניסיון החינמית, תחויבו במחיר הרגיל של התוכנית שבחרתם. תוכלו לבטל בכל עת לפני כן.",
"Already a member?": "כבר רשומים?",
"An error occurred": "קרתה שגיאה",
Expand Down
1 change: 1 addition & 0 deletions ghost/i18n/locales/hi/portal.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"Account": "खाता",
"Account details updated successfully": "",
"Account settings": "खाता सेटिंग्स",
"Add a personal note": "",
"After a free trial ends, you will be charged the regular price for the tier you've chosen. You can always cancel before then.": "मुफ्त परीक्षण समाप्त होने के बाद, आपको आपके द्वारा चुने गए स्तर के लिए नियमित कीमत पर शुल्क लिया जाएगा। आप तब तक किसी भी समय रद्द कर सकते हैं।",
"Already a member?": "पहले से ही सदस्य हैं?",
"An error occurred": "",
Expand Down
1 change: 1 addition & 0 deletions ghost/i18n/locales/hr/portal.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"Account": "Vaš račun",
"Account details updated successfully": "",
"Account settings": "Podešavanje vašeg računa",
"Add a personal note": "",
"After a free trial ends, you will be charged the regular price for the tier you've chosen. You can always cancel before then.": "Nakon isteka probnog perioda, izvršit će se naplata odabranog plana pretplate. Uvijek možete otkazati pretplatu prije toga.",
"Already a member?": "Već imate račun?",
"An error occurred": "",
Expand Down
1 change: 1 addition & 0 deletions ghost/i18n/locales/hu/portal.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"Account": "Fiók",
"Account details updated successfully": "",
"Account settings": "Fiók beállítások",
"Add a personal note": "",
"After a free trial ends, you will be charged the regular price for the tier you've chosen. You can always cancel before then.": "Az ingyenes próbaidőszak lejárta után a kiválasztott csomag normál díját fogjuk felszámolni. A feliratkozás bármikor ingyenesen lemondható a próbaidőszak alatt.",
"Already a member?": "Már van fiókja?",
"An error occurred": "",
Expand Down
1 change: 1 addition & 0 deletions ghost/i18n/locales/id/portal.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"Account": "Akun",
"Account details updated successfully": "Detail akun berhasil diperbarui",
"Account settings": "Pengaturan akun",
"Add a personal note": "",
"After a free trial ends, you will be charged the regular price for the tier you've chosen. You can always cancel before then.": "Setelah percobaan gratis berakhir, Anda akan dikenai harga normal untuk tingkatan yang dipilih. Anda selalu dapat membatalkannya sebelum masa percobaan gratis berakhir.",
"Already a member?": "Sudah menjadi anggota?",
"An error occurred": "Terjadi kesalahan",
Expand Down
1 change: 1 addition & 0 deletions ghost/i18n/locales/is/portal.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"Account": "Aðgangur",
"Account details updated successfully": "",
"Account settings": "Aðgangsstillingar",
"Add a personal note": "",
"After a free trial ends, you will be charged the regular price for the tier you've chosen. You can always cancel before then.": "Þegar prufutímabili lýkur muntu greiða venjulegt verð í samræmi við áskriftarleiðina sem þú valdir. Þú getur ávallt sagt upp áskriftinni áður en til þess kemur.",
"Already a member?": "Ertu nú þegar með áskrift?",
"An error occurred": "",
Expand Down
1 change: 1 addition & 0 deletions ghost/i18n/locales/it/portal.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"Account": "Account",
"Account details updated successfully": "Dettagli dell'account aggiornati con successo",
"Account settings": "Impostazioni account",
"Add a personal note": "",
"After a free trial ends, you will be charged the regular price for the tier you've chosen. You can always cancel before then.": "Al termine della prova gratuita, ti verrà addebitato il prezzo regolare del piano scelto. Puoi annullare in qualsiasi momento prima della scadenza.",
"Already a member?": "Sei già iscritto?",
"An error occurred": "Si è verificato un errore",
Expand Down
1 change: 1 addition & 0 deletions ghost/i18n/locales/ja/portal.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"Account": "アカウント",
"Account details updated successfully": "アカウント詳細が更新されました",
"Account settings": "アカウント設定",
"Add a personal note": "",
"After a free trial ends, you will be charged the regular price for the tier you've chosen. You can always cancel before then.": "無料期間が終了すると、選択したプランの通常価格が請求されます。それまではいつでもキャンセルできます。",
"Already a member?": "すでに会員ですか?",
"An error occurred": "エラーが発生しました",
Expand Down
1 change: 1 addition & 0 deletions ghost/i18n/locales/ko/portal.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"Account": "계정",
"Account details updated successfully": "계정 정보가 성공적으로 업데이트되었어요",
"Account settings": "계정 설정",
"Add a personal note": "",
"After a free trial ends, you will be charged the regular price for the tier you've chosen. You can always cancel before then.": "무료 체험이 종료되면 선택한 요금제의 정상 가격이 청구돼요. 그 전에 언제든지 취소할 수 있어요.",
"Already a member?": "이미 회원이신가요?",
"An error occurred": "오류가 발생했어요",
Expand Down
Loading
Loading