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

🌐 Portal translations - make additional errors translatable. #21190

Merged
merged 12 commits into from
Oct 3, 2024

Conversation

cathysarisky
Copy link
Contributor

@cathysarisky cathysarisky commented Oct 2, 2024

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.

@cathysarisky cathysarisky changed the title 🌐 Portal translations - chasing errors. 🌐 Portal translations - make additional errors translatable. Oct 2, 2024
Copy link
Contributor

@9larsons 9larsons left a comment

Choose a reason for hiding this comment

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

I think you know what's coming 🙂. Could we get unit tests over the new content in errors.js?

apps/portal/src/utils/errors.js Show resolved Hide resolved
apps/portal/src/utils/errors.js Outdated Show resolved Hide resolved
apps/portal/src/utils/errors.js Outdated Show resolved Hide resolved
@9larsons
Copy link
Contributor

9larsons commented Oct 3, 2024

Looks great, thanks! I'd like to revisit some time why we need to load the special messages. We don't need to worry about that here.

@9larsons 9larsons enabled auto-merge (squash) October 3, 2024 13:31
@9larsons 9larsons merged commit 1196688 into TryGhost:main Oct 3, 2024
21 checks passed
Lekler added a commit to Lekler/Ghost that referenced this pull request Oct 7, 2024
Following commit TryGhost#21190, the following updates were made:


- Filled missing translations and made style corrections to existing translations to improve clarity and consistency. 


Total new translations added: 29 entries filled.
Existing translations improved: 7 entries updated for better consistency and clarity.
sagzy pushed a commit that referenced this pull request Oct 7, 2024
no issue

- Following commit #21190, the following updates were made:
    - **Filled missing translations and made style corrections to existing
translations to improve clarity and consistency.**
    - Total new translations added: 29 entries filled.
    - Existing translations improved: 7 entries updated for better
consistency and clarity.
sagzy pushed a commit that referenced this pull request Oct 7, 2024
no issue

- improved Vietnamese translations
- improved i18n support for Portal error messages
(cf. #21190)
@cathysarisky cathysarisky deleted the portal-translations-pass-the-t branch November 10, 2024 15:42
tilak999 pushed a commit to tilak999/ghost that referenced this pull request Nov 20, 2024
no issue

- Following commit TryGhost#21190, the following updates were made:
    - **Filled missing translations and made style corrections to existing
translations to improve clarity and consistency.**
    - Total new translations added: 29 entries filled.
    - Existing translations improved: 7 entries updated for better
consistency and clarity.
tilak999 pushed a commit to tilak999/ghost that referenced this pull request Nov 20, 2024
no issue

- improved Vietnamese translations
- improved i18n support for Portal error messages
(cf. TryGhost#21190)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants