0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00
ghost/apps/portal/src/utils
Cathy Sarisky 1196688b0e
🌐 Improved i18n support for Portal error messages (#21190)
no ref

Expose (some) Portal error strings for translations

💩This is a somewhat hacky (but test-passing and individual inspection
passing) solution to the way Portal handles errors. Or rather, the
half-dozen ways Portal handles errors.

Passing 't' around with context and state, and occasionally recreating
it from the site object. Yes, I am also somewhat horrified, but a better
implementation will need a major rewrite of Portal.

Addresses errors in both the popover React app and in the
data-attributes.

There are probably more. Since Portal exposes raw API responses in some
places, it's hard to enumerate everything that /might/ end up being
client-facing, but at least I've gotten the ones that I've commonly
seen.

Improvements very welcome.
2024-10-03 13:35:23 +00:00
..
api.js Reverted "🌐 Updated Portal error handling to be i18n-friendly (#21176)" (#21184) 2024-10-02 12:06:09 +00:00
check-mode.js
contrast-color.js
copy-to-clipboard.js
date-time.js
discount.js
errors.js 🌐 Improved i18n support for Portal error messages (#21190) 2024-10-03 13:35:23 +00:00
fixtures-generator.js 🔒 Added uuid verification to member endpoints not requiring a session 2024-08-20 16:24:02 +02:00
fixtures.js 🔒 Added uuid verification to member endpoints not requiring a session 2024-08-20 16:24:02 +02:00
form.js Added missing translation entries for Portal field placeholders, labels, and errors (#20858) 2024-08-28 15:43:03 +00:00
helpers.js 🐛 Fixed newsletter button not hidden in Portal (#20732) 2024-08-12 06:00:25 +00:00
helpers.test.js
links.js
notifications.js
test-fixtures.js Fix free tier benefit not showing up (#19879) 2024-03-19 09:51:59 +01:00
test-utils.js
transform-portal-anchor-to-relative.js 🎨 Convert portal links to relative to avoid homepage flash on click (#20896) 2024-09-02 11:23:12 +00:00
validator.js