-
Notifications
You must be signed in to change notification settings - Fork 1
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 translations #52
base: main
Are you sure you want to change the base?
Conversation
|
✅ Deploy Preview for prismatic-souffle-43beb6 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
how much work would it be to have
/website/expression/applications/en.webc
/website/expression/applications/es.webc
instead of
/website/en/expression/applications.webc
/website/es/expression/applications.webc
we can compute the permalink
data key, remember.
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.
The file structure in this PR is the prefered 11ty way of doing this
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.
is there too much content structure in this template? wouldn't it be better to leave the main
to pages to fill in, rather than sprinkling in keyed "slots" (not slot elements) for frontmatter content?
We should keep the number of keyed content-as-data areas to a minimum - 2 or 3 max. This way, design and layout changes would happen in content files, not in layouts
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 think we could definitely look at where main
is output in the layouts.
That said, I wouldn't classify the template you are linking against as a layout per say.
This way, design and layout changes would happen in content files, not in layouts
Right now the keyed content mimics the "block" sections of the page. If you are suggesting we create layouts (what i would call a partial) for things like grid-4-cards
for reducing duplication then yeah I think we could look at where those patterns are repeated and slim those down.
I think we could also look at using the translation data to drive template decisions too such as the grid-4-cards
example by using yml arrays to loop through. I need to first answer the question if we want to conflate translations with urls to images etc.
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 need to first answer the question if we want to conflate translations with urls to images etc.
One benefit of doing so would be the ability to output a different image for different languages if desired.
Fixed by swapping the order of the redirects |
What I did
netlify.toml
to redirect if no language is specified to english defaultrhb-nav-secondary
static code and improved translation accessTODO
Testing Instructions
Notes for Reviewers
Only the homepage data has been translated (so far). Most of the copy for the Spanish translation I pulled over from the current sites translation.
What happens when the translated page isn't the same as the English page?
English:
https://www.redhat.com/en/about/brand/standards?brand-expression=funcional
Spanish:
https://www.redhat.com/es/about/brand/standards?brand-expression=funcional
The number of cards is different for English and Spanish for the What's new section. Do we want to do data driven templates?
What should be translated and what isn't? It doesn't seem like images have alt tags translated. Should they? What about page titles, some are, some aren't (homepage as example).