@@ -1,11 +1,22 @@ | |||||
import { injectIntl } from 'react-intl'; | |||||
import { connect } from 'react-redux'; | import { connect } from 'react-redux'; | ||||
import { NotificationStack } from 'react-notification'; | import { NotificationStack } from 'react-notification'; | ||||
import { dismissAlert } from '../../../actions/alerts'; | import { dismissAlert } from '../../../actions/alerts'; | ||||
import { getAlerts } from '../../../selectors'; | import { getAlerts } from '../../../selectors'; | ||||
const mapStateToProps = state => ({ | |||||
notifications: getAlerts(state), | |||||
}); | |||||
const mapStateToProps = (state, { intl }) => { | |||||
const notifications = getAlerts(state); | |||||
notifications.forEach(notification => ['title', 'message'].forEach(key => { | |||||
const value = notification[key]; | |||||
if (typeof value === 'object') { | |||||
notification[key] = intl.formatMessage(value); | |||||
} | |||||
})); | |||||
return { notifications }; | |||||
}; | |||||
const mapDispatchToProps = (dispatch) => { | const mapDispatchToProps = (dispatch) => { | ||||
return { | return { | ||||
@@ -15,4 +26,4 @@ const mapDispatchToProps = (dispatch) => { | |||||
}; | }; | ||||
}; | }; | ||||
export default connect(mapStateToProps, mapDispatchToProps)(NotificationStack); | |||||
export default injectIntl(connect(mapStateToProps, mapDispatchToProps)(NotificationStack)); |
@@ -28,6 +28,8 @@ | |||||
"account.unmute": "إلغاء الكتم عن @{name}", | "account.unmute": "إلغاء الكتم عن @{name}", | ||||
"account.unmute_notifications": "إلغاء كتم إخطارات @{name}", | "account.unmute_notifications": "إلغاء كتم إخطارات @{name}", | ||||
"account.view_full_profile": "عرض الملف الشخصي كاملا", | "account.view_full_profile": "عرض الملف الشخصي كاملا", | ||||
"alert.unexpected.message": "An unexpected error occurred.", | |||||
"alert.unexpected.title": "Oops!", | |||||
"boost_modal.combo": "يمكنك ضغط {combo} لتخطّي هذه في المرّة القادمة", | "boost_modal.combo": "يمكنك ضغط {combo} لتخطّي هذه في المرّة القادمة", | ||||
"bundle_column_error.body": "لقد وقع هناك خطأ أثناء عملية تحميل هذا العنصر.", | "bundle_column_error.body": "لقد وقع هناك خطأ أثناء عملية تحميل هذا العنصر.", | ||||
"bundle_column_error.retry": "إعادة المحاولة", | "bundle_column_error.retry": "إعادة المحاولة", | ||||
@@ -28,6 +28,8 @@ | |||||
"account.unmute": "Unmute @{name}", | "account.unmute": "Unmute @{name}", | ||||
"account.unmute_notifications": "Unmute notifications from @{name}", | "account.unmute_notifications": "Unmute notifications from @{name}", | ||||
"account.view_full_profile": "View full profile", | "account.view_full_profile": "View full profile", | ||||
"alert.unexpected.message": "An unexpected error occurred.", | |||||
"alert.unexpected.title": "Oops!", | |||||
"boost_modal.combo": "You can press {combo} to skip this next time", | "boost_modal.combo": "You can press {combo} to skip this next time", | ||||
"bundle_column_error.body": "Something went wrong while loading this component.", | "bundle_column_error.body": "Something went wrong while loading this component.", | ||||
"bundle_column_error.retry": "Try again", | "bundle_column_error.retry": "Try again", | ||||
@@ -28,6 +28,8 @@ | |||||
"account.unmute": "Treure silenci de @{name}", | "account.unmute": "Treure silenci de @{name}", | ||||
"account.unmute_notifications": "Activar notificacions de @{name}", | "account.unmute_notifications": "Activar notificacions de @{name}", | ||||
"account.view_full_profile": "Mostra el perfil complet", | "account.view_full_profile": "Mostra el perfil complet", | ||||
"alert.unexpected.message": "An unexpected error occurred.", | |||||
"alert.unexpected.title": "Oops!", | |||||
"boost_modal.combo": "Pots premer {combo} per saltar-te això el proper cop", | "boost_modal.combo": "Pots premer {combo} per saltar-te això el proper cop", | ||||
"bundle_column_error.body": "S'ha produït un error en carregar aquest component.", | "bundle_column_error.body": "S'ha produït un error en carregar aquest component.", | ||||
"bundle_column_error.retry": "Torna-ho a provar", | "bundle_column_error.retry": "Torna-ho a provar", | ||||
@@ -28,6 +28,8 @@ | |||||
"account.unmute": "@{name} nicht mehr stummschalten", | "account.unmute": "@{name} nicht mehr stummschalten", | ||||
"account.unmute_notifications": "Benachrichtigungen von @{name} einschalten", | "account.unmute_notifications": "Benachrichtigungen von @{name} einschalten", | ||||
"account.view_full_profile": "Vollständiges Profil anzeigen", | "account.view_full_profile": "Vollständiges Profil anzeigen", | ||||
"alert.unexpected.message": "An unexpected error occurred.", | |||||
"alert.unexpected.title": "Oops!", | |||||
"boost_modal.combo": "Du kannst {combo} drücken, um dies beim nächsten Mal zu überspringen", | "boost_modal.combo": "Du kannst {combo} drücken, um dies beim nächsten Mal zu überspringen", | ||||
"bundle_column_error.body": "Etwas ist beim Laden schiefgelaufen.", | "bundle_column_error.body": "Etwas ist beim Laden schiefgelaufen.", | ||||
"bundle_column_error.retry": "Erneut versuchen", | "bundle_column_error.retry": "Erneut versuchen", | ||||
@@ -1734,5 +1734,18 @@ | |||||
} | } | ||||
], | ], | ||||
"path": "app/javascript/mastodon/features/video/index.json" | "path": "app/javascript/mastodon/features/video/index.json" | ||||
}, | |||||
{ | |||||
"descriptors": [ | |||||
{ | |||||
"defaultMessage": "Oops!", | |||||
"id": "alert.unexpected.title" | |||||
}, | |||||
{ | |||||
"defaultMessage": "An unexpected error occurred.", | |||||
"id": "alert.unexpected.message" | |||||
} | |||||
], | |||||
"path": "app/javascript/mastodon/middleware/errors.json" | |||||
} | } | ||||
] | ] |
@@ -28,6 +28,8 @@ | |||||
"account.unmute": "Unmute @{name}", | "account.unmute": "Unmute @{name}", | ||||
"account.unmute_notifications": "Unmute notifications from @{name}", | "account.unmute_notifications": "Unmute notifications from @{name}", | ||||
"account.view_full_profile": "View full profile", | "account.view_full_profile": "View full profile", | ||||
"alert.unexpected.message": "An unexpected error occurred.", | |||||
"alert.unexpected.title": "Oops!", | |||||
"boost_modal.combo": "You can press {combo} to skip this next time", | "boost_modal.combo": "You can press {combo} to skip this next time", | ||||
"bundle_column_error.body": "Something went wrong while loading this component.", | "bundle_column_error.body": "Something went wrong while loading this component.", | ||||
"bundle_column_error.retry": "Try again", | "bundle_column_error.retry": "Try again", | ||||
@@ -28,6 +28,8 @@ | |||||
"account.unmute": "Malsilentigi @{name}", | "account.unmute": "Malsilentigi @{name}", | ||||
"account.unmute_notifications": "Malsilentigi sciigojn de @{name}", | "account.unmute_notifications": "Malsilentigi sciigojn de @{name}", | ||||
"account.view_full_profile": "Vidi plenan profilon", | "account.view_full_profile": "Vidi plenan profilon", | ||||
"alert.unexpected.message": "An unexpected error occurred.", | |||||
"alert.unexpected.title": "Oops!", | |||||
"boost_modal.combo": "Vi povas premi {combo} por preterpasi sekvafoje", | "boost_modal.combo": "Vi povas premi {combo} por preterpasi sekvafoje", | ||||
"bundle_column_error.body": "Io misfunkciis en la ŝargado de ĉi tiu elemento.", | "bundle_column_error.body": "Io misfunkciis en la ŝargado de ĉi tiu elemento.", | ||||
"bundle_column_error.retry": "Bonvolu reprovi", | "bundle_column_error.retry": "Bonvolu reprovi", | ||||
@@ -28,6 +28,8 @@ | |||||
"account.unmute": "Dejar de silenciar a @{name}", | "account.unmute": "Dejar de silenciar a @{name}", | ||||
"account.unmute_notifications": "Dejar de silenciar las notificaciones de @{name}", | "account.unmute_notifications": "Dejar de silenciar las notificaciones de @{name}", | ||||
"account.view_full_profile": "Ver perfil completo", | "account.view_full_profile": "Ver perfil completo", | ||||
"alert.unexpected.message": "An unexpected error occurred.", | |||||
"alert.unexpected.title": "Oops!", | |||||
"boost_modal.combo": "Puedes presionar {combo} para saltear este aviso la próxima vez", | "boost_modal.combo": "Puedes presionar {combo} para saltear este aviso la próxima vez", | ||||
"bundle_column_error.body": "Algo salió mal al cargar este componente.", | "bundle_column_error.body": "Algo salió mal al cargar este componente.", | ||||
"bundle_column_error.retry": "Inténtalo de nuevo", | "bundle_column_error.retry": "Inténtalo de nuevo", | ||||
@@ -28,6 +28,8 @@ | |||||
"account.unmute": "باصدا کردن @{name}", | "account.unmute": "باصدا کردن @{name}", | ||||
"account.unmute_notifications": "باصداکردن اعلانها از طرف @{name}", | "account.unmute_notifications": "باصداکردن اعلانها از طرف @{name}", | ||||
"account.view_full_profile": "نمایش نمایهٔ کامل", | "account.view_full_profile": "نمایش نمایهٔ کامل", | ||||
"alert.unexpected.message": "An unexpected error occurred.", | |||||
"alert.unexpected.title": "Oops!", | |||||
"boost_modal.combo": "دکمهٔ {combo} را بزنید تا دیگر این را نبینید", | "boost_modal.combo": "دکمهٔ {combo} را بزنید تا دیگر این را نبینید", | ||||
"bundle_column_error.body": "هنگام بازکردن این بخش خطایی رخ داد.", | "bundle_column_error.body": "هنگام بازکردن این بخش خطایی رخ داد.", | ||||
"bundle_column_error.retry": "تلاش دوباره", | "bundle_column_error.retry": "تلاش دوباره", | ||||
@@ -28,6 +28,8 @@ | |||||
"account.unmute": "Poista mykistys käyttäjältä @{name}", | "account.unmute": "Poista mykistys käyttäjältä @{name}", | ||||
"account.unmute_notifications": "Poista mykistys käyttäjän @{name} ilmoituksilta", | "account.unmute_notifications": "Poista mykistys käyttäjän @{name} ilmoituksilta", | ||||
"account.view_full_profile": "Näytä koko profiili", | "account.view_full_profile": "Näytä koko profiili", | ||||
"alert.unexpected.message": "An unexpected error occurred.", | |||||
"alert.unexpected.title": "Oops!", | |||||
"boost_modal.combo": "Voit painaa näppäimiä {combo} ohittaaksesi tämän ensi kerralla", | "boost_modal.combo": "Voit painaa näppäimiä {combo} ohittaaksesi tämän ensi kerralla", | ||||
"bundle_column_error.body": "Jokin meni vikaan tätä komponenttia ladatessa.", | "bundle_column_error.body": "Jokin meni vikaan tätä komponenttia ladatessa.", | ||||
"bundle_column_error.retry": "Yritä uudestaan", | "bundle_column_error.retry": "Yritä uudestaan", | ||||
@@ -28,6 +28,8 @@ | |||||
"account.unmute": "Ne plus masquer", | "account.unmute": "Ne plus masquer", | ||||
"account.unmute_notifications": "Réactiver les notifications de @{name}", | "account.unmute_notifications": "Réactiver les notifications de @{name}", | ||||
"account.view_full_profile": "Afficher le profil complet", | "account.view_full_profile": "Afficher le profil complet", | ||||
"alert.unexpected.message": "An unexpected error occurred.", | |||||
"alert.unexpected.title": "Oops!", | |||||
"boost_modal.combo": "Vous pouvez appuyer sur {combo} pour pouvoir passer ceci, la prochaine fois", | "boost_modal.combo": "Vous pouvez appuyer sur {combo} pour pouvoir passer ceci, la prochaine fois", | ||||
"bundle_column_error.body": "Une erreur s’est produite lors du chargement de ce composant.", | "bundle_column_error.body": "Une erreur s’est produite lors du chargement de ce composant.", | ||||
"bundle_column_error.retry": "Réessayer", | "bundle_column_error.retry": "Réessayer", | ||||
@@ -28,6 +28,8 @@ | |||||
"account.unmute": "Non acalar @{name}", | "account.unmute": "Non acalar @{name}", | ||||
"account.unmute_notifications": "Desbloquear as notificacións de @{name}", | "account.unmute_notifications": "Desbloquear as notificacións de @{name}", | ||||
"account.view_full_profile": "Ver o perfil completo", | "account.view_full_profile": "Ver o perfil completo", | ||||
"alert.unexpected.message": "An unexpected error occurred.", | |||||
"alert.unexpected.title": "Oops!", | |||||
"boost_modal.combo": "Pulse {combo} para saltar esto a próxima vez", | "boost_modal.combo": "Pulse {combo} para saltar esto a próxima vez", | ||||
"bundle_column_error.body": "Houbo un fallo mentras se cargaba este compoñente.", | "bundle_column_error.body": "Houbo un fallo mentras se cargaba este compoñente.", | ||||
"bundle_column_error.retry": "Inténteo de novo", | "bundle_column_error.retry": "Inténteo de novo", | ||||
@@ -28,6 +28,8 @@ | |||||
"account.unmute": "הפסקת השתקת @{name}", | "account.unmute": "הפסקת השתקת @{name}", | ||||
"account.unmute_notifications": "להפסיק הסתרת הודעות מעם @{name}", | "account.unmute_notifications": "להפסיק הסתרת הודעות מעם @{name}", | ||||
"account.view_full_profile": "הראה אודות מלאות", | "account.view_full_profile": "הראה אודות מלאות", | ||||
"alert.unexpected.message": "An unexpected error occurred.", | |||||
"alert.unexpected.title": "Oops!", | |||||
"boost_modal.combo": "ניתן להקיש {combo} כדי לדלג בפעם הבאה", | "boost_modal.combo": "ניתן להקיש {combo} כדי לדלג בפעם הבאה", | ||||
"bundle_column_error.body": "משהו השתבש בעת הצגת הרכיב הזה.", | "bundle_column_error.body": "משהו השתבש בעת הצגת הרכיב הזה.", | ||||
"bundle_column_error.retry": "לנסות שוב", | "bundle_column_error.retry": "לנסות שוב", | ||||
@@ -28,6 +28,8 @@ | |||||
"account.unmute": "Poništi utišavanje @{name}", | "account.unmute": "Poništi utišavanje @{name}", | ||||
"account.unmute_notifications": "Unmute notifications from @{name}", | "account.unmute_notifications": "Unmute notifications from @{name}", | ||||
"account.view_full_profile": "View full profile", | "account.view_full_profile": "View full profile", | ||||
"alert.unexpected.message": "An unexpected error occurred.", | |||||
"alert.unexpected.title": "Oops!", | |||||
"boost_modal.combo": "Možeš pritisnuti {combo} kako bi ovo preskočio sljedeći put", | "boost_modal.combo": "Možeš pritisnuti {combo} kako bi ovo preskočio sljedeći put", | ||||
"bundle_column_error.body": "Something went wrong while loading this component.", | "bundle_column_error.body": "Something went wrong while loading this component.", | ||||
"bundle_column_error.retry": "Try again", | "bundle_column_error.retry": "Try again", | ||||
@@ -28,6 +28,8 @@ | |||||
"account.unmute": "@{name} kinémítása", | "account.unmute": "@{name} kinémítása", | ||||
"account.unmute_notifications": "@{name} értesítéseinek kinémítása", | "account.unmute_notifications": "@{name} értesítéseinek kinémítása", | ||||
"account.view_full_profile": "Teljes profil megtekintése", | "account.view_full_profile": "Teljes profil megtekintése", | ||||
"alert.unexpected.message": "An unexpected error occurred.", | |||||
"alert.unexpected.title": "Oops!", | |||||
"boost_modal.combo": "Megnyomhatod {combo}, hogy átugord következő alkalommal", | "boost_modal.combo": "Megnyomhatod {combo}, hogy átugord következő alkalommal", | ||||
"bundle_column_error.body": "Hiba történt a komponens betöltése közben.", | "bundle_column_error.body": "Hiba történt a komponens betöltése közben.", | ||||
"bundle_column_error.retry": "Próbálja újra", | "bundle_column_error.retry": "Próbálja újra", | ||||
@@ -28,6 +28,8 @@ | |||||
"account.unmute": "Ապալռեցնել @{name}֊ին", | "account.unmute": "Ապալռեցնել @{name}֊ին", | ||||
"account.unmute_notifications": "Միացնել ծանուցումները @{name}֊ից", | "account.unmute_notifications": "Միացնել ծանուցումները @{name}֊ից", | ||||
"account.view_full_profile": "Դիտել ամբողջական տարբերակը։", | "account.view_full_profile": "Դիտել ամբողջական տարբերակը։", | ||||
"alert.unexpected.message": "An unexpected error occurred.", | |||||
"alert.unexpected.title": "Oops!", | |||||
"boost_modal.combo": "Կարող ես սեղմել {combo}՝ սա հաջորդ անգամ բաց թողնելու համար", | "boost_modal.combo": "Կարող ես սեղմել {combo}՝ սա հաջորդ անգամ բաց թողնելու համար", | ||||
"bundle_column_error.body": "Այս բաղադրիչը բեռնելու ընթացքում ինչ֊որ բան խափանվեց։", | "bundle_column_error.body": "Այս բաղադրիչը բեռնելու ընթացքում ինչ֊որ բան խափանվեց։", | ||||
"bundle_column_error.retry": "Կրկին փորձել", | "bundle_column_error.retry": "Կրկին փորձել", | ||||
@@ -28,6 +28,8 @@ | |||||
"account.unmute": "Berhenti membisukan @{name}", | "account.unmute": "Berhenti membisukan @{name}", | ||||
"account.unmute_notifications": "Munculkan notifikasi dari @{name}", | "account.unmute_notifications": "Munculkan notifikasi dari @{name}", | ||||
"account.view_full_profile": "Lihat profil lengkap", | "account.view_full_profile": "Lihat profil lengkap", | ||||
"alert.unexpected.message": "An unexpected error occurred.", | |||||
"alert.unexpected.title": "Oops!", | |||||
"boost_modal.combo": "Anda dapat menekan {combo} untuk melewati ini", | "boost_modal.combo": "Anda dapat menekan {combo} untuk melewati ini", | ||||
"bundle_column_error.body": "Kesalahan terjadi saat memuat komponen ini.", | "bundle_column_error.body": "Kesalahan terjadi saat memuat komponen ini.", | ||||
"bundle_column_error.retry": "Coba lagi", | "bundle_column_error.retry": "Coba lagi", | ||||
@@ -28,6 +28,8 @@ | |||||
"account.unmute": "Ne plus celar @{name}", | "account.unmute": "Ne plus celar @{name}", | ||||
"account.unmute_notifications": "Unmute notifications from @{name}", | "account.unmute_notifications": "Unmute notifications from @{name}", | ||||
"account.view_full_profile": "View full profile", | "account.view_full_profile": "View full profile", | ||||
"alert.unexpected.message": "An unexpected error occurred.", | |||||
"alert.unexpected.title": "Oops!", | |||||
"boost_modal.combo": "Tu povas presar sur {combo} por omisar co en la venonta foyo", | "boost_modal.combo": "Tu povas presar sur {combo} por omisar co en la venonta foyo", | ||||
"bundle_column_error.body": "Something went wrong while loading this component.", | "bundle_column_error.body": "Something went wrong while loading this component.", | ||||
"bundle_column_error.retry": "Try again", | "bundle_column_error.retry": "Try again", | ||||
@@ -28,6 +28,8 @@ | |||||
"account.unmute": "Non silenziare @{name}", | "account.unmute": "Non silenziare @{name}", | ||||
"account.unmute_notifications": "Unmute notifications from @{name}", | "account.unmute_notifications": "Unmute notifications from @{name}", | ||||
"account.view_full_profile": "View full profile", | "account.view_full_profile": "View full profile", | ||||
"alert.unexpected.message": "An unexpected error occurred.", | |||||
"alert.unexpected.title": "Oops!", | |||||
"boost_modal.combo": "Puoi premere {combo} per saltare questo passaggio la prossima volta", | "boost_modal.combo": "Puoi premere {combo} per saltare questo passaggio la prossima volta", | ||||
"bundle_column_error.body": "Something went wrong while loading this component.", | "bundle_column_error.body": "Something went wrong while loading this component.", | ||||
"bundle_column_error.retry": "Try again", | "bundle_column_error.retry": "Try again", | ||||
@@ -28,6 +28,8 @@ | |||||
"account.unmute": "@{name}さんのミュートを解除", | "account.unmute": "@{name}さんのミュートを解除", | ||||
"account.unmute_notifications": "@{name}さんからの通知を受け取る", | "account.unmute_notifications": "@{name}さんからの通知を受け取る", | ||||
"account.view_full_profile": "全ての情報を見る", | "account.view_full_profile": "全ての情報を見る", | ||||
"alert.unexpected.message": "不明なエラーが発生しました", | |||||
"alert.unexpected.title": "エラー", | |||||
"boost_modal.combo": "次からは{combo}を押せばスキップできます", | "boost_modal.combo": "次からは{combo}を押せばスキップできます", | ||||
"bundle_column_error.body": "コンポーネントの読み込み中に問題が発生しました。", | "bundle_column_error.body": "コンポーネントの読み込み中に問題が発生しました。", | ||||
"bundle_column_error.retry": "再試行", | "bundle_column_error.retry": "再試行", | ||||
@@ -28,6 +28,8 @@ | |||||
"account.unmute": "뮤트 해제", | "account.unmute": "뮤트 해제", | ||||
"account.unmute_notifications": "@{name}의 알림 뮤트 해제", | "account.unmute_notifications": "@{name}의 알림 뮤트 해제", | ||||
"account.view_full_profile": "전체 프로필 보기", | "account.view_full_profile": "전체 프로필 보기", | ||||
"alert.unexpected.message": "An unexpected error occurred.", | |||||
"alert.unexpected.title": "Oops!", | |||||
"boost_modal.combo": "다음부터 {combo}를 누르면 이 과정을 건너뛸 수 있습니다.", | "boost_modal.combo": "다음부터 {combo}를 누르면 이 과정을 건너뛸 수 있습니다.", | ||||
"bundle_column_error.body": "컴포넌트를 불러오는 과정에서 문제가 발생했습니다.", | "bundle_column_error.body": "컴포넌트를 불러오는 과정에서 문제가 발생했습니다.", | ||||
"bundle_column_error.retry": "다시 시도", | "bundle_column_error.retry": "다시 시도", | ||||
@@ -28,6 +28,8 @@ | |||||
"account.unmute": "@{name} niet meer negeren", | "account.unmute": "@{name} niet meer negeren", | ||||
"account.unmute_notifications": "@{name} meldingen niet meer negeren", | "account.unmute_notifications": "@{name} meldingen niet meer negeren", | ||||
"account.view_full_profile": "Volledig profiel tonen", | "account.view_full_profile": "Volledig profiel tonen", | ||||
"alert.unexpected.message": "An unexpected error occurred.", | |||||
"alert.unexpected.title": "Oops!", | |||||
"boost_modal.combo": "Je kunt {combo} klikken om dit de volgende keer over te slaan", | "boost_modal.combo": "Je kunt {combo} klikken om dit de volgende keer over te slaan", | ||||
"bundle_column_error.body": "Tijdens het laden van dit onderdeel is er iets fout gegaan.", | "bundle_column_error.body": "Tijdens het laden van dit onderdeel is er iets fout gegaan.", | ||||
"bundle_column_error.retry": "Opnieuw proberen", | "bundle_column_error.retry": "Opnieuw proberen", | ||||
@@ -28,6 +28,8 @@ | |||||
"account.unmute": "Avdemp @{name}", | "account.unmute": "Avdemp @{name}", | ||||
"account.unmute_notifications": "Vis varsler fra @{name}", | "account.unmute_notifications": "Vis varsler fra @{name}", | ||||
"account.view_full_profile": "Vis hele profilen", | "account.view_full_profile": "Vis hele profilen", | ||||
"alert.unexpected.message": "An unexpected error occurred.", | |||||
"alert.unexpected.title": "Oops!", | |||||
"boost_modal.combo": "You kan trykke {combo} for å hoppe over dette neste gang", | "boost_modal.combo": "You kan trykke {combo} for å hoppe over dette neste gang", | ||||
"bundle_column_error.body": "Noe gikk galt mens denne komponenten lastet.", | "bundle_column_error.body": "Noe gikk galt mens denne komponenten lastet.", | ||||
"bundle_column_error.retry": "Prøv igjen", | "bundle_column_error.retry": "Prøv igjen", | ||||
@@ -28,6 +28,8 @@ | |||||
"account.unmute": "Quitar de rescondre @{name}", | "account.unmute": "Quitar de rescondre @{name}", | ||||
"account.unmute_notifications": "Mostrar las notificacions de @{name}", | "account.unmute_notifications": "Mostrar las notificacions de @{name}", | ||||
"account.view_full_profile": "Veire lo perfil complèt", | "account.view_full_profile": "Veire lo perfil complèt", | ||||
"alert.unexpected.message": "An unexpected error occurred.", | |||||
"alert.unexpected.title": "Oops!", | |||||
"boost_modal.combo": "Podètz botar {combo} per passar aquò lo còp que ven", | "boost_modal.combo": "Podètz botar {combo} per passar aquò lo còp que ven", | ||||
"bundle_column_error.body": "Quicòm a fach mèuca pendent lo cargament d’aqueste compausant.", | "bundle_column_error.body": "Quicòm a fach mèuca pendent lo cargament d’aqueste compausant.", | ||||
"bundle_column_error.retry": "Tornar ensajar", | "bundle_column_error.retry": "Tornar ensajar", | ||||
@@ -28,6 +28,8 @@ | |||||
"account.unmute": "Cofnij wyciszenie @{name}", | "account.unmute": "Cofnij wyciszenie @{name}", | ||||
"account.unmute_notifications": "Cofnij wyciszenie powiadomień od @{name}", | "account.unmute_notifications": "Cofnij wyciszenie powiadomień od @{name}", | ||||
"account.view_full_profile": "Wyświetl pełny profil", | "account.view_full_profile": "Wyświetl pełny profil", | ||||
"alert.unexpected.message": "An unexpected error occurred.", | |||||
"alert.unexpected.title": "Oops!", | |||||
"boost_modal.combo": "Naciśnij {combo}, aby pominąć to następnym razem", | "boost_modal.combo": "Naciśnij {combo}, aby pominąć to następnym razem", | ||||
"bundle_column_error.body": "Coś poszło nie tak podczas ładowania tego składnika.", | "bundle_column_error.body": "Coś poszło nie tak podczas ładowania tego składnika.", | ||||
"bundle_column_error.retry": "Spróbuj ponownie", | "bundle_column_error.retry": "Spróbuj ponownie", | ||||
@@ -28,6 +28,8 @@ | |||||
"account.unmute": "Não silenciar @{name}", | "account.unmute": "Não silenciar @{name}", | ||||
"account.unmute_notifications": "Retirar silêncio das notificações vindas de @{name}", | "account.unmute_notifications": "Retirar silêncio das notificações vindas de @{name}", | ||||
"account.view_full_profile": "Ver perfil completo", | "account.view_full_profile": "Ver perfil completo", | ||||
"alert.unexpected.message": "An unexpected error occurred.", | |||||
"alert.unexpected.title": "Oops!", | |||||
"boost_modal.combo": "Você pode pressionar {combo} para ignorar este diálogo na próxima vez", | "boost_modal.combo": "Você pode pressionar {combo} para ignorar este diálogo na próxima vez", | ||||
"bundle_column_error.body": "Algo de errado aconteceu enquanto este componente era carregado.", | "bundle_column_error.body": "Algo de errado aconteceu enquanto este componente era carregado.", | ||||
"bundle_column_error.retry": "Tente novamente", | "bundle_column_error.retry": "Tente novamente", | ||||
@@ -28,6 +28,8 @@ | |||||
"account.unmute": "Não silenciar @{name}", | "account.unmute": "Não silenciar @{name}", | ||||
"account.unmute_notifications": "Deixar de silenciar @{name}", | "account.unmute_notifications": "Deixar de silenciar @{name}", | ||||
"account.view_full_profile": "Ver perfil completo", | "account.view_full_profile": "Ver perfil completo", | ||||
"alert.unexpected.message": "An unexpected error occurred.", | |||||
"alert.unexpected.title": "Oops!", | |||||
"boost_modal.combo": "Pode clicar {combo} para não voltar a ver", | "boost_modal.combo": "Pode clicar {combo} para não voltar a ver", | ||||
"bundle_column_error.body": "Algo de errado aconteceu enquanto este componente era carregado.", | "bundle_column_error.body": "Algo de errado aconteceu enquanto este componente era carregado.", | ||||
"bundle_column_error.retry": "Tente de novo", | "bundle_column_error.retry": "Tente de novo", | ||||
@@ -28,6 +28,8 @@ | |||||
"account.unmute": "Снять глушение", | "account.unmute": "Снять глушение", | ||||
"account.unmute_notifications": "Показывать уведомления от @{name}", | "account.unmute_notifications": "Показывать уведомления от @{name}", | ||||
"account.view_full_profile": "Показать полный профиль", | "account.view_full_profile": "Показать полный профиль", | ||||
"alert.unexpected.message": "An unexpected error occurred.", | |||||
"alert.unexpected.title": "Oops!", | |||||
"boost_modal.combo": "Нажмите {combo}, чтобы пропустить это в следующий раз", | "boost_modal.combo": "Нажмите {combo}, чтобы пропустить это в следующий раз", | ||||
"bundle_column_error.body": "Что-то пошло не так при загрузке этого компонента.", | "bundle_column_error.body": "Что-то пошло не так при загрузке этого компонента.", | ||||
"bundle_column_error.retry": "Попробовать снова", | "bundle_column_error.retry": "Попробовать снова", | ||||
@@ -28,6 +28,8 @@ | |||||
"account.unmute": "Prestať ignorovať @{name}", | "account.unmute": "Prestať ignorovať @{name}", | ||||
"account.unmute_notifications": "Odtĺmiť notifikácie od @{name}", | "account.unmute_notifications": "Odtĺmiť notifikácie od @{name}", | ||||
"account.view_full_profile": "Pozri celý profil", | "account.view_full_profile": "Pozri celý profil", | ||||
"alert.unexpected.message": "An unexpected error occurred.", | |||||
"alert.unexpected.title": "Oops!", | |||||
"boost_modal.combo": "Nabudúce môžete kliknúť {combo} aby ste preskočili", | "boost_modal.combo": "Nabudúce môžete kliknúť {combo} aby ste preskočili", | ||||
"bundle_column_error.body": "Nastala chyba pri načítaní tohto komponentu.", | "bundle_column_error.body": "Nastala chyba pri načítaní tohto komponentu.", | ||||
"bundle_column_error.retry": "Skúste znova", | "bundle_column_error.retry": "Skúste znova", | ||||
@@ -28,6 +28,8 @@ | |||||
"account.unmute": "Ukloni ućutkavanje korisniku @{name}", | "account.unmute": "Ukloni ućutkavanje korisniku @{name}", | ||||
"account.unmute_notifications": "Uključi nazad obaveštenja od korisnika @{name}", | "account.unmute_notifications": "Uključi nazad obaveštenja od korisnika @{name}", | ||||
"account.view_full_profile": "Vidi ceo profil", | "account.view_full_profile": "Vidi ceo profil", | ||||
"alert.unexpected.message": "An unexpected error occurred.", | |||||
"alert.unexpected.title": "Oops!", | |||||
"boost_modal.combo": "Možete pritisnuti {combo} da preskočite ovo sledeći put", | "boost_modal.combo": "Možete pritisnuti {combo} da preskočite ovo sledeći put", | ||||
"bundle_column_error.body": "Nešto je pošlo po zlu prilikom učitavanja ove komponente.", | "bundle_column_error.body": "Nešto je pošlo po zlu prilikom učitavanja ove komponente.", | ||||
"bundle_column_error.retry": "Pokušajte ponovo", | "bundle_column_error.retry": "Pokušajte ponovo", | ||||
@@ -28,6 +28,8 @@ | |||||
"account.unmute": "Уклони ућуткавање кориснику @{name}", | "account.unmute": "Уклони ућуткавање кориснику @{name}", | ||||
"account.unmute_notifications": "Укључи назад обавештења од корисника @{name}", | "account.unmute_notifications": "Укључи назад обавештења од корисника @{name}", | ||||
"account.view_full_profile": "Види цео профил", | "account.view_full_profile": "Види цео профил", | ||||
"alert.unexpected.message": "An unexpected error occurred.", | |||||
"alert.unexpected.title": "Oops!", | |||||
"boost_modal.combo": "Можете притиснути {combo} да прескочите ово следећи пут", | "boost_modal.combo": "Можете притиснути {combo} да прескочите ово следећи пут", | ||||
"bundle_column_error.body": "Нешто је пошло по злу приликом учитавања ове компоненте.", | "bundle_column_error.body": "Нешто је пошло по злу приликом учитавања ове компоненте.", | ||||
"bundle_column_error.retry": "Покушајте поново", | "bundle_column_error.retry": "Покушајте поново", | ||||
@@ -28,6 +28,8 @@ | |||||
"account.unmute": "Ta bort tystad @{name}", | "account.unmute": "Ta bort tystad @{name}", | ||||
"account.unmute_notifications": "Återaktivera notifikationer från @{name}", | "account.unmute_notifications": "Återaktivera notifikationer från @{name}", | ||||
"account.view_full_profile": "Visa hela profilen", | "account.view_full_profile": "Visa hela profilen", | ||||
"alert.unexpected.message": "An unexpected error occurred.", | |||||
"alert.unexpected.title": "Oops!", | |||||
"boost_modal.combo": "Du kan trycka {combo} för att slippa denna nästa gång", | "boost_modal.combo": "Du kan trycka {combo} för att slippa denna nästa gång", | ||||
"bundle_column_error.body": "Något gick fel när du laddade denna komponent.", | "bundle_column_error.body": "Något gick fel när du laddade denna komponent.", | ||||
"bundle_column_error.retry": "Försök igen", | "bundle_column_error.retry": "Försök igen", | ||||
@@ -28,6 +28,8 @@ | |||||
"account.unmute": "Unmute @{name}", | "account.unmute": "Unmute @{name}", | ||||
"account.unmute_notifications": "Unmute notifications from @{name}", | "account.unmute_notifications": "Unmute notifications from @{name}", | ||||
"account.view_full_profile": "View full profile", | "account.view_full_profile": "View full profile", | ||||
"alert.unexpected.message": "An unexpected error occurred.", | |||||
"alert.unexpected.title": "Oops!", | |||||
"boost_modal.combo": "You can press {combo} to skip this next time", | "boost_modal.combo": "You can press {combo} to skip this next time", | ||||
"bundle_column_error.body": "Something went wrong while loading this component.", | "bundle_column_error.body": "Something went wrong while loading this component.", | ||||
"bundle_column_error.retry": "Try again", | "bundle_column_error.retry": "Try again", | ||||
@@ -28,6 +28,8 @@ | |||||
"account.unmute": "Sesi aç @{name}", | "account.unmute": "Sesi aç @{name}", | ||||
"account.unmute_notifications": "Unmute notifications from @{name}", | "account.unmute_notifications": "Unmute notifications from @{name}", | ||||
"account.view_full_profile": "View full profile", | "account.view_full_profile": "View full profile", | ||||
"alert.unexpected.message": "An unexpected error occurred.", | |||||
"alert.unexpected.title": "Oops!", | |||||
"boost_modal.combo": "Bir dahaki sefere {combo} tuşuna basabilirsiniz", | "boost_modal.combo": "Bir dahaki sefere {combo} tuşuna basabilirsiniz", | ||||
"bundle_column_error.body": "Something went wrong while loading this component.", | "bundle_column_error.body": "Something went wrong while loading this component.", | ||||
"bundle_column_error.retry": "Try again", | "bundle_column_error.retry": "Try again", | ||||
@@ -28,6 +28,8 @@ | |||||
"account.unmute": "Зняти глушення", | "account.unmute": "Зняти глушення", | ||||
"account.unmute_notifications": "Unmute notifications from @{name}", | "account.unmute_notifications": "Unmute notifications from @{name}", | ||||
"account.view_full_profile": "View full profile", | "account.view_full_profile": "View full profile", | ||||
"alert.unexpected.message": "An unexpected error occurred.", | |||||
"alert.unexpected.title": "Oops!", | |||||
"boost_modal.combo": "Ви можете натиснути {combo}, щоб пропустити це наступного разу", | "boost_modal.combo": "Ви можете натиснути {combo}, щоб пропустити це наступного разу", | ||||
"bundle_column_error.body": "Something went wrong while loading this component.", | "bundle_column_error.body": "Something went wrong while loading this component.", | ||||
"bundle_column_error.retry": "Try again", | "bundle_column_error.retry": "Try again", | ||||
@@ -28,6 +28,8 @@ | |||||
"account.unmute": "不再隐藏 @{name}", | "account.unmute": "不再隐藏 @{name}", | ||||
"account.unmute_notifications": "不再隐藏来自 @{name} 的通知", | "account.unmute_notifications": "不再隐藏来自 @{name} 的通知", | ||||
"account.view_full_profile": "查看完整资料", | "account.view_full_profile": "查看完整资料", | ||||
"alert.unexpected.message": "An unexpected error occurred.", | |||||
"alert.unexpected.title": "Oops!", | |||||
"boost_modal.combo": "下次按住 {combo} 即可跳过此提示", | "boost_modal.combo": "下次按住 {combo} 即可跳过此提示", | ||||
"bundle_column_error.body": "载入这个组件时发生了错误。", | "bundle_column_error.body": "载入这个组件时发生了错误。", | ||||
"bundle_column_error.retry": "重试", | "bundle_column_error.retry": "重试", | ||||
@@ -28,6 +28,8 @@ | |||||
"account.unmute": "取消 @{name} 的靜音", | "account.unmute": "取消 @{name} 的靜音", | ||||
"account.unmute_notifications": "Unmute notifications from @{name}", | "account.unmute_notifications": "Unmute notifications from @{name}", | ||||
"account.view_full_profile": "查看完整資料", | "account.view_full_profile": "查看完整資料", | ||||
"alert.unexpected.message": "An unexpected error occurred.", | |||||
"alert.unexpected.title": "Oops!", | |||||
"boost_modal.combo": "如你想在下次路過這顯示,請按{combo},", | "boost_modal.combo": "如你想在下次路過這顯示,請按{combo},", | ||||
"bundle_column_error.body": "加載本組件出錯。", | "bundle_column_error.body": "加載本組件出錯。", | ||||
"bundle_column_error.retry": "重試", | "bundle_column_error.retry": "重試", | ||||
@@ -28,6 +28,8 @@ | |||||
"account.unmute": "不再消音 @{name}", | "account.unmute": "不再消音 @{name}", | ||||
"account.unmute_notifications": "Unmute notifications from @{name}", | "account.unmute_notifications": "Unmute notifications from @{name}", | ||||
"account.view_full_profile": "查看完整資訊", | "account.view_full_profile": "查看完整資訊", | ||||
"alert.unexpected.message": "An unexpected error occurred.", | |||||
"alert.unexpected.title": "Oops!", | |||||
"boost_modal.combo": "下次你可以按 {combo} 來跳過", | "boost_modal.combo": "下次你可以按 {combo} 來跳過", | ||||
"bundle_column_error.body": "加載本組件出錯。", | "bundle_column_error.body": "加載本組件出錯。", | ||||
"bundle_column_error.retry": "重試", | "bundle_column_error.retry": "重試", | ||||
@@ -1,7 +1,13 @@ | |||||
import { defineMessages } from 'react-intl'; | |||||
import { showAlert } from '../actions/alerts'; | import { showAlert } from '../actions/alerts'; | ||||
const defaultFailSuffix = 'FAIL'; | const defaultFailSuffix = 'FAIL'; | ||||
const messages = defineMessages({ | |||||
unexpectedTitle: { id: 'alert.unexpected.title', defaultMessage: 'Oops!' }, | |||||
unexpectedMessage: { id: 'alert.unexpected.message', defaultMessage: 'An unexpected error occurred.' }, | |||||
}); | |||||
export default function errorsMiddleware() { | export default function errorsMiddleware() { | ||||
return ({ dispatch }) => next => action => { | return ({ dispatch }) => next => action => { | ||||
if (action.type && !action.skipAlert) { | if (action.type && !action.skipAlert) { | ||||
@@ -21,7 +27,7 @@ export default function errorsMiddleware() { | |||||
dispatch(showAlert(title, message)); | dispatch(showAlert(title, message)); | ||||
} else { | } else { | ||||
console.error(action.error); | console.error(action.error); | ||||
dispatch(showAlert('Oops!', 'An unexpected error occurred.')); | |||||
dispatch(showAlert(messages.unexpectedTitle, messages.unexpectedMessage)); | |||||
} | } | ||||
} | } | ||||
} | } | ||||