-
-
Notifications
You must be signed in to change notification settings - Fork 681
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
feat: add features list translations #2074
Conversation
Signed-off-by: Ansh Goyal <[email protected]>
✅ Deploy Preview for asyncapi-website ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
//cc @magicmatatjahu 🚀 |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-2074--asyncapi-website.netlify.app/ |
@@ -1,50 +1,56 @@ | |||
export const features = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need that file when we have this content inside locales
? Except that question, everything is good :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Actually we are using the ids of those features to create unique translation keys to fetch those from the locales. It would also act like a first source of truth, and cypress testing, since parsing from the json would not be convenient in cypress tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like here for example
{t(`features.${feature.id}.name`)}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So maybe put another texts as values to keys, not whole content, ok?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't get that. Please clarify. Do you mean creating another array of keys inside the file itself rather than importing features.js and using it for keys?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see what you did :) Only remove not needed keys from /features
map, like description
etc, only leave id, label, href etc, what you exactly used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done with the changes 🚀
Signed-off-by: Ansh Goyal <[email protected]>
/rtm |
Description
This PR adds the translations for the homepage's features section.
Related issue(s)
part of #2039