Skip to content
Closed
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
2 changes: 1 addition & 1 deletion apps/portal/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tryghost/portal",
"version": "2.67.9",
"version": "2.67.10",
"license": "MIT",
"repository": "https://github.com/TryGhost/Ghost",
"author": "Ghost Foundation",
Expand Down
36 changes: 31 additions & 5 deletions apps/portal/src/components/notification.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import Interpolate from '@doist/react-interpolate';
import Frame from './frame';
import AppContext from '../app-context';
import NotificationStyle from './notification.styles';
Expand Down Expand Up @@ -40,19 +41,34 @@ const NotificationText = ({type, status, context}) => {
} else if (type === 'signin' && status === 'error') {
return (
<p>
{t('Could not sign in. Login link expired.')} <br /><a href={signinPortalLink} target="_parent">{t('Click here to retry')}</a>
<Interpolate
mapping={{
a: <a href={signinPortalLink} target="_parent" />
}}
string={t('Could not sign in. Login link expired. <br /><a>Click here to retry</a>')}
/>
Comment on lines +44 to +49
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.

To play devil's advocate, the fact that there's a br might really suggest that these are two separate ideas that can be safely translated as separate strings. And then we'd keep the enforced common phrasing for "Click here to retry", which really does seem to be a separate idea.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Looking at this with fresh eyes and I think you're right, this would revert this PR and make it a no-op so I'll close this PR

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.

@rob-ghost - I think it's perhaps worth keeping "You've successfully subscribed to {siteTitle}". That's an improvement :)

</p>
);
} else if (type === 'signup' && status === 'success') {
return (
<p>
{t('You\'ve successfully subscribed to')} <br /><strong>{context.site.title}</strong>
<Interpolate
mapping={{
strong: <strong />
}}
string={t('You\'ve successfully subscribed to <br /><strong>{siteTitle}</strong>', {siteTitle: context.site.title})}
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.

ok, this breaks my heuristic that a br means a new string... 😆

Is having the br necessary here? Will it survive a variety of languages (which could be adjusted by translators) and site title lengths (which cannot? Would it be better to let the browser make the decision about when to break the line? And does the layout break if a translator removes it? I'm imagining that the zh and zh-Hant translators would probably remove it, for example.

/>
</p>
);
} else if (type === 'signup-paid' && status === 'success') {
return (
<p>
{t('You\'ve successfully subscribed to')} <br /><strong>{context.site.title}</strong>
<Interpolate
mapping={{
strong: <strong />
}}
string={t('You\'ve successfully subscribed to <br /><strong>{siteTitle}</strong>', {siteTitle: context.site.title})}
/>
</p>
);
} else if (type === 'updateEmail' && status === 'success') {
Expand All @@ -70,13 +86,23 @@ const NotificationText = ({type, status, context}) => {
} else if (type === 'signup' && status === 'error') {
return (
<p>
{t('Signup error: Invalid link')}<br /><a href={singupPortalLink} target="_parent">{t('Click here to retry')}</a>
<Interpolate
mapping={{
a: <a href={singupPortalLink} target="_parent" />
}}
string={t('Signup error: Invalid link.<br /><a>Click here to retry</a>')}
/>
</p>
);
} else if (type === 'signup-paid' && status === 'error') {
return (
<p>
{t('Signup error: Invalid link')}<br /><a href={singupPortalLink} target="_parent">{t('Click here to retry')}</a>
<Interpolate
mapping={{
a: <a href={singupPortalLink} target="_parent" />
}}
string={t('Signup error: Invalid link.<br /><a>Click here to retry</a>')}
/>
</p>
);
} else if (type === 'stripe:checkout' && status === 'success') {
Expand Down
7 changes: 3 additions & 4 deletions ghost/i18n/locales/af/portal.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"Choose a different plan": "Kies 'n ander plan",
"Choose a plan": "",
"Choose your newsletters": "Kies u nuusbriefs",
"Click here to retry": "Kliek hier om weer te probeer",
"Close": "Sluit",
"Code": "",
"Comment preferences updated.": "",
Expand All @@ -56,7 +55,7 @@
"Continue subscription": "Gaan voort met inskrywing",
"Could not create Stripe billing portal session": "",
"Could not create Stripe checkout session": "",
"Could not sign in. Login link expired.": "Kon nie aanmeld nie. Aanmeldskakel het verval.",
"Could not sign in. Login link expired. <br /><a>Click here to retry</a>": "Kon nie aanmeld nie. Aanmeldskakel het verval. <br /><a>Kliek hier om weer te probeer</a>",
"Could not update email! Invalid link.": "Kon nie e-pos opdateer nie! Ongeldige skakel.",
"Create a new contact": "Skep 'n nuwe kontak",
"Current plan": "Huidige plan",
Expand Down Expand Up @@ -172,7 +171,7 @@
"Sign in": "Meld aan",
"Sign out": "Teken uit",
"Sign up": "Registreer",
"Signup error: Invalid link": "Aanmelding fout: Ongeldige skakel",
"Signup error: Invalid link.<br /><a>Click here to retry</a>": "Aanmelding fout: Ongeldige skakel <br /><a>Kliek hier om weer te probeer</a>",
"Signups from this email domain are currently restricted.": "",
"Something went wrong, please try again later.": "",
"Sorry, no recommendations are available right now.": "",
Expand Down Expand Up @@ -242,7 +241,7 @@
"You're not receiving emails": "U ontvang nie e-posse nie",
"You're not receiving emails because you either marked a recent message as spam, or because messages could not be delivered to your provided email address.": "U ontvang nie e-posse nie, omdat u onlangs 'n boodskap as spam gemerk het, of omdat boodskappe nie na die e-pos adres wat u verskaf het gestuur kon word nie.",
"You've successfully signed in.": "U het suksesvol aangemeld.",
"You've successfully subscribed to": "Jy het suksesvol ingeteken op",
"You've successfully subscribed to <br /><strong>{siteTitle}</strong>": "Jy het suksesvol ingeteken op <br /><strong>{siteTitle}</strong>",
"Your account": "U rekening",
"Your email has failed to resubscribe, please try again": "",
"your inbox": "",
Expand Down
7 changes: 3 additions & 4 deletions ghost/i18n/locales/ar/portal.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"Choose a different plan": "اختر خطة مختلفة",
"Choose a plan": "اختر خطة",
"Choose your newsletters": "اختر نشرتك الإخبارية المفضلة",
"Click here to retry": "انقر هنا لإعادة المحاولة",
"Close": "إغلاق",
"Code": "كود",
"Comment preferences updated.": "تم تعديل تفضيلات التعليقات.",
Expand All @@ -56,7 +55,7 @@
"Continue subscription": "متابعة الاشتراك",
"Could not create Stripe billing portal session": "",
"Could not create Stripe checkout session": "Stripe تعذر إنشاء جلسة دفع ",
"Could not sign in. Login link expired.": ".تعذر تسجيل الدخول. رابط تسجيل الدخول منتهي الصلاحية",
"Could not sign in. Login link expired. <br /><a>Click here to retry</a>": ".تعذر تسجيل الدخول. رابط تسجيل الدخول منتهي الصلاحية <br /><a>انقر هنا لإعادة المحاولة</a>",
"Could not update email! Invalid link.": ".تعذر تحديث البريد الإلكتروني! الرابط غير صالح",
"Create a new contact": "إنشاء جهة اتصال جديدة",
"Current plan": "الخطة الحالية",
Expand Down Expand Up @@ -172,7 +171,7 @@
"Sign in": "تسجيل الدخول",
"Sign out": "تسجيل الخروج",
"Sign up": "إنشاء حساب",
"Signup error: Invalid link": "خطأ في التسجيل: الرابط غير صالح",
"Signup error: Invalid link.<br /><a>Click here to retry</a>": "خطأ في التسجيل: الرابط غير صالح <br /><a>انقر هنا لإعادة المحاولة</a>",
"Signups from this email domain are currently restricted.": "",
"Something went wrong, please try again later.": ".حدث خطأ ما، يرجى المحاولة مرة أخرى لاحقًا",
"Sorry, no recommendations are available right now.": ".عذرًا، لا توجد توصيات متاحة حاليًا",
Expand Down Expand Up @@ -242,7 +241,7 @@
"You're not receiving emails": "لم تستلم رسالة بريدية",
"You're not receiving emails because you either marked a recent message as spam, or because messages could not be delivered to your provided email address.": "لم تستلم رسالة بريدية لربما انك جعلت الرسائل مهملة او ان الرسائل لا تصل الى بريدك الذي سجلته.",
"You've successfully signed in.": ".تم تسجيل الدخول بنجاح",
"You've successfully subscribed to": "تم الاشتراك بنجاح في",
"You've successfully subscribed to <br /><strong>{siteTitle}</strong>": "تم الاشتراك بنجاح في <br /><strong>{siteTitle}</strong>",
"Your account": "حسابك",
"Your email has failed to resubscribe, please try again": "بريدك الاكتروني لم ينجح في إعادة الاشتراك، رجاء المحاولة مرة أخرى",
"your inbox": "بريدك الوارد",
Expand Down
7 changes: 3 additions & 4 deletions ghost/i18n/locales/bg/portal.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"Choose a different plan": "Изберете друг план",
"Choose a plan": "Изберете план",
"Choose your newsletters": "Изберете бюлетини",
"Click here to retry": "Щракнете за нов опит",
"Close": "Затвори",
"Code": "Код",
"Comment preferences updated.": "Настройките за коментиране са обновени.",
Expand All @@ -56,7 +55,7 @@
"Continue subscription": "Продължете абонамента",
"Could not create Stripe billing portal session": "Неуспешна сесия с платежната система Stripe",
"Could not create Stripe checkout session": "Неуспешен опит за плащане чрез Stripe",
"Could not sign in. Login link expired.": "Неуспешно влизане. Линкът е с изтекла валидност.",
"Could not sign in. Login link expired. <br /><a>Click here to retry</a>": "Неуспешно влизане. Линкът е с изтекла валидност. <br /><a>Щракнете за нов опит</a>",
"Could not update email! Invalid link.": "Не успяхме да обновим имейла! Невалиден линк.",
"Create a new contact": "Създайте нов контакт",
"Current plan": "Текущ план",
Expand Down Expand Up @@ -172,7 +171,7 @@
"Sign in": "Вход",
"Sign out": "Изход",
"Sign up": "Регистрация",
"Signup error: Invalid link": "Грешка при регистрация: Невалиден линк",
"Signup error: Invalid link.<br /><a>Click here to retry</a>": "Грешка при регистрация: Невалиден линк <br /><a>Щракнете за нов опит</a>",
"Signups from this email domain are currently restricted.": "Регистрациите от този домейн в момента са ограничени.",
"Something went wrong, please try again later.": "Нещо се обърка, опитайте отново.",
"Sorry, no recommendations are available right now.": "За жалост, в момента няма налични препоръки.",
Expand Down Expand Up @@ -242,7 +241,7 @@
"You're not receiving emails": "Не получавате имейли",
"You're not receiving emails because you either marked a recent message as spam, or because messages could not be delivered to your provided email address.": "Не получавате имейли, защото или наскоро сте маркирали някое съобщение като спам, или писмата не могат да бъдат доставени до вашия имейл адрес.",
"You've successfully signed in.": "Влязохте успешно.",
"You've successfully subscribed to": "Успешно се абонирахте за",
"You've successfully subscribed to <br /><strong>{siteTitle}</strong>": "Успешно се абонирахте за <br /><strong>{siteTitle}</strong>",
"Your account": "Вашият профил",
"Your email has failed to resubscribe, please try again": "Неуспешно подновяване на абонамент с този имейл, опитайте отново",
"your inbox": "вашия имейл",
Expand Down
7 changes: 3 additions & 4 deletions ghost/i18n/locales/bn/portal.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"Choose a different plan": "একটি ভিন্ন পরিকল্পনা বেছে নিন",
"Choose a plan": "",
"Choose your newsletters": "আপনার নিউজলেটার বেছে নিন",
"Click here to retry": "আবার চেষ্টা করতে এখানে ক্লিক করুন",
"Close": "বন্ধ করুন",
"Code": "",
"Comment preferences updated.": "",
Expand All @@ -56,7 +55,7 @@
"Continue subscription": "সাবস্ক্রিপশন চালিয়ে যান",
"Could not create Stripe billing portal session": "",
"Could not create Stripe checkout session": "",
"Could not sign in. Login link expired.": "সাইন ইন করতে পারেনি। লগইন লিঙ্কের মেয়াদ শেষ হয়েছে।",
"Could not sign in. Login link expired. <br /><a>Click here to retry</a>": "সাইন ইন করতে পারেনি। লগইন লিঙ্কের মেয়াদ শেষ হয়েছে। <br /><a>আবার চেষ্টা করতে এখানে ক্লিক করুন</a>",
"Could not update email! Invalid link.": "ইমেল আপডেট করতে পারেনি! অবৈধ লিঙ্ক।",
"Create a new contact": "একটি নতুন যোগাযোগ তৈরি করুন",
"Current plan": "বর্তমান পরিকল্পনা",
Expand Down Expand Up @@ -172,7 +171,7 @@
"Sign in": "সাইন ইন করুন",
"Sign out": "সাইন আউট করুন",
"Sign up": "সাইন আপ করুন",
"Signup error: Invalid link": "সাইন আপ ত্রুটি: অবৈধ লিঙ্ক",
"Signup error: Invalid link.<br /><a>Click here to retry</a>": "সাইন আপ ত্রুটি: অবৈধ লিঙ্ক <br /><a>আবার চেষ্টা করতে এখানে ক্লিক করুন</a>",
"Signups from this email domain are currently restricted.": "",
"Something went wrong, please try again later.": "",
"Sorry, no recommendations are available right now.": "",
Expand Down Expand Up @@ -242,7 +241,7 @@
"You're not receiving emails": "আপনি ইমেল পাচ্ছেন না",
"You're not receiving emails because you either marked a recent message as spam, or because messages could not be delivered to your provided email address.": "আপনি ইমেল পাচ্ছেন না কারণ আপনি হয়তো একটি সাম্প্রতিক বার্তা স্প্যাম হিসেবে চিহ্নিত করেছেন, অথবা বার্তাগুলি আপনার প্রদত্ত ইমেল ঠিকানায় বিতরণ করা যায়নি।",
"You've successfully signed in.": "আপনি সফলভাবে সাইন ইন করেছেন।",
"You've successfully subscribed to": "আপনি সফলভাবে সাবস্ক্রাইব করেছেন",
"You've successfully subscribed to <br /><strong>{siteTitle}</strong>": "আপনি সফলভাবে সাবস্ক্রাইব করেছেন <br /><strong>{siteTitle}</strong>",
"Your account": "আপনার অ্যাকাউন্ট",
"Your email has failed to resubscribe, please try again": "",
"your inbox": "",
Expand Down
7 changes: 3 additions & 4 deletions ghost/i18n/locales/bs/portal.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"Choose a different plan": "Odaberi drugi plan",
"Choose a plan": "",
"Choose your newsletters": "Odaberi svoje newslettere",
"Click here to retry": "Pokušaj ponovo",
"Close": "Zatvori",
"Code": "",
"Comment preferences updated.": "",
Expand All @@ -56,7 +55,7 @@
"Continue subscription": "Produži pretplatu",
"Could not create Stripe billing portal session": "",
"Could not create Stripe checkout session": "",
"Could not sign in. Login link expired.": "Nije se moguće prijaviti. Link za prijavu je istekao.",
"Could not sign in. Login link expired. <br /><a>Click here to retry</a>": "Nije se moguće prijaviti. Link za prijavu je istekao. <br /><a>Pokušaj ponovo</a>",
"Could not update email! Invalid link.": "Nije moguće promijeniti Email! Pogrešan link.",
"Create a new contact": "Dodaj novi kontakt",
"Current plan": "Trenutni plan",
Expand Down Expand Up @@ -172,7 +171,7 @@
"Sign in": "Prijavi se",
"Sign out": "Odjavi se",
"Sign up": "Registracija",
"Signup error: Invalid link": "Greška pri prijavi: Neispravan link",
"Signup error: Invalid link.<br /><a>Click here to retry</a>": "Greška pri prijavi: Neispravan link <br /><a>Pokušaj ponovo</a>",
"Signups from this email domain are currently restricted.": "",
"Something went wrong, please try again later.": "",
"Sorry, no recommendations are available right now.": "",
Expand Down Expand Up @@ -242,7 +241,7 @@
"You're not receiving emails": "Ne primam Email poruke",
"You're not receiving emails because you either marked a recent message as spam, or because messages could not be delivered to your provided email address.": "Ne primaš Email poruke jer je posljednja poruka označena kao spam ili zato što poruke nisu mogle biti dostavljene na tvoj inbox iz bilo kojeg drugog razloga.",
"You've successfully signed in.": "Uspješna prijava.",
"You've successfully subscribed to": "Uspješna pretplata na",
"You've successfully subscribed to <br /><strong>{siteTitle}</strong>": "Uspješna pretplata na <br /><strong>{siteTitle}</strong>",
"Your account": "Tvoj račun",
"Your email has failed to resubscribe, please try again": "",
"your inbox": "",
Expand Down
Loading
Loading