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

Fixes for Dawn Onboarding toast messages #660

Merged
merged 12 commits into from Jan 21, 2021

Make toast message i18n-friendly

  • Loading branch information
leuryr committed Jan 20, 2021
commit b4018495d626d52aedf58f2222a4e0c182ec256f
@@ -1959,8 +1959,11 @@
"ghostery_browser_hub_onboarding_other": {
"message": "Other"
},
"ghostery_browser_hub_onboarding_toast_error": {
"message": "Please answer all questions"
"ghostery_browser_hub_onboarding_toast_success": {
"message": "Success: "
},
"ghostery_browser_hub_onboarding_toast_alert": {
"message": "Error: "
},
"enable_when_paused": {
"message": "To use this function, Resume Ghostery."
@@ -27,12 +27,7 @@ const ToastMessage = ({
const dawnHubClass = dawnHub ? 'dawn-hub' : '';
const dawnLayout = dawnHub ? 'align-justify align-middle' : 'align-center-middle';

let dawnToastText = '';
if (dawnHub && toastClass === 'alert') {
dawnToastText = 'Error: ';
} else if (dawnHub && toastClass === 'success') {
dawnToastText = 'Success: ';
}
const dawnToastText = dawnHub ? t(`ghostery_browser_hub_onboarding_toast_${toastClass}`) : '';

return (
<div className={`ToastMessage full-width ${dawnHubClass}`}>
ProTip! Use n and p to navigate between commits in a pull request.